SimpleTrade - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 Resources


The EA compares the opening prices of the zero bar and the third bar.
The author of the idea is Oleksandr , the author of the MQL5 code is Barabashkakon .
Conditions for opening a buy position:
- If the opening price of the zero bar is higher than the opening price of the third bar.
Conditions for opening a sell position:
- If the opening price of the zero bar is less than or equal to the opening price of the third bar.

Close the position via stop loss or at the beginning of the next bar:

Since the EA works when new bars appear, it is equipped with several protection steps - to avoid missing entire bars due to possible position opening errors.
For example, if we cannot update the current price, we should reset the timer (static variable):
We also check the results of trading operations:
Attachment download
📎 simpletrade_.mq5 (13.42 KB)
Source: MQL5 #17274
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •