당사 팬 페이지에 가입하십시오
- 조회수:
- 3998
- 평가:
- 게시됨:
- 2018.03.01 11:53
-
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
The Expert Advisor uses the Percentage_Crossover_Channel indicator.
The strategy is simple:
- The mode of trading based on channel borders:
- If the Low price of the first bar has crossed or touched the lower border downwards, a Buy position is opened;
- If the High price of the first bar has crossed or touched the upper border upwards, a Sell position is opened;
- If the reverse mode is enabled, Sell is opened instead of Buy and vice versa.
- Mode of trading based on the midline intersection:
- If the Close price of the first bar has crossed the middle line downwards, a Buy position is opened;
- If the Close price of the first bar has crossed the middle line upwards, a Sell position is opened;
- If the reverse mode is enabled, Sell is opened instead of Buy and vice versa.
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:
- Experts magic number - a unique identifier for the EA's positions;
- Percent - the indicator parameter, which sets the channel width;
- Applied price - the indicator parameter;
- Trade at the intersection of the middle line - enable/disable trading based in the middle line intersection;
- Reverse trade - enable/disable the reverse mode;
- Lots - the volume of positions to open;
- Stop loss in points - Stop Loss value in points;
- Take profit in points - Take Profit value in points;
- Slippage of price - allowable slippage;
- Multiplier spread for stops - spread multiplier for calculating a correct distance for stop orders.
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
MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/19913
![Diff_TF_MA_EA](https://c.mql5.com/i/code/expert.png)
An Expert Advisor based on the Diff_TF_MA indicator.
![ZeroLagMACD](https://c.mql5.com/i/code/indicator.png)
ZeroLagMACD is an MACD version, which has a much smaller lag compared to the classic MACD.
![NTK 07](https://c.mql5.com/i/code/expert.png)
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](https://c.mql5.com/i/code/expert.png)
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.