Skip to content
All library documents

Comparing Candle Body Size with Its Recent Average to Track Volatility

Article MQL5 code base

Summary

This indicator compares a selected candle’s body with the average body size over a chosen number of candles. It displays horizontal bars and a relative-size reading, helping traders see whether the selected candle is unusually large or small for that instrument and timeframe. The example contrasts a body reported at 221% of its average with one at 5%.

Users can choose the candle index, averaging length, bar reference size, text size, and horizontal placement. Multiple instances can show different candles, with placement adjusted to prevent overlap. The suggested interpretation is that small bodies may accompany contraction before volatility expands, while an exceptionally large body may be less likely to be followed immediately by another similarly large one. These are qualitative observations only: the document supplies no tested thresholds, forecast accuracy, or trading results, and candle body size does not capture the full high-to-low range.

Key ideas

  • The scanner expresses a selected candle body as a percentage of its average body size.
  • The candle index and averaging period determine which observation is compared and against what baseline.
  • Multiple instances can display readings for different candles on one chart.
  • The author associates quiet periods with possible later expansion and exceptionally large candles with possible near-term moderation.
  • The document provides no statistical validation of these volatility interpretations.

Tags

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