Exp_X2MA_Digit_DM_361 trend-following trading system is based on ColorX2MA_Digit and ColorDM_361 indicator signals. ColorX2MA_Digit indicator is used to define the main slow trend direction, while ColorDM_361 indicator allows us to define an entry point when a fast trend direction is changing. An entry signal is generated at a bar closure if the following two conditions are met:
String variables containing text in the inputs code are included only for better visual display of the EA inputs window.
ColorDM_361_HTF and ColorX2MA_Digit_HTF indicators in the EA are included only for more convenient trend visualization in the strategy tester. They are not used in other operation modes.
Place ColorX2MA_Digit.ex5, ColorX2MA_Digit_HTF.ex5, ColorDM_361.ex5 and ColorDM_361_HTF.ex5 compiled files to the <terminal_data_folder>\MQL5\Indicators for the generated EA correct operation.
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: Trade Algorithms.
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 trades on the chart
Test results for 2015 on GBPUSD, slow trend on H4, entry by fast trend on M30:
Fig. 2. Testing results chart
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/16681
Standard RSI oscillator implemented as a histogram rounding its values to the standard range.ZPF_HTF
ZPF indicator with the timeframe selection option available in input parameters.