OPEN-SOURCE SCRIPT
MTF Institutional Zones with Alerts (Impulse + Mitigation)

This script plots multi-timeframe (MTF) Supply and Demand zones derived from impulse candles on higher timeframes.
How zones are created
A new zone is formed when an HTF candle has a body size greater than or equal to ATR(14) * Impulse Multiplier.
If the impulse candle is bullish, the script uses the most recent bearish candle (on that HTF) as the Demand zone source.
If the impulse candle is bearish, the script uses the most recent bullish candle (on that HTF) as the Supply zone source.
Filtering and zone management
Zones are kept only if the distance from the HTF impulse close to the zone source is within ATR(14) * Max Distance.
A maximum number of zones per side is stored for each timeframe. Older zones are deleted automatically.
Zones are extended to the right in real time.
Mitigation rule (50%)
A zone is removed when price mitigates 50% of its range:
Demand is removed when low reaches the midpoint.
Supply is removed when high reaches the midpoint.
Alerts
Formation alerts: triggered when a new HTF zone is created (TF1/TF2/TF3).
Proximity alerts (NEAR/IN): triggered when the candle range is within a configurable distance from a zone or when price is inside/touching it.
How to use
Choose TF1/TF2/TF3 (e.g., 4H / 1H / 15m).
Adjust Impulse Multiplier to detect only strong candles.
Adjust Proximity distance (%) to control when proximity alerts trigger.
Notes
This indicator highlights potential reaction areas. It does not guarantee reversals and should be used with proper risk management.
How zones are created
A new zone is formed when an HTF candle has a body size greater than or equal to ATR(14) * Impulse Multiplier.
If the impulse candle is bullish, the script uses the most recent bearish candle (on that HTF) as the Demand zone source.
If the impulse candle is bearish, the script uses the most recent bullish candle (on that HTF) as the Supply zone source.
Filtering and zone management
Zones are kept only if the distance from the HTF impulse close to the zone source is within ATR(14) * Max Distance.
A maximum number of zones per side is stored for each timeframe. Older zones are deleted automatically.
Zones are extended to the right in real time.
Mitigation rule (50%)
A zone is removed when price mitigates 50% of its range:
Demand is removed when low reaches the midpoint.
Supply is removed when high reaches the midpoint.
Alerts
Formation alerts: triggered when a new HTF zone is created (TF1/TF2/TF3).
Proximity alerts (NEAR/IN): triggered when the candle range is within a configurable distance from a zone or when price is inside/touching it.
How to use
Choose TF1/TF2/TF3 (e.g., 4H / 1H / 15m).
Adjust Impulse Multiplier to detect only strong candles.
Adjust Proximity distance (%) to control when proximity alerts trigger.
Notes
This indicator highlights potential reaction areas. It does not guarantee reversals and should be used with proper risk management.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。