Skip to content
All library documents

EMA and WMA Crossover Trading with Fixed Stops and Trailing

Article MQL5 code base

Summary

This Expert Advisor strategy uses an 8-period weighted moving average and a 28-period exponential moving average. It opens a long position when the WMA crosses above the EMA and a short position when it crosses below. After entry, it sets take-profit and stop-loss levels 50 points from the open price, with the stop-loss distance adjusted for spread. Version 2 adds trailing-stop functionality, with trailing distance, step, and risk available as inputs.

If the averages cross against an open position, the instructions call for closing that trade and opening a new one in the crossover direction, replacing the old orders. The source advises that the system may not suit every currency pair and suggests fixed-deposit sizing with high leverage. It provides no backtest, transaction-cost analysis, or evidence that the suggested settings are robust. The crossover can lag, and the fixed point exits and leverage guidance require careful evaluation against the instrument and account risk.

Key ideas

  • The strategy uses an 8-period WMA and a 28-period EMA to generate crossover signals.
  • An upward crossover opens a long position, and a downward crossover opens a short position.
  • The stated initial take-profit and stop-loss distances are 50 points, with spread included in the stop-loss reference.
  • Version 2 adds trailing-stop distance and step inputs.
  • An opposite crossover closes the current trade and reverses the position.
  • The document reports no performance testing and warns that suitability varies by currency pair.

Tags

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