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

 
Anddy Cabrera #:

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.

Really Very Nice article, I tried the demo and noted that only yValues[1] only may give values more than .5, yValues[0] and yValues[2] values are of maxumum of .2 or .3. even in optimization no more than one trade, which is one sell order, will open.  
 
nail sertoglu #:

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 ? 

Update the following function to return `bool` instead of `void` and you will see that there was a bad number of weights given.

bool SetWeights(double &weights[])
     {
      int numWeights=(numInput*numHiddenA)+numHiddenA+(numHiddenA*numHiddenB)+numHiddenB+(numHiddenB*numOutput)+numOutput;
      if(ArraySize(weights)!=numWeights)
        {
         printf("Bad weights length (%i), expected %i", ArraySize(weights), numWeights);
         return false;
        }

Note that you also need to update the wheights on top of the file (it's not enough to update them only when you initialize the network :P 

#define SIZEI 25 // input * hidden A
#define SIZEA 25 // hidden A * hidden B
#define SIZEB 15 // hidden B * output
 
Hi Anddy,

This is a very good article.
I have a few questions.
1) Can I use both Sigmoid and Tan-h activation leads to output in a multilayer neuron by combination?
2) Do you need to update the wheights at the top of the file as suggested by Karlis Balcers?
#define SIZEI 20 // (input * hidden A)+hidden A
#define SIZEA 25 // (hidden A * hidden B)+hidden B
#define SIZEB 18 // (hidden B * output)+output
Note: SIZEI should be 20 and SIZEB should be 18, is that correct?
3) I have attached a deep neural network diagram as described in this article, is that correct?

many thanks


EADNN

 
It works like genetic algo ith optimizer, selecting values that better the final result
 
<Deleted>
 
Hi Sir good day i was indeed fascinated by your EA regarding on Neural Network and
I was working on it for quite a while now
I dont know whats wrong on my code since i'm not an expert i'm just an IT student studying in a community college
I would like to make your EA into custom indicator that just make object label
(Buy [+1], Sell[-1],ignore[0] also sir i change rates[0].high to rates[1].high) but no matter how i read some documentation it doesnt show the final output
 
Karlis Balcers #:

Update the following function to return `bool` instead of `void` and you will see that there was a bad number of weights given.

Note that you also need to update the wheights on top of the file (it's not enough to update them only when you initialize the network :P 

It's a hard-coded NN, I don't recommend increasing the number of neurons as you won't be able to train it later...

 
Thanks for the codes you shared. As an new coder, I have some questions to ask, hopefully can get some helps from your experience guys. Thanks in advance.

1. When I compile the file "DeepNeuralNetwork.mqh", I have some errors and couldn't fix them.

2. In DemoEADNN.mq5, couldn't find this two files, see the screenshot below.

Thanks.

Files:
 

A very useful article

Thank you so much

 
Perfect article, many thank's :)