3sma – EA MetaTrader 5

The author of the idea: Scriptor

MQL5 code author: barabashkakvn

The EA is based on three iMA (Moving Average, MA) indicators using the MODE_SMA averaging method (Simple averaging). It works on every tick.

Signal for opening a BUY position

“MA 1”, “MA 2” and “MA 3” indicator values are taken from the bar #0.

“MA 1” is above “MA 2” by MA’s spread points, while “MA 2” indicator is above “MA 3” by MA’s spread points:

3sma

Signal for opening a SELL position

“MA 1”, “MA 2” and “MA 3” indicator values are taken from the bar #0.

“MA 1” indicator is below “MA 2” by MA’s spread points, while “MA 2” is below “MA 3” by MA’s spread points.

Limitations for position opening

If at the moment, there are BUY positions opened by this EA, then the BUY signal is ignored. The same is done with the SELL signal.

Alternative:   Exp_WeightOscillator_Direct - EA MetaTrader 5

Closing Positions

“MA 1” and “MA 2” indicator values are taken from the bar #0.

  • If “MA 1” is less than “MA 2” for the half of MA’s spread → close BUY position;
  • If “MA 1” is above “MA 2” for the half of MA’s spread → close SEll position.


📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks