Exp_ColorZerolagMomentum_X2 - MetaTrader 5 Expert




Input parameters of EA trading:
String parameters with text in the input parameter code are just for better visualization of the expert's input parameters window.
The ColorZerolagMomentum_HTF indicator in the EA is only used for more convenient visualization of trends in the strategy tester, they are inactive in other operating modes.
Place the ColorZerolagMomentum.ex5 and ColorZerolagMomentum_HTF.ex5 compiled files into <terminal data folder>\MQL5\indicators .
After compilation, the Exp_ColorZerolagMomentum.ex5 expert file contains the ColorZerolagMomentum.ex5 and ColorZerolagMomentum_HTF.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.
Please note that the TradeAlgorithms.mqh library file allows trading Expert Advisors with non-zero spreads and the option to set Stop Loss and Take Profit along with opening positions with brokers that offer the following services. You can download more variants of this library via the following link: Trading Algorithms .
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 test results, H6 slow trend, M30 fast trend entry:
Figure 2. Test result chart
Attachment download
📎 tradealgorithms.mqh (178.23 KB)
📎 colorzerolagmomentum.mq5 (22.52 KB)
📎 colorzerolagmomentum_htf.mq5 (20.97 KB)
📎 exp_colorzerolagmomentum_x2.mq5 (23.41 KB)
Source: MQL5 #16981
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •