Programming for Beginners: Moving Average Crossover with or without Martingale Function - MetaTrader 5 Expert




All functions used in Expert Advisor can be found in the ImportFunctions.mqh include file.
There are 2 Expert Advisors, both of which use price crossing of moving averages as entry signals, but there is a simple difference: one uses Martingale when losses occur, while the other does not.
I do not recommend using any EA in a real account, they are for demonstration purposes only.
The code is commented and I made a YouTube video explaining everything you need to understand.
Thank you for reading!
Attachment download
📎 movingaverage.mq5 (2.74 KB)
📎 movingaveragemartingale.mq5 (3.57 KB)
📎 importantfunctions.mqh (4.49 KB)
Source: MQL5 #50198
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •