Gold Profile Shape
A rule-based intraday strategy for gold. Every morning it looks at the previous regular session (08:20-13:30 ET) as a volume profile and finds its point of control (POC), the price where the most volume traded.
- Market
- gold, under any of the names it trades as.
- Runs on
- any symbol from the three families above, 5-minute chart (recommended).
Free on request during the launch period.
Open on TradingViewThe rules, in full
- Previous session = the last complete gold session (18:00-17:00 ET) with a full regular session (08:20-13:30 ET). Its high, low and volume profile come from the bars starting 08:20-13:30 ET.
- Profile: each bar's volume is spread evenly over its high-low range in 1-tick rows. The POC is the row with the most volume (tie: the row nearest that session's 08:20-13:30 ET VWAP, then the lower one). If regular-hours bars or volume are missing, there is no trade.
- Position = (POC - low) / (high - low).
- At or above 2/3 = SHORT.
- At or below 1/3 = LONG.
- In between = no trade.
- Entry: one market order at the 08:20 ET open (sent at the close of the bar that ends at 08:20, filled at the next bar's open). Needs a price before 08:20 ET in today's session. One trade per session.
- U = median full-session range (18:00-17:00 ET) of the previous 20 complete sessions; the 20th must be no more than 40 days back. The average 08:20-13:30 range of the previous 20 sessions must also exist (data check).
- Close-only stop: when a 5-minute bar CLOSES 0.35 x U or more against the entry fill price, the trade is closed at market on the next bar. Wicks alone do not count.
- VWAP exit: when a 5-minute bar closes below the session VWAP (for a long) or above it (for a short), the trade is closed at market on the next bar. VWAP = volume-weighted average price from 18:00 ET.
- Both checks start with the 08:20-08:25 bar. If both hit on the same close, the stop reason is used.
- Safety stop: a normal stop order 2 x U (rounded up to whole ticks) from the entry fill price, for extreme moves.
- No profit target. Any trade still open is closed at 16:09 ET (the open of the 16:10 bar on a 5-minute chart).
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 or red ▼ SHORT label above the bar where the order fills (the 08:20 bar, the same bar as the Strategy Tester's entry marker). Hover it for the previous session's high, low, POC and position, the entry and the stops; after the fill it shows the real fill price. The signal bar just before it (08:15-08:20, where the order is sent) lights up (optional).
- "EXIT +/- pts" label on the bar where the Strategy Tester exit fills, at the fill price. Hover for the reason (Stop (5-min close), VWAP exit, Stop, Time exit, Time exit (session change)) and the trade result.
- Previous session high and low (gray) and POC (yellow) lines, each named with its price at the right edge.
- While a trade is open: white entry line, red stop line (the 5-minute close level) with a light red risk zone, a faint safety-stop line and the orange session VWAP. Each line is named with its price at the right edge.
- Compact status box (top right, 4 rows):
- the symbol and how it was read (gold futures / spot / CFD gold / gold ETF);
- state: WAITING with a short reason, SETUP LONG/SHORT at 08:20 ET, IN LONG / IN SHORT with the entry time and stop, DONE with today's result, or OFF on an unsupported symbol or timeframe;
- previous session high, low, POC and position in %;
- signals with days loaded, or a yellow note when there are none yet.
Hover a row for the full explanation. "Show details" adds U and stop sizes, the ADR (average 08:20-13:30 range), the current VWAP, the exit rule, today's decision and, on a 1-minute chart, a tip to use 5 minutes.
- 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). Orange banner when the chart is not 5 or 1 minutes (no orders).
Alerts
1. Open a 5-minute gold chart - XAUUSD, GOLD, GC1!, MGC1!... - 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 extras, separated by "|". Nothing else to read.
LONG 3886.9 on COMEX:GC1! | SL close 3858.4 | SL safety 3790.0 | no target | flat 16:09 ET | fills next open
LONG 3887.1 on COMEX:GC1! | SL close 3858.6 | SL safety 3790.2 | no target | filled
EXIT at market on OANDA:XAUUSD | 5-min close below VWAP | now 3879.4 | -7.7 pts | fills next open
EXIT 3904.2 on COMEX:GC1! | Stop | +17.3 pts | position 0
ARMED on OANDA:XAUUSD | LONG at 08:20 ET | b shape (POC in bottom third)
"SL close" is the 5-minute-close stop, "SL safety" the wide touch stop. The EXIT at market line is sent when the rule decides the exit; the EXIT with a price is the fill the Strategy Tester got. 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. Each type has its own toggle in the Alerts group; the setup heads-up is off by default.
5. Free Basic plan: this one needs no alert at all, which is better than a workaround. The bias comes from the previous session's volume profile and the entry is decided by the clock - a market order at the 08:20 ET open - so the status box's last row says to set a phone alarm for 08:20 ET, open the chart when it rings and read the entry and the two stops off the box (this rule has no target). That is exact, free on any plan, repeatable every day, and it uses none of the three price alerts a free account gets. Do not alert on the previous session's high, low or POC: they decide the direction, none of them is an entry trigger.
Settings
- Feature Toggles: Enable trading (on; off = previous-session levels, status box and the optional SETUP alert only, with no orders, LONG/SHORT labels or entry alerts) and Allow orders on non-gold symbols (off). Gold is recognised by its contract root or ticker together with the instrument type: futures roots (GC, MGC, GOLD, GOLDM, GOLDGUINEA, GOLDPETAL, 1OZ, AU, GD, JAU), any spot / CFD / commodity quote starting with XAU or containing GOLD, and the bullion ETF roots are all accepted, while a gold mining share is not. The override only matters if you want to experiment off gold entirely.
- Rule group: Profile row size (ticks) 1, ADR length (prior sessions) 20, U = median range of last N full sessions 20, U: oldest session within (calendar days) 40.
- Session Settings: 08:20 ET open, 13:30 ET close, 16:09 ET flat time.
- Exit group: Close-only stop (x U) 0.35, Safety stop (x U) 2.0, VWAP exit on.
- These are the values the strategy is designed around; changing them changes the strategy.
- Alerts: entry signals, fill and exits on; setup heads-up off.
- Display Options: previous high/low/POC, session VWAP, entry/stop lines and risk zone, LONG/SHORT and EXIT labels, label size, signal bar background, status box and its position, Show details, dark chart theme.
- Properties default to 1 contract, 100,000 USD initial capital, 5% margin long and short, pyramiding 0, 1.20 USD commission per contract per side (a micro-futures figure) and 1 tick slippage. 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
- At most one trade a day, and only on days when the previous session's POC sits in the top or bottom third of its range (roughly half of the days).
- The profile is built from chart bars, not individual trades, so the POC can sit a few ticks away from a tick-by-tick profile. This matters only when the position is close to 1/3 or 2/3. A 1-minute chart gives a finer profile but loads fewer days.
- VWAP is computed from bar prices and volume. A 5-minute close very close to VWAP can be judged differently from tick data.
- Holiday and early-close sessions are not used as the "previous session". On early-close days set the flat time by hand; a trade still open when trading halts is closed at market at the start of the next session.
- Pine fills at the next bar's open plus 1 tick and estimates the price path inside each bar. 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, do not start their daily bar at the same time and do not report volume the same way, so the same rule produces a different trade list on each. Read each one on its own chart.
- Contract rolls can shift the previous session'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 Profile Shape on TradingView.