Skip to content
All library documents

Daily Moving Average EA with Position Scaling and Risk-Based Sizing

Article MQL5 code base

Summary

This document outlines a MetaTrader Expert Advisor built around a daily-timeframe moving average. It lists an option to reverse signals and describes controls for adding positions, including a maximum position count for the current symbol and magic number. The excerpt does not specify the precise moving-average signal rule, so it is not possible to infer when the EA enters or reverses trades from the description alone.

Trade management inputs include stop loss, take profit, trailing stop, and trailing step, with zero disabling the respective feature. Position size can use either a fixed lot or a risk percentage per trade. A configurable close hour is checked on the position-increase timeframe; the document warns that a coarse timeframe can skip the chosen hour, illustrating the importance of matching time-based exits to bar intervals. No backtest results or performance evidence are supplied, and the description does not establish how the strategy behaves across instruments or market conditions.

Key ideas

  • The EA uses a daily moving average, but the excerpt does not state its exact entry or exit signal rule.
  • Users can reverse signals and scale into positions subject to a maximum count.
  • Position sizing supports either a fixed lot or a per-trade risk percentage.
  • Stop loss, take profit, and trailing controls can be disabled individually.
  • A close-hour rule may be missed when the selected position-increase timeframe has bars too far apart.

Tags

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