Skip to content
All library documents

WMA and EMA Crossovers with Fixed Stops and Trend Reversals

Article MQL5 code base

Summary

This simple expert-advisor concept uses an 8-period weighted moving average and a 28-period exponential moving average to generate directional trades. A cross of the weighted average above the exponential average opens a long position; a cross below opens a short position. The description frames the system as a way to test a trading theory, not as a method that can prevent losses or protect an account from a severe drawdown.

Each new position receives a take-profit and stop-loss set 50 points from the entry, with the stop-loss calculation accounting for spread. If the averages cross in the opposite direction while a trade is open, the suggested behavior is to close the existing position, remove its orders, and open a position in the new direction. The author advises using a fixed deposit allocation with leverage and cautions that the approach may not suit every currency pair. No performance results or backtest details are provided, so profitability and robustness cannot be assessed from this description.

Key ideas

  • The strategy enters long or short when an 8-period WMA crosses a 28-period EMA.
  • Each position uses a 50-point take-profit and stop-loss, with spread considered in the stop calculation.
  • An opposite crossover prompts closing the current position and reversing direction.
  • The source presents the EA as a theory-testing tool and offers no performance evidence.

Tags

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