Discussion of article "Programming a Deep Neural Network from Scratch using MQL Language"

 

New article Programming a Deep Neural Network from Scratch using MQL Language has been published:

This article aims to teach the reader how to make a Deep Neural Network from scratch using the MQL4/5 language.

It begins with the basic unit of a neural network: a single neuron. In this article, I will concentrate on the different parts of the type of neuron that we are going to use in our Deep Neural Network, although the biggest difference between types of the neurons is usually the activation function.

The artificial neuron, loosely modeled off of a neuron in the human brain, simply hosts the mathematical computations. Like our neurons, it triggers when it encounters sufficient stimuli. The neuron combines input from the data with a set of coefficients, or weights, that either amplify or dampen that input, which thereby assigns significance to inputs for the task the algorithm is trying to learn. See each part of the neuron in action in the next image:

artificialneuron


Author: Anddy Cabrera

 

Awesome approach - just worked on a similar - to optmize the weights by using generic algorithms built in to the Strategy Tester!!! Love it!

Why would you optimize "bias" also? I thought it's always  "1.0" to avoid from 0 values, or?

 
Awesome Article Sir
 

Nice article, it explains the basics about neural networks, and its important that it uses the optimizer for training.

 
Great article, Could you please share mq5 file as well? 
 
Li Hua Liu #:
Great article, Could you please share mq5 file as well? 

Hi Li,

I have updated the article with 2 demos files. One for MQL5 and one for MQL4. The DeepNeuralNetwork.mqh can be used for both, mql5 and mql4. 


In anyway, I'm attaching this files here to show how to use it. 


Let me know if you have more questions.

Files:
DemoEADNN.mq4  17 kb
DemoEADNN.mq5  8 kb
 
Anddy Cabrera #:

Hi Li,

I have updated the article with 2 demos files.

Added to article
 

Thanks for the codes you shared. Tried to understand the way of your.


I have some hesitation since about yValues[0] ,  yValues[1],  yValues[2] since they are NOT changing and always  0,33333 but  _xValues[1,2,3] are changing with new bar ; so if trade based on yValues I did not see ANY TRADE while TRADE OCCURS when conditions based on _xValues.

Is it my fault or simply miscoding error in your original code ? 

 
Thanks for your Article and the very helpful code bro 😜
 

What a nice way to use the testers genetic algorithm as existing structures for training.

 

Greetings and thanks for nice article.

I have trained the neural network for 2019; then i tried using the best parameters/results(from strategy optimization--since this is the training ground) for 2020 but did not get good results.

My questions:

1) What does training do?

2) How often is it supposed to be done?

3) Can best parameters for 2019 be expected to work fine for 2020?

4) If 2019 best parameters dont give good results in 2020, then how often is training supposed to be done and what are its limitations?

5) Can i train everyday, everyweek? I train it for a few days, weeks or months?

Thank you.

Reason: