OPEN-SOURCE SCRIPT
Güncellendi Same-Direction Candles (Two Symbols)

Same-Direction Candles (Two Symbols)
What it does
Highlights bars on your chart when two symbols print the same candle direction on the chosen timeframe:
Both Bullish → one color
Both Bearish → another color
Great for spotting synchronous moves (e.g., NQ & ES, QQQ & SPY), or confirming risk-on/risk-off with an inverse asset (e.g., NQ vs DXY with inversion).
How it works
For each bar, the script checks whether close > open (bullish), close < open (bearish), or equal (doji) for:
The chart’s symbol
A second symbol pulled via request.security() (optionally on a different timeframe)
If both symbols are bullish, it paints Bull color; if both are bearish, it paints Bear color. Dojis can be ignored.
Inputs
Second symbol: Ticker to compare (e.g., CME_MINI:ES1!, NASDAQ:QQQ, TVC:DXY).
Second symbol timeframe: Leave blank to use the chart’s TF, or set a specific one (e.g., 5, 15, D).
Invert second symbol direction?: Flips the second symbol’s candle direction (useful for inversely related assets like DXY vs indices).
Ignore doji candles: Skip highlights when either candle is neutral (open == close).
Coloring options: Toggle bar coloring and/or background shading; pick colors; set background transparency.
Alerts
Three alert conditions:
Both Bullish
Both Bearish
Both Same Direction (bullish or bearish)
Create alerts from the Add Alert dialog after adding the script.
Use cases
Index confluence: NQ & ES moving in lockstep
ETF confirmation: QQQ & SPY agreement
FX/Index risk signals: Invert DXY against NQ/ES to see when equity strength aligns with dollar weakness
Tips
For mixed timeframes (e.g., chart on 1m, ES on 5m), set Second symbol timeframe to the higher TF to reduce noise.
Keep Ignore dojis on for cleaner signals.
Combine with your own entry rules (structure, FVGs, liquidity sweeps).
Notes
Works on any symbol/timeframe supported by TradingView.
Overlay script; no strategy/entries/exits are executed.
Past performance ≠ future results; for education only.
Version: 1.0 – initial release (bar/background highlights, doji filter, inversion, multi-TF support, alerts).
What it does
Highlights bars on your chart when two symbols print the same candle direction on the chosen timeframe:
Both Bullish → one color
Both Bearish → another color
Great for spotting synchronous moves (e.g., NQ & ES, QQQ & SPY), or confirming risk-on/risk-off with an inverse asset (e.g., NQ vs DXY with inversion).
How it works
For each bar, the script checks whether close > open (bullish), close < open (bearish), or equal (doji) for:
The chart’s symbol
A second symbol pulled via request.security() (optionally on a different timeframe)
If both symbols are bullish, it paints Bull color; if both are bearish, it paints Bear color. Dojis can be ignored.
Inputs
Second symbol: Ticker to compare (e.g., CME_MINI:ES1!, NASDAQ:QQQ, TVC:DXY).
Second symbol timeframe: Leave blank to use the chart’s TF, or set a specific one (e.g., 5, 15, D).
Invert second symbol direction?: Flips the second symbol’s candle direction (useful for inversely related assets like DXY vs indices).
Ignore doji candles: Skip highlights when either candle is neutral (open == close).
Coloring options: Toggle bar coloring and/or background shading; pick colors; set background transparency.
Alerts
Three alert conditions:
Both Bullish
Both Bearish
Both Same Direction (bullish or bearish)
Create alerts from the Add Alert dialog after adding the script.
Use cases
Index confluence: NQ & ES moving in lockstep
ETF confirmation: QQQ & SPY agreement
FX/Index risk signals: Invert DXY against NQ/ES to see when equity strength aligns with dollar weakness
Tips
For mixed timeframes (e.g., chart on 1m, ES on 5m), set Second symbol timeframe to the higher TF to reduce noise.
Keep Ignore dojis on for cleaner signals.
Combine with your own entry rules (structure, FVGs, liquidity sweeps).
Notes
Works on any symbol/timeframe supported by TradingView.
Overlay script; no strategy/entries/exits are executed.
Past performance ≠ future results; for education only.
Version: 1.0 – initial release (bar/background highlights, doji filter, inversion, multi-TF support, alerts).
Sürüm Notları
Same-Direction Candles (Two Symbols)What it does
Highlights bars on your chart when two symbols print the same candle direction on the chosen timeframe:
Both Bullish → one color
Both Bearish → another color
Great for spotting synchronous moves (e.g., NQ & ES, QQQ & SPY), or confirming risk-on/risk-off with an inverse asset (e.g., NQ vs DXY with inversion).
How it works
For each bar, the script checks whether close > open (bullish), close < open (bearish), or equal (doji) for:
The chart’s symbol
A second symbol pulled via request.security() (optionally on a different timeframe)
If both symbols are bullish, it paints Bull color; if both are bearish, it paints Bear color. Dojis can be ignored.
Inputs
Second symbol: Ticker to compare (e.g., CME_MINI:ES1!, NASDAQ:QQQ, TVC:DXY).
Second symbol timeframe: Leave blank to use the chart’s TF, or set a specific one (e.g., 5, 15, D).
Invert second symbol direction?: Flips the second symbol’s candle direction (useful for inversely related assets like DXY vs indices).
Ignore doji candles: Skip highlights when either candle is neutral (open == close).
Coloring options: Toggle bar coloring and/or background shading; pick colors; set background transparency.
Alerts
Three alert conditions:
Both Bullish
Both Bearish
Both Same Direction (bullish or bearish)
Create alerts from the Add Alert dialog after adding the script.
Use cases
Index confluence: NQ & ES moving in lockstep
ETF confirmation: QQQ & SPY agreement
FX/Index risk signals: Invert DXY against NQ/ES to see when equity strength aligns with dollar weakness
Tips
For mixed timeframes (e.g., chart on 1m, ES on 5m), set Second symbol timeframe to the higher TF to reduce noise.
Keep Ignore dojis on for cleaner signals.
Combine with your own entry rules (structure, FVGs, liquidity sweeps).
Notes
Works on any symbol/timeframe supported by TradingView.
Overlay script; no strategy/entries/exits are executed.
Past performance ≠ future results; for education only.
Version: 1.0 – initial release (bar/background highlights, doji filter, inversion, multi-TF support, alerts).
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.