The creator of this strategy: Scriptor
MQL5 code author: barabashkakvn
This Expert Advisor (EA) utilizes three Simple Moving Averages (SMAs) calculated with the MODE_SMA method. It operates on every tick, ensuring you’re always in the loop with market movements.
When to Open a BUY Position
For a BUY signal, we look at the values of "MA 1", "MA 2", and "MA 3" from the most recent bar (#0).
Specifically, "MA 1" needs to be above "MA 2" by a certain number of MA's spread points, while "MA 2" must be above "MA 3" by the same MA's spread points:

When to Open a SELL Position
For a SELL signal, we again take the values of "MA 1", "MA 2", and "MA 3" from bar #0.
This time, "MA 1" should be below "MA 2" by the MA's spread, and "MA 2" must be below "MA 3" by the same MA's spread:
Limitations on Position Opening
Keep in mind that if there are any BUY positions currently open by this EA, the BUY signal will be disregarded. The same applies to the SELL signal.
How to Close Positions
To close positions, we again reference the values of "MA 1" and "MA 2" from the current bar (#0).
- If "MA 1" is lower than "MA 2" by half of the MA's spread, it’s time to close your BUY position.
- If "MA 1" is higher than "MA 2" by half of the MA's spread, close your SELL position.
By mastering the use of the 3SMA EA in MetaTrader 5, you can enhance your trading strategies and make more informed decisions in the market!
Comments 0