Skip to content
All library documents

Detecting Ranging Markets with Point Thresholds or ATR

Article MQL5 code base

Summary

The document describes an indicator for marking periods when prices move within a range. It offers two ways to define the range: a fixed point threshold or a threshold that changes with average true range (ATR) multiplied by a user-set factor. ATR is the default, and the author presents it as a flexible way to adapt the definition to market movement.

The indicator uses a dynamic anchor point and is described as non-lagging. A separate pseudo-chart displays candles inside a detected range in a different color. Users can adjust the ATR period and multiplier to fit their trading horizon: longer-term traders may filter out smaller fluctuations, while scalpers may want to identify narrower ranges. The document gives no performance results, validation method, or precise detection rules, so the claims about lag and suitability cannot be assessed from the description alone. Range thresholds also depend on parameter choices and may classify the same price action differently across instruments or timeframes.

Key ideas

  • The indicator defines ranges using either a fixed point threshold or an ATR-based threshold.
  • The ATR mode scales the threshold by recent volatility and is enabled by default.
  • A dynamic anchor point is used to identify range periods, which are visually marked on a separate pseudo-chart.
  • Users can tune the ATR period and multiplier to suit their trading horizon.
  • The document provides no backtest or detailed validation of the detection method.

Tags

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