Gold Month Compass
Not accepted: gold mining shares and miner ETFs (NYSE:GOLD is a company, GDX is a basket of companies - both get the red banner), and any other market.
- Market
- gold, under any of the names it trades as.
- Runs on
- any accepted symbol, 20-minute chart (recommended).
Free on request during the launch period.
Open on TradingViewThe rules, in full
- A session runs 18:00-17:00 ET and belongs to the month of the day it ends.
- Last month's high / low = the extremes of all of last month's sessions. Last month's close = close of its final session.
- Week-1 close = close of the month's 5th "level" session (trading between 08:20 and 13:30 ET, not an NYSE holiday).
- Side: week-1 close above last month's close by more than half a tick = long setup; below by more than half a tick = short setup; otherwise no trade this month.
- The setup stays on while the level (last month's high for longs, low for shorts) has not traded this month, including today's prices before 08:20 ET from 18:00 the evening before. Once it trades, the setup is off for the rest of the month. That level is not the exit.
- Entry: on each session after the 5th while the setup is on, a market order at 08:20 ET (fills at the next bar's open). One trade per session. Needs a price in the 10 minutes before 08:20, no holiday, and no open position.
- Stop = 0.35 x U from the fill, rounded away from the fill. Target = 2 x the stop distance, with the limit resting 1 tick beyond. U = median full-session range of the previous 20 complete level sessions (the typical daily range); the 20th must be no more than 40 days back.
- Time exit: 16:09 ET, or 13:30 ET on dates in the early-close list. It fills at the open of the bar that contains that time. A position still open when a new session starts is closed ("Session end", safety only).
That is the whole rule set, exactly as published. Nothing is held back for subscribers.
What you see on the chart
- Green ▲ LONG label below the 08:20 bar or red ▼ SHORT label above it, on the bar where the order actually filled (the same bar as the Strategy Tester entry; hover for the fill price, stop and target); that entry bar is highlighted.
- "EXIT +/- pts" label; hover for the reason (Stop hit, Target 2R hit, the time exit or Session end) and the P/L.
- Last month's high and low lines, named with their price at the right edge; light background tint while the setup is live.
- In a trade: entry (white), stop (red) and 2R target (green) lines with zones, from the fill bar to the exit bar, each named with its price at the right edge. On the fill bar the lines show the provisional stop and target that were working during that bar; from the next bar on, the levels measured from the real fill.
- Compact status box (top right): a title row with the symbol and how it was read (gold futures / spot / CFD gold / gold ETF), the state (WAITING with a short reason, LONG/SHORT setup, IN LONG / IN SHORT with stop and target, DONE today), last month's high / low, and the signal count with days loaded (or a warning). Hover a row for the full explanation. "Show details" adds last month's close, the week-1 close, the daily range U, the rule summary and, on 1/5/10-minute charts, a 20-minute tip.
- An orange reminder row on a spot / CFD or ETF symbol: on a CFD "1 contract" is one ounce, not a futures contract, so size and commission have to be set in Properties.
- Red banner on any symbol that is not gold (no orders there unless the override is on); orange banner when the timeframe is not 1, 5, 10 or 20 minutes (no orders there).
Alerts
1. Add the strategy to a gold chart - XAUUSD, GOLD, GC1!, MGC1!...
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 extras, separated by "|". Nothing else to read.
LONG 3886.9 on COMEX:GC1! | SL 3858.4 | TP 3943.9 | flat 16:09 ET | fills next open
LONG 3887.1 on COMEX:GC1! | SL 3858.6 | TP 3944.1 | filled
EXIT 3904.2 on COMEX:GC1! | Target 2R hit | +17.3 pts | LONG from 3887.1
ARMED on OANDA:XAUUSD | LONG at 08:20 ET until high 3950.0 trades | week-1 close 3886.9 vs last month 3870.2
The first two lines are the same trade: the estimate sent at 08:20 ET ends in "fills next open", the one after the real fill ends in "filled". The ticker is in every line, so you can watch several gold symbols at once and still tell them apart at a glance. Alerts are per chart: create one on each symbol you want watched.
4. Messages fire once per bar close. Toggles in the Alerts group: entry, fill and exit on by default, setup armed off.
5. On a free Basic account you do not need an alert at all for this one: the entry is decided by the clock, not by a price. Set a phone alarm for 08:20 ET (the Decision time in Session Settings), open the chart when it rings, and read the entry, stop and target off the status box. That is free, unlimited, works on any plan and uses none of the three price alerts a free account gets.
The last row of the status box says exactly that. Last month's high / low shown above it is the month's objective, not an entry trigger - the setup ends when that level trades - so a price alert there tells you the move is completing, not starting. If a client wants one anyway it holds for the whole month, which matches the one-month life of a free alert.
Settings
- Enable trading (off = levels and status box only, no orders or trade labels) and Sides (Both by default; Long only / Short only restrict the side).
- Rule and Session Settings: 5 sessions, 0.35 x U stop, 2R target with the limit 1 tick through, U from 20 sessions within 40 days, a price within 600 s before the decision, 08:20 ET entry, level-session window 08:20-13:30 ET, 16:00 ET no-entry time, 16:09 ET close (early-close days: 13:30 close, 13:45 session end). These values define the rule; changing them changes the strategy.
- NYSE holiday list (2025-2027) and early-close list. The early-close dates are unverified defaults; check and update both lists.
- Market Lock: "Allow orders on non-gold symbols" override, off by default. Gold is recognised by its contract root or ticker together with the instrument type: the futures roots GC, MGC, GOLD, GOLDM, GOLDGUINEA, GOLDPETAL, 1OZ, AU, GD and JAU; any spot / forex / commodity / CFD quote whose ticker starts with XAU or contains GOLD; and the bullion ETFs GLD, GLDM, IAU, IAUM, SGOL, BAR, AAAU, OUNZ, PHYS, GBS, SGLN, PHAU and 4GLD. A mining share or miner ETF of the same name is not gold and is refused, and so is a gold quote published as an index.
- Alerts toggles, and Display Options / Colors for levels, trade lines, zones, labels, tint, status box (position, theme, details).
- Properties default to 50,000 USD initial capital, 1 contract, no pyramiding, 1.20 commission per contract per order (a micro-futures figure), 1 tick slippage, 7% margin. Enter your own size and cost for the instrument you trade - these defaults are wrong for spot, for CFDs and for full-size GC.
Limits, and what this cannot do
- Few setups: at most about 12 monthly setups a year, and trades inside one month follow the same monthly call.
- History: the rule needs all of last month plus 20 complete sessions, roughly 45-65 sessions. A 20-minute chart needs about 3,000-4,500 bars, a 10-minute chart 6,200-9,000, a 5-minute chart 12,400-18,000. Until then nothing trades. Never use 3- or 15-minute bars (08:20 falls inside a bar).
- Pine fills at the next bar's open plus 1 tick and estimates the price path inside each bar; the 16:09 time exit fills at 16:00 on 10- and 20-minute charts, 16:05 on 5-minute and 16:09 on 1-minute. Results on chart bars can differ from live fills.
- Different gold symbols are different data: a spot / CFD feed, a futures contract and an ETF do not print the same bars, do not keep the same hours and do not start their daily bar at the same time, so the same rule produces a different trade list on each. Read each one on its own chart.
- Contract rolls can move last month's levels; use back-adjustment if available.
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 Month Compass on TradingView.