Skip to content
All library documents

Moving-Average Crossovers for Hedged Automated Orders

Article MQL5 code base

Summary

This expert-advisor description explains an order trigger based on price crossing a moving average rather than on candle values. It says a hedge order can follow when a later candle produces another crossover relative to prior orders. The supplied logic permits separate buy and sell signals, limits the number of orders, and avoids submitting a second order on the same bar. Inputs include trading hours, position size, take-profit and stop-loss settings, trailing stops, and moving-average periods.

The example configuration sets a maximum of ten orders and enables both trade directions, with money-based take profit and trailing stops. However, the document does not define the signal calculation in full, explain how hedge positions are managed, identify an instrument or timeframe, or provide backtest or live performance evidence. The settings describe an implementation example, not validated trading guidance; spread, execution, and position-level risk are not analyzed.

Key ideas

  • The EA uses moving-average crossovers to trigger orders instead of relying on candle values.
  • It describes follow-up hedge orders after later crossover signals.
  • Inputs control trade direction, trading hours, order limits, size, exits, and moving-average periods.
  • The example enables both buying and selling and allows up to ten orders.
  • No performance evidence or complete signal specification is provided.

Tags

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