Skip to content
All library documents

Adaptive Moving Averages Across Chart Timeframes

Article MQL5 code base

Summary

This indicator adjusts a simple moving average’s period to the chart timeframe, aiming to represent a comparable span of market activity across charts. The examples scale the lookback to the number of bars in a year or trading session: monthly and weekly charts use annual bar counts, while intraday charts use the duration of a day, week, or session divided by the chart interval. Session length therefore affects the period used for CFDs.

The suggested interpretation is directional: price above the average favors buying, while price below it favors selling. Entry ideas include waiting for price to cross the average, revisit it and form a reversal candle in the prevailing direction, or break a recent high or low after crossing. The stop is placed at the opposing extreme. The document provides calculation examples and discretionary rules, but no backtest, market-specific validation, or evidence for its claim of accuracy. Results may depend on session definitions and instrument behavior.

Key ideas

  • The moving average period is recalculated from chart timeframe and the relevant session or calendar span.
  • For intraday charts, the proposed period is the number of bars within a reference trading interval.
  • Price above or below the average is used as a basic directional filter.
  • Potential entries include a retest with reversal candles or a break of a recent extreme after crossing.
  • Stops are placed at the opposing price extreme, but the document supplies no performance testing.

Tags

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