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.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
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
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
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
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน