Skip to content
All library documents

Displaying Multiple Moving Average Periods on One Chart

Article MQL5 code base

Summary

The document describes a chart indicator that displays moving averages for 20-, 50-, 100-, and 200-day periods without requiring the trader to switch chart timeframes. It also inserts gaps between periods so the start of a new period is easier to see. This can make longer-term averages more accessible during chart review.

An example uses a 20-day exponential moving average calculated from daily closes and shifted forward by one period. The note offers no performance evidence, trading rules, or comparison with other indicator settings. It explains a display convenience rather than a strategy, so traders would need to decide how to interpret the averages and test any resulting signals themselves.

Key ideas

  • The indicator shows 20-, 50-, 100-, and 200-day moving averages without changing chart timeframes.
  • Gaps between periods help distinguish where a new period begins.
  • The example applies a 20-day exponential moving average to daily closes with a one-period shift.
  • The document describes chart presentation and provides no evidence of trading performance.

Tags

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