Gold Ledge Fade
It looks for "ledges": prices where several 30-minute brackets stopped at the same level, a sign that the auction left unfinished business there.
- 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
- Brackets: 30-minute high/low brackets. Yesterday's come from 08:20-13:30 ET (the last one is 10 minutes); tonight's from 18:00 ET to the 08:20 open.
- Ledge: a price where at least 3 bracket highs (or lows) lie within 1 tick of it. When several neighbouring prices qualify, the one with the most brackets is used (ties: the middle, lower one).
- Inside the range: a high ledge must be at least 0.10 x the typical 08:20-13:30 range below the highest bracket high (low ledge: above the lowest bracket low). Typical range = median of the prior 20 sessions.
- Untouched: yesterday's high ledges must stay above everything traded since yesterday 13:30 ET (low ledges below). Tonight's ledges must stay untouched by the brackets after the last one that formed them.
- Choice at 08:20 ET: high ledges above the 08:20 open (sell) and low ledges below it (buy); the nearest to the open wins (tie: the high ledge, then the lower price). One setup per day at most.
- Entry: the first retest to within 1 tick of the ledge between 08:20 and 12:00 ET. The limit order sits 2 ticks in front of the ledge (sell at ledge - 2 ticks, buy at ledge + 2 ticks), so with the 1-tick-through fill setting it fills when price reaches the retest level. If the 08:20 bar has already touched that level, the entry is at market on the next bar's open. Unfilled orders are cancelled at 12:00 ET.
- Stop: 0.50 x U from the fill. U = median high-low range of the previous 20 daily bars (18:00-17:00 ET).
- Target: Initial Balance (IB) = 08:20-09:20 ET range. Long target = IB high + 0.5 x IB range; short target = IB low - 0.5 x IB range. Used only for fills from 09:20 ET and only if the level is beyond the fill; otherwise there is no target. The target counts only when price trades 1 tick through it.
- Time exit: any open trade is closed at market at 16:10 ET.
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 fill bar or red ▼ SHORT label above it (hover for the ledge, fill, stop and target).
- "EXIT +/- pts" label; hover for the reason (Stop, Target or Time exit).
- While the retest order is working (from the bar after 08:20 through the fill bar): an orange line on the chosen ledge and a thin faded orange line on the limit order 2 ticks in front of it (where the fill happens), named "High ledge ... · sell limit ..." or "Low ledge ... · buy limit ..." at the right end.
- In a trade: entry line (white on dark theme) from the fill bar; red stop and green target lines from the next bar, when the exit orders are live; all run through the bar on which the trade closed. Each is named with its price at the right end, with light red (risk) and light green (target) zones. Labels, lines and the trade count come from the Strategy Tester's own trades.
- Thin gray IB high / low lines from 08:20 ET.
- Compact status box (top right): market and name; the state (WAITING, SETUP with the order price or "at market", IN LONG / IN SHORT with the stop, DONE with a short reason, or OFF on an unsupported symbol or timeframe); today's ledge levels or the trade levels; trades on the chart and days loaded, or a yellow note when there are none yet or the chart is not on 5 minutes. Hover any row for more.
- Banner in the middle of the chart: red on any symbol that is not gold futures, spot / CFD gold and the bullion ETFs included (no orders); the status box names what the symbol was read as, so an overridden lock still tells you where you are. Orange when the timeframe cannot run the rule (no signals).
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.
SETUP SHORT 3892.2 on COMEX:GC1! | ledge 3892.4 | till 12:00 ET | SL ~3912.9 | TP IB ext from 09:20 ET
SETUP LONG at market on COMEX:MGC1! | ledge 3861.0 | till 12:00 ET | SL ~3840.5 | TP IB ext from 09:20 ET
SHORT 3892.2 on COMEX:GC1! | SL 3912.9 | TP 3861.0 | filled | flat 16:10 ET
EXIT 3861.0 on COMEX:GC1! | Target | +31.2 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: setup chosen at 08:20 ET, fills and exits. No alerts on unsupported symbols unless "Allow orders on other symbols" is on.
5. FREE BASIC PLAN - the "Price alert" row. A Basic account cannot create the alert in step 2 at all, so the status box prints a "Price alert" row instead: once the day has a setup, the price the buy / sell order is actually resting at ("none yet" before 08:20 ET or when there is no untouched ledge).
That number goes into an ordinary price alert on the SYMBOL (Alt+A, Condition = GC1! or MGC1! and not the strategy, operator "Crossing", tick "Notify on app"), which Basic does allow - three of them, and editing one does not use up another.
This is the closest fit of the set: the entry is a resting order at exactly that price, so the phone rings when the order would fill. It is still only a price alert - the day may already be done, and the trade is cancelled if the retest comes after 12:00 ET - so look at the chart before acting.
Settings
- Allow orders on other symbols (off by default).
- Ledge rule: 3 brackets, 1-tick tolerance, 0.10 x RTH range distance, overnight ledges on, 20-session RTH range.
- Stop, target and exit: 0.50 x U stop, U from 20 sessions, 0.5 x IB extension, 60-minute IB.
- Session windows: 08:20 open, 13:30 close, 12:00 last retest, 16:10 time exit (ET). These are the defaults the strategy is designed around; changing them changes the strategy.
- Signals (LONG / SHORT labels and size, EXIT labels, risk / target zones), Alerts (setup, fill, exit) and Display Options (lines, ledge, IB, status box, "Show details", dark theme, box position).
- Properties default to 1 contract, pyramiding 1, 100,000 starting capital, 5% margin, 1.20 commission per contract per side (micro), 1 tick slippage, and limit fills only when price trades 1 tick through. Enter your own commission, especially for GC.
Limits, and what this cannot do
- Pine sees one price per bar. Stop and target start on the bar after the fill bar, and a bar touching both is Pine's estimate; results on chart bars can differ from live fills.
- A retest inside the 08:20 bar is entered at the next bar's open, so on 10-minute bars that entry can be up to 10 minutes late.
- U and the typical range come from TradingView data and can differ around contract rolls and short holiday sessions. On early-close days change the time exit by hand.
- Ledges are absolute prices carried from yesterday to today. Turn on back-adjustment for contract changes on the continuous chart (B-ADJ on GC1!/MGC1!); without it, on the roll day yesterday's ledges come from the old contract and that day's setup can be wrong.
- With about one trade a week, a few weeks of history say very little.
- 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 Ledge Fade on TradingView.