New article: Third Generation Neural Networks: Deep Networks

 

New article Third Generation Neural Networks: Deep Networks has been published at mql5.com:

This article is dedicated to a new and perspective direction in machine learning - deep learning or, to be precise, deep neural networks. This is a brief review of second generation neural networks, the architecture of their connections and main types, methods and rules of learning and their main disadvantages followed by the history of the third generation neural network development, their main types, peculiarities and training methods. Conducted are practical experiments on building and training a deep neural network initiated by the weights of a stacked autoencoder with real data. All the stages from selecting input data to metric derivation are discussed in detail. The last part of the article contains a software implementation of a deep neural network in an Expert Advisor with a built-in indicator based on MQL4/R.

This article is going to consider the main ideas of this subject such as Deep Learning and Deep Network without complex computations in layman’s terms.

Experiments with real data confirm (or don't) theoretical advantages of deep neural networks over shallow ones by metric definition and comparison (not sure about metric definition and comparison). The task in hand is classification. We shall create an indicator and an Expert Advisor based on a deep neural network model and working in conjunction according to the client/server scheme and then test them.

The reader is presumed to have a fair idea of the basic concepts used in neural networks.


4. The Implementation (Indicator and Expert Advisor)

Now we are going to write a program for the indicator and Expert Advisor using a deep network for receiving trading signals.

There are two ways of such an implementation:

  • The first one. Training of the neural network is performed in Rstudio manually. After obtaining acceptable results, save the network in the appropriate catalog. Then launch the EA and indicator on the chart. The EA will load the trained network. The indicator prepares a vector of new input data on each new bar and passes it to the EA. The EA presents network data, receives a signal and then acts on it. The EA is carrying on with its usual activities such as opening and closing orders, trailing etc The objective of the indicator is to prepare and pass on to the EA new input data on each new bar and, most importantly, present signals forecast by the network on a chart. Practice shows that visual control is the most efficient way of assessing a neural network.
  • Second way. Launch the EA and the indicator on the chart. At the first launch, the indicator passes on to the EA a prepared large set of input and output data. The EA launches training, testing and selecting the best neural network. After that work goes on like in the first way.

We are going to write the link indicator-EA following the first algorithm. EA with a minimum of bows and frills.

Why is it so difficult? This way of implementation allows to connect several indicators placed on different symbols/timeframes to one EA and work with them consequently. For that, the EA has to go through a little modernization. We are going to talk about it later.

Below is the structure of interaction between the indicator and the EA:

Fig. 31. Structure of interaction between the indicator and the EA

Fig. 31. Structure of interaction between the indicator and the EA

Author: Vladimir Perervenko

Reason: