OPEN-SOURCE SCRIPT
Actualizado

Adaptive S/R Box Zones with Dynamic Stop Loss & EMA Filter

7 776
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.
Notas de prensa
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) ⬇️

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.