Trend Range Detector (Zeiierman)█ Overview
Trend Range Detector (Zeiierman) is a market structure tool that identifies and tracks periods of price compression by forming adaptive range boxes based on volatility and price movement. When prices remain stable within a defined band, the script dynamically draws a range box; when prices break out of that structure, the box highlights the breakout in real-time.
By combining a volatility-based envelope with a custom weighted centerline, this tool filters out noise and isolates truly stable zones — providing a clean framework for traders who focus on accumulation, distribution, breakout anticipation, and reversion opportunities.
Whether you're range trading, spotting trend consolidations, or looking for volatility contractions before major moves, the Trend Range Detector gives you a mathematically adaptive, visually intuitive structure that maps the heartbeat of the market.
█ How It Works
⚪ Range Formation Engine
The core of this indicator revolves around two conditions:
Distance Filter: The maximum distance between all recent closes and a dynamic centerline must remain within a volatility envelope.
Volatility Envelope: Based on an ATR(2000) multiplied by a user-defined factor to account for broader market volatility trends.
If both conditions are satisfied over the most recent length bars, a range box is drawn to visually anchor the zone.
⚪ Dynamic Breakout Coloring
When price breaks out of the top or bottom of the active range box, the box color shifts in real-time:
Blue Boxes represent areas where price has remained within a defined volatility envelope over a sustained number of bars. These zones reflect stable, low-volatility periods, often associated with consolidation, equilibrium, or market indecision.
Green Boxes for bullish breakouts.
Red Boxes for bearish breakdowns.
This allows traders to visually spot transitions from consolidation to expansion phases without relying on lagging signals.
█ Why Use a Weighted Close Instead of SMA?
A standard Simple Moving Average (SMA) treats all past closes equally, which works well in theory, but not in dynamic, fast-shifting markets. In this script, we replace the traditional SMA with a speed-weighted average that reflects how aggressively the market has moved bar-to-bar.
⚪ Here's why it matters:
Bars with higher momentum (larger price differences between closes) are given more weight.
Slow, sideways candles (typical in noise or low volume) contribute less to the calculated centerline.
This method creates a more accurate snapshot of market behavior, especially during volatile phases. As a result, the indicator adapts to market conditions more effectively, helping traders identify real consolidation zones, not just average lines distorted by flat bars or noise.
█ How to Use
⚪ Range Detection
Boxes form only when price remains consistently close to the speed-weighted mean.
Helps identify sideways zones, consolidations, and low-volatility structures where price is “charging up.”
⚪ Breakout Confirmation
Once price exits the top or bottom boundary, the box immediately highlights the direction of the break.
Use this signal in conjunction with your own momentum, volume, or trend filters for higher-confidence trades.
█ Settings
Minimum Range Length: Number of candles required for a valid range to form.
Range Width Multiplier: Adjusts the envelope around the weighted average using ATR(2000).
Highlight Box Breaks: Enables real-time coloring of breakouts and breakdowns for immediate visual feedback.
-----------------
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.
Rangestrategy
Dynamic Range Filter with Trend Candlesticks (Zeiierman)█ Overview
Dynamic Range Filter with Trend Candlesticks (Zeiierman) is a volatility-responsive trend engine that adapts in real-time to market structure, offering a clean and intelligent visualization of directional bias. It blends dynamic range calculation with customizable smoothing techniques and layered trend confirmation logic, making it ideal for traders who rely on clear trend direction, structural range analysis, and momentum-based candlestick signals.
By measuring scaled volatility over configurable lengths and applying advanced moving average techniques, this indicator filters out market noise while preserving true directional intent. Complementing this, a dual-trend system (range-based and candle-based) enhances clarity and responsiveness, particularly during shifting market conditions.
█ How It Works
⚪ Scaled Volatility Band Calculation
At the core lies a volatility engine that constructs adaptive range bands around price using smoothed high/low calculations. The bands are dynamically adjusted using:
High/Low Smoothing – Applies a moving average to the raw high and low data before calculating the range.
Scaled Range Volatility – A 2.618 multiplier scales the distance between smoothed highs and lows, forming a responsive volatility envelope.
Band Multiplier – Controls how wide the upper/lower range bands extend from the mean.
This filtering process minimizes false signals and highlights only structurally meaningful moves.
⚪ Multi-Type Smoothing Engine
Users can choose from a wide array of smoothing algorithms for trend construction, including:
HMA (default), SMA, EMA, RMA
KAMA – Adapts to market volatility using efficiency ratios.
VIDYA – Momentum-sensitive smoothing using CMO logic.
FRAMA – Dynamically adjusts to fractal dimension in price.
Super Smoother – Ideal for eliminating aliasing in range signals.
This provides the trader with fine-tuned control over reactivity vs. smoothness.
⚪ Trend Detection (Dual Engine)
The indicator includes two independent trend tracking systems:
Main Trend Filter – Based on adaptive volatility band shifts.
Candle Trend Filter – A second-tier confirmation using smoothed candle data, ideal for directional candles and confirmation entries.
█ How to Use
⚪ Trend Confirmation
Use the Trend Line and colored candlesticks for high-probability entries in the trend direction. The more trend layers that align, the higher the confidence.
⚪ Reversal Zones
When the price reaches the outer bands or fails to break them, look for candle color shifts or a crossover in the range to anticipate possible reversals or consolidations.
█ Settings
Scaled Volatility Length – Controls the lookback used to stabilize the base volatility band.
MA Type & Length – Choose and fine-tune the smoothing method (HMA, EMA, KAMA, etc.)
High/Low Smoother – Pre-smoothing for structural high/low banding.
Band Multiplier – Adjusts the width of the dynamic bands.
Trend Length (Candles) – Length used for candle-based trend confirmation.
-----------------
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.