Neural networks, how to master them, where to start? - page 16

 
Neutron >> :

You can, of course!

But it will learn your rule in 10 lessons, and then what?

This algorithm is taken as a simple example for creating a neural network, because you have to learn from a simple one....

If the range of a candle is greater than the average range of the last five candles by a certain coefficient (if the candle is going up - buy, if the candle is going down - sell).


Based on this algorithm , the input parameters will be the crackficents of the average range of the last five bars?


 

You give definitions of the terms you use. What is "candle range"? A network should learn from examples. What counts as positive and negative examples for your network (from your point of view)? What is an "overshoot ratio"?

 
Neutron >> :

You give definitions of the terms you use. What is "candle range"? A network should learn from examples. What counts as positive and negative examples for your network (from your point of view)? What is the "overshoot factor"?

range of the last bar formed = High[1]-Low[1];

double cdpb // average range of the last five bars

for(i=1;i<5;i++){

сдппб=сдппб+(High[1]-Low[1])/5;

}

purchase condition

if(range of the last completed bar> average range of the last five bars* coefficient && Close[1]>Open[1]){

buy by market

}

Can you tell me how easy it is to define a positive negative example for the net, perhaps the result of a trade?

 

диапазон последнего сформировавшегося бара>средний диапазон пяти последних баров*коэффицент

This condition will determine the network training algorithm and its architecture. We will consider as positive outcome for the NS a coincidence of the predicted kotir movement that begins with opening a position and ends with its closing when the signal for position reversal appears. Negative - respectively - no match. The result of the network trine will be finding the optimal (from its point of view) coefficient value. The network will have 7 inputs. First input will be a constant offset (increases computational power of the network and accelerates learning), second input will have the range of 1 bar, third input will have the range of second bar and so on up to fifth bar, and seventh (the last input of NS) will have the range of zero bar (current), that it would compare with it.

The network we choose is the simplest - the linear perseptron. During learning process, it will assign optimal coefficients to each bar (not one for all five bars, like in your case, but one individual (w0, w1...w6) for each bar) and if it is possible in principle, the National Computer will predict buying or selling almost without errors!

 
Neutron >> :

This condition will determine the network training algorithm and its architecture. We will consider as positive outcome for the network coincidence of a predicted kotir movement that begins with opening a position and ends with its closing when the signal for position reversal appears. Negative - respectively - no match. The result of the network trine will be finding the optimal (from its point of view) coefficient value. The network will have 7 inputs. First input will be a constant offset (increases computational power of the network and accelerates learning), second input will have the range of 1 bar, third input will have the range of second bar and so on up to fifth bar, and seventh (the last input of NS) will have the range of zero bar (current), that it would compare with it.

Network we choose the simplest - the linear perseptron. In the learning process, it will assign the best ratios to each bar (not one for all five, like you, but one individual (w0, w1...w6) for each bar) and if it is possible in principle, the NS will predict buying or selling almost without errors!

Thank you very much Neutron.


If I understood correctly, the entries are marked as Wn, if so, my next task is to describe each entry by a code, for example:

int w0= постоянное смещение ( вот с этим не совсем понятно);  
double w1=High[1]-Low[1];
double w2=High[1]-Low[2];
double w3=High[1]-Low[3];
double w4=High[1]-Low[4];
double w5=High[1]-Low[5];
double w6=High[1]-Low[0];


Is this correct?

 

That's right!

What about constant input is not clear? We have to normalize the input data beforehand, this procedure is not obligatory, but desirable (it helps the network learn faster and increases its predictive power). As a result of this procedure, the whole variety of input signals (from -infinity, to +infinity), will be mapped into a finite interval +/-1. As a constant offset, we will supply +1 (for clarity) to the first input of the NS. The output will output Out>0 means Bue and Out<0 means Sell.

 
Neutron >> :

That's right!

What about constant input is not clear? We have to normalize the input data beforehand, this procedure is not obligatory, but desirable (it helps the network learn faster and increases its predictive power). As a result of this procedure, the whole variety of input signals (from -infinity, to +infinity), will be mapped into a finite interval +/-1. As a constant offset, we feed +1 (for certainty) to the first input of the NS.

int    w0=1; // это для того, чтобы все ниже описаные входы были проработаны на истории?
double w1=High[1]-Low[1];
double w2=High[1]-Low[2];
double w3=High[1]-Low[3];
double w4=High[1]-Low[4];
double w5=High[1]-Low[5];
double w6=High[1]-Low[0];
 
Andrey4-min писал(а) >>

Is this right?

It's still not right.

In this formulation, the inputs to the NS will be only positive in amplitude signals and the network will not get all the possible information on which the analysis will be based. Better, multiply the value of your input by the colour of the candle: +1 if the candle was rising, and -1 - if it was falling. And not even by +/-1, but by the value of the increment: Close[i]-Open[i].

It will look like this:

w1=(High[1]-Low[1])/Point*( Close[1]-Open[1])/Point;

w1=(High[2]-Low[2])/Point*( Close[2]-Open[2])/Point;

w1=(High[3]-Low[3])/Point*( Close[3]-Open[3])/Point;

This is without normalisation for now.

P.S. I do not understand this: // Is it to make all of the inputs described below work through history?

 
Neutron >> :

This is still not correct.

In this formulation, the inputs to the NS will be only positive in amplitude signals, and the network will not get all the possible information on which to base the analysis. Better, multiply the value of your input by the colour of the candle: +1 if the candle was rising, and -1 - if it was falling. And not even +/-1, but to the value of the increment: Close[i]-Open[i].

It will look like this:

w1=(High[1]-Low[1])/Point*( Close[1]-Open[1])/Point;

w1=(High[2]-Low[2])/Point*( Close[2]-Open[2])/Point;

w1=(High[3]-Low[3])/Point*( Close[3]-Open[3])/Point;

This is without normalisation for now.

P.S. I do not understand this: // Is it to make all the inputs described below work through history?

You have w1 in all three lines in your example, should it be like that?

P.S. What I don't get is this: // is it so that all the inputs described below can be worked through on history?

I'm trying to understand what function w0 will perform, and I assumed it's a step in the story, like in loops, if not, can you tell me more...

 
Andrey4-min писал(а) >>

In your example you have w1 in all three lines, should this be the case?

I'm trying to figure out what function w0 will perform, so I assumed it was a step into history, like in loops, if not, please explain more...

To understand what function w0 performs, we'd better start with some textbooks instead of jumping into the NS, IMHO.

Reason: