OPEN-SOURCE SCRIPT
تم تحديثه

Fixed Range / Donchian Channel with price projections

473
## Fixed Range / Donchian Channel

A versatile channel indicator combining traditional Donchian Channels with adaptive fixed-range logic.

This tool is designed to help traders visualise structured price movement using either:

* Dynamic Donchian breakout ranges, or
* Fixed-width channels that remain level until price forces a reset.

Unlike standard volatility bands that continuously expand and contract every bar, the Fixed Range mode creates stable price zones that only shift when price exceeds the current boundary. This produces cleaner structure and makes recurring market ranges easier to identify.

### Features

* Fixed Range mode using:

* Points
* Percentage
* ATR
* Traditional Donchian Channel mode
* Locked ATR logic:

* ATR is calculated only when the channel resets
* Prevents band distortion and keeps channel widths stable
* Midline and quarter divisions
* Configurable extension levels
* Clean visual structure suitable for trend and range analysis

### How It Works

#### Fixed Range Mode

The channel maintains a constant width until price breaks either the upper or lower boundary.

When a breakout occurs:

* The channel resets from the breakout point
* A new fixed range is calculated
* The new range remains locked until the next reset

This creates staircase-like market structure that can help identify:

* Trend continuation
* Volatility expansion
* Recurring price intervals
* Structured pullbacks

#### ATR Mode

Most ATR-based indicators recalculate every bar, causing channel widths to constantly fluctuate.

This script uses a different approach:

* ATR is only recalculated during a reset event
* The channel width then remains fixed
* Produces cleaner and more level price structures

This makes ATR behave more like a true structural range rather than a continuously moving volatility envelope.

### Suggested Usage

Market behaviour is fractal in nature. Prices often move in repeating ranges and waves within waves.

Examples commonly observed:

* Forex intraday:

* 10, 20, 50, 100 pip movements
* 0.2%, 0.5%, 1% ranges
* Indices such as SPX:

* 3%, 5%, 10% swings on higher timeframes

This indicator helps visualise these recurring structures across multiple scales.

Many traders may find it useful for:

* Trend structure analysis
* Pullback zones
* Breakout continuation
* Mean reversion areas
* Multi-timeframe market mapping

### Power tip
With the fixed range option you can use the standard Tradingview fib extension with ease. Just set it once for the range and then just keep dragging it to new levels
Swith off the extension lines if you go for this method

### Notes

* Fixed Range mode is intentionally non-reactive between resets.
* ATR mode behaves differently from standard ATR bands by design.
* Donchian mode functions as a traditional rolling highest/lowest channel.
ملاحظات الأخبار
Added an option to plot lines at an interval of 1/8 of the width. This useful when selecting large ranges

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.