Skip to content
All library documents

A Price-Range-Adaptive Williams Percent Range Indicator

Article MQL5 code base

Summary

The document describes an oscillator modeled on Williams Percent Range, with a variable lookback chosen according to price movement rather than a fixed number of bars. For each bar, the period is selected so that the price interval covered exceeds a user-specified point range. This makes the indicator’s observation window adapt to how much the market has moved.

The input range should be larger than the typical bar height on the active timeframe. The resulting values are bounded from -50 to +50. The document gives no trading rules, testing results, or evidence that this adaptive construction improves decisions, so it explains an indicator design rather than a complete strategy. Users would need to define how to interpret its readings and evaluate that interpretation on relevant data.

Key ideas

  • The indicator adapts its lookback period to a specified price movement range.
  • For each bar, its period expands or contracts until the covered price interval exceeds the input range.
  • The input range should be larger than the average bar height for the chosen timeframe.
  • The indicator is described as ranging from -50 to +50, but no entry or exit rules are provided.

Tags

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