OPEN-SOURCE SCRIPT
GC Trend-Pullback Volume Gate Signal Indicator

A trend-following pullback signal tool for COMEX gold, ported from a strategy validated on GC 1H data. It marks re-entries in the direction of the higher-timeframe trend, confirmed by a volume gate, and plots the intended stop/target frame for each signal.
What it does
Trades only with the trend: long signals when the 4H EMA-50 is above EMA-200, shorts when below. The trend filter reads the previous completed HTF bar with lookahead_off, so it does not repaint.
Signals on RSI(14) re-entry after a pullback — cross up through 40 in uptrends, cross down through 60 in downtrends.
Fires only when volume is at or above its 20-bar average. This volume gate is the validated edge.
Plots an entry/stop/target frame (1.5×ATR stop, 2.0 R:R by default) so you can see the geometry of each signal. The frame is illustrative — this is an indicator, not a backtest, so it shows intent, not fills.
Built-in alerts: named conditions for long/short in the Create Alert dialog, plus a dynamic-price alert() option. Set alerts to Once Per Bar Close to match the tested bar-close logic.
Data requirement — read before using
The volume gate depends on real volume, so a real-time data feed for the instrument is needed for live signals. On GC and other CME/COMEX futures, TradingView volume is true contract volume — exactly what this was built on. On spot/CFD gold (XAUUSD), volume is only tick volume, a different quantity, and the edge does not carry over. Run it on the futures.
Suggested use
GC1! (or the live front month) on the 1H timeframe, with the higher-timeframe trend filter at 240 (4H) — the configuration it was validated on. Note that GC1! is an auto-rolled continuous contract, so expect minor discontinuities at each roll; trade the actual front month live. Real-time COMEX volume on TradingView requires the CME/COMEX real-time data add-on — without it the feed is delayed and live signals will lag.
Scope
The underlying logic was validated on a single ~10.5-month gold uptrend, so treat signals as a starting point, not a finished system, and confirm behavior across other regimes before relying on it.
Research and educational tool, not financial advice. Markets carry risk; past behavior does not guarantee future results.
What it does
Trades only with the trend: long signals when the 4H EMA-50 is above EMA-200, shorts when below. The trend filter reads the previous completed HTF bar with lookahead_off, so it does not repaint.
Signals on RSI(14) re-entry after a pullback — cross up through 40 in uptrends, cross down through 60 in downtrends.
Fires only when volume is at or above its 20-bar average. This volume gate is the validated edge.
Plots an entry/stop/target frame (1.5×ATR stop, 2.0 R:R by default) so you can see the geometry of each signal. The frame is illustrative — this is an indicator, not a backtest, so it shows intent, not fills.
Built-in alerts: named conditions for long/short in the Create Alert dialog, plus a dynamic-price alert() option. Set alerts to Once Per Bar Close to match the tested bar-close logic.
Data requirement — read before using
The volume gate depends on real volume, so a real-time data feed for the instrument is needed for live signals. On GC and other CME/COMEX futures, TradingView volume is true contract volume — exactly what this was built on. On spot/CFD gold (XAUUSD), volume is only tick volume, a different quantity, and the edge does not carry over. Run it on the futures.
Suggested use
GC1! (or the live front month) on the 1H timeframe, with the higher-timeframe trend filter at 240 (4H) — the configuration it was validated on. Note that GC1! is an auto-rolled continuous contract, so expect minor discontinuities at each roll; trade the actual front month live. Real-time COMEX volume on TradingView requires the CME/COMEX real-time data add-on — without it the feed is delayed and live signals will lag.
Scope
The underlying logic was validated on a single ~10.5-month gold uptrend, so treat signals as a starting point, not a finished system, and confirm behavior across other regimes before relying on it.
Research and educational tool, not financial advice. Markets carry risk; past behavior does not guarantee future results.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Sharing clean, logical market analysis focused on liquidity, structure and volume. No signals, no pressure — just education. If you want more insights, you’re welcome to join: t.me/CE3vdc5m72w4MjRk
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Sharing clean, logical market analysis focused on liquidity, structure and volume. No signals, no pressure — just education. If you want more insights, you’re welcome to join: t.me/CE3vdc5m72w4MjRk
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.