Skip to content
All library documents

How the Constant Range Detector Works on Range Bars and Renko Charts

Article MQL5 code base

Summary

The Constant Range Detector is intended for constant-range charts, such as range bars or Renko boxes, where each completed bar has the same high-to-low size. It measures the high-low span of the eighth historical bar relative to the current bar. As new bars form, that reference bar advances, but its measured range remains fixed when the chart uses consistently sized bars. On ordinary time-based candles, whose high-low ranges vary, the output will vary as well.

The document illustrates the indicator with oil-chart examples and notes that displayed point values can require scaling on three- and five-digit price feeds. It also describes two ways to generate range bars in MetaTrader, with different refresh behavior, plus setup and synchronization considerations. These are operational notes rather than evidence for a trading edge: no entry or exit method, performance results, or validation is provided, and the indicator is unsuitable for interpreting fixed range on standard candles.

Key ideas

  • The detector is designed for range bars or Renko charts with a constant high-low size.
  • It measures the high-low range of the eighth historical bar, which advances as new bars form.
  • On standard candles, the measured range changes because candle sizes are not fixed.
  • Point scaling may need adjustment for three- and five-digit pricing.
  • The document explains chart generation and setup but provides no trading-performance evidence.

Tags

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