OPEN-SOURCE SCRIPT
Institutional Market Structure Engine [PRO]

Institutional Market Structure Engine [PRO]
The Institutional Market Structure Engine is an advanced, fully non-repainting quantitative trading script built for professional Smart Money Concepts (SMC) and price action traders. Rather than cluttering the chart with endless geometric shapes, this indicator employs a highly strict validation engine to ensure only the highest-probability, institutionally-backed levels are displayed on your chart.
Core Features
1. Dual-Layer Market Structure Engine The script simultaneously tracks two layers of market structure:
Macro (External) Structure: Tracks major high-timeframe swings (drawn with thick, solid lines). Prints M-BOS (Break of Structure) and M-CHOCH (Change of Character).
Micro (Internal) Structure: Tracks short-term pullbacks and minor structure (drawn with thin, dotted lines). Prints m-bos and m-choch.
2. Volume Delta Validation Not all structure breaks are equal. The engine uses a 20-period Volume SMA to validate structural displacement. If a break occurs on high volume, it is labeled as a "Strong BOS". If it occurs on low volume, the engine identifies it as a potential fake-out and labels it as a "Weak BOS" or "Sweep".
3. Strict Smart Money Concepts (OB + FVG + IFVG) This indicator features an incredibly strict SMC generation algorithm designed to keep your chart remarkably clean:
Coupled Order Blocks & FVGs: Fair Value Gaps are only drawn if they are formed immediately following a valid Order Block. Isolated displacement without an initiating block is ignored.
Liquidity Sweeps: Order blocks can be strictly filtered to only appear if they swept the liquidity (wick) of the preceding candle.
Inversion FVGs (IFVG): When price completely closes through an unmitigated FVG, it flips polarity. A broken Bullish FVG instantly converts into a Bearish IFVG (acting as resistance), changing its color and label until it is mitigated from the opposite side.
Chart Garbage Collection: To prevent visual clutter, the engine forces a maximum active limit. It actively sweeps the chart to ensure you never have more than 6 active Order Blocks and 6 active IFVGs/FVGs on your screen at any given time.
4. Institutional Liquidity Pools Institutional algorithms heavily target multi-day liquidity. The script automatically fetches and projects the exact horizontal price levels for:
Previous Day Highs and Lows (PDH / PDL) - Dashed Lines
Previous Week Highs and Lows (PWH / PWL) - Thick Solid Lines
5. Multi-Timeframe Dashboard A sleek, customizable Heads-Up Display (HUD) sits in the corner of your screen, feeding you real-time trend alignment metrics. It calculates exponential moving average trends across 4 custom timeframes so you never take a trade against the higher timeframe momentum.
The Institutional Market Structure Engine is an advanced, fully non-repainting quantitative trading script built for professional Smart Money Concepts (SMC) and price action traders. Rather than cluttering the chart with endless geometric shapes, this indicator employs a highly strict validation engine to ensure only the highest-probability, institutionally-backed levels are displayed on your chart.
Core Features
1. Dual-Layer Market Structure Engine The script simultaneously tracks two layers of market structure:
Macro (External) Structure: Tracks major high-timeframe swings (drawn with thick, solid lines). Prints M-BOS (Break of Structure) and M-CHOCH (Change of Character).
Micro (Internal) Structure: Tracks short-term pullbacks and minor structure (drawn with thin, dotted lines). Prints m-bos and m-choch.
2. Volume Delta Validation Not all structure breaks are equal. The engine uses a 20-period Volume SMA to validate structural displacement. If a break occurs on high volume, it is labeled as a "Strong BOS". If it occurs on low volume, the engine identifies it as a potential fake-out and labels it as a "Weak BOS" or "Sweep".
3. Strict Smart Money Concepts (OB + FVG + IFVG) This indicator features an incredibly strict SMC generation algorithm designed to keep your chart remarkably clean:
Coupled Order Blocks & FVGs: Fair Value Gaps are only drawn if they are formed immediately following a valid Order Block. Isolated displacement without an initiating block is ignored.
Liquidity Sweeps: Order blocks can be strictly filtered to only appear if they swept the liquidity (wick) of the preceding candle.
Inversion FVGs (IFVG): When price completely closes through an unmitigated FVG, it flips polarity. A broken Bullish FVG instantly converts into a Bearish IFVG (acting as resistance), changing its color and label until it is mitigated from the opposite side.
Chart Garbage Collection: To prevent visual clutter, the engine forces a maximum active limit. It actively sweeps the chart to ensure you never have more than 6 active Order Blocks and 6 active IFVGs/FVGs on your screen at any given time.
4. Institutional Liquidity Pools Institutional algorithms heavily target multi-day liquidity. The script automatically fetches and projects the exact horizontal price levels for:
Previous Day Highs and Lows (PDH / PDL) - Dashed Lines
Previous Week Highs and Lows (PWH / PWL) - Thick Solid Lines
5. Multi-Timeframe Dashboard A sleek, customizable Heads-Up Display (HUD) sits in the corner of your screen, feeding you real-time trend alignment metrics. It calculates exponential moving average trends across 4 custom timeframes so you never take a trade against the higher timeframe momentum.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。