OPEN-SOURCE SCRIPT

Consolidation Range with Signals (Zeiierman)

9 432
Overview
Consolidation Range with Signals (Zeiierman) is a precision tool for identifying and trading market consolidation zones, where price contracts into tight ranges before significant movement. It provides dynamic range detection using either ADX-based trend strength or volatility compression metrics, and offers built-in take profit and stop loss signals based on breakout dynamics.
istantanea

Whether you trade breakouts, range reversals, or trend continuation setups, this indicator visualizes the balance between supply and demand with clearly defined mid-bands, breakout zones, and momentum-sensitive TP/SL placements.
istantanea

How It Works

Multi-Method Range Detection

ADX Mode
Uses the Average Directional Index (ADX) to detect low-trend-strength environments. When ADX is below your selected threshold, price is considered to be in consolidation.

Volatility Mode
This mode detects consolidation by identifying periods of volatility compression. It evaluates whether the following metrics are simultaneously below their respective historical rolling averages:
  • Standard Deviation
  • Variance
  • Average True Range (ATR)

Dynamic Range Band System
Once a range is confirmed, the system builds a dynamic band structure using a volatility-based filter and price-jump logic:
  • Middle Line (Trend Filter): Reacts to price imbalance using adaptive jump logic.
  • Upper & Lower Bands: Calculated by expanding from the middle line using a configurable multiplier.

This creates a clean, visual box that reflects current consolidation conditions and adapts as price fluctuates within or escapes the zone.

SL/TP Signal Engine
On detection of a breakout from the range, the indicator generates up to 3 Take Profit levels and one Stop Loss, based on the breakout direction:
  • All TP/SL levels are calculated using the filtered base range and multipliers.
  • Cooldown logic ensures signals are not spammed bar-to-bar.
  • Entries are visualized with colored lines and labeled levels.

This feature is ideal for traders who want automated risk and reward reference points for range breakout plays.


How to Use

Breakout Traders
Use the SL/TP signals when the price breaks above or below the range bands, especially after extended sideways movement. You can customize how far TP1, TP2, and TP3 sit from the entry using your own risk/reward profile.
istantanea

Mean Reversion Traders
Use the bands to locate high-probability reversion zones. These serve as reference zones for scalping or fade entries within stable consolidation phases.
istantanea

Settings
  • Range Detection Method – Choose between ADX or Volatility compression to define range criteria.
  • Range Period – Determines how many bars are used to compute trend/volatility.
  • Range Multiplier – Scales the width of the consolidation zone.
  • SL/TP System – Optional levels that project TP1/TP2/TP3 and SL from the base price using multipliers.
  • Cooldown – Prevents repeated SL/TP signals from triggering too frequently.
  • ADX Threshold & Smoothing – Adjusts sensitivity of trend strength detection.
  • StdDev / Variance / ATR Multipliers – Fine-tune compression detection logic.


-----------------
Disclaimer

The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.

All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.