Artificial Neural Network Plus
The Expert Advisor trades the signals from an artificial neural network with one hidden layer. Presence of a signal is checked at the closing of the specified period.
- Net option - setting the order grid. When placing a market (not pending, Pending order offset=0) order according to a signal, the grid order is set. The following direction are available: follow the trend, against the treand and both directions. The number of placed orders is taken from the ...maximum deals with losses parameter, while the distance between orders - from Minimum distance to the same direction deal;
- Pending order offset (>0 limit-order, <0 stop-order) - type of the opened order. If the parameter is equal to 0, the EA will open market buy or sell orders. Otherwise, pending orders;
- Take profit;
- Stop loss;
- Start trailing if profit > (pips) - trail the stop loss order if the profit exceeds the specified value;
- Lot size - volume of the opened position;
- Lot step for same direction next deal - increase the volume of the next position in the same direction;
- Timeframe - network generates a signal at the close of a bar of the specified period;
- Trade direction - choose trading direction;
- Do not trade N-bars if spread> - prohibit trading for the specified number of bars (N-bars) if the current spread is greater than specified;
- Close deal by - deal closing method: at an opposite signal; current RSI crossing the specified levels and with a reverse;
- close buy at RSI % - close a buy trade when the RSI crosses this level from above, with reverse - from below;
- close sell at RSI % - close a sell trade when the RSI crosses this level from below, with reverse - from above;
- Do not trade at days of week - prohibit trading on the specified days of the week (1 – Monday, 2 – Tuesday, etc.).
ANN PARAMETERS - parameters of the neural network
- a1 ... a8 - input parameters of the neural network (weight coefficients of values for RSI oscillator), used for training it on history, values from 0 to 100;
- Signal Force (%) - strength of the neural network signal, in %;
- …step - change the signal strength for the next trade in the same direction by the given step;
- RSI period - period for averaging the values of the RSI oscillator;
- RSI shift - shift of the RSI oscillator values, greater than or equal to zero.
- Scan for signal after days from last deal - open a trade in the same direction if the specified number of trades has passed since the last trade opening;
- Amount of arrows in signals - open a trade if there is a specified number of signal confirmations on previous bars;
- ...in bars - number of previous bars;
- Minimum distance to the same direction deal - minimum allowed difference in points between deals in the same direction.
DEALS CLOSING - trade closing parameters
- Set breakeven after bars - move a trade to breakeven a specified time after it was opened;
- Set sl to breakeven if loss > (pips) - set the stop loss of a trade to breakeven if its loss exceeds the specified value;
- Set tp to breakeven if profit > (pips) - set the take profit of a trade to breakeven if its profit exceeds the specified value;
- Close deals with losses - close losing trades if there is a reverse signal. If "no", a take profit of the previous losing trade is moved to the trade's open level (breakeven) when an opposite signal appears;
- ...maximum deals with losses - maximum allowable value of open losing trades. Trades are opened till the limit is reached;
- Close deals if total loss > (%) - close all open trades if their total loss exceeds the specified value;
- Close deals if total profit > (%) - similar, but for profit;
- Close all deals by breakeven - close all trades when breakeven is reached.
- Show panel - show the control panel;
- Show profits - show the trade results on the chart;
- Write this string as order’s comment - write this line to the comment of trades;
- Write backtest results into *.csv file - testing results (drawdown, volume of opened positions, maximum position holding time, etc) will be written to a file. The file will be located in the МТ4 directory, in \tester\files.
2. Added the button on the panel setting the signal strength. When the signal strength changes on the panel, the signal arrows on the symbol chart are redrawn.
3. Added trailing stop orders. It is enabled automatically if placing stop orders is selected ('Pending orders'<0).