Exp Color Zerolag Momentum X2
This is a powerful addition to your MetaTrader 5 toolkit designed to optimize market analysis and performance. This Expert Advisor serves as automated trading software. It is utilized to monitor financial markets and execute trades based on predefined algorithmic rules, enabling precise position management without the need for constant manual oversight.
How to Setup and Use Exp Color Zerolag Momentum X2
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
Description & Settings
Signals of the fast and slow trend match;
Direction of the fast trend has changed.
Input parameters for the Expert Advisor://+-------------------------------------------------+//| Input parameters of the EA indicator |//+-------------------------------------------------+input string Trade="Trade management"; //+============== TRADE MANAGEMENT ==============+ input double MM=0.1; //Share of a deposit in a dealinput MarginMode MMMode=LOT; //lot value detection methodinput uint StopLoss_=1000; //Stop Loss in pointsinput uint TakeProfit_=2000; //Take Profit in pointsinput string MustTrade="Trade permissions"; //+============== TRADE PERMISSION ==============+ input int Deviation_=10; //max. price deviation in pointsinput bool BuyPosOpen=true; //Permission to enter long positioninput bool SellPosOpen=true; //Permission to enter short position//+-------------------------------------------------+//| Input parameters of the filter indicator |//+-------------------------------------------------+input string Filter="PARAMETERS FOR SLOW TREND"; //+============== PARAMETERS FOR SLOW TREND ==============+ input ENUM_TIMEFRAMES TimeFrame=PERIOD_H6; //1 Chart period for the trendinput uint smoothing=15;input ENUM_APPLIED_PRICE IPC=PRICE_CLOSE;//Applied price//----input double Factor1=0.05;input uint Momentum_period1=8;//----input double Factor2=0.10;input uint Momentum_period2=21;//----input double Factor3=0.16;input uint Momentum_period3=34;//----input double Factor4=0.26;input int Momentum_period4=55;//----input double Factor5=0.43;input uint Momentum_period5=89;input uint SignalBar=1; //bar index for getting an entry signalinput bool BuyPosClose=true; //Permission to exit long positions by trendinput bool SellPosClose=true; //Permission to exit short positions by trend//+-------------------------------------------------+//| Input parameters of the entry indicator |//+-------------------------------------------------+input string Input="ENTRY PARAMETERS"; //+=============== ENTRY PARAMETERS ===============+ input ENUM_TIMEFRAMES TimeFrame_=PERIOD_M30; //2 Chart period for the entryinput uint smoothing_=15;input ENUM_APPLIED_PRICE IPC_=PRICE_CLOSE;//Applied price//----input double Factor1_=0.05;input uint Momentum_period1_=8;//----input double Factor2_=0.10;input uint Momentum_period2_=21;//----input double Factor3_=0.16;input uint Momentum_period3_=34;//----input double Factor4_=0.26;input int Momentum_period4_=55;//----input double Factor5_=0.43;input uint Momentum_period5_=89;input uint SignalBar_=1;//bar index for getting an entry signalinput bool BuyPosClose_=false; //Permission to exit long positions by signalinput bool SellPosClose_=false; //Permission to exit short positions by signal//+-------------------------------------------------+
String parameters with text in the code of input parameters are only for better visualization of the input parametera window of the expert.
The ColorZerolagMomentum_HTF indicators in the EA are intended only for a more convenient visualization of trends in the strategy tester, in other operation modes they are inactive.
Place ColorZerolagMomentum.ex5 and ColorZerolagMomentum_HTF.ex5 compiled files to the <terminal_data_folder>\MQL5\Indicators.
After compilation, the Exp_ColorZerolagMomentum.ex5 expert file contains the ColorZerolagMomentum.ex5 and ColorZerolagMomentum_HTF.ex5 indicators as , and therefore, they are not required to be present in the terminal folder for the compiled EA to work! For this purpose, the corresponding code has been added to the EA code in order to include these indicators in the expert's executable file.
The indicator executable files have been added as resources at the global scope
//---- Include the indicators in the EA code as resources#resource "\\Indicators\\ColorZerolagMomentum.ex5" #resource "\\Indicators\\ColorZerolagMomentum_HTF.ex5"
Changed the string paths to the indicators used as resources in the block of the OnInit() function
Thus, the compiled executable file of the expert can be used on other trade terminals on its own without the indicators.
Note that the TradeAlgorithms.mqh library file allows using Expert Advisors with brokers who offer
nonzero spread
and the option of setting Stop Loss and Take Profit
together with position opening
. You can download more variants of the library at the following link: .
Default Expert Advisor's input parameters have been used during the tests shown below. Stop Loss and Take Profit have not been used during the tests.
Fig. 1. Examples of deals on the chart
Testing results for 2015 on GBPJPY, slow trend on H6, entry by fast trend on M30:
Fig. 2. Chart of testing results