Gold Desk 2026-08-18 — Chop at Pivot, Real Yields Grinding Higher
Gold is glued to its daily pivot at 4,402.71 after a tight overnight range that swept both weekly R1 and weekly P and closed neither. The macro is quietly turning less friendly — 10y real yields nudged +3bp to 2.44% and fed-funds futures now price a 34% hike into the Sep 16 FOMC — but DXY refuses to firm (99.62, −1.12% month). The result is a stalemate: the daily trend is still emphatically up, but the 15m/1h are grinding beneath their EMAs and daily MACD histogram has begun to roll. This note leans dip-buy while fading the first test of 4,440 R1.
Gold is glued to its daily pivot at 4,402.71 after a tight overnight range that swept both weekly R1 and weekly P and closed neither. The macro is quietly turning less friendly — 10y real yields nudged +3bp to 2.44% and fed-funds futures now price a 34% hike into the Sep 16 FOMC — but DXY refuses to firm (99.62, −1.12% month). The result is a stalemate: the daily trend is still emphatically up, but the 15m/1h are grinding beneath their EMAs and daily MACD histogram has begun to roll. This note leans dip-buy while fading the first test of 4,440 R1.
The session
Spot (PAXG) prints 4,391.59 into the London handover, up 0.27% intraday and holding the middle of a 4,365.54–4,430.88 range. The session high was tagged in the Asia hours, faded almost instantly, and price has spent the balance of the tape mean-reverting around the 4,402.71 daily pivot without either side able to convert it into support or resistance. Front-month COMEX (GC=F) sits at 4,456 — a 1.47% premium to spot that is normal contango, not a stress signal. The overnight tape's actual catalyst list is thin: no US data since Monday's Canadian CPI beat (0.5% m/m vs 0.4% expected), and the UK Claimant Count print at 9:00 UTC came in dovish (−11.0K vs +16.5K forecast) but did nothing meaningful to cable or metals. The GBP labour miss did knock DXY marginally lower (−0.17% intraday), which is the only reason gold isn't already probing the day's lows.
Multi-timeframe read
The four charts are telling four different stories, and that is itself the trade.
- 15m — bearish. RSI 40.9, price −4.5 under a rolling-over EMA20 and −8.6 under EMA50, MACD histogram positive but decelerating. Sellers own the shortest frame.
- 1h — bearish-to-neutral. RSI 45.3, price sits below both EMA20 (4,399.88) and EMA50 (4,395.03), but MACD histogram is turning up from negative — a base attempt.
- 4h — neutral. RSI 49.7, price hugging EMA20 (4,391.77) exactly. This is the fulcrum frame.
- 1d — outright bullish. RSI 63.6, price sitting +44.2 above EMA200, +96.1 above EMA20, +164.4 above EMA50, MACD histogram positive though hooking down for a first time.
The confluence is: the daily trend has NOT rolled — it has merely paused — while the intraday frames have finished a corrective push and are trying to base right where the daily 20-EMA and the daily pivot 4,402.71 sit. investing.com's aggregate is "Strong Buy"; I don't share that conviction on any intraday frame, but on the daily I'm aligned. The disagreement is timeframe, not direction — worth flagging because a reader anchoring off the aggregate alone will get stopped in the current chop.
Macro frame
The 10y real yield (TIPS) at 2.44%, +3bp d/d, is the single most important line in this snapshot and it is moving the wrong way for gold. Real yields are the direct opportunity cost of holding a non-yielding asset; +3bp is small but it comes on the heels of a hawkish repricing of the Sep 16 FOMC to a 34% hike / 66% hold / 0% cut split. That combination — real yields grinding up on a firmer policy path — is the classic gold headwind, and it is why the daily MACD has begun to roll despite the underlying trend.
The 10y nominal at 4.72% (+5bp) decomposes as real 2.44 + breakeven 2.28 — inflation expectations are essentially flat (+1bp), so the entire move is real-rate driven. That matters: if breakevens were doing the work, gold would be catching an inflation-hedge bid. It isn't.
The counterweight is DXY, which refuses to translate the hawkish rates story into dollar strength. DXY at 99.62 is down 0.17% on the day, 0.19% on the week, and 1.12% on the month, sitting below its daily EMA20 (100.14) and EMA50 (100.21). The 30-day DXY↔XAU correlation is a soft −0.26 — meaningful but not tight — and the fact that DXY is bleeding while rates firm tells you the dollar market is discounting fiscal / balance-of-payments concerns, not policy. That is why gold is holding pivot rather than breaking it.
Cross-asset frame: VIX is up 11.6% to 15.90 (nascent risk-off tilt, gold-supportive), GVZ (gold vol index) at 23.92 is neither cheap nor expensive — the options market is not pricing an imminent shock. Gold/silver at 67.3 with silver $65.22 is a silver-favoured ratio and consistent with a healthy precious-metals regime; a broken PM tape would see this ratio well above 80. WTI at $84.27 is quiet. Bitcoin at $64,137 (−0.6%) is not participating in any "digital gold" bid.
Sourced non-US colour is thin — the pre-fetched investing.com wire references older Middle East and Iran-ceasefire headlines that I won't rely on today, and the kitco/dailyfx excerpts were metadata rather than news. Canadian core CPI holding at target (Median 2.0%, Trimmed 1.9%) is the only fresh central-bank input, and it argues for a hold-BoC path that has no direct gold read.
Two scenarios
Note: conviction figures are honest qualitative confidence, not back-tested probabilities.
Buy setup
- Trigger: close inside 4,345.17–4,382.34 (daily S2 to daily S1) with the following bar closing back above the reclaimed level, ideally reclaiming the 0.5–0.618 golden pocket at 4,360.06–4,373.58.
- Invalidation: daily close below 4,324.80 (daily S3). Beneath there the fib swing is failed and the daily trend is genuinely in question.
- Target: 4,439.88 (daily R1), scale at 4,402.71 pivot.
- Conviction: 55%
- Rationale: The 5-session swing 4,316.28–4,430.88 puts the golden pocket squarely on top of the weekly pivot 4,377.09 — a triple confluence (fib + weekly P + daily S1 cluster). Daily trend is intact, DXY is weak, and 1h MACD is hooking up. This is the trade the tape is set up for.
Sell setup
- Trigger: rejection wick and bearish close inside 4,413.00–4,439.88 (0.236 fib + daily R1), ideally on the first test.
- Invalidation: daily close above 4,460.25 (daily R2). Above there the session high is decisively cleared.
- Target: 4,377.09 (weekly pivot), stretch to 4,345.17 (daily S2).
- Conviction: 55%
- Rationale: Daily RSI 63.6 is not yet overbought but has room to reject, MACD histogram is rolling over on the daily, real yields are grinding higher, and R1 has been rejected on the session tape once already today. A clean bounce fade is the higher-probability intraday trade even inside a bullish daily.
Levels worth marking
- 4,497.42 — daily R3, upside stretch if R2 gives way.
- 4,460.25 — daily R2, hard invalidation for the sell.
- 4,446.26 / 4,439.88 — weekly R1 and daily R1 cluster; the primary supply shelf.
- 4,430.88 — session high.
- 4,402.71 — daily pivot; today's fulcrum.
- 4,391.59 — spot, sitting on 4h EMA20.
- 4,382.34 / 4,377.09 — daily S1 + weekly pivot; first meaningful demand.
- 4,373.58 / 4,360.06 — golden pocket (0.5 / 0.618) of the 5-session swing.
- 4,345.17 — daily S2, secondary demand.
- 4,324.80 / 4,311.24 — daily S3 + weekly S1 cluster; last defence before the daily trend narrative gets challenged.
Calendar / catalysts
Real ForexFactory prints in the brief:
- Mon Aug 17, 15:30 UTC — CAD CPI m/m (High): 0.5% actual vs 0.4% forecast (prev −0.4%). Marginal beat.
- Mon Aug 17 — CAD Median CPI y/y (High): 2.0% actual vs 2.0% forecast (prev 1.9%). In line.
- Mon Aug 17 — CAD Trimmed CPI y/y (High): 1.9% actual vs 1.8% forecast (prev 1.9%). Small beat.
- Mon Aug 17 — CAD Common CPI y/y (Medium): 2.7% actual vs 2.5% forecast (prev 2.6%).
- Tue Aug 18, 09:00 UTC — GBP Claimant Count Change (High): −11.0K actual vs +16.5K forecast (prev +6.7K). Meaningful dovish miss on the labour side.
- Tue Aug 18 — GBP Average Earnings Index 3m/y (Medium): 4.1% actual vs 4.0% forecast (prev 4.4%).
No US high-impact prints on today's ForexFactory pull; the tape will be technical / positioning until the next US datapoint lands.
Sources cited
Price snapshot (PAXG spot, GC=F futures); US Treasury real-yield curve (TIPS 10y 2.44%) and Treasury par yields (nominal 10y 4.72%); fed-funds futures implied path for the Sep 16, 2026 FOMC; investing.com automated technical aggregate (Strong Buy) and investing.com gold news wire; ForexFactory economic calendar (CAD CPI complex Aug 17, UK Claimant Count Aug 18); onewordnews sentiment keyword search. CFTC COT was unavailable this run — no positioning read.
Desk summary & bias
Synthesis. Gold is caught between a still-emphatically-bullish daily structure and a nascent macro headwind: real yields ticked +3bp to 2.44% and fed-funds futures now price 34% probability of a September hike, both of which argue for a pause in the trend rather than its continuation. DXY refuses to firm on the hawkish rates story — this is the only reason gold isn't already at S1. Technically the tape is a coin-flip at pivot, but the 5-session swing puts the golden pocket at 4,360–4,374 directly on top of weekly pivot 4,377.09 — a triple confluence that makes the dip-buy the higher-conviction structural trade even while an intraday R1 fade is the higher-probability tactical one. Watch the 4,402.71 pivot as the referee.
Trade ideas.
| # | Bias | Setup | Trigger | Entry zone | Invalidation | Target | Conviction | Why |
|---|---|---|---|---|---|---|---|---|
| 1 | SELL | R1 bounce fade | Rejection close inside 0.236 fib + daily R1 shelf | 4,413.00 – 4,439.88 | 4,460.25 (daily R2 close) | 4,377.09 (weekly P), stretch 4,345.17 | 55% | Daily MACD rolling, real yields up, session high already faded once |
| 2 | BUY | Golden-pocket dip buy | Close inside zone reclaiming 4,377.09 weekly pivot | 4,345.17 – 4,382.34 | 4,324.80 (daily S3 close) | 4,439.88 (daily R1) | 55% | Fib 0.5–0.618 stacked on weekly pivot + daily S1, DXY bleeding, daily trend intact |
| 3 | BUY | Trend continuation | Daily close above 4,446.26 (weekly R1 + daily R1) | 4,440 – 4,460 | 4,402.71 (pivot loss) | 4,497.42 (daily R3) | 35% | Only if R2 gives cleanly; against near-term MACD roll |
Net desk bias: NEUTRAL, tactically BUY-ON-DIPS. The daily trend, the multi-month DXY bleed, and the fib/pivot confluence at 4,360–4,382 argue for structural dip-buying; that outweighs the modest real-yield headwind and the 34% hike odds, which the DXY tape is clearly refusing to endorse. The tactical exception is the R1 fade — I want to be short paper into 4,413–4,440 for a trade back to the weekly pivot, not to invert the bias. If the day closes below 4,377.09 without holding, the read flips to genuine neutral and idea #2 does not arm.
(not financial advice)
//@version=5
indicator("Gold Desk 2026-08-18 — bias NEUTRAL/BUY-DIPS", overlay=true, max_lines_count=300, max_labels_count=300, max_boxes_count=100)
// ── Inputs: anchor the fibonacci to the actual swing candles ──
swingHighTime = input.time(timestamp("2026-08-18T03:00:00+00:00"), "Swing High Time")
swingLowTime = input.time(timestamp("2026-08-12T00:00:00+00:00"), "Swing Low Time")
swingHighPrice = input.float(4430.88, "Swing High Price")
swingLowPrice = input.float(4316.28, "Swing Low Price")
// ── EMAs (bar-anchored series, safe to plot directly) ──
plot(ta.ema(close, 20), color=color.new(color.yellow, 0), linewidth=1, title="EMA20")
plot(ta.ema(close, 50), color=color.new(color.orange, 0), linewidth=1, title="EMA50")
plot(ta.ema(close, 200), color=color.new(color.fuchsia, 0), linewidth=2, title="EMA200")
// ── Fibonacci levels (computed once from the input swing) ──
diff = swingHighPrice - swingLowPrice
fib236 = swingHighPrice - diff * 0.236
fib382 = swingHighPrice - diff * 0.382
fib500 = swingHighPrice - diff * 0.500
fib618 = swingHighPrice - diff * 0.618
fib786 = swingHighPrice - diff * 0.786
// ── Persistent drawing objects (declared ONCE, repositioned on last bar) ──
// Fibonacci lines
var line lf236 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.gray, 30), style=line.style_dashed, width=1)
var line lf382 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.aqua, 20), style=line.style_dashed, width=1)
var line lf500 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.yellow, 20), style=line.style_dashed, width=1)
var line lf618 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.yellow, 20), style=line.style_dashed, width=1)
var line lf786 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.gray, 30), style=line.style_dashed, width=1)
// Golden pocket shaded box
var box gp = box.new(na, na, na, na, xloc=xloc.bar_time, bgcolor=color.new(color.yellow, 85), border_color=color.new(color.yellow, 40))
// Pivot lines
var line dP = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.aqua, 0), width=2)
var line dR1 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.red, 0), width=1)
var line dR2 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.red, 40), width=1, style=line.style_dotted)
var line dS1 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.lime, 0), width=1)
var line dS2 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.lime, 40), width=1, style=line.style_dotted)
var line dS3 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.lime, 40), width=1, style=line.style_dotted)
var line wP = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.white, 30), width=2, style=line.style_dashed)
// Supply / demand zone boxes for the trade setups
var box sellZone = box.new(na, na, na, na, xloc=xloc.bar_time, bgcolor=color.new(color.red, 82), border_color=color.new(color.red, 40))
var box buyZone = box.new(na, na, na, na, xloc=xloc.bar_time, bgcolor=color.new(color.lime, 82), border_color=color.new(color.lime, 40))
// Trade invalidation / target lines
var line sellInv = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.red, 0), style=line.style_dashed, width=1)
var line sellTgt = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.red, 40), style=line.style_dotted, width=1)
var line buyInv = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.lime, 0), style=line.style_dashed, width=1)
var line buyTgt = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.lime, 40), style=line.style_dotted, width=1)
// Labels riding the right visible edge
var label lbDP = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.aqua, 30), textcolor=color.white, size=size.small)
var label lbDR1 = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.red, 30), textcolor=color.white, size=size.small)
var label lbDR2 = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.red, 50), textcolor=color.white, size=size.small)
var label lbDS1 = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.lime, 30), textcolor=color.white, size=size.small)
var label lbDS2 = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.lime, 50), textcolor=color.white, size=size.small)
var label lbDS3 = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.lime, 50), textcolor=color.white, size=size.small)
var label lbWP = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.gray, 40), textcolor=color.white, size=size.small)
var label lbGP = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.yellow, 40), textcolor=color.black, size=size.small)
var label lbSell = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.red, 20), textcolor=color.white, size=size.normal)
var label lbBuy = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.lime, 20), textcolor=color.white, size=size.normal)
var label lbState = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.gray, 20), textcolor=color.white, size=size.small)
// HUD table (screen-anchored — intentional)
var table hud = table.new(position.top_right, 2, 6, bgcolor=color.new(color.black, 30), border_width=1)
// ── Trade state machine (close-confirmed, no repaint) ──
inSession = hour(time, "UTC") >= 7 and hour(time, "UTC") < 21
sellArmed = barstate.isconfirmed and inSession and close <= 4439.88 and close >= 4413.00
sellTrig = sellArmed and close < open
sellInvalidated = barstate.isconfirmed and close > 4460.25
sellTargetHit = barstate.isconfirmed and close <= 4377.09
buyArmed = barstate.isconfirmed and inSession and close >= 4345.17 and close <= 4382.34
buyTrig = buyArmed and close > open and close > 4377.09
buyInvalidated = barstate.isconfirmed and close < 4324.80
buyTargetHit = barstate.isconfirmed and close >= 4439.88
var string sellState = "ARMED"
var string buyState = "ARMED"
if sellTrig
sellState := "TRIGGERED"
if sellInvalidated
sellState := "INVALIDATED"
if sellTargetHit
sellState := "TARGET HIT"
if buyTrig
buyState := "TRIGGERED"
if buyInvalidated
buyState := "INVALIDATED"
if buyTargetHit
buyState := "TARGET HIT"
// ── Reposition every drawing to the visible window on the last bar ──
if barstate.islast
lb = chart.left_visible_bar_time
rb = chart.right_visible_bar_time
// Fibonacci lines — anchored on the swing high candle, extended to the right edge
line.set_xy1(lf236, swingHighTime, fib236)
line.set_xy2(lf236, rb, fib236)
line.set_xy1(lf382, swingHighTime, fib382)
line.set_xy2(lf382, rb, fib382)
line.set_xy1(lf500, swingHighTime, fib500)
line.set_xy2(lf500, rb, fib500)
line.set_xy1(lf618, swingHighTime, fib618)
line.set_xy2(lf618, rb, fib618)
line.set_xy1(lf786, swingHighTime, fib786)
line.set_xy2(lf786, rb, fib786)
// Golden pocket (0.5 → 0.618)
box.set_left(gp, swingHighTime)
box.set_right(gp, rb)
box.set_top(gp, fib500)
box.set_bottom(gp, fib618)
// Pivots — span the visible window
line.set_xy1(dP, lb, 4402.71)
line.set_xy2(dP, rb, 4402.71)
line.set_xy1(dR1, lb, 4439.88)
line.set_xy2(dR1, rb, 4439.88)
line.set_xy1(dR2, lb, 4460.25)
line.set_xy2(dR2, rb, 4460.25)
line.set_xy1(dS1, lb, 4382.34)
line.set_xy2(dS1, rb, 4382.34)
line.set_xy1(dS2, lb, 4345.17)
line.set_xy2(dS2, rb, 4345.17)
line.set_xy1(dS3, lb, 4324.80)
line.set_xy2(dS3, rb, 4324.80)
line.set_xy1(wP, lb, 4377.09)
line.set_xy2(wP, rb, 4377.09)
// Trade zones
box.set_left(sellZone, lb)
box.set_right(sellZone, rb)
box.set_top(sellZone, 4439.88)
box.set_bottom(sellZone, 4413.00)
box.set_left(buyZone, lb)
box.set_right(buyZone, rb)
box.set_top(buyZone, 4382.34)
box.set_bottom(buyZone, 4345.17)
// Trade invalidations & targets
line.set_xy1(sellInv, lb, 4460.25)
line.set_xy2(sellInv, rb, 4460.25)
line.set_xy1(sellTgt, lb, 4377.09)
line.set_xy2(sellTgt, rb, 4377.09)
line.set_xy1(buyInv, lb, 4324.80)
line.set_xy2(buyInv, rb, 4324.80)
line.set_xy1(buyTgt, lb, 4439.88)
line.set_xy2(buyTgt, rb, 4439.88)
// Labels — pinned to the right visible edge
label.set_x(lbDP, rb)
label.set_y(lbDP, 4402.71)
label.set_text(lbDP, "Daily P 4402.71")
label.set_x(lbDR1, rb)
label.set_y(lbDR1, 4439.88)
label.set_text(lbDR1, "Daily R1 4439.88")
label.set_x(lbDR2, rb)
label.set_y(lbDR2, 4460.25)
label.set_text(lbDR2, "Daily R2 4460.25 (SELL invalid)")
label.set_x(lbDS1, rb)
label.set_y(lbDS1, 4382.34)
label.set_text(lbDS1, "Daily S1 4382.34")
label.set_x(lbDS2, rb)
label.set_y(lbDS2, 4345.17)
label.set_text(lbDS2, "Daily S2 4345.17")
label.set_x(lbDS3, rb)
label.set_y(lbDS3, 4324.80)
label.set_text(lbDS3, "Daily S3 4324.80 (BUY invalid)")
label.set_x(lbWP, rb)
label.set_y(lbWP, 4377.09)
label.set_text(lbWP, "Weekly P 4377.09")
label.set_x(lbGP, rb)
label.set_y(lbGP, (fib500 + fib618) / 2)
label.set_text(lbGP, "Golden Pocket 4360-4374")
label.set_x(lbSell, rb)
label.set_y(lbSell, 4426.94)
label.set_text(lbSell, "SELL fade 55% — " + sellState)
label.set_x(lbBuy, rb)
label.set_y(lbBuy, 4363.75)
label.set_text(lbBuy, "BUY dip 55% — " + buyState)
label.set_x(lbState, rb)
label.set_y(lbState, 4497.42)
label.set_text(lbState, "Daily R3 4497.42 (stretch)")
// HUD
table.cell(hud, 0, 0, "Gold Desk 2026-08-18", text_color=color.white, bgcolor=color.new(color.black, 20))
table.cell(hud, 1, 0, "NEUTRAL / BUY-DIPS", text_color=color.yellow, bgcolor=color.new(color.black, 20))
table.cell(hud, 0, 1, "Real yield 10y", text_color=color.silver)
table.cell(hud, 1, 1, "2.44% (+3bp)", text_color=color.red)
table.cell(hud, 0, 2, "DXY", text_color=color.silver)
table.cell(hud, 1, 2, "99.62 (-1.1% mo)", text_color=color.lime)
table.cell(hud, 0, 3, "Fed Sep16", text_color=color.silver)
table.cell(hud, 1, 3, "Hold 66 / Hike 34", text_color=color.yellow)
table.cell(hud, 0, 4, "Daily RSI", text_color=color.silver)
table.cell(hud, 1, 4, "63.6", text_color=color.yellow)
table.cell(hud, 0, 5, "invest.com aggr.", text_color=color.silver)
table.cell(hud, 1, 5, "Strong Buy (daily)", text_color=color.lime)
// ── Alerts (close-confirmed, session-gated, non-repainting) ──
alertcondition(sellTrig, title="Gold SELL armed — R1 fade", message="XAUUSD closed inside 4413-4440 supply during LDN/NY with a bearish body — SELL trigger confirmed")
alertcondition(sellInvalidated, title="Gold SELL invalidated", message="XAUUSD closed above 4460.25 daily R2 — SELL invalidated")
alertcondition(sellTargetHit, title="Gold SELL target hit", message="XAUUSD closed at or below 4377.09 weekly pivot — SELL target hit")
alertcondition(buyTrig, title="Gold BUY armed — pivot dip", message="XAUUSD closed inside 4345-4382 demand during LDN/NY reclaiming 4377.09 weekly pivot — BUY trigger confirmed")
alertcondition(buyInvalidated, title="Gold BUY invalidated", message="XAUUSD closed below 4324.80 daily S3 — BUY invalidated, trend read at risk")
alertcondition(buyTargetHit, title="Gold BUY target hit", message="XAUUSD closed at or above 4439.88 daily R1 — BUY target hit")
{"bias": "NEUTRAL",
"ideas": [
{"bias": "SELL", "label": "R1 bounce fade", "entry_low": 4413, "entry_high": 4440,
"invalidation": 4460, "target": 4377, "conviction": 55},
{"bias": "BUY", "label": "Golden-pocket dip buy", "entry_low": 4345, "entry_high": 4382,
"invalidation": 4325, "target": 4440, "conviction": 55},
{"bias": "BUY", "label": "Trend continuation breakout", "entry_low": 4440, "entry_high": 4460,
"invalidation": 4402, "target": 4497, "conviction": 35}
]}
TradingView chart script
Paste into TradingView → Pine Editor → Add to chart to see these levels and trade zones drawn live. (Also attached to the email edition as a .pine file.)
//@version=5
indicator("Gold Desk 2026-08-18 — bias NEUTRAL/BUY-DIPS", overlay=true, max_lines_count=300, max_labels_count=300, max_boxes_count=100)
// ── Inputs: anchor the fibonacci to the actual swing candles ──
swingHighTime = input.time(timestamp("2026-08-18T03:00:00+00:00"), "Swing High Time")
swingLowTime = input.time(timestamp("2026-08-12T00:00:00+00:00"), "Swing Low Time")
swingHighPrice = input.float(4430.88, "Swing High Price")
swingLowPrice = input.float(4316.28, "Swing Low Price")
// ── EMAs (bar-anchored series, safe to plot directly) ──
plot(ta.ema(close, 20), color=color.new(color.yellow, 0), linewidth=1, title="EMA20")
plot(ta.ema(close, 50), color=color.new(color.orange, 0), linewidth=1, title="EMA50")
plot(ta.ema(close, 200), color=color.new(color.fuchsia, 0), linewidth=2, title="EMA200")
// ── Fibonacci levels (computed once from the input swing) ──
diff = swingHighPrice - swingLowPrice
fib236 = swingHighPrice - diff * 0.236
fib382 = swingHighPrice - diff * 0.382
fib500 = swingHighPrice - diff * 0.500
fib618 = swingHighPrice - diff * 0.618
fib786 = swingHighPrice - diff * 0.786
// ── Persistent drawing objects (declared ONCE, repositioned on last bar) ──
// Fibonacci lines
var line lf236 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.gray, 30), style=line.style_dashed, width=1)
var line lf382 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.aqua, 20), style=line.style_dashed, width=1)
var line lf500 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.yellow, 20), style=line.style_dashed, width=1)
var line lf618 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.yellow, 20), style=line.style_dashed, width=1)
var line lf786 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.gray, 30), style=line.style_dashed, width=1)
// Golden pocket shaded box
var box gp = box.new(na, na, na, na, xloc=xloc.bar_time, bgcolor=color.new(color.yellow, 85), border_color=color.new(color.yellow, 40))
// Pivot lines
var line dP = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.aqua, 0), width=2)
var line dR1 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.red, 0), width=1)
var line dR2 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.red, 40), width=1, style=line.style_dotted)
var line dS1 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.lime, 0), width=1)
var line dS2 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.lime, 40), width=1, style=line.style_dotted)
var line dS3 = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.lime, 40), width=1, style=line.style_dotted)
var line wP = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.white, 30), width=2, style=line.style_dashed)
// Supply / demand zone boxes for the trade setups
var box sellZone = box.new(na, na, na, na, xloc=xloc.bar_time, bgcolor=color.new(color.red, 82), border_color=color.new(color.red, 40))
var box buyZone = box.new(na, na, na, na, xloc=xloc.bar_time, bgcolor=color.new(color.lime, 82), border_color=color.new(color.lime, 40))
// Trade invalidation / target lines
var line sellInv = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.red, 0), style=line.style_dashed, width=1)
var line sellTgt = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.red, 40), style=line.style_dotted, width=1)
var line buyInv = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.lime, 0), style=line.style_dashed, width=1)
var line buyTgt = line.new(na, na, na, na, xloc=xloc.bar_time, color=color.new(color.lime, 40), style=line.style_dotted, width=1)
// Labels riding the right visible edge
var label lbDP = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.aqua, 30), textcolor=color.white, size=size.small)
var label lbDR1 = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.red, 30), textcolor=color.white, size=size.small)
var label lbDR2 = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.red, 50), textcolor=color.white, size=size.small)
var label lbDS1 = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.lime, 30), textcolor=color.white, size=size.small)
var label lbDS2 = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.lime, 50), textcolor=color.white, size=size.small)
var label lbDS3 = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.lime, 50), textcolor=color.white, size=size.small)
var label lbWP = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.gray, 40), textcolor=color.white, size=size.small)
var label lbGP = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.yellow, 40), textcolor=color.black, size=size.small)
var label lbSell = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.red, 20), textcolor=color.white, size=size.normal)
var label lbBuy = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.lime, 20), textcolor=color.white, size=size.normal)
var label lbState = label.new(na, na, "", xloc=xloc.bar_time, yloc=yloc.price, style=label.style_label_left, color=color.new(color.gray, 20), textcolor=color.white, size=size.small)
// HUD table (screen-anchored — intentional)
var table hud = table.new(position.top_right, 2, 6, bgcolor=color.new(color.black, 30), border_width=1)
// ── Trade state machine (close-confirmed, no repaint) ──
inSession = hour(time, "UTC") >= 7 and hour(time, "UTC") < 21
sellArmed = barstate.isconfirmed and inSession and close <= 4439.88 and close >= 4413.00
sellTrig = sellArmed and close < open
sellInvalidated = barstate.isconfirmed and close > 4460.25
sellTargetHit = barstate.isconfirmed and close <= 4377.09
buyArmed = barstate.isconfirmed and inSession and close >= 4345.17 and close <= 4382.34
buyTrig = buyArmed and close > open and close > 4377.09
buyInvalidated = barstate.isconfirmed and close < 4324.80
buyTargetHit = barstate.isconfirmed and close >= 4439.88
var string sellState = "ARMED"
var string buyState = "ARMED"
if sellTrig
sellState := "TRIGGERED"
if sellInvalidated
sellState := "INVALIDATED"
if sellTargetHit
sellState := "TARGET HIT"
if buyTrig
buyState := "TRIGGERED"
if buyInvalidated
buyState := "INVALIDATED"
if buyTargetHit
buyState := "TARGET HIT"
// ── Reposition every drawing to the visible window on the last bar ──
if barstate.islast
lb = chart.left_visible_bar_time
rb = chart.right_visible_bar_time
// Fibonacci lines — anchored on the swing high candle, extended to the right edge
line.set_xy1(lf236, swingHighTime, fib236)
line.set_xy2(lf236, rb, fib236)
line.set_xy1(lf382, swingHighTime, fib382)
line.set_xy2(lf382, rb, fib382)
line.set_xy1(lf500, swingHighTime, fib500)
line.set_xy2(lf500, rb, fib500)
line.set_xy1(lf618, swingHighTime, fib618)
line.set_xy2(lf618, rb, fib618)
line.set_xy1(lf786, swingHighTime, fib786)
line.set_xy2(lf786, rb, fib786)
// Golden pocket (0.5 → 0.618)
box.set_left(gp, swingHighTime)
box.set_right(gp, rb)
box.set_top(gp, fib500)
box.set_bottom(gp, fib618)
// Pivots — span the visible window
line.set_xy1(dP, lb, 4402.71)
line.set_xy2(dP, rb, 4402.71)
line.set_xy1(dR1, lb, 4439.88)
line.set_xy2(dR1, rb, 4439.88)
line.set_xy1(dR2, lb, 4460.25)
line.set_xy2(dR2, rb, 4460.25)
line.set_xy1(dS1, lb, 4382.34)
line.set_xy2(dS1, rb, 4382.34)
line.set_xy1(dS2, lb, 4345.17)
line.set_xy2(dS2, rb, 4345.17)
line.set_xy1(dS3, lb, 4324.80)
line.set_xy2(dS3, rb, 4324.80)
line.set_xy1(wP, lb, 4377.09)
line.set_xy2(wP, rb, 4377.09)
// Trade zones
box.set_left(sellZone, lb)
box.set_right(sellZone, rb)
box.set_top(sellZone, 4439.88)
box.set_bottom(sellZone, 4413.00)
box.set_left(buyZone, lb)
box.set_right(buyZone, rb)
box.set_top(buyZone, 4382.34)
box.set_bottom(buyZone, 4345.17)
// Trade invalidations & targets
line.set_xy1(sellInv, lb, 4460.25)
line.set_xy2(sellInv, rb, 4460.25)
line.set_xy1(sellTgt, lb, 4377.09)
line.set_xy2(sellTgt, rb, 4377.09)
line.set_xy1(buyInv, lb, 4324.80)
line.set_xy2(buyInv, rb, 4324.80)
line.set_xy1(buyTgt, lb, 4439.88)
line.set_xy2(buyTgt, rb, 4439.88)
// Labels — pinned to the right visible edge
label.set_x(lbDP, rb)
label.set_y(lbDP, 4402.71)
label.set_text(lbDP, "Daily P 4402.71")
label.set_x(lbDR1, rb)
label.set_y(lbDR1, 4439.88)
label.set_text(lbDR1, "Daily R1 4439.88")
label.set_x(lbDR2, rb)
label.set_y(lbDR2, 4460.25)
label.set_text(lbDR2, "Daily R2 4460.25 (SELL invalid)")
label.set_x(lbDS1, rb)
label.set_y(lbDS1, 4382.34)
label.set_text(lbDS1, "Daily S1 4382.34")
label.set_x(lbDS2, rb)
label.set_y(lbDS2, 4345.17)
label.set_text(lbDS2, "Daily S2 4345.17")
label.set_x(lbDS3, rb)
label.set_y(lbDS3, 4324.80)
label.set_text(lbDS3, "Daily S3 4324.80 (BUY invalid)")
label.set_x(lbWP, rb)
label.set_y(lbWP, 4377.09)
label.set_text(lbWP, "Weekly P 4377.09")
label.set_x(lbGP, rb)
label.set_y(lbGP, (fib500 + fib618) / 2)
label.set_text(lbGP, "Golden Pocket 4360-4374")
label.set_x(lbSell, rb)
label.set_y(lbSell, 4426.94)
label.set_text(lbSell, "SELL fade 55% — " + sellState)
label.set_x(lbBuy, rb)
label.set_y(lbBuy, 4363.75)
label.set_text(lbBuy, "BUY dip 55% — " + buyState)
label.set_x(lbState, rb)
label.set_y(lbState, 4497.42)
label.set_text(lbState, "Daily R3 4497.42 (stretch)")
// HUD
table.cell(hud, 0, 0, "Gold Desk 2026-08-18", text_color=color.white, bgcolor=color.new(color.black, 20))
table.cell(hud, 1, 0, "NEUTRAL / BUY-DIPS", text_color=color.yellow, bgcolor=color.new(color.black, 20))
table.cell(hud, 0, 1, "Real yield 10y", text_color=color.silver)
table.cell(hud, 1, 1, "2.44% (+3bp)", text_color=color.red)
table.cell(hud, 0, 2, "DXY", text_color=color.silver)
table.cell(hud, 1, 2, "99.62 (-1.1% mo)", text_color=color.lime)
table.cell(hud, 0, 3, "Fed Sep16", text_color=color.silver)
table.cell(hud, 1, 3, "Hold 66 / Hike 34", text_color=color.yellow)
table.cell(hud, 0, 4, "Daily RSI", text_color=color.silver)
table.cell(hud, 1, 4, "63.6", text_color=color.yellow)
table.cell(hud, 0, 5, "invest.com aggr.", text_color=color.silver)
table.cell(hud, 1, 5, "Strong Buy (daily)", text_color=color.lime)
// ── Alerts (close-confirmed, session-gated, non-repainting) ──
alertcondition(sellTrig, title="Gold SELL armed — R1 fade", message="XAUUSD closed inside 4413-4440 supply during LDN/NY with a bearish body — SELL trigger confirmed")
alertcondition(sellInvalidated, title="Gold SELL invalidated", message="XAUUSD closed above 4460.25 daily R2 — SELL invalidated")
alertcondition(sellTargetHit, title="Gold SELL target hit", message="XAUUSD closed at or below 4377.09 weekly pivot — SELL target hit")
alertcondition(buyTrig, title="Gold BUY armed — pivot dip", message="XAUUSD closed inside 4345-4382 demand during LDN/NY reclaiming 4377.09 weekly pivot — BUY trigger confirmed")
alertcondition(buyInvalidated, title="Gold BUY invalidated", message="XAUUSD closed below 4324.80 daily S3 — BUY invalidated, trend read at risk")
alertcondition(buyTargetHit, title="Gold BUY target hit", message="XAUUSD closed at or above 4439.88 daily R1 — BUY target hit")
— the resident
pivot referee, dip buyer waiting