Working - Liquididity Weighted Moving AverageI took the Indicator created by AlgoAlpha and essentially just turned it into a strategy. The Buy signal comes when the Fast Length crosses above the Slow Length and the Sell signal when they cross back.
I am looking for feedback from active traders on this strategy. So far, I have found that it is pretty reliable when trading Dogecoin using the 3 Hour interval. It's not reliable at all outside of this time interval. It is hit or miss when changing to other coins.
I am wondering if anyone has an idea of another indicator that will make the strategy more reliable. I am not keen on the Drawdown or Percent Profitable, but when I change the time duration on backtesting, as long as I am using Dogecoin on the 3 hour interval, the strategy appears to work.
インジケーターとストラテジー
c0Library "c0"
strToInt(s)
Parameters:
s (string)
strCount(s, ss)
Parameters:
s (string)
ss (string)
strPart(str, index, delim)
Parameters:
str (string)
index (int)
delim (string)
compareValues(left, op, right)
Parameters:
left (float)
op (string)
right (float)
parseIndex(ind)
Parameters:
ind (string)
parseFn(input, argsSep)
Parameters:
input (string)
argsSep (string)
isCurrentBar(ts)
Parameters:
ts (int)
lastBars(num)
Parameters:
num (int)
isHigherTf(tf)
Parameters:
tf (string)
isNewInterval(tf)
Parameters:
tf (string)
isRealtime()
tfMultiplier(tf)
Parameters:
tf (string)
tfStep(step, tf)
Parameters:
step (int)
tf (string)
relativeTime(dRel, mRel, yRel, ts)
Parameters:
dRel (int)
mRel (int)
yRel (int)
ts (int)
timeToBar(ts, abs)
Parameters:
ts (int)
abs (bool)
plotVline(ts, color, style, y1, y2)
Parameters:
ts (int)
color (color)
style (string)
y1 (int)
y2 (int)
hasVolume()
isBull(offset)
Parameters:
offset (int)
candleAvg(length, offset)
Parameters:
length (int)
offset (int)
ma(src, len, mode)
Parameters:
src (float)
len (simple int)
mode (string)
slope(src, lookback, threshold)
Parameters:
src (float)
lookback (int)
threshold (float)
bullDiv(src1, src2, depth)
Parameters:
src1 (float)
src2 (float)
depth (int)
bearDiv(src1, src2, depth)
Parameters:
src1 (float)
src2 (float)
depth (int)
----------------
Logger
Fields:
labels (map)
tables (map)
tablesMeta (map)
bgColor (series color)
txtColor (series color)
txtSize (series string)
method logBar(this, input, bar, y)
Namespace types: Logger
Parameters:
this (Logger)
input (string)
bar (int)
y (float)
method logTable(this, row, pos, maxRows)
Namespace types: Logger
Parameters:
this (Logger)
row (array)
pos (string)
maxRows (int)
JoGeilo RSI Divergence Indicator with EMA FilterAn RSI indicator that can show divergences and filter them.
EMA filter:
The filter shows the bearish divergences above the EMA as a possible trend reversal and hidden bullish divergences as a trend continuation. The bullish divergences and hidden bearish divergences change to gray. Exactly the opposite happens when the price is below the EMA. This allows you to concentrate on the relevant divergences in the direction of the trend. The length of the EMA can be defined by yourself. The filter can also be reversed.
Explanation:
Regular (normal) divergences: Can be interpreted as an indication of an impending trend change.
Hidden divergences: Are generally seen as trend confirmation and indicate a continuation of the current trend.
I hope the indicator helps you.
[MAD] Weighted Trend Detector--> Purpose
The Weighted Trend Detector evaluates market direction by combining multiple technical indicators (RSI, MACD, Moving Averages, ADX, and Volume) across up to three different timeframes.
It calculates an overall trend score to help visualize whether conditions are bullish, bearish, or neutral.
--> Scaling & Weightings
Each component indicator contributes a score between -1.0 and +1.0. User-defined weights (e.g., 0.2 for RSI, 0.3 for MACD) determine how much each indicator influences the final score. An adaptive scaling mechanism ensures extreme values remain in view by dynamically setting the minimum and maximum of the score range over a specified lookback period.
--> Basic Parameters of Individual Indicators
RSI Period: Number of bars for the Relative Strength Index calculation; higher values smooth out noise but may lag.
MACD Fast/Slow/Signal: EMA-based periods to identify momentum shifts. A shorter “Fast” length reacts quickly, while a longer “Slow” length is smoother.
Moving Averages (Short & Long Lengths): Simple Moving Averages used to gauge shorter- vs. longer-term price direction.
ADX Length: Defines how many bars are considered when measuring trend strength. Higher values produce smoother ADX lines.
Volume MA Length: Period over which the average volume is calculated to compare against current volume.
--> Colors & How They Are Mixed
The background color scales from a negative color (for lower scores) to a positive color (for higher scores).
Near the highest or lowest parts of the score range, additional blending occurs if the slope (change in score) reverses:
Turning Down: Mixes with a user-chosen “warning” color if the score is high but moving lower.
Turning Up: Mixes with a user-chosen “recovery” color if the score is low but moving higher.
All colors (including line and label text) can be adjusted in the script’s inputs to suit personal preferences.colors are customizable via inputs.
Have fun :-)
Market Direction and Next Pivothere is a simpel indicator to know the Market Direction and Next Pivot , i think is a good indicator . thx
ema,atr and with Bollinger Bands (Indicator)1. Indicator Overview
The indicator:
Displays EMA and Bollinger Bands on the chart.
Tracks price behavior during a user-defined trading session.
Generates long/short signals based on crossover conditions of EMA or Bollinger Bands.
Provides alerts for potential entries and exits.
Visualizes tracked open and close prices to help traders interpret market conditions.
2. Key Features
Inputs
session_start and session_end: Define the active trading session using timestamps.
E.g., 17:00:00 (5:00 PM) for session start and 15:40:00 (3:40 PM) for session end.
atr_length: The lookback period for the Average True Range (ATR), used for price movement scaling.
bb_length and bb_mult: Control the Bollinger Bands' calculation, allowing customization of sensitivity.
EMA Calculation
A 21-period EMA is calculated using:
pinescript
Copy code
ema21 = ta.ema(close, 21)
Purpose: Acts as a dynamic support/resistance level. Price crossing above or below the EMA indicates potential trend changes.
Bollinger Bands
Purpose: Measure volatility and identify overbought/oversold conditions.
Formula:
Basis: Simple Moving Average (SMA) of closing prices.
Upper Band: Basis + (Standard Deviation × Multiplier).
Lower Band: Basis - (Standard Deviation × Multiplier).
Code snippet:
pinescript
Copy code
bb_basis = ta.sma(close, bb_length)
bb_dev = bb_mult * ta.stdev(close, bb_length)
bb_upper = bb_basis + bb_dev
bb_lower = bb_basis - bb_dev
Session Tracking
The in_session variable ensures trading signals are only generated within the defined session:
pinescript
Copy code
in_session = time >= session_start and time <= session_end
3. Entry Conditions
EMA Crossover
Long Signal: When the price crosses above the EMA during the session:
pinescript
Copy code
ema_long_entry_condition = ta.crossover(close, ema21) and in_session and barstate.isconfirmed
Short Signal: When the price crosses below the EMA during the session:
pinescript
Copy code
ema_short_entry_condition = ta.crossunder(close, ema21) and in_session and barstate.isconfirmed
Bollinger Bands Crossover
Long Signal: When the price crosses above the upper Bollinger Band:
pinescript
Copy code
bb_long_entry_condition = ta.crossover(close, bb_upper) and in_session and barstate.isconfirmed
Short Signal: When the price crosses below the lower Bollinger Band:
pinescript
Copy code
bb_short_entry_condition = ta.crossunder(close, bb_lower) and in_session and barstate.isconfirmed
4. Tracked Prices
The script keeps track of key open/close prices using the following logic:
If a long signal is detected and the close is above the open, it tracks the open price.
If the close is below the open, it tracks the close price.
Tracked values are scaled using *4 (custom scaling logic).
These tracked prices are plotted for visual feedback:
pinescript
Copy code
plot(tracked_open, color=color.red, title="Tracked Open Price", linewidth=2)
plot(tracked_close, color=color.green, title="Tracked Close Price", linewidth=2)
5. Exit Conditions
Long Exit: When the price drops below the tracked open and close price:
pinescript
Copy code
exit_long_condition = (close < open) and (tracked_close < tracked_open) and barstate.isconfirmed
Short Exit: When the price rises above the tracked open and close price:
pinescript
Copy code
exit_short_condition = (close > open) and (tracked_close > tracked_open) and barstate.isconfirmed
6. Visualization
Plots:
21 EMA, Bollinger Bands (Basis, Upper, Lower).
Tracked open/close prices for additional context.
Background Colors:
Green for long signals, red for short signals (e.g., ema_long_entry_condition triggers a green background).
7. Alerts
The script defines alerts to notify the user about key events:
Entry Alerts:
pinescript
Copy code
alertcondition(ema_long_entry_condition, title="EMA Long Entry", message="EMA Long Entry")
alertcondition(bb_long_entry_condition, title="BB Long Entry", message="BB Long Entry")
Exit Alerts:
pinescript
Copy code
alertcondition(exit_long_condition, title="Exit Long", message="Exit Long")
8. Purpose
Trend Following: EMA crossovers help identify trend changes.
Volatility Breakouts: Bollinger Band crossovers highlight overbought/oversold regions.
Custom Sessions: Trading activity is restricted to specific time periods for precision.
NASDAQ Market Open Breakout StrategyEstablishes a range using the 5 candles before market open (9:30 AM ET)
Enters a long position if price breaks above the pre-market high
Enters a short position if price breaks below the pre-market low
Takes profit at 30 points in either direction
Only trades during regular market hours (9:30 AM - 4:00 PM ET)
Stochastic+RSIThis script combines stochastic rsi and rsi with overbought and oversold bands for RSI to better vizualize potential pivot or reversals points.
It also scans for potential divergences and pivots marked by arrows on RSI and try to predict the next movements (not super accurate on price movement prediction but it is what it is)
AIOS v1This indicator stacks :
- Keltner Channel
- Nadaraya (non repaint)
- Ichimoku (non-repainted version)
- EMAs
I choose to compile them because I didn't see anywhere a script that gathers the valuable data all in one. This script provides a deeper insight of what the market could be doing and this could be valuable to traders.
Particularly, this script is an attempt to provide a more smoother nadaraya version (as the repainted one cause problems) despite the fact I'm not entirely satisfied with the output, so a 2nd version will probably come up later.
It is rather simple and easy to add for the newcomers, so I chose to release it. I wanted it to be being fully configurable and modular.
Alligator IndicatorThe Alligator Indicator is a popular tool created by Bill Williams. It uses three moving averages (referred to as the “Jaw,” “Teeth,” and “Lips”) with different lookback periods and forward offsets. By combining these three lines, the Alligator helps traders visually identify market trends, potential turning points, and periods of consolidation.
Jaw (blue): The longest moving average, shifted the farthest forward.
Teeth (red): A medium-length moving average, shifted moderately forward.
Lips (green): The shortest moving average, shifted the least.
When these lines “open up” and separate, it suggests a strong directional move (the Alligator is “awake and feeding”). When they converge or overlap, it indicates market indecision or consolidation (the Alligator is “sleeping”). Traders often watch for crossovers between these lines to identify potential trend reversals or breakout entries. This indicator can be combined with other tools (like momentum or volume analysis) to help confirm trade signals.
CBA 6MA Cross Volume and Price AnalysisThis script does the following:
1.Defines and plots six moving averages (14, 21, 35, 50, 100, 200).
2.Detects MA "crossovers and crossunders" between any of the moving averages.
3.Calculates up and down volumes based on whether the closing price is above or below the opening price.
4.Compares the current volume, up volume, and down volume with their previous values.
5.Uses the price change to infer buying pressure (when price increases and up volume increases) and selling pressure (when price decreases and down volume increases).
6.Plots an "X" for buy pressure below the bar and an "O" for sell pressure above the bar.
CBA MA Cross Volume and Price AnalysisThis script does the following:
1.Defines and plots six moving averages (14, 21, 35, 50, 100, 200).
2.Detects cross-overs and cross-unders between any of the moving averages.
3.Calculates up and down volumes based on whether the closing price is above or below the opening price.
4.Compares the current volume, up volume, and down volume with their previous values.
5.Uses the price change to infer buying pressure (when price increases and up volume increases) and selling pressure (when price decreases and down volume increases).
6.Plots an "X" for buy pressure below the bar and an "O" for sell pressure above the bar.
CBA MA Cross Volume and Price AnalysisThis script does the following:
1.Defines and plots six moving averages (14, 21, 35, 50, 100, 200).
2.Detects cross-overs and cross-unders between any of the moving averages.
3.Calculates up and down volumes based on whether the closing price is above or below the opening price.
4.Compares the current volume, up volume, and down volume with their previous values.
5.Uses the price change to infer buying pressure (when price increases and up volume increases) and selling pressure (when price decreases and down volume increases).
6.Plots an "X" for buy pressure below the bar and an "O" for sell pressure above the bar.
Optimized ICT Buy and Sell SignalsI understand that you're seeing too many signals, which can make the strategy seem cluttered or overly reactive. To **optimize the strategy** and reduce the frequency of buy and sell signals, we can add a few improvements:
### Optimization Approach:
1. **Increase Lookback Periods**: By increasing the lookback periods for **Market Structure**, **Order Blocks**, and **FVGs**, we can make the strategy less sensitive to every little fluctuation and focus more on stronger trend shifts.
2. **Trend Confirmation with EMA**: Use the **EMA 9** as a trend filter. Only generate signals when the price is above the **EMA 9** for bullish signals and below the **EMA 9** for bearish signals.
3. **Limit Signals to Stronger Price Action**: For example, we can reduce the number of signals by requiring price to be closer to significant **order blocks** or **FVGs**, or only trigger signals when there is a **break of structure** (BoS) and confirmation of a trend reversal.
---
### Optimized Code
```pinescript
//@version=5
indicator("Optimized ICT Buy and Sell Signals", overlay=true)
// --- Input Parameters ---
emaLength = input.int(9, title="EMA Length")
fvgLookback = input.int(10, title="Fair Value Gap Lookback Period")
orderBlockLookback = input.int(30, title="Order Block Lookback Period")
minGapSize = input.float(0.5, title="Min Gap Size (FVG)") // Minimum gap size for FVG detection
// --- EMA 9 (for trend direction) ---
ema9 = ta.ema(close, emaLength)
plot(ema9, title="EMA 9", color=color.blue, linewidth=2)
// --- Market Structure (ICT) ---
// Identify Higher Highs (HH) and Higher Lows (HL) for Bullish Market Structure
hhCondition = high > ta.highest(high, orderBlockLookback) // Higher High
hlCondition = low > ta.lowest(low, orderBlockLookback) // Higher Low
isBullishStructure = hhCondition and hlCondition // Bullish Market Structure condition
// Identify Lower Highs (LH) and Lower Lows (LL) for Bearish Market Structure
lhCondition = high < ta.highest(high, orderBlockLookback) // Lower High
llCondition = low < ta.lowest(low, orderBlockLookback) // Lower Low
isBearishStructure = lhCondition and llCondition // Bearish Market Structure condition
// --- Order Blocks (ICT) ---
// Bullish Order Block (consolidation before upmove)
var float bullishOrderBlock = na
if isBullishStructure
bullishOrderBlock := ta.valuewhen(low == ta.lowest(low, orderBlockLookback), low, 0)
// Bearish Order Block (consolidation before downmove)
var float bearishOrderBlock = na
if isBearishStructure
bearishOrderBlock := ta.valuewhen(high == ta.highest(high, orderBlockLookback), high, 0)
// --- Fair Value Gap (FVG) ---
// Bullish Fair Value Gap (FVG): Gap between a down-close followed by an up-close
fvgBullish = (low < high ) and (high - low > minGapSize) // Bullish FVG condition with gap size filter
// Bearish Fair Value Gap (FVG): Gap between an up-close followed by a down-close
fvgBearish = (high > low ) and (high - low > minGapSize) // Bearish FVG condition with gap size filter
// --- Entry Conditions ---
// Buy Condition: Bullish Market Structure and Price touching a Bullish Order Block or FVG, and above EMA
longCondition = isBullishStructure and (close <= bullishOrderBlock or fvgBullish) and close > ema9
// Sell Condition: Bearish Market Structure and Price touching a Bearish Order Block or FVG, and below EMA
shortCondition = isBearishStructure and (close >= bearishOrderBlock or fvgBearish) and close < ema9
// --- Plot Buy and Sell Signals on the Chart ---
plotshape(series=longCondition, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal", text="BUY", size=size.small)
plotshape(series=shortCondition, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal", text="SELL", size=size.small)
// --- Highlight Order Blocks ---
plot(bullishOrderBlock, color=color.green, linewidth=1, title="Bullish Order Block", style=plot.style_circles)
plot(bearishOrderBlock, color=color.red, linewidth=1, title="Bearish Order Block", style=plot.style_circles)
// --- Highlight Fair Value Gaps (FVG) ---
bgcolor(fvgBullish ? color.new(color.green, 90) : na, title="Bullish FVG", transp=90)
bgcolor(fvgBearish ? color.new(color.red, 90) : na, title="Bearish FVG", transp=90)
// --- Alerts ---
// Alert for Buy Signals
alertcondition(longCondition, title="Long Signal", message="Optimized ICT Buy Signal: Bullish structure, price touching bullish order block or FVG, and above EMA.")
// Alert for Sell Signals
alertcondition(shortCondition, title="Short Signal", message="Optimized ICT Sell Signal: Bearish structure, price touching bearish order block or FVG, and below EMA.")
```
### Key Optimizations:
1. **Increased Lookback Periods**:
- The `orderBlockLookback` has been increased to **30**. This allows for a larger window for identifying **order blocks** and **market structure** changes, reducing sensitivity to small price fluctuations.
- The `fvgLookback` has been increased to **10** to ensure that only larger price gaps are considered.
2. **Min Gap Size for FVG**:
- A new input parameter `minGapSize` has been introduced to **filter out small Fair Value Gaps (FVGs)**. This ensures that only significant gaps trigger buy or sell signals. The default value is **0.5** (you can adjust it as needed).
3. **EMA Filter**:
- Added a trend filter using the **EMA 9**. **Buy signals** are only triggered when the price is **above the EMA 9** (indicating an uptrend), and **sell signals** are only triggered when the price is **below the EMA 9** (indicating a downtrend).
- This helps reduce noise by confirming that signals are aligned with the broader market trend.
### How to Use:
1. **Apply the script** to your chart and observe the reduced number of buy and sell signals.
2. **Buy signals** will appear when:
- The price is in a **bullish market structure**.
- The price is near a **bullish order block** or filling a **bullish FVG**.
- The price is **above the EMA 9** (confirming an uptrend).
3. **Sell signals** will appear when:
- The price is in a **bearish market structure**.
- The price is near a **bearish order block** or filling a **bearish FVG**.
- The price is **below the EMA 9** (confirming a downtrend).
### Further Fine-Tuning:
- **Adjust Lookback Periods**: If you still find the signals too frequent or too few, you can tweak the `orderBlockLookback` or `fvgLookback` values further. Increasing them will give more weight to the larger market structures, reducing noise.
- **Test Different Timeframes**: This optimized version is still suited for lower timeframes like 15-minutes or 5-minutes but will also work on higher timeframes (1-hour, 4-hour, etc.). Test across different timeframes for better results.
- **Min Gap Size**: If you notice that the FVG condition is too restrictive or too lenient, adjust the `minGapSize` parameter.
### Conclusion:
This version of the strategy should give you fewer, more meaningful signals by focusing on larger market movements and confirming the trend direction with the **EMA 9**. If you find that the signals are still too frequent, feel free to further increase the lookback periods or tweak the FVG gap size.
TTM VWAP PublicThe TTM VWAP indicator was developed by the TotheMoon Team with day traders in mind, particularly those focused on the U.S. markets. This indicator is perfectly suited for U.S. trading sessions, as it automatically resets at 4 AM Eastern Standard Time, aligning with the start of each new trading day in the U.S. It provides a fresh perspective at the beginning of each market session, helping traders make informed decisions based on volume-weighted price action.
ICT + RSI + EMA Strategy with Buy/Sell SignalsKey Changes:
Plotchar for Debugging: We use plotchar to visualize whether the long and short conditions are being met. These will print an upward arrow (↑) for buy signals and a downward arrow (↓) for sell signals right on the bars.
Buy condition: If the condition is true, a green arrow (↑) will appear below the bar.
Sell condition: If the condition is true, a red arrow (↓) will appear above the bar.
This allows us to visually confirm whether the conditions are being met and help debug if the signals aren't showing up.
Simplified Entry Conditions: To help identify whether the signals are too strict, the entry conditions are kept the same, but with plotchar, you can now track when they are met. If you still don't see signals, you can simplify the conditions further for testing (e.g., only using the EMA and RSI without ICT components initially).
Debugging: The plotchar will display arrows on the chart where the conditions are true, allowing you to see if the logic for generating the signals is working.
Next Steps:
Check the Debug Arrows: Once you add this script, look for the ↑ (buy) and ↓ (sell) arrows on the chart. If you don't see them, it means the conditions might not be met frequently. You can tweak the logic accordingly.
Look at the Debug Values: If the arrows are too rare, you can adjust the logic by reducing the strictness of the conditions. For example, temporarily remove the FVG or market structure conditions to see if the basic RSI and EMA signals are working.
Adjust the Conditions: If the signals are still not showing, you may need to relax the conditions (e.g., using different RSI thresholds or simpler price actions).
Conclusion:
The key modification here is the use of plotchar to visually debug whether the buy and sell conditions are being met.
If this works, you can remove the plotchar and keep only the plotshape for the final signals.
Let me know if this helps or if you need further clarification!
Suporte e Resistência com Sinais de Compra/Venda//@version=5
indicator("Suporte e Resistência com Sinais de Compra/Venda", shorttitle="S&R com Sinais", overlay=true)
// Parâmetros
resistanceColor = color.red
supportColor = color.green
// Função para calcular os níveis de suporte e resistência
calculateSupportResistance() =>
// Calcule os níveis de suporte e resistência
support = ta.lowest(low, 20)
resistance = ta.highest(high, 20)
= calculateSupportResistance()
// Plotar linhas de suporte e resistência
plot(supportLevel, title="Suporte", color=supportColor, linewidth=2)
plot(resistanceLevel, title="Resistência", color=resistanceColor, linewidth=2)
// Sinal de Compra quando toca no Suporte
plotshape(series=ta.crossover(close, supportLevel) ? 1 : na, title="Sinal de Compra", location=location.belowbar, color=color.green, style=shape.triangleup, text="Compra")
// Sinal de Venda quando toca na Resistência
plotshape(series=ta.crossunder(close, resistanceLevel) ? 1 : na, title="Sinal de Venda", location=location.abovebar, color=color.red, style=shape.triangledown, text="Venda")
DMI Candles ColoredThe DMI Candles Colored indicator colors the candles based on directional momentum derived from the DMI.
- Green : Bullish momentum.
- Red : Bearish momentum.
- Purple : Neutral phase, indicating a slowdown in volatility, which helps identify accumulation and distribution phases.
Combo_EMA, Fibonacci, Support/Resistance, Buy/Sell SignalsAuto Colored Ema
Fibonacci
Support and Resistance
Buy and Sell Signals