Skip to content
All library documents

Trend Direction from Two Moving Averages

Article MQL5 code base

Summary

This educational indicator uses two moving averages to determine market direction and displays that direction with color: green for an uptrend and red for a downtrend. The document presents it as a basic example of a multicolored trend indicator, intended to help readers understand how such indicators work.

No moving-average periods, crossover rules, entry or exit signals, or performance evidence are provided. The description therefore explains the general idea but does not give enough detail to reproduce the calculation or assess its trading value. A color-coded direction display can make a trend state easier to read, but the document offers no guidance on lag, ranging markets, risk controls, or testing.

Key ideas

  • The indicator uses two moving averages to identify market direction.
  • It colors upward direction green and downward direction red.
  • The description is educational and does not specify calculation details or trading rules.

Tags

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