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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
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
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
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
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.