Skip to content
All library documents

DiffMA Histogram: Comparing Average Prices on Up and Down Candles

Article MQL5 code base

Summary

This indicator compares average applied prices from bullish and bearish candlesticks over a chosen period. It calculates a separate mean for each direction, then displays their difference. The result is positive when the bullish-candle average is higher and negative when the bearish-candle average is higher, subject to both candle types appearing in the period.

The document gives the calculation and identifies the configurable period and applied price. It does not provide performance evidence, trading rules, or guidance on interpreting particular values. The measure describes a directional difference in candle-group prices; by itself, it does not establish a buy or sell signal. Its behavior may also depend on the selected price series and period, and the calculation needs care when a window contains no candles of one direction.

Key ideas

  • The indicator computes separate average applied prices for bullish and bearish candles within a lookback period.
  • Its output is the bullish-candle average minus the bearish-candle average.
  • The period and applied price are configurable inputs.
  • The description provides a calculation but no tested strategy or evidence of predictive performance.

Tags

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