OPEN-SOURCE SCRIPT
Mis à jour Adaptive S/R Box Zones with Dynamic Stop Loss & EMA Filter

Title: Adaptive S/R Box Zones with Dynamic Stop Loss & EMA Filter
Description:
This indicator is an advanced tool designed to automatically identify key Support and Resistance (S/R) levels by blending momentum, volatility, and structural pivot points. The core objective of the script is to visualize asymmetric risk zones (Stop Loss zones) and filter out false breakouts using an integrated EMA momentum filter.
How it works:
S/R Detection Logic: Levels are not derived from simple highs and lows. The script utilizes a sophisticated algorithm that dynamically combines the RSI (Relative Strength Index) to spot extreme overbought/oversold conditions, a HMA-based CMO (Chande Momentum Oscillator) for momentum confirmation, and historical Close Pivots.
Asymmetric SL Zones (Boxes): Instead of standard symmetric lines that often distort spatial risk, the indicator renders dynamic box shapes. The height of these zones automatically adapts to the market's current volatility using the ATR (Average True Range).
The Resistance Zone expands asymmetrically upward from the level, offering a clear visual map for placing Stop Losses on Short setups.
The Support Zone expands asymmetrically downward from the level, defining the logical Stop Loss area for Long setups.
EMA Momentum Filter & Trigger: The script features an optional EMA crossover filter. When enabled, the detection of a new S/R zone acts as a dynamic "setup alert", while the actual BUY or SELL signal triggers only when the price breaks through the EMA line, confirming directional momentum.
Key Features & Inputs:
Zone Height (ATR Multiplier): Controls the thickness of the risk zones based on market volatility.
S/R Timeframe: Multi-timeframe (MTF) functionality to plot higher time frame levels onto your current chart.
Signal Trigger Mode: Toggle between On Candle Close and After Candle Close (waits for the candle to seal to prevent repainting).
EMA Filter Toggle: Can be fully deactivated if you prefer to receive raw signals immediately upon the formation of S/R levels.
Description:
This indicator is an advanced tool designed to automatically identify key Support and Resistance (S/R) levels by blending momentum, volatility, and structural pivot points. The core objective of the script is to visualize asymmetric risk zones (Stop Loss zones) and filter out false breakouts using an integrated EMA momentum filter.
How it works:
S/R Detection Logic: Levels are not derived from simple highs and lows. The script utilizes a sophisticated algorithm that dynamically combines the RSI (Relative Strength Index) to spot extreme overbought/oversold conditions, a HMA-based CMO (Chande Momentum Oscillator) for momentum confirmation, and historical Close Pivots.
Asymmetric SL Zones (Boxes): Instead of standard symmetric lines that often distort spatial risk, the indicator renders dynamic box shapes. The height of these zones automatically adapts to the market's current volatility using the ATR (Average True Range).
The Resistance Zone expands asymmetrically upward from the level, offering a clear visual map for placing Stop Losses on Short setups.
The Support Zone expands asymmetrically downward from the level, defining the logical Stop Loss area for Long setups.
EMA Momentum Filter & Trigger: The script features an optional EMA crossover filter. When enabled, the detection of a new S/R zone acts as a dynamic "setup alert", while the actual BUY or SELL signal triggers only when the price breaks through the EMA line, confirming directional momentum.
Key Features & Inputs:
Zone Height (ATR Multiplier): Controls the thickness of the risk zones based on market volatility.
S/R Timeframe: Multi-timeframe (MTF) functionality to plot higher time frame levels onto your current chart.
Signal Trigger Mode: Toggle between On Candle Close and After Candle Close (waits for the candle to seal to prevent repainting).
EMA Filter Toggle: Can be fully deactivated if you prefer to receive raw signals immediately upon the formation of S/R levels.
Notes de version
what was changed:Original behavior:
Support zone = from price DOWNWARD (top: tf1, bottom: tf1 - zone_offset)
Resistance zone = from price UPWARD (top: tf2 + zone_offset, bottom: tf2)
New behavior (after correction):
Support zone = from price UPWARD (top: tf1 + zone_offset, bottom: tf1) ⬆️
Resistance zone = from price DOWNWARD (top: tf2, bottom: tf2 - zone_offset) ⬇️
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Free telegram channel t.me/alexmasterforex
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Free telegram channel t.me/alexmasterforex
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.