Skip to content
All library documents

Moving Average EA with Fixed Lots and Stop Controls

Article MQL5 code base

Summary

This document describes a modified version of a standard moving average expert advisor. It adds configurable stop-loss and take-profit settings, each disabled when set to zero. The lot parameter also supports a fixed-size mode: entering a negative value makes the EA use that lot size for every position. Other listed inputs include maximum risk, a decrease factor, and the moving average period and shift.

The note gives parameter descriptions but does not specify the entry and exit rules in detail, explain how the risk and decrease settings interact, or provide backtest results. It is therefore a brief account of configurable trade sizing and protective orders, rather than an evaluation of a complete strategy. Traders would need to inspect the EA itself and test it under their market, instrument, and execution assumptions before drawing conclusions about its behavior or performance.

Key ideas

  • The EA adds configurable stop-loss and take-profit controls to a moving average example.
  • Setting either protective-order parameter to zero disables it.
  • A negative lot input selects a fixed position size for all trades.
  • The document lists risk and indicator settings but provides no performance evidence.

Tags

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