Skip to content
All library documents

Donchian Percentage Oscillator for Relative Channel Position

Article MQL5 code base

Summary

The document explains a Donchian Percentage oscillator that expresses the closing price as a percentage of its position between the channel’s lower and upper bounds. The bounds are the lowest low and highest high over a configurable lookback period. A reading near zero places the close near the bottom of the channel, while a reading near one hundred places it near the top. The indicator is displayed in a separate window alongside the price chart or Donchian channel.

Users can configure the calculation period and choose whether the current bar is included. The document provides the calculation and illustrative figure references, but no performance tests, trading rules, or empirical evidence. The value describes relative location within a recent price range; on its own, it does not establish whether price will continue in that direction or reverse. Its interpretation therefore depends on the instrument, timeframe, lookback choice, and how it is incorporated into a broader analysis.

Key ideas

  • The oscillator scales the close relative to the highest high and lowest low over a selected period.
  • Values indicate where the close sits within the Donchian channel’s range.
  • The lookback period and inclusion of the current bar are configurable.
  • The document explains the calculation but provides no tested trading strategy or performance evidence.

Tags

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