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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.