Skip to content
All library documents

Measuring Price Distance from Donchian Channel Boundaries

Article MQL5 code base

Summary

The Donchian Oscillator described here measures how far the closing price sits beyond a Donchian channel boundary. The channel is formed from the highest high and lowest low across a chosen lookback period. A close above the upper boundary produces a positive histogram value equal to the excess distance; a close below the lower boundary produces a negative value based on its distance from that boundary.

The indicator has one input: the channel calculation period. It therefore offers a compact way to display price extensions relative to recent highs or lows. The document defines the calculation but gives no entry or exit rules, interpretation thresholds, backtest evidence, or guidance on how to use the measure across markets. Its signal meaning and usefulness must be evaluated in the context of a separate trading method.

Key ideas

  • The channel boundaries are the highest high and lowest low over the selected period.
  • A close above the upper boundary is shown as a positive histogram reading.
  • A close below the lower boundary is shown as a negative histogram reading.
  • The sole stated input is the period used to calculate the channel.
  • The document does not provide trading rules or performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.