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.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.