- Comments (6)
The EA is based on and fully complies with principles described in the article https://www.mql5.com/en/articles/250 , which are put into action in the indicator https://www.mql5.com/ru/code/10339 (in Russian). The EA opens and closes orders according to signals of the stated indicator on any time frame (TF) and gains advantage due to forecasting features of the indicator.
Medium-term trading: from intraday trading to trading within several months. Tested on EURUSD.
A corresponding trading position is opened by a signal of the indicator at the beginning of a candle on a selected TF with equal values of take profit (TP) and stop loss (SL) which are specified in the EA's settings. This position is closed by another signal of the indicator or by stop orders of TP and SL.
The EA can close all positions when the signal changes or by stop orders.
- Hour Begin trade - time to start trading;
- Hour End trade - time to end trading;
- The maximum numbers of open trades simultaneously - maximum number of simultaneously opened orders;
- Volume of the lot (if=0, use the Risk) - initial lot volume ( if = 0, the Risk parameter is used);
- Risk Automaticaly- as a % of the account - automated reinvestment as % of equity;
- Experts magic number - unique number of the EA;
- Maximum deviation from quoted prices (Slippage) - maximum deviation from quotes (slippage);
- Reverse signal;
- Close the transaction if the amount varies with the trend+/- m - closing all open positions if trend direction changes from + (positive) to - (negative);
- TakeProfit, 0 = empty - fixed profit, 0 = profit is not fixed;
- StopLoss, 0 = empty - fixed loss, 0 = loss is not fixed;
- Calculate the number of bars - number of history bars used for calculating trading parameters and generating signals by the indicator;
- Number of bars forecast(how many lines extend into the future) - forecast bar for calculating a signal of closing positions (how many lines will be extended);
- if=0- use the current bars also, =1 - only closed -=0 - current bar is used, =1 - after the bar is closed;
- Minimum distance between points P3 (max) and P - minimum distance between P3 and actual price P.
- The minimum amount trend1 + + trend2 trend3 - minimum sum of 1, 2 and 3 trends;
- Numbers of bars to calculate the signals on the history.
For example, working on EURUSD D1 from the beginning of 2009 till July 7, 2015, the EA demonstrates following results with lot equal to 0,01, TP = SL = 300 points (4 digit quotes). The chart is given on the Screenshots tab.
- Bars in test 2272
- Ticks modeled 3961
- Modeling quality n/a
- Mismatched charts errors 0
- Initial deposit 2000.00
- Spread Current (2)
- Total net profit 13988.22
- Gross profit 29744.90
- Gross loss -15756.68
- Profit factor 1.89
- Expected payoff 8.28
- Absolute drawdown 0.00
- Maximal drawdown 2009.69 (35.95%)
- Relative drawdown 37.69% (1974.76)
- Total trades 1689
- Short positions (won %) 881 (63.79%)
- Long positions (won %) 808 (58.54%)
- Profit trades (% of total) 1035 (61.28%)
- Loss trades (% of total) 654 (38.72%)
- profit trade 29.98
- loss trade -32.60
- profit trade 28.74
- loss trade -24.09
- consecutive wins (profit in money) 89 (2613.36)
- consecutive losses (loss in money) 72 (-797.32)
- consecutive profit (count of wins) 2613.36 (89)
- consecutive loss (count of losses) -1480.85 (60)
- consecutive wins 18
- consecutive losses 11
You can change the history period used by the indicator when generating a signal for market entry and exit.