PureBytes Links
Trading Reference Links
|
INPUT:LEN1(6),LEN2(10),LEN3(100),PERIODS(365);
VAR:DPC(0),NLOG(0),SDEV(0),SDEV2(0),SDEV3(0),VOLAT(0),VOLAT2(0),VOLAT3(0);
IF C[1]<>0 THEN DPC=C/C[1] ELSE DPC=1;
NLOG=Log(DPC);
SDEV=STDDEV(NLOG,LEN1);
VOLAT=100*SDEV*(SquareRoot(PERIODS));
SDEV2=STDDEV(NLOG,LEN2);
VOLAT2=100*SDEV2*(SquareRoot(PERIODS));
SDEV3=STDDEV(NLOG,LEN3);
VOLAT3=100*SDEV3*(SquareRoot(PERIODS));
PLOT1(VOLAT,"HV% 1");
PLOT2(VOLAT2,"HV% 2");
PLOT3(VOLAT3,"HV% 3");
=================================
INPUT:LEN1(10),LEN2(100),PERIODS(365);
VAR:DPC(0),NLOG(0),SDEV(0),SDEV2(0),VOLAT2(0),VOLAT(0);
IF C[1]<>0 THEN DPC=C/C[1] ELSE DPC=1;
NLOG=Log(DPC);
SDEV=STDDEV(NLOG,LEN1);
VOLAT=100*SDEV*(SquareRoot(PERIODS));
SDEV2=STDDEV(NLOG,LEN2);
VOLAT2=100*SDEV2*(SquareRoot(PERIODS));
PLOT1(VOLAT,"HV%10");
PLOT2(VOLAT2,"HV%100");
==================================
INPUT:LEN1(10),LEN2(100),PERIODS(365),CUTOFF(0.50);
VAR:DPC(0),NLOG(0),SDEV(0),SDEV2(0),VOLAT2(0),VOLAT(0),P1(0);
IF C[1]<>0 THEN DPC=C/C[1] ELSE DPC=1;
NLOG=Log(DPC);
SDEV=STDDEV(NLOG,LEN1);
VOLAT=100*SDEV*(SquareRoot(PERIODS));
SDEV2=STDDEV(NLOG,LEN2);
VOLAT2=100*SDEV2*(SquareRoot(PERIODS));
IF VOLAT2<>0 THEN P1=VOLAT/VOLAT2;
PLOT1(P1,"HVratio");
plot2(CUTOFF,"Cutoff");
IF CheckAlert Then Begin
IF Plot1 Crosses Above Plot2 or Plot1 Crosses Below Plot2
Then Alert = TRUE;
End;
|