OPEN-SOURCE SCRIPT
Mis à jour Market Structure 2.0- Zig Zag , BoS and Supply/Demand Zones

Market Structure 2.0- Zig Zag, BoS and Supply/Demand
Unlock the full picture of market structure with this all-in-one indicator. At its core, it’s built around precise price action reversals, detected through smart engulfment of highs and lows. Every reversal acts as a single, powerful trigger that automatically maps out supply and demand zones and structural levels (swing high/lows, BoS and market shift) — everything you need to understand the market at a glance.
Whether you’re scanning for trend continuation, identifying structural levels for entries and exits, or marking key areas for Fibonacci retracements, this indicator simplifies it all. BoS signals help you ride the prevailing trend, zones highlight areas of interest, and swing highs/lows give you structural context — all perfectly aligned with each other, all as a result of price-action based reversals.
Want to see the bigger picture? The HTF input lets you track higher timeframe structures right on your current chart, giving you an edge for live trading. Just remember: for consistent results, refresh your chart before observing HTF structure, and use caution when back-testing, as higher timeframe patterns may appear inconsistent in bar-replay (refresh chart regularly for accurate results). Also, be aware that supply/demand zones are most accurate on the chosen timeframes raw timeframe (for example if using 4h on HTF input, 4h supply/demand zones are more accurate when observing 4h chart and may show discrepancy on lower timeframes).
With this tool, the chaos of the market is transformed into a clean, actionable map — all guided by the same unique reversal logic.
Real-Time Alerts
This indicator doesn’t just visualize market structure — it actively notifies you when critical events occur, so you can observe passively without being glued to the charts. Alerts are fully customizable and cover every key element of market behavior:
Supply & Demand Zones
• New Supply Zone (Bullish) – Triggers when a fresh supply area forms.
• New Demand Zone (Bearish) – Alerts you to newly established demand.
Internal Shifts & Swing Points
• Bullish Internal Shift – Detects bullish price shifts across all swing lows.
• Bearish Internal Shift – Detects bearish shifts across all swing highs.
• Higher Highs (HH) / Higher Lows (HL) / Lower Highs (LH) / Lower Lows (LL) – Track critical swing points with precise conditions to avoid false signals.
• Liquidity Sweeps (LS) – Alerts when price sweeps stop-loss areas, signaling potential traps or continuation setups.
Market Structure & Breaks of Structure (BoS)
• Bullish / Bearish BoS – Highlights breaks in structure that confirm trend continuation or reversals.
• Bullish / Bearish Market Shifts – Flags larger trend changes detected by the indicator’s unique reversal logic.
Alerts can be triggered on LTF, MTF, or HTF charts, giving you flexibility to match your trading style. Each alert is configurable, so you receive only the notifications that matter to you — whether it’s swing points, market shifts, or key supply and demand levels.
With these alerts, you’re not just watching the market — you’re anticipating it.
Unlock the full picture of market structure with this all-in-one indicator. At its core, it’s built around precise price action reversals, detected through smart engulfment of highs and lows. Every reversal acts as a single, powerful trigger that automatically maps out supply and demand zones and structural levels (swing high/lows, BoS and market shift) — everything you need to understand the market at a glance.
Whether you’re scanning for trend continuation, identifying structural levels for entries and exits, or marking key areas for Fibonacci retracements, this indicator simplifies it all. BoS signals help you ride the prevailing trend, zones highlight areas of interest, and swing highs/lows give you structural context — all perfectly aligned with each other, all as a result of price-action based reversals.
Want to see the bigger picture? The HTF input lets you track higher timeframe structures right on your current chart, giving you an edge for live trading. Just remember: for consistent results, refresh your chart before observing HTF structure, and use caution when back-testing, as higher timeframe patterns may appear inconsistent in bar-replay (refresh chart regularly for accurate results). Also, be aware that supply/demand zones are most accurate on the chosen timeframes raw timeframe (for example if using 4h on HTF input, 4h supply/demand zones are more accurate when observing 4h chart and may show discrepancy on lower timeframes).
With this tool, the chaos of the market is transformed into a clean, actionable map — all guided by the same unique reversal logic.
Real-Time Alerts
This indicator doesn’t just visualize market structure — it actively notifies you when critical events occur, so you can observe passively without being glued to the charts. Alerts are fully customizable and cover every key element of market behavior:
Supply & Demand Zones
• New Supply Zone (Bullish) – Triggers when a fresh supply area forms.
• New Demand Zone (Bearish) – Alerts you to newly established demand.
Internal Shifts & Swing Points
• Bullish Internal Shift – Detects bullish price shifts across all swing lows.
• Bearish Internal Shift – Detects bearish shifts across all swing highs.
• Higher Highs (HH) / Higher Lows (HL) / Lower Highs (LH) / Lower Lows (LL) – Track critical swing points with precise conditions to avoid false signals.
• Liquidity Sweeps (LS) – Alerts when price sweeps stop-loss areas, signaling potential traps or continuation setups.
Market Structure & Breaks of Structure (BoS)
• Bullish / Bearish BoS – Highlights breaks in structure that confirm trend continuation or reversals.
• Bullish / Bearish Market Shifts – Flags larger trend changes detected by the indicator’s unique reversal logic.
Alerts can be triggered on LTF, MTF, or HTF charts, giving you flexibility to match your trading style. Each alert is configurable, so you receive only the notifications that matter to you — whether it’s swing points, market shifts, or key supply and demand levels.
With these alerts, you’re not just watching the market — you’re anticipating it.
Notes de version
Input description fixed.Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.