Gold Dual Thrust
At the 18:00 ET session open it draws two lines: the open plus and minus half of the recent multi-day range. A trade through the upper line buys, a trade through the lower line sells.
- Market
- gold futures only.
- Runs on
- GC or MGC, 5-minute chart (recommended).
Free on request during the launch period.
Open on TradingViewThe rules, in full
- Range: from the last 4 complete sessions (18:00-17:00 ET), take the highest high (HH), lowest low (LL), highest close (HC) and lowest close (LC). Range = the larger of HH - LC and HC - LL. Holiday and incomplete sessions are left out.
- Lines: upper line = 18:00 ET open + 0.5 x Range; lower line = 18:00 ET open - 0.5 x Range. If the chart has no bar at 18:00 ET, the session is skipped.
- Entry: stop orders 1 tick through the lines. Buy when price trades 1 tick above the upper line, sell when it trades 1 tick below the lower line. Orders work from 18:05 ET (Sunday-evening session: from 00:00 ET Monday) until 16:00 ET (last entry 15:59:55).
- Sequence: before the first signal both lines are watched. After a long, only a short can follow; after a short, only a long. The next order keeps working while a trade is open, but the trade's stop always sits between its entry and the opposite line, so the trade is closed at its stop before the opposite signal can fill: never long and short at once (only a gap through both lines, or a single bar that crosses both right after the fill, before the stop is working, turns the trade around).
- Stop: on the opposite line (lower line for a long, upper line for a short), with its distance from the entry kept between 0.03 U and 1.0 U. U = median high-low range of the previous 20 complete sessions; if U is not available the day is skipped. Stop and target start working on the bar after the fill bar.
- Target: Initial Balance (IB) = 08:20-09:20 ET range. Long target = IB high + 1 x IB range; short target = IB low - 1 x IB range. Used only if the entry is at or after 09:20 ET and the level is beyond the entry; otherwise there is no target. The target counts only when price trades 1 tick through it.
- Time exit: anything still open is closed at market at the open of the first bar at or after 16:09 ET (16:09 on the 1-minute chart, 16:10 on the 5-minute chart). A position still open at the next 18:00 ET session start is closed at the open of the following bar ("Session change").
That is the whole rule set, exactly as published. Nothing is held back for subscribers.
What you see on the chart
- Upper line (green, "Buy above") and lower line (red, "Sell below") for the session, drawn at the order prices (1 tick through). A line is solid only on bars where its stop order is really working and faded otherwise (before 18:05 ET, on the Sunday evening before 00:00 ET, after a fill on that side, or when no orders are placed).
- Green ▲ LONG label below the fill bar or red ▼ SHORT label above it (hover for the line, fill price, stop and target).
- "EXIT +/- pts" label at each exit, at the Strategy Tester's exit price (hover for the reason: Stop, Target, Time exit 16:09, Session change or Reversed, and the net result after commission).
- While a trade is open: entry line (white, dark grey with the light theme) from the fill bar, red stop line and green target line from the bar after the fill bar (when the bracket starts working) through the exit bar, each named with its price at the right edge, with light red (risk) and light green (target) zones.
- Faint green lines for the IB long and short targets after 09:20 ET.
- Compact status box (top right): market and name; state (WAITING, SETUP watching both / buy / sell line, IN LONG / IN SHORT with stop and target, DONE for today); today's lines; signals and days loaded, or a short yellow note if there are none yet. Hover a row for more. "Show details" adds open and range, U and stop band, IB targets, order window, last event and which line can trade next.
- Red banner in the middle of the chart on any symbol that is not gold futures - spot / CFD gold and the bullion ETFs included (no orders unless the market lock is turned off). The status box names what the symbol was read as (gold futures, spot / CFD gold, gold ETF), so an overridden lock still tells you where you are. Orange banner when the chart is not 1- or 5-minute (no orders), naming the 5-minute chart.
Alerts
1. Open a 5-minute GC or MGC chart and add the strategy.
2. Create Alert: Condition = this strategy, then "alert() function calls only". TradingView calls this a technical alert, and a free Basic account cannot create one - Basic allows 3 price alerts and no technical alerts at all, so the Create Alert dialog will not let you save it. Essential is the lowest plan that works (20 technical alerts); Plus 100, Premium 400. On Essential and Plus an alert also expires after two months and has to be created again; on Premium and Ultimate it does not expire. Phone notifications themselves are free on every plan - tick "Notify on app" and have the TradingView app installed and signed in on the same account.
3. Each message is one short line: what happened and at what price first, then the exchange and ticker, then the numbers, separated by "|". Nothing else to read.
ORDERS on COMEX:GC1! | BUY above 3918.4 | SL ~3878.1 | SELL below 3862.1 | SL ~3902.3 | TP only from 09:20 ET | flat 16:09 ET
LONG 3918.5 on COMEX:GC1! | SL 3878.2 | TP 3961.0 | filled | flat 16:09 ET
EXIT 3961.0 on COMEX:GC1! | Target | +42.5 pts | position 0
EXIT 3878.2 on COMEX:MGC1! | Stop | -40.3 pts | position 0
The ticker is in every line, so a GC chart and an MGC chart can be watched at once and still be told apart at a glance. Alerts are per chart: create one on each symbol you want watched.
4. Messages fire once per bar close. Three toggles in the Alerts group: entry orders working (fires when the working set changes), LONG / SHORT fills, and exits. No alerts on other symbols unless the market lock is turned off.
5. On a free Basic account, use the last row of the status box: "Price alert: ▲<buy line> ▼<sell line>" - the two lines this session's orders sit on. Basic cannot alert on the strategy, but it can set a plain price alert on the symbol at either number (Alt+A, Condition = the symbol, operator "Crossing", "Notify on app" ticked); both sides use two of the three free alerts.
Those two numbers are the strategy's own stop-order prices, so the alert rings essentially when the order would fill - but only one side is working at a time and only inside the entry window, so it still means price arrived rather than a trade: look at the chart before acting. New lines each session, so edit the alert instead of creating another one.
Settings
- Market lock: allow orders on other symbols (off by default).
- Rule parameters, Stop and target, Session windows: 4 sessions, 0.5 / 0.5 line factors, U from 20 sessions (within 40 days), stop band 0.03-1.0 U, IB extension 1.0 from 08:20 for 60 minutes, orders from 18:05 ET, entries before 16:00 ET, time exit 16:09 ET. These are the defaults the strategy is designed around; changing them changes the strategy.
- Alerts, Display Options (lines, IB targets, entry/stop/target lines, labels and label size, fill bar highlight, labels kept for the last N trades, status box and its position, Show details, dark theme).
- Properties default to 100,000 initial capital, 1 contract, no pyramiding, 1.20 commission per contract per side (micro), 1 tick slippage and 5% margin. Enter your own commission, especially for GC.
Limits, and what this cannot do
- Pine fills stop orders at the trigger price plus 1 tick (or at the bar open when price is already beyond the line) and estimates the price path inside each bar; a bar touching both stop and target is a guess. Results on chart bars can differ from live fills.
- On the 5-minute chart the stop and target start on the bar after the fill, so a trade is unprotected for up to 5 minutes; the 1-minute chart is the closest but loads only a few days.
- The levels use the continuous contract (GC1! / MGC1!). Around a contract roll the 4-session range can include the roll gap; turning on back-adjustment in the chart settings reduces this.
- On early-close days, change "Time exit" by hand.
- The script only sees its own trades.
Educational tool. Not financial advice. Past behaviour does not predict future results.
Before you decide
The script page on TradingView carries TradingView's own Strategy Tester report, generated by TradingView from this script. We do not write those numbers and we do not repeat them here. Read them at the source: Gold Dual Thrust on TradingView.