Exp_2pbIdealMA_ReOpen - MetaTrader 5 Expert - MT4/MT5 Resources


Exp_2pbIdealMA EA is based on moving average crossovers and adjusts positions according to the trend. If the fast moving average 2pbIdeal1MA crosses the slow moving average 2pbIdeal3MA, a signal is formed on the bar close. In addition, if the profit points of the last trade of the position exceed the threshold specified in the EA input parameters, it scales the volume of the opened position. A breakout of the fast moving average is a buy signal. Segmentation – Sell. Information about position scaling is stored in the transaction's string annotation in the following format: scale number/last deal price/latest volume .
Place the compiled files 2pbIdeal1MA.ex5 and 2pbIdeal3MA.ex5 to <terminal data folder>\MQL5\Indicators .
After compilation, the Exp_2pbIdealMA_ReOpen.ex5 expert file contains the 2pbIdeal1MA.ex5 and 2pbIdeal3MA.ex5 indicators as shown below in the resource , therefore, they do not need to be present in the terminal folder for the compiled EA to work! For this purpose, corresponding code has been added to the EA code in order to include these indicators in the EA's executable file.
Metrics executable has been added as a global scope resource
Change the string path to the indicator used as a resource in the OnInit() function block
Therefore, the executable compiled by experts can be used independently on other trading terminals without indicators.
The input parameters of the default Expert Advisor were used in the test shown below. Stop Loss and Take Profit were not used during testing.

Figure 1. Example of trade on chart
2015 GBPJPY H4 test results:

Figure 2. Test result chart
Attachment download
📎 tradealgorithms.mqh (178.23 KB)
📎 2pbideal1ma.mq5 (11.1 KB)
📎 2pbideal3ma.mq5 (6.52 KB)
📎 exp_2pbidealma_reopen.mq5 (27.1 KB)
Source: MQL5 #16958
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •