Aurum

Sniper · gold

COMEX gold

4,216.30

+14.00 since the prior session · tape Oct 9, 16:59 ET

Clock syncing

GC futures · 15m

7 snipers · 6 armed and never filled

Front-month gold futures. Spot XAUUSD tracks this tape within the futures basis. Entries are rules on completed candles — they do not repaint, and they are not a promise of the next tick.

On TradingView

Paste this into the Pine editor on XAUUSD or GC1!, 15-minute to start. Add to chart. Labels mark the arm, the fill, the half, and the exit.

//@version=5
indicator("Aurum Sniper — Gold", "Aurum", overlay=true, max_labels_count=500, max_lines_count=500)

// Same rules as the Aurum desk.
// Chart: XAUUSD or GC1!. Start on 15m.
// 5m: swing 4, buffer 0.8, max risk 18, min gap 1.2
// 1h: swing 2, buffer 2.5, max risk 48, min gap 4

swingLen = input.int(3, "Swing length", minval=2, maxval=8)
minGap   = input.float(2.0, "Minimum gap ($)", minval=0.1, step=0.1)
stopBuf  = input.float(1.2, "Stop beyond the wick ($)", minval=0.1, step=0.1)
maxRisk  = input.float(28.0, "Skip if the stop is wider than ($)", minval=1)
kzOnly   = input.bool(true, "Killzones only")
useAsia  = input.bool(true, "Asian range counts as liquidity")

ph = ta.pivothigh(high, swingLen, swingLen)
pl = ta.pivotlow(low, swingLen, swingLen)
var float swingHigh = na
var float swingLow = na
if not na(ph)
    swingHigh := ph
if not na(pl)
    swingLow := pl

atr = ta.atr(14)
gapNeed = math.max(minGap, atr * 0.30)
pierce = math.max(0.4, atr * 0.06)

hET = hour(time, "America/New_York")
mET = minute(time, "America/New_York")
mins = hET * 60 + mET
hot = (mins >= 120 and mins < 300) or (mins >= 510 and mins < 660)
silver = (mins >= 180 and mins < 240) or (mins >= 600 and mins < 660)
sess = silver ? "Silver Bullet" : mins >= 120 and mins < 300 ? "London" : mins >= 510 and mins < 660 ? "New York" : "Off session"

inAsia = not na(time(timeframe.period, "2000-0000", "America/New_York"))
var float asiaBuildHi = na
var float asiaBuildLo = na
var float asiaHi = na
var float asiaLo = na
var bool asiaHiUsed = false
var bool asiaLoUsed = false
if inAsia
    asiaBuildHi := na(asiaBuildHi) ? high : math.max(asiaBuildHi, high)
    asiaBuildLo := na(asiaBuildLo) ? low : math.min(asiaBuildLo, low)
else if not na(asiaBuildHi)
    asiaHi := asiaBuildHi
    asiaLo := asiaBuildLo
    asiaHiUsed := false
    asiaLoUsed := false
    asiaBuildHi := na
    asiaBuildLo := na

var int pend = 0
var float pendExt = na
var float pendLvl = na
var int pendBar = na
var float pendOpen = na
var float pendClose = na
var string pendKind = na
var string pendSess = na

var int phase = 0
var int side = 0
var float entry = na
var float stop = na
var float tp1 = na
var float tp2 = na
var int armBar = na

if phase == 1 and bar_index > armBar
    filled = side == 1 ? low <= entry : high >= entry
    if not filled and bar_index - armBar > 16
        label.new(bar_index, side == 1 ? low : high, "Missed", style=label.style_label_left, textcolor=color.new(#a39888, 0), size=size.tiny)
        phase := 0
    else if filled
        phase := 2
        label.new(bar_index, side == 1 ? low : high, side == 1 ? "LONG" : "SHORT", style=side == 1 ? label.style_label_up : label.style_label_down, color=side == 1 ? color.new(#3fbf8a, 10) : color.new(#e06b5a, 10), textcolor=#12100e, size=size.small)

if phase == 2 or phase == 3
    stopPx = phase == 3 ? entry : stop
    hitStop = side == 1 ? low <= stopPx : high >= stopPx
    hitTp1 = phase == 2 and (side == 1 ? high >= tp1 : low <= tp1)
    hitTp2 = side == 1 ? high >= tp2 : low <= tp2
    bullish = close >= open
    favorable = side == 1 ? bullish : not bullish
    if favorable
        if hitTp1
            phase := 3
            label.new(bar_index, side == 1 ? high : low, "Half", style=label.style_label_left, textcolor=#d7a441, size=size.tiny)
        if hitTp2 and phase >= 2
            label.new(bar_index, side == 1 ? high : low, "TP", style=side == 1 ? label.style_label_down : label.style_label_up, color=#d7a441, textcolor=#12100e, size=size.small)
            line.new(armBar, tp2, bar_index, tp2, color=color.new(#3fbf8a, 0))
            phase := 0
        else if hitStop and phase == 2
            label.new(bar_index, side == 1 ? low : high, "SL", style=side == 1 ? label.style_label_up : label.style_label_down, color=#e06b5a, textcolor=#12100e, size=size.small)
            phase := 0
        else if hitStop and phase == 3
            label.new(bar_index, entry, "BE", style=label.style_label_left, textcolor=#ece7dc, size=size.small)
            phase := 0
    else
        if hitStop and phase == 2
            label.new(bar_index, side == 1 ? low : high, "SL", style=side == 1 ? label.style_label_up : label.style_label_down, color=#e06b5a, textcolor=#12100e, size=size.small)
            phase := 0
        else if hitStop and phase == 3
            label.new(bar_index, entry, "BE", style=label.style_label_left, textcolor=#ece7dc, size=size.small)
            phase := 0
        else if hitTp2
            label.new(bar_index, side == 1 ? high : low, "TP", style=side == 1 ? label.style_label_down : label.style_label_up, color=#d7a441, textcolor=#12100e, size=size.small)
            phase := 0
        else if hitTp1 and phase == 2
            phase := 3
            label.new(bar_index, side == 1 ? high : low, "Half", style=label.style_label_left, textcolor=#d7a441, size=size.tiny)

if phase == 0 and pend != 0 and bar_index - pendBar > 8
    pend := 0

bool canArm = phase == 0 and pend != 0 and bar_index > pendBar and bar_index >= 2
if canArm
    gap = pend == 1 ? low - high[2] : low[2] - high
    body = math.abs(close - open)
    span = high - low
    disp = span > 0 and body / span >= 0.45 and (pend == 1 ? close > open and close > math.max(pendOpen, pendClose) : close < open and close < math.min(pendOpen, pendClose))
    if gap >= gapNeed * 0.75 and disp
        mid = pend == 1 ? (high[2] + low) / 2.0 : (low[2] + high) / 2.0
        stp = pend == 1 ? pendExt - stopBuf : pendExt + stopBuf
        risk = pend == 1 ? mid - stp : stp - mid
        beyond = pend == 1 ? mid < close : mid > close
        if risk > 0 and risk <= maxRisk and beyond
            phase := 1
            side := pend
            entry := mid
            stop := stp
            tp1 := pend == 1 ? mid + risk * 1.5 : mid - risk * 1.5
            tp2 := pend == 1 ? mid + risk * 3.0 : mid - risk * 3.0
            armBar := bar_index
            box.new(bar_index - 2, pend == 1 ? low : low[2], bar_index, pend == 1 ? high[2] : high, bgcolor=color.new(pend == 1 ? #3fbf8a : #e06b5a, 88), border_color=color.new(#d7a441, 40))
            label.new(bar_index, pend == 1 ? high : low, "Armed " + pendSess, style=pend == 1 ? label.style_label_down : label.style_label_up, color=color.new(#d7a441, 15), textcolor=#12100e, size=size.tiny)
            pend := 0

if phase == 0 and pend == 0 and (not kzOnly or hot)
    span = high - low
    if span > 0
        pos = (close - low) / span
        float sweptLow = na
        string lowKind = na
        if not na(swingLow) and low < swingLow - pierce and close > swingLow
            sweptLow := swingLow
            lowKind := "swing low"
        if useAsia and not asiaLoUsed and not na(asiaLo) and low < asiaLo - pierce and close > asiaLo
            if na(sweptLow) or asiaLo > sweptLow
                sweptLow := asiaLo
                lowKind := "Asian low"
        float sweptHigh = na
        string highKind = na
        if not na(swingHigh) and high > swingHigh + pierce and close < swingHigh
            sweptHigh := swingHigh
            highKind := "swing high"
        if useAsia and not asiaHiUsed and not na(asiaHi) and high > asiaHi + pierce and close < asiaHi
            if na(sweptHigh) or asiaHi < sweptHigh
                sweptHigh := asiaHi
                highKind := "Asian high"
        if pos >= 0.55 and not na(sweptLow)
            pend := 1
            pendExt := low
            pendLvl := sweptLow
            pendBar := bar_index
            pendOpen := open
            pendClose := close
            pendKind := lowKind
            pendSess := sess
            if lowKind == "swing low"
                swingLow := na
            if lowKind == "Asian low"
                asiaLoUsed := true
        else if pos <= 0.45 and not na(sweptHigh)
            pend := -1
            pendExt := high
            pendLvl := sweptHigh
            pendBar := bar_index
            pendOpen := open
            pendClose := close
            pendKind := highKind
            pendSess := sess
            if highKind == "swing high"
                swingHigh := na
            if highKind == "Asian high"
                asiaHiUsed := true

plot(asiaHi, "Asian high", color=color.new(#d7a441, 55), style=plot.style_linebr)
plot(asiaLo, "Asian low", color=color.new(#d7a441, 55), style=plot.style_linebr)