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

 

A small pebble

for(int i=1; i<=100; i++) {

HL= HL+(High[ i] -Low[ i] )*(High[ i] -Low[ i] ); //Эти значения умножаются друг на друга, 
                                             //чтобы в случае если значение будет отрицательным
CO= CO+(Close[ i]-Open[ i])*(Close[ i]-Open[ i]); //при умножении оно стало положительным?

}
Well there isn't a zero bar yet.
 

Эти значения умножаются друг на друга,чтобы в случае если значение будет отрицательным
при умножении оно стало положительным?

No, this is the standard mathematical procedure for finding the standard deviation.

The average of the range of the last 100 bars is obtained

Not the average, but the standard deviation.

double th(double x); // what does this line mean?

Defined the subroutine function th and its argument x.

return(S); // what was S calculated for?

This is the value of the function th calculated and returned to the main program.

double w0=1; // what does full stop after a number mean?

It means we are going to work with real numbers, not just integers.

Vinin wrote (a) >>

A little pebble.

Well there is no zero bar yet.
That's right, it hasn't been formed yet! Then it doesn't exist.
 
Neutron писал(а) >>

No, it is a standard mathematical procedure for finding the standard deviation.

I think the standard deviation is different. In the definition itself sits "deviation ", i.e. the deviation from the average. I didn't notice the calculation of the mean.

 
Vinin писал(а) >>

It seems that the standard deviation is differently considered.

We work with the first difference series (FFD) Open[i]-Open[i+1] of the initial BP Open[i]. It can be shown that expectation (average) for the FFD is zero. Therefore, I count the deviation from "zero", hence, there is no contradiction and the standard deviation is considered correct in this case.

 
Neutron писал(а) >>

We work with the first difference series (FDD) Open[i]-Open[i+1] of the original BP Open[i]. It can be shown that the expectation (average) for RRD is zero. So I consider the deviation from "zero" and there is no contradiction.

For difference High[i]-Low[i] I would not say so. It is unlikely to be equal to zero.

 
Vinin писал(а) >>

For the High[i]-Low[i] difference, I would not say so. It is unlikely to be zero. And Open-Close is not equal to zero either.

Exactly. I've gone over it!

We're not counting the RMS Deviation, but the RMS Amplitude.

 
It is interesting to investigate to what extent the assumption of a zero mean - in case it is not zero after all - distorts the value of s.c.o.
 

Vinin, stop picking on me, give me a tester for the MA.

Mathemat писал(а) >>
It is interesting to investigate how much the assumption of zero mean - in case it is not zero after all - distorts the s.c.o. value.
Mathemat, where might that be of interest?
 
Neutron, what's wrong with the code I posted, does it compile with errors?
 

And you take some ready-made template and everything becomes clear (or vice versa).

Reason: