Neural network 2 Moving Averages
Neural network Adviser on two moving averages with learning mode. Educate your adviser on these examples and make profit in real trading. Advisor can work on any instrument and any time frame.
trade algorithm in the EA
Analysis of the two moving average produces neural network core that provides instructions to buy or sell.
On the input first layer are fed values of two moving averages, fast (FMA) and slow (SMA), a second layer, calculate two neurons responsible for purchase (N buy) and sale (N sell), a decision is taken in the third layer purchase or sale.
The block diagram of the neural network shown in Fig.
The adviser of the training mode “learns” the user marked on the chart currency instrument values moving averages. In the future, in normal operation, recognizes the “stored” value moving averages.
For training advisor must specify on the graph at least one long and one short transaction. For long trade designations used arrow “Buy”, respectively, for short transactions used arrow “Sell”. Expose the graph can be larger and the number of arrows. The more arrows, the more will be long-term learning process. Finding any other objects on the chart, in addition to these arrows, it is not desirable.
After training, the folder “NN 2MA”, where there will be “HHHHHH_NN_2MA.bin” file will be created in the common terminal folder containing the setup trained neural network. XXXXXX in the file name – is the name of the tool. In normal operation, the Advisor loads the data from the file. If the file is not found, it will use the default settings. By default, the adviser trained on the currency pair USDJPY and hour timeframe, the transaction selected in 2012.
During training advisor meet the following input values:
- The number of weights per neuron – the number of weights of neurons. Is the length of the moving average. Default – 48.
- The number of training cycles – the number of learning cycles, default – 100. The higher the value, the longer will be the process of learning. The trial version – 10.
- Factor b – value affects the rate of correction weights of neurons used for training the network. The default value is 0.7, and does not need to be changed.
- Learning mode EA – includes counselor training mode.
Examples of specifying transactions for learning advisor is shown in Figure.
The Normal mode
Section Settings Moving Averages
Here you can configure each MA separately: the period, the price calculation mode.
Section Trade Settings
- Volume of order – order size, default – 0.1.
- Value of slippages in points – slip size in points by default – 30.
- Number of attempts to open a position – number of attempts to open a position by default – 5.
- Level StopLoss in points – Stop Loss level in points, by default – 0.
- Level TakeProfit in points – the level of Take Profit in points by default – 0.
- Level TrailingStop in points – trailing stop level in points, by default – 650.
- Allow money management – the size of the order control mode to enter the market, it is enabled by default. If you disable mode, the order size is taken from the “Volume of order”.
- The volume of orders as a percentage of the deposit – is used in order to manage the size mode and determines the size of orders as a percentage of the deposit, by default – 5 percent.
- Adding to the open position – mode add to the open position, it is enabled by default. If there is a new one-way input signal to the market that made entry into the market at the open position.
Settings Neural Network Section
- The number of weights per neuron – the number of neuron weights. It corresponds to the length of the study moving average. The higher the value, the more accurate will be recognized by the current state of the market, but it reduces the number of transactions. The lower the value, the less severely will be recognized by the current state of the market and the number of transactions will increase.
- The value of neuron activation – the activation of the neuron. Value is about 0.75 the value of “The number of weights per neuron”. The higher the value, the more stringent selection for deciding neurons, the smaller the value, the less stringent selection respectively neurons. The trial version – 40.
- The number of training cycles – the number of learning cycles, by default – 100.
- Factor b – value of the speed adjustment weights, the default – 0.7.
- Learning mode EA – counselor training mode.
The training advisor in the chart comments will
is the maximum value of the neurons. These values can be
used as the activation of the neuron.
An example is shown in Fig.
Section Other Settings
- Enable comments – allows a conclusion comments on the chart.
- Magic Number of Advisor – the magic number adviser.
- Pause after trading in milliseconds – pause after trading in milliseconds.
By default, the adviser trained on the instrument and the USDJPY H1 timeframe in two transactions in 2012. Test Result adviser in 2013 can be seen in the figure.
Donchian Filter tfmt5 As with our other adviser Turtle, this system is based on the price channel breakout (Price Channel), and Donchian channel, and…
MACD 3TF VI Martingale Expert MACD 3TF VI Martingale from the series “Trading systems with increased volume position.” Here is a brief description. A…
Spider Grid mt5 This expert is virtually a copy of my expert released for MT4 Spider Grid terminal. Counselor been tested for periods of M15 and above,…