How to form the input values for the NS correctly. - page 12

 
sergeev писал (а) >>
If moderators allow, I put the archives here (after reading them you will have to delete them :))))

THANK YOU SO MUCH!!! Great archive - I'm off to learn... that's what I didn't know how to do, so I'm off to learn-thank you again.

>> and thank you for keeping this thread alive.

 
sergeev писал (а) >>
So what about the inputs. Who has what networks and inputs?

take the difference in EMA

for each TF


M1 M5 M15 M30 (H1)



3-5

5-8

8-13

13-21

21-34

34-55

55-89

89-144

144-233


I get something like this

#define MAX_INP 6 //; 3-5 5-8 8-13 13-21 21-34 34-55 55-89 89-144 144-233


at the input of the training I give something like this




INP_PATTERNS[3][0]=-2;
INP_PATTERNS[3][1]=-3 ;
INP_PATTERNS[3][2]=-4 ;
INP_PATTERNS[3][3]=-5 ;
INP_PATTERNS[3][4]=-6 ;
INP_PATTERNS[3][5]=-7 ;
INP_PATTERNS[3][6]=-8 ;
INP_PATTERNS[3][7]=-9 ;
INP_PATTERNS[3][8]=-10;
OUT_PATTERNS [ 3, 0]=0. ;
OUT_PATTERNS [ 3, 1]=0. ;
OUT_PATTERNS [ 3, 2]= 1.0 ; // bye



output ! this paternoster has BAY




INP_PATTERNS[4][0]=1 ;
INP_PATTERNS[4][1]=1 ;
INP_PATTERNS[4][2]=2 ;
INP_PATTERNS[4][3]=2 ;
INP_PATTERNS[4][4]=3 ;
INP_PATTERNS[4][5]=3 ;
INP_PATTERNS[4][6]=4 ;
INP_PATTERNS[4][7]=5 ;
INP_PATTERNS[4][8]=6 ;

OUT_PATTERNS[4, 0]=1. ; // sell
OUT_PATTERNS [ 4, 1]=0. ;
OUT_PATTERNS [ 4, 2]= 0. ;

Sell


INP_PATTERNS[5][0]=0 ;
INP_PATTERNS[5][1]=0 ;
INP_PATTERNS[5][2]=1;
INP_PATTERNS[5][3]=0 ;
INP_PATTERNS[5][4]=-2;
INP_PATTERNS[5][5]=0 ;
INP_PATTERNS[5][6]=1;
INP_PATTERNS[5][7]=0 ;
INP_PATTERNS[5][8]=-5 ;

OUT_PATTERNS [ 5, 0]=0.00 ;
OUT_PATTERNS [ 5, 1]= 1.00 ; // flip
OUT_PATTERNS [ 5, 2]= 0.00


----

has three outputs

at the network

output is considered as direction

NEURAL NETWORK AS A SCRIPT

 
YuraZ писал (а) >>

3-5

5-8

8-13

13-21

21-34

34-55

55-89

89-144

144-233

What is it? Can you be more specific, it's not quite clear from the original post.

 
TheXpert писал (а) >>

What is this? Can you be more specific, it's not quite clear from the original post.



these are the muving numbers.



schematically

--

void Get0MAEUR(int iBAR )
  {
  
  
   MA[1][3 ] [iBAR]=iMA(Symbol(),PERIOD_M1,  3,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[1][5 ] [iBAR]=iMA(Symbol(),PERIOD_M1,  5,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[1][8 ] [iBAR]=iMA(Symbol(),PERIOD_M1,  8,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[1][13] [iBAR]=iMA(Symbol(),PERIOD_M1, 13,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[1][21] [iBAR]=iMA(Symbol(),PERIOD_M1, 21,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[1][34] [iBAR]=iMA(Symbol(),PERIOD_M1, 34,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[1][55] [iBAR]=iMA(Symbol(),PERIOD_M1, 55,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[1][89] [iBAR]=iMA(Symbol(),PERIOD_M1, 89,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[1][144][iBAR]=iMA(Symbol(),PERIOD_M1,144,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[1][233][iBAR]=iMA(Symbol(),PERIOD_M1,233,0,MODE_EMA,PRICE_CLOSE,iBAR);
 
 
   MA[2][3 ] [iBAR]=iMA(Symbol(),PERIOD_M5,  3,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[2][5 ] [iBAR]=iMA(Symbol(),PERIOD_M5,  5,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[2][8 ] [iBAR]=iMA(Symbol(),PERIOD_M5,  8,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[2][13] [iBAR]=iMA(Symbol(),PERIOD_M5, 13,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[2][21] [iBAR]=iMA(Symbol(),PERIOD_M5, 21,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[2][34] [iBAR]=iMA(Symbol(),PERIOD_M5, 34,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[2][55] [iBAR]=iMA(Symbol(),PERIOD_M5, 55,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[2][89] [iBAR]=iMA(Symbol(),PERIOD_M5, 89,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[2][144][iBAR]=iMA(Symbol(),PERIOD_M5,144,0,MODE_EMA,PRICE_CLOSE,iBAR);
   MA[2][233][iBAR]=iMA(Symbol(),PERIOD_M5,233,0,MODE_EMA,PRICE_CLOSE,iBAR);
 
 
...


            INP_PATTERNS[iB][0]=  (MA[iTF][3  ][iP]-MA[iTF][5  ][iP])/Point    ;
            INP_PATTERNS[iB][1]=  (MA[iTF][5  ][iP]-MA[iTF][8  ][iP])/Point    ;
            INP_PATTERNS[iB][2]=  (MA[iTF][8  ][iP]-MA[iTF][13 ][iP])/Point    ;
            INP_PATTERNS[iB][3]=  (MA[iTF][13 ][iP]-MA[iTF][21 ][iP])/Point    ;
            INP_PATTERNS[iB][4]=  (MA[iTF][21 ][iP]-MA[iTF][34 ][iP])/Point    ;
            INP_PATTERNS[iB][5]=  (MA[iTF][34 ][iP]-MA[iTF][55 ][iP])/Point    ;
            INP_PATTERNS[iB][6]=  (MA[iTF][55 ][iP]-MA[iTF][89 ][iP])/Point    ;
            INP_PATTERNS[iB][7]=  (MA[iTF][89 ][iP]-MA[iTF][144][iP])/Point    ;
            INP_PATTERNS[iB][8]=  (MA[iTF][144][iP]-MA[iTF][233][iP])/Point    ;

i.e. it takes the difference between adjacent EMAs on several TFs

and is fed into the mains input



in the code there I read more than 6 inputs

but I process 6 -- the code is experimental.


--


 

2 YuraZ. People are picking up. That's good to see.

Your expert in the above thread was my first introduction. Thank you very much for the code. I will paste here its slightly corrected and decorated version. It is good for beginner.

Files:
 
sergeev писал (а) >>

2 YuraZ. People are picking up. That's good to see.

Your expert in the above thread was my first introduction. Thank you very much for the code. I will paste here its slightly corrected and decorated version. It's perfect for a beginner.


I don't think it's worthy of the example, I got the initial code from the same thread too.

https://forum.mql4.com/ru/12474 from the first page

---


but I added a layer.

then the random network augmentation algorithm

I increased the accuracy in training.

then the algorithm for learning from real data (though with a teacher putting arrows i.e. a human)


I added there learning from real data if you put arrows on the chart! the system starts learning from real data, not from dumb patterns

one condition!

you need to see a fan opening M1 M5 M15 M30 ( H1 )

there is also a code for a flat!

 
YuraZ писал (а) >>

...

Looks nice, as one option it's quite good.

 
TheXpert писал (а) >>

Looks nice, as one option it's quite good.

the entrances are sometimes caught beautifully! but something else is needed !

 
YuraZ писал (а) >>

I added learning on real data there! If you put arrows on the chart, the system will learn not from dumb patterns but from real data!

one condition!

you have to see the fan opening M1 M5 M15 M30 ( H1 )

There is also a code of flat!


I saw it. I have removed the detection by arrows. However, I need the machine version. Without "hands".

That's basically what this whole thread is about :)

 
sergeev писал (а) >>

Seen it. I've removed the arrow definition. Still need a machine version. Without "hands".

For this in principle the whole branch is devoted :)

as a variant of a point it is possible to try to find

1 convergence of a zigzag from several TFs in one point

+ fan opening


and feed these points to the input

I.e. to keep in memory the nearest points and forget the old ones

I do not know what number of samples - probably experimentally

network size (number of neurons in the layers) probably also experimentally