• Overview
  • Reviews (5)
  • Comments (90)
  • What's new

Artificial Neural Network Advanced

The Expert Advisor receives signals from an artificial neural network. Trades are closed by an opposite signal. A signal is checked aft the close of a bar, therefore the EA can be tested and optimized using Open prices of the traded period specified in the Timeframe parameter. This feature greatly increases the speed of testing and optimization.

The EA can be used as an indicator through disabling the trading option. It will show signals on the chart as arrows, see the figure. The EA algorithm also includes the following functions:

  • stop loss order trailing after reaching a certain profit;
  • changing a position volume depending on the balance change;
  • moving losing positions to breakeven.
  • closing unidirectional trades by breakeven;
  • limiting losses or profits of open trades;
  • showing signal values on the chart.


  • Take profit - take profit value;
  • Stop loss - stop loss value;
  • Start trailing if profit > (pips) - trail a stop loss order if the profit exceeds the specified value; 0 - trailing disabled;
  • Start with lot - initial position volume increased in proportion to the balance change;
  • Lotsize by balance - increasing lot in proportion to the balance increase, yes/no;
  • Timeframe - the chart period, a signal is checked after the close of the bar of the specified period;
  • Trade direction - choose trading direction;
  • Do not trade if spread > - the EA will not trade if spread is higher than the specified value;
  • Close deal by - deal closing method: at an opposite signal; RSI cross of the level of 50%, 60-40% (60 buy, 40 sell), 70-30% (70 buy, 30 sell);
  • a1 ... a10 - inputs for the neural network used for the network training, values from 0 to 100 with any step;
  • Reset in days - open a trade in the same direction if the specified number of trades has passed since the last trade opening;
  • Amount of signals - open a trade if there is a specified number of signal confirmations on previous bars;
  • ...in bars - the number of previous bars;
  • Close losses - close losing trades (yes/no). If "no", a take profit of the previous losing trade is moved to a trade open level (breakeven) when an opposite signal appears. If the previous trade is profitable, it is closed;
  • ...maximum deals with losses - maximum allowable value of open losing trades. Trades are opened till the limit is reached;
  • Close deals if total loss profit > (%) - close all open trades if their loss or profit exceeds the specified value. Specify a negative value for loss and positive for profit
  • ...close - choose trades to be closed upon specified profit or loss. Values: all; only loss; only profitable;
  • Close couple deals by breakeven - close unidirectional trades by breakeven (yes/no);
  • Slippage (in pips) - allowed slippage when opening a trade;
  • Magic number - magic number of trades.

Training and testing example

The neural network has been trained (selection of parameters а1 ... а10) on EURUSD from 1 September to 1 November, 2016, every tick, М30, open prices, allowing closure of losing trades. Testing results on the period from September 1 to December 19 2016 are shown on the screenshots.

2017.04.17 15:01 

This is a neural system that really works on real account. Safe, profitable and low price.

Jiayi Huang
2017.04.04 13:00 


Alexey Rudich
2017.03.06 16:27 

Чтоб заработать 50$ нужно уйти в просадку 500-700$ и пересидеть лет 500 чтоб вернуть потом свои деньги.

То есть советник начинает покупать по первой своей стрелке, а как положено первая стрелка появляется обычно в сааамом начале тренда.

то есть если евро погнало рости, то первая стрелка в низ появится где то на пятой шестой свечке, и будьте готовы что он по этой стрелке начнет это самое евро продавать и будет продавать до тех пор пока оно весь тренд в обратную сторону не пройдет, и потом когда это самое евро вернется к сиходной точке, советник героически оттралит эту сделку с прибылью 0,20-0,65 центов.

мега круто что до этого блестящего момента пройдет месяц как минимум.

2017.01.04 21:59 

At first I need to say that backtests are very impressive.

28.12.2016 EA start on mql5-vps on two brokers: LMAX and Tickmill-UK.

1st chart: EURUSD m30 - SELL&BUY, Start with lot =0.015 + Lotsize by balance = on, else setting are default

2nd chart EURUSD m30 - SELL, Start with lot =0.015 + Lotsize by balance = on, else setting are default

I will show results after some time and update Stars rating

update #1: very good so far. 4 Stars right now, if it will conticune trading profitable longterm rating will be 5.

Paolo Ronchetti
2016.12.28 14:50 

User didn't leave any comment to the rating

Version 1.4 - 2017.03.24
Fixed an error in the stop loss trailing function.
Version 1.3 - 2017.02.01
1. Fixed the error which caused the EA to be unable to open trades in the same direction when Close losses = yes.
2. Added manual setting of the RSI indicator levels for closing deals.
Version 1.2 - 2016.12.30
1. Added an option for selecting trade closure method: opposite signal; crossover of the current RSI value and the level of 50%, 60-40% (60 for Buy, 40 for Sell), 70-30% (70 for Buy, 30 for Sell).
2. Added selection of trades to closed upon reaching the specified profit or loss. Parameter ...close, values: all; only loss; only profitable.