Skip to content
All library documents

Moving Average Crossover EA with a Third-Average Filter

Article MQL5 code base

Summary

This document describes an expert advisor built around crossovers between two moving averages, with a third moving average used as a filter. It exposes settings for each average’s period, shift, method, and display color, and describes plotting the averages in different colors on a chart or in the visual tester.

The EA includes manual lot sizing or sizing based on a percentage of account balance. It can submit stop, market, or limit orders, with the order style selected through a signed pip input. Stop loss, take profit, and trailing stop settings are also available. The document gives no entry thresholds, crossover rules beyond the general concept, or performance evidence, so it does not establish whether the approach is profitable. It is a feature overview rather than a full strategy specification.

Key ideas

  • The EA uses a crossover between two moving averages to generate trades.
  • A third moving average acts as a trade filter.
  • Users can configure average periods, shifts, methods, and chart colors.
  • Position size can be fixed manually or based on a balance risk percentage.
  • The EA supports stop, market, and limit orders with protective exit settings.

Tags

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