The rules at a glance
- Levels: yesterday's classic pivots from the daily candle: P = (high + low + close) ÷ 3, R1 = 2P − low, S1 = 2P − high
- Bias: set at 8 a.m. London time: if gold opens London above P, look only for longs today; below P, only shorts
- Entry: the first 15-minute candle whose low comes back to P (to within a tenth of the ATR) and that closes above P as a bullish candle; enter at that close (mirrored for shorts)
- Stop loss: half an ATR below P or below the candle's low, whichever is lower
- Target: R1 for longs, S1 for shorts; skip the trade if the target is less than 1R away
- Hours: entries from 8 a.m. to 4 p.m. London time (12:30 to 20:30 IST in summer, 13:30 to 21:30 IST in winter); one trade a day, closed by 5 p.m. London time
- Stand aside: if a candle closes more than half an ATR through P against the bias, there's no trade that day
What the daily pivot tells you about the gold day
The pivot point (P) is the average of yesterday's high, low and close. It's a rough balance price for the new day: many traders read gold trading above P as a bullish lean and below it as a bearish one, and the first support and resistance levels, S1 and R1, are common first targets. None of this is magic. The levels are useful because they're simple and lots of people watch the same numbers.
This strategy uses all three ideas at once. Where gold sits against P at the London open sets the direction for the day. A pullback to P is the entry. R1 (or S1 for a short) is the target. Here is the arithmetic for the day in the example:
| Price | How it's worked out | |
|---|---|---|
| Yesterday's high | 4,318.40 | From the daily candle |
| Yesterday's low | 4,262.60 | From the daily candle |
| Yesterday's close | 4,301.90 | From the daily candle |
| Pivot (P) | 4,294.30 | (4,318.40 + 4,262.60 + 4,301.90) ÷ 3 |
| R1 | 4,326.00 | 2 × P − yesterday's low |
| S1 | 4,270.20 | 2 × P − yesterday's high |
The pivot point calculator does this for you and shows the Fibonacci, Camarilla, Woodie and DeMark versions side by side. The script uses the classic levels.
Which daily candle to use
Gold has no single official close. On most TradingView gold feeds the daily candle ends at 5 p.m. New York time, which is 02:30 IST while the US is on summer time and 03:30 IST in winter, so the day's pivots are ready long before London opens. Brokers whose server runs on GMT+0 close the day at 05:30 IST and show a short Sunday candle, which gives different levels and odd Monday pivots. Use one source for both the pivots and your trades. The script reads the completed daily candle from the chart's own feed and never looks ahead.
On Monday the levels come from Friday's candle, so a weekend gap can open gold far from P. That's fine: if the price never comes back to the pivot, there's simply no trade.
The rules, step by step
1. Note P, R1 and S1 before London
Take yesterday's high, low and close and work out the three levels. Plot them on a 15-minute XAUUSD chart.
2. Set the bias at 8 a.m. London time
Look at where gold opens the London session (12:30 IST in summer, 13:30 IST in winter). Above P means you only look for longs today. Below P means only shorts. Write it down so you don't change your mind halfway through the morning.
3. Wait for the pullback to P
For a long, wait for a 15-minute candle whose low comes back to P, or to within a tenth of the 14-period ATR of it, and that closes above P as a bullish candle (close above open). That close is the entry. The low can poke below P; what matters is that buyers pushed the price back above it by the close.
4. Put the stop below P and the target at R1
The stop goes half an ATR below P or below the entry candle's low, whichever is lower. The target is R1. If R1 is less than one times the risk away, skip the trade: the reward isn't worth it.
5. One trade a day, and know when the bias has failed
Take the first valid signal between 8 a.m. and 4 p.m. London time and nothing after it. If a candle closes more than half an ATR below P on a long-bias day, the market has told you the bias was wrong, and the script stands aside until tomorrow. Anything still open at 5 p.m. London time is closed. Shorts are the mirror image: bias below P, a rally up to P, a bearish close back below it, the stop above, S1 as the target.
Worked example: XAUUSD, 15-minute chart
From the levels above, P is 4,294.30 and R1 is 4,326.00. Gold opens the London session at 4,302.00, above P, so it's a long-bias day. It rallies for an hour and then drifts back. The 10:00 candle (14:30 IST in summer) dips to 4,293.50, just under the pivot, and closes at 4,299.30, above both P and its own open. That's the signal. The ATR is 5.05, so half an ATR below the candle's low, which is under P, puts the stop at 4,290.98.
| XAUUSD long | |
|---|---|
| Entry | 4,299.30 |
| Stop loss (half an ATR below the candle's low) | 4,290.98, $8.32 away |
| Target (R1) | 4,326.00, $26.70 away, about 3.2R |
| Account and risk | $10,000, risking 1% = $100 |
| Lot size | $100 ÷ ($8.32 × 100 ounces) = 0.120, so 0.12 lots (the script trades the unrounded 12.0 ounces) |
| Loss if the stop is hit | $99.84 |
| Profit at R1 | $320.40 |
Gold works its way up and reaches R1 by 14:00 London time, well before the 5 p.m. cut-off. The reward here is more than 3R because R1 sits a long way from P on a day after a wide range. After a narrow day R1 is close, and the 1R filter skips more trades. The XAUUSD lot size calculator does the sizing for any stop.
Days when the pivot works less well
- Strong trend days. When gold opens far above P and never looks back, there's no pullback and no trade. That's a missed move, not a loss, and it's the price of waiting for a good entry.
- News days. US data at 8:30 a.m. New York time (18:00 IST in summer, 19:00 IST in winter) can push gold straight through P and R1 in one candle. The gold news guide lists the releases that matter.
- Choppy days around P. If gold keeps crossing the pivot, the stand-aside rule usually takes you out of the day before a second and third loss.
- Very wide or narrow ranges yesterday. After a huge day, R1 may be out of reach before 5 p.m. London time and the trade closes at the cut-off for whatever it shows. After a tiny day, R1 can be too close to be worth it.
Risk management
- Size from the stop. $1 on one lot of gold is $100. An $8 stop at 1% risk on $10,000 is about 0.12 lots, not 1 lot. See risk management for gold.
- One trade a day. The rule protects you from revenge trading the pivot all afternoon.
- Check the spread at entry. On a stop of $8, a spread that widens from 30 cents to $1 eats a real part of your risk.
- Prop firm accounts: a daily loss limit of 4% or 5% leaves room for this strategy's one trade, but check the news rules before trading around US data.
Common mistakes
- Switching bias midway. If you decided "long only" at the London open, a sudden drop below P isn't a short signal under these rules. It's a reason to stand aside.
- Buying the touch. The entry is the close back above P, not the moment the price reaches it.
- Mixing pivot sources. Levels from a GMT+0 broker on a 5 p.m. New York chart give you two different P values. Pick one.
- Moving the target past R1. Test that idea with the script first; R2 is much further and is reached far less often within the day.
Backtest it yourself on TradingView
This page doesn't quote a win rate or a profit figure, and you should be wary of anyone who does without showing the test. Results change with the market, the dates, the data feed and the costs you put in. The honest way is to run the test yourself, and the free script below does the work in a couple of minutes.
- Open the chart. On TradingView, open XAUUSD on the 15-minute chart.
- Add the script. Open the Pine Editor from the Pine icon in the panel on the right of the chart (older layouts have it as a tab under the chart), delete the code that's already there, paste this strategy's code and click "Add to chart".
- Put in your costs. Open the strategy's settings and go to Properties. Enter your broker's commission and a little slippage. A test without costs flatters every strategy, and short-term ones most of all.
- Read the Strategy Tester. The panel under the chart shows the net profit, the maximum drawdown, the profit factor, the number of trades and a list of every trade. Click a few trades and check on the chart that each one follows the rules. Trade sizes are shown in units rather than lots: 100,000 units is one lot of a forex pair, and 100 ounces is one lot of gold.
- Change one setting at a time. Compare the touch distance (0 to 0.3 × ATR), the stand-aside rule (0.3 to 1 × ATR), the 1R minimum against 1.5R, and the cut-off at 4 p.m. against 5 p.m. London time. Then try the same rules on EURUSD and GBPUSD, which have pivots too.
As a rough guide, don't trust a result with fewer than 100 trades, a profit factor under 1 once costs are in, or a drawdown you couldn't sit through with real money. Settings tuned to look good on one stretch of history often fail on the next, so check the same settings on dates you didn't tune them on, then demo trade the strategy for a few weeks. How much history you can test depends on your TradingView plan: the free plan loads 5,000 candles, which is a few months of 15-minute candles but years of daily ones.
The script sizes each trade from the stop loss and your risk percentage, starts with $10,000 and assumes 1:100 leverage (a 1% margin setting), so the tester doesn't flag margin calls on normal forex trade sizes. Change these under Properties to match your account. By default TradingView fills orders at the open of the candle after the signal, so the fill can differ a little from the signal candle's close.
Download the free Pine Script and PDF
The script is written in Pine Script version 6 for this guide and follows the rules above. It can't read the economic calendar, so skipping news days is up to you. It's free to use, change and share. The PDF is a one-page cheat sheet with the rules, the levels formula, the hours in IST, a worked example and a checklist, to keep next to your chart.
Show the code (Pine Script v6, 78 lines)
//@version=6
// XAUUSD Intraday Pivot strategy by PipLedger (https://pipledgerfx.com/xauusd-intraday-strategy)
// Uses yesterday's floor pivots (P, R1, S1). The London open sets the day's bias (price above or below P), then the strategy trades the first clean pullback to P, with R1 or S1 as the target.
// Free to use and change. For education and backtesting only; not financial advice.
strategy("PipLedger: XAUUSD Intraday Pivot", shorttitle="Gold Pivot", overlay=true, initial_capital=10000, pyramiding=0, default_qty_type=strategy.fixed, default_qty_value=1, margin_long=1, margin_short=1, currency=currency.USD)
// ---------- Inputs
tz = input.string("Europe/London", "Session time zone")
tradeSess = input.session("0800-1600", "Trading window (London time)")
closeHour = input.int(17, "Close any open trade at (hour, London time)", minval=1, maxval=23)
touchAtr = input.float(0.1, "A pullback counts if the low comes within (x ATR 14) of P", minval=0.0, step=0.05)
failAtr = input.float(0.5, "No trade today if a candle closes this far through P against the bias (x ATR)", minval=0.1, step=0.1)
stopAtr = input.float(0.5, "Stop buffer below P or the candle low (x ATR)", minval=0.0, step=0.1)
minRR = input.float(1.0, "Skip if R1 (or S1) is less than this many R away", minval=0.5, step=0.25)
riskPct = input.float(1.0, "Risk per trade (% of equity)", minval=0.1, maxval=5.0, step=0.1)
// ---------- Helpers
fx = strategy.convert_to_account(1.0) // one unit of the chart's quote currency in account currency (1 on USD-quoted charts)
calcQty(float entry, float stop) =>
float dist = math.abs(entry - stop)
dist > 0 and not na(fx) ? strategy.equity * riskPct / 100 / (dist * syminfo.pointvalue * fx) : 0.0
atr = ta.atr(14)
// yesterday's completed daily candle (no repainting: [1] with lookahead_on)
[dH, dL, dC] = request.security(syminfo.tickerid, "D", [high[1], low[1], close[1]], lookahead=barmerge.lookahead_on)
P = (dH + dL + dC) / 3
R1 = 2 * P - dL
S1 = 2 * P - dH
inSess = not na(time(timeframe.period, tradeSess, tz))
cutoff = timestamp(tz, year(time, tz), month(time, tz), dayofmonth(time, tz), closeHour, 0)
// ---------- Bias, set by the first candle of the London window
var int bias = 0 // 1 = buy pullbacks to P, -1 = sell rallies to P, 0 = no trade today
var bool done = false
if inSess and not inSess[1]
bias := open > P ? 1 : open < P ? -1 : 0
done := false
// a clear close through P means the bias was wrong: stand aside for the rest of the day
if inSess and bias == 1 and close < P - failAtr * atr
bias := 0
if inSess and bias == -1 and close > P + failAtr * atr
bias := 0
// ---------- Signals: price comes back to P and the candle closes back on the bias side
canTrade = inSess and not done and strategy.position_size == 0 and time_close < cutoff and not na(P)
longSl = math.min(low, P) - stopAtr * atr
shortSl = math.max(high, P) + stopAtr * atr
longSig = canTrade and bias == 1 and low <= P + touchAtr * atr and close > P and close > open and R1 - close >= minRR * (close - longSl)
shortSig = canTrade and bias == -1 and high >= P - touchAtr * atr and close < P and close < open and close - S1 >= minRR * (shortSl - close)
// ---------- Orders
if longSig
float q = calcQty(close, longSl)
if q > 0
strategy.entry("Long", strategy.long, qty=q)
strategy.exit("Long exit", "Long", stop=longSl, limit=R1)
done := true
if shortSig
float q = calcQty(close, shortSl)
if q > 0
strategy.entry("Short", strategy.short, qty=q)
strategy.exit("Short exit", "Short", stop=shortSl, limit=S1)
done := true
// the candle that closes at the cut-off sends the order, so it fills at the cut-off time
if strategy.position_size != 0 and time_close >= cutoff
strategy.close_all(comment="Session end")
// ---------- Chart
plot(P, "Pivot P", color=color.new(color.orange, 0), linewidth=2, style=plot.style_stepline)
plot(R1, "R1", color=color.new(color.teal, 0), style=plot.style_stepline)
plot(S1, "S1", color=color.new(color.red, 0), style=plot.style_stepline)
bgcolor(inSess and bias == 1 ? color.new(color.teal, 94) : inSess and bias == -1 ? color.new(color.red, 94) : na, title="Bias")
plotshape(longSig, "Long at P", shape.triangleup, location.belowbar, color.teal, size=size.small)
plotshape(shortSig, "Short at P", shape.triangledown, location.abovebar, color.red, size=size.small)Trading this from India
The rules work on any gold chart, and TradingView's XAUUSD chart is a fine place to learn and backtest them. To trade gold legally from India, though, use MCX gold futures, including the smaller Gold Mini and Gold Petal contracts, through a SEBI-registered broker. Trading XAUUSD as a CFD with an offshore forex platform isn't allowed for residents under FEMA. MCX gold trades from 9 a.m. to 11:30 p.m. IST while the US is on daylight saving time and to 11:55 p.m. in the US winter, which covers the London session and the New York morning. The contract is priced in rupees, and MCX trades different hours from spot gold, so work out the pivots from the MCX contract's own daily high, low and close if you trade it there. The full picture is in is forex trading legal in India and XAUUSD market timings in India.
Related strategies: XAUUSD London session, XAUUSD New York session, gold Donchian breakout, XAUUSD FVG + order block, XAUUSD pin bar, XAUUSD scalping, previous day high and low. All 34 strategies are compared on one page in forex trading strategies.