OPEN-SOURCE SCRIPT
Actualizado

Order Block Finder | Gold | ProjectSyndicate

7 622
🥇 ProjectSyndicate Gold Order Block Finder
📌 Institutional Order Blocks for XAUUSD Built for Gold’s Volatility


The ProjectSyndicate Gold Order Block Finder is a professional-grade TradingView indicator engineered specifically for XAUUSD / Gold traders who want clean, high-probability institutional supply & demand zones on their chart.

Gold moves fast, sweeps liquidity often, and loves sharp displacement. This tool is tuned to match that behavior—so you can quickly spot the zones where smart money likely stepped in, and plan entries, targets, and invalidations with confidence. ✅

🚀 Why Gold Traders Like It

✅ Made for XAUUSD: Detection is tuned for Gold’s unique volatility and impulse structure
🏦 Institutional Zone Detection: Finds the last opposing candle before a true displacement + structure break
🧹 Auto-Cleanup (Mitigation): Zones automatically disappear when invalidated (no clutter)
📦 Clean Visualization: Professional OB boxes that extend into live price action
⚡ Pine Script v6: Built on the latest TradingView engine for stability and speed

🧠 Detection Logic Simple, Effective, Battle-Tested

📈 Bullish Order Block (Demand):
The last bearish candle before a strong bullish displacement that breaks market structure (BOS)

📉 Bearish Order Block (Supply):
The last bullish candle before a strong bearish displacement that breaks market structure (BOS)

💥 Displacement Filter Power Move Confirmation:
Zones are validated only when the impulse move meets a minimum strength threshold (default: 1.3× candle range)—helping filter out weak noise and low-quality blocks.

🛠 Recommended Gold Settings (XAUUSD)

Use these presets to match Gold’s typical behavior across higher-impact timeframes:
Timeframe | Swing Length | Displacement

M5 | 5–7 | 1.2 – 1.4
M10 | 5–7 | 1.2 – 1.4
M30 | 5–7 | 1.2 – 1.4
H1 | 7–9 | 1.3 – 1.6
H4 | 8–10 | 1.5 – 2.0

💡 Tip: If you want more signals, reduce Swing Length.
If you want higher quality only, increase Displacement.

✅ Best Use-Cases on Gold

🎯 Mark premium supply/demand zones without manual drawing
🧲 Wait for price to return to the OB for cleaner entries
🛡️ Use OB boundaries for clear invalidation + stop placement
📊 Combine with trend bias / liquidity sweeps / session levels for extra confirmation
Notas de prensa
📌 Order Block Finder v2.0 — Repainting Fix

The original Order Block Finder had repainting problems—order blocks could show up and later disappear as new candles formed.

v2.0 fixes this by adding strong anti-repainting logic, so once an order block is drawn, it stays stable and won’t change after being displayed.

🔍 Why the Original Version Repainted
1) Real-Time Bar Processing

The script ran on every tick, even while the current candle was still forming (incomplete data). This caused:

Order blocks detected from temporary price moves
Blocks vanishing when the candle closed differently
Mismatch between live and historical results

2) Pivot Point Confirmation Lag

ta.pivothigh() / ta.pivotlow() need swing_length bars on both sides to confirm a pivot. The original code didn’t fully respect this delay, leading to:

Pivot points shifting as new bars arrived
Order blocks placed at wrong historical locations
Blocks created too early (before pivots were truly confirmed)
3) Mitigation Check Timing

The “mitigation” check (whether price broke an order block) also ran on every tick, including during live candle formation. That caused:

Blocks removed prematurely mid-candle

Live behavior that didn’t match backtesting/history

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.