Skip to content
All library documents

Moving Average Crossover Expert Advisor with Stops

Article MQL5 code base

Summary

This document outlines a forex-oriented Expert Advisor built around signals from two moving averages crossing. It describes a reversal rule in which an open sell position is closed when a buy signal appears, and an open buy is closed when a sell signal appears. The system also supports a take-profit level and a trailing stop with a configurable step; setting take profit or trailing stop to zero disables that feature. Position volume and an identifier for the EA are also configurable.

The author notes that parameters should be chosen separately for each symbol and that the supplied defaults target EURUSD on an hourly chart. No performance results or backtest evidence are provided, so the description does not establish profitability or robustness. It is a brief specification of entry signals and trade management, without details on signal timing, slippage, spread, position sizing methodology, or validation across market regimes.

Key ideas

  • The Expert Advisor generates signals from crossings of two moving averages.
  • An opposite crossover closes the existing position direction.
  • Take profit and trailing-stop controls can be disabled by setting them to zero.
  • The document says parameters should be tuned separately for each instrument.
  • It supplies no performance evidence, so the strategy’s effectiveness remains unassessed.

Tags

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