Hallo guys!!! I would to calculate the correlaton using, for example, only 
hourly bar (calculate the correlation from today hourly bar at 10 o' clock to 
yesterday 10 o'clock,etc for all 10 hours.
This is the basic afl (i'm very new guy in programming):

bartime=TimeNum();
x = IIf( bartime == 100000 , C,Null);
y = IIf( bartime == 110000 , C,Null);



rend1 = 100*log(Ref(x,-1)/x);
rend2 = 100*log(Ref(y,-1)/y);
//x=100*log(Ref(H1,-1)/H1);
//y=100*log(Ref(H2,-1)/H2);

acf=Correlation( rend1, rend2, 180 ); 
bt=1.96/sqrt(180);



Filter=acf>bt;
AddColumn( acf, "ACF" );


Plot(acf,"acf",colorRed);
Plot(bt,"bt",colorRed);
Plot(-bt,"bt",colorRed);


this code doesn't plot the acf but i don't understand where is the error 
(first,second and third line?)
Thanks

Dan

Reply via email to