The Exp_ColorZerolagJCCX Expert Advisor enters the market when the ColorZerolagJCCX indicator cloud changes its color. The signal is formed when a bar is closing if the oscillator has crossed its signal line.
Place JCCX.ex5 and ColorZerolagJCCX.ex5 compiled files to the <terminal_data_folder>\MQL5\Indicators.
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 2014 on GBPJPY H4:
Fig.2. Testing results chart
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/13875
The ColorZerolagJCCX indicator with the timeframe selection option available in the input parameters.GlobalVariable
This advisor demonstrates an example of global variables usage. The task of the advisor: store the calculation result in a global variable and get the global variable value on new initialization.