Exp_X2MA_JFatl trend-following trading system is based on ColorX2MA and ColorJFatl indicator signals. ColorX2MA indicator is used to define the main slow trend direction, while ColorJFatl 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.
ColorJFatl_HTF and ColorX2MA_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.ex5, ColorX2MA_HTF.ex5, ColorJFatl.ex5 and ColorJFatl_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
Testing results for 2015 on EURJPY, 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/16665
ZigZag based on the XMACandles indicator candles.Exp_XMACandles
The Exp_XMACandles Expert Advisor is based on signals of the XMACandles indicator.