The Expert Advisor uses the Percentage_Crossover_Channel indicator.
The strategy is simple:
It is a swing Expert Advisor, which can only have one position in the market. If a buy signal emerges and there is an open sell position, such a position will be closed and a buy position will be opened. The opposite is true for sell signals.
The Expert Advisor can reverse indicator signals to open Sell instead of Buy and vice versa. You can also set stop loss and take profit in points. If invalid Stop Loss and Take Profit values are specified, the EA will adjust the values to the minimum StopLevel allowed for the symbol.
The Expert Advisor will also adjust the lot in case an incorrect value is specified. If the lot is too large, the EA will adjust it in order to be able to open a position. If there is no money for opening even the minimum lot, the signal will be skipped.
For a proper operation, the EA needs the compiled indicator file Percentage_Crossover_Channel.
Also note that the Expert Advisor is designed for training and strategy testing purposes.
The EA has ten input parameters:
To check the strategy, two tests were performed on EURUSD H1, using data in the interval from 2017.01.02 to 2018.01.19, in two modes: default (at channel borders) and at the intersection of the middle line.
Fig.1. Testing graph of trading using channel borders on EURUSD H1 2017.01.02 - 2018.01.19
Fig.2. Testing results of trading using channel borders on EURUSD H1 2017.01.02 - 2018.01.19
Fig.3. Testing graph of middle line crossover trading on EURUSD H1 2017.01.02 - 2018.01.19
Fig.4. Testing results of middle line crossover trading on EURUSD H1 2017.01.02 - 2018.01.19
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/19913
An Expert Advisor based on the Diff_TF_MA indicator.ZeroLagMACD
ZeroLagMACD is an MACD version, which has a much smaller lag compared to the classic MACD.
Implementation of multiple trailing types. Pending Buy Stop and Sell Stop orders. Limitation of the maximum total lot and the total number of positions. Several types of position volume calculation.TimeEA
A Simple Expert Advisor The EA opens a position of the specified type at the time specified in the EA parameters. The position is closed at the time specified in the appropriate parameter.