OPEN-SOURCE SCRIPT

XAUUSD Zone Sniper v1

837
XAUUSD Zone Sniper is an intraday liquidity-based indicator built for gold traders who want a more structured way to read sweep-and-reversal conditions on lower timeframes. The script is designed for XAUUSD and overlays the chart with key liquidity levels, displacement events, and actionable reaction zones derived from post-sweep price behavior.

The indicator uses a multi-factor workflow instead of a single trigger. First, it builds a directional bias using a combination of EMA alignment, EMA slope, and recent swing structure. It then tracks key reference levels such as Asia session high/low, previous day high/low, recent swing liquidity, and nearby round numbers. When price wicks through one of those levels and closes back inside, the event is treated as a potential liquidity sweep.

After a sweep, the script looks for displacement. In this context, displacement is defined as a strong impulsive candle with a minimum body-to-range ratio and a minimum expansion versus ATR. If displacement occurs within a short window after the sweep, the script can mark a potential reaction area using either a Fair Value Gap, an Order Block, or both, depending on the selected settings.

Each zone is then scored using several contextual factors. The score can include liquidity quality, displacement, inefficiency, session timing, higher-timeframe bias alignment, and retest confirmation, while poor context such as dead-session conditions can reduce quality. This allows the indicator to separate weaker candidates from stronger A and A+ setups instead of plotting every possible zone equally.

The script also includes a zone state model. A newly created zone starts as a candidate, can later become armed after a valid retest, and is eventually marked as mitigated or no longer relevant if price trades too deeply into it, closes beyond it, or enough bars pass without confirmation. This helps reduce chart clutter and keeps the focus on fresh areas.

What you see on the chart:
- EMA fast, EMA slow, and HTF EMA for bias context
- Asia high/low, previous day high/low, and nearby round numbers
- Sweep markers when liquidity is taken above or below key levels
- Displacement arrows after valid sweep reactions
- Bullish and bearish zones drawn as boxes
- Optional score labels showing setup quality and class

Suggested use:
- Best suited to XAUUSD intraday charts
- Typically most relevant on lower timeframes such as M1 to M15
- Can be used to frame reaction trades after a liquidity event rather than to predict price in advance
- Stronger signals generally occur when a sweep, displacement, session timing, and directional bias align together

Important notes:
- This script is a decision-support tool, not a fully autonomous trading system
- Zones are context-dependent and should be evaluated together with execution, risk management, and nearby targets/liquidity
- Session filters and scoring thresholds can materially change how selective the script becomes
- The default settings are optimized for a liquidity/reaction style workflow on gold, but users may still need to tune them to their broker feed and timeframe

Main inputs:
- HTF Bias: EMA fast/slow/HTF, structure lookback, slope length
- Key Levels: Asia range, previous day high/low, round number logic, swing lookback
- Sweep Detection: tolerance and wick quality filters
- Displacement: body/range threshold, ATR expansion, ATR length
- Zone Logic: FVG / OB / Both
- Scoring: minimum score to draw, alert thresholds, class thresholds, factor weights
- Zone Management: max active zones, expiry bars, mitigation depth, minimum R:R filter
- Alerts: armed bull/bear zones, sweeps, and displacement events

This indicator is for educational and analytical purposes only. It does not guarantee future performance, and all trading decisions remain the responsibility of the user.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.