Re: Scalping AUDNZD: A Cross Driven by Relative Rates and Quiet Ranges
Posted: Fri Oct 09, 2026 8:37 am
AUDNZD Pro: Asian Liquidity Matrix
Code: Select all
//@version=5
indicator("AUDNZD Pro: Asian Liquidity Matrix", overlay=true, max_lines_count=500, max_boxes_count=500)
// =========================================================================
// INPUTS & SETTINGS
// =========================================================================
grp_time = "Session & Broker Time"
sessTime = input.session("2200-0600", title="Asian Session (Broker Time)", group=grp_time, tooltip="Set this to match your broker's Asian session hours.")
tz = input.string("UTC", title="Timezone", group=grp_time, tooltip="Match to your broker (e.g., UTC+2 for standard NY Close charts).")
grp_ui = "Visuals & UI"
colHigh = input.color(color.new(color.red, 30), title="Buy-Side Liquidity (High)", group=grp_ui)
colLow = input.color(color.new(color.teal, 30), title="Sell-Side Liquidity (Low)", group=grp_ui)
colBox = input.color(color.new(color.blue, 90), title="Accumulation Box", group=grp_ui)
showDash = input.bool(true, title="Show HUD Dashboard", group=grp_ui)
// =========================================================================
// SESSION LOGIC & STATE TRACKING
// =========================================================================
inSession = time(timeframe.period, sessTime, tz)
sessionStart = inSession and not inSession[1]
sessionEnd = not inSession and inSession[1]
var float asHigh = na
var float asLow = na
var float asEq = na // Equilibrium (50% of range)
// State flags for Alerts
var bool sweptHigh = false
var bool sweptLow = false
// Drawing Objects
var box asBox = na
var line hLine = na
var line lLine = na
var line eqLine = na
// =========================================================================
// ACCUMULATION PHASE (ASIAN SESSION)
// =========================================================================
if sessionStart
asHigh := high
asLow := low
sweptHigh := false
sweptLow := false
asBox := box.new(left=bar_index, top=asHigh, right=bar_index, bottom=asLow, border_color=color.new(color.blue, 70), bgcolor=colBox)
if inSession
asHigh := math.max(asHigh, high)
asLow := math.min(asLow, low)
asEq := (asHigh + asLow) / 2
box.set_top(asBox, asHigh)
box.set_bottom(asBox, asLow)
box.set_right(asBox, bar_index)
// =========================================================================
// MANIPULATION / DISTRIBUTION PHASE (LONDON / NY)
// =========================================================================
if sessionEnd
hLine := line.new(x1=bar_index, y1=asHigh, x2=bar_index+1, y2=asHigh, color=colHigh, width=2, style=line.style_dashed)
lLine := line.new(x1=bar_index, y1=asLow, x2=bar_index+1, y2=asLow, color=colLow, width=2, style=line.style_dashed)
eqLine := line.new(x1=bar_index, y1=asEq, x2=bar_index+1, y2=asEq, color=color.gray, width=1, style=line.style_dotted)
if not inSession and not na(hLine)
line.set_x2(hLine, bar_index)
line.set_x2(lLine, bar_index)
line.set_x2(eqLine, bar_index)
// =========================================================================
// EXECUTION LOGIC & ALERTS (FADING THE SWEEP)
// =========================================================================
// Detect sweeps (Wick goes outside, but we track the state)
if not inSession
if high > asHigh
sweptHigh := true
if low < asLow
sweptLow := true
// Sweep Rejection (Price wicked out, but closed back inside the range)
validShortTrigger = sweptHigh and close < asHigh and high > asHigh and not inSession
validLongTrigger = sweptLow and close > asLow and low < asLow and not inSession
// Alert Conditions for automation or notifications
alertcondition(validShortTrigger, title="AUDNZD: BSL Sweep & Reject", message="Buy-Side Liquidity swept. Short trigger formed. Target EQ.")
alertcondition(validLongTrigger, title="AUDNZD: SSL Sweep & Reject", message="Sell-Side Liquidity swept. Long trigger formed. Target EQ.")
// Visual cue on chart for valid triggers
plotshape(validShortTrigger, title="Short Trigger", style=shape.triangledown, location=location.abovebar, color=colHigh, size=size.small)
plotshape(validLongTrigger, title="Long Trigger", style=shape.triangleup, location=location.belowbar, color=colLow, size=size.small)
// =========================================================================
// PRO DASHBOARD (HUD)
// =========================================================================
adr14 = request.security(syminfo.tickerid, "D", ta.sma(high - low, 14))
pipMult = syminfo.mintick == 0.00001 ? 10000 : (syminfo.mintick == 0.001 ? 100 : 10000)
adrPips = adr14 * pipMult
asPips = (asHigh - asLow) * pipMult
asPct = (asPips / adrPips) * 100
// Dynamic Market State string
string mktState = "Accumulating"
color stateCol = color.gray
if not inSession
if validShortTrigger or validLongTrigger
mktState := "Sweep Rejected (Action)"
stateCol := color.orange
else if high > asHigh or low < asLow
mktState := "Sweeping Liquidity"
stateCol := color.red
else
mktState := "Inside Range"
stateCol := color.teal
var table hud = table.new(position.top_right, 2, 4, border_width=1, border_color=color.new(color.gray, 80), bgcolor=color.new(color.black, 85))
if showDash and barstate.islast
table.cell(hud, 0, 0, "14-Day ADR", text_color=color.white, text_size=size.small)
table.cell(hud, 1, 0, str.tostring(adrPips, "#.0") + " pips", text_color=color.yellow, text_size=size.small)
table.cell(hud, 0, 1, "Asian Range", text_color=color.white, text_size=size.small)
table.cell(hud, 1, 1, str.tostring(asPips, "#.0") + " pips (" + str.tostring(asPct, "#.0") + "%)", text_color=color.aqua, text_size=size.small)
table.cell(hud, 0, 2, "Session EQ", text_color=color.white, text_size=size.small)
table.cell(hud, 1, 2, str.tostring(asEq, "#.00000"), text_color=color.gray, text_size=size.small)
table.cell(hud, 0, 3, "State", text_color=color.white, text_size=size.small)
table.cell(hud, 1, 3, mktState, text_color=stateCol, text_size=size.small)