PureBytes Links
Trading Reference Links
|
> This is the formula I'm using:
>
> Inputs: XAvg1(48), XAvg2(12);
> Vars: Diff(0), Accutrack(0);
>
> Diff= (XAverage(PercentChange(Close of Data1,1),XAvg1))-
> (Xaverage(PercentChange(Close of
> Data2,1),Xavg2));
>
> Accutrack= XAverage(Diff,XAvg2);
>
> Plot1(Accutrack, "Accutrack");
Diff= (XAverage(PercentChange(Close of Data1,1),XAvg1))-
(Xaverage(PercentChange(Close of
Data2,1),Xavg2));
That last Xavg2 should be Xavg1 so you are using the same smoothing for
the stock and the index.
Diff= (XAverage(PercentChange(Close of Data1,1),XAvg1))-
(Xaverage(PercentChange(Close of Data2,1),Xavg1));
> Here's another version of the Accutrack formula...I can't get this one to
> plot:
>
> Inputs: Parameter1(12), Parameter2(48),DaysBack(500);
> Vars:
>
> Change1(0),Change2(0),Data1Change(0),Data2Change(0),Diff(0),SmoothDiff(0),FirstData(0),SecondData(0)
> , Close1(0), Close2(0),PercChange1(0),PercChange2(0);
>
> If Close1<>0 and Close2<>0 then begin
>
> Close1= Close of Data1;
> Close2= Close of Data2;
>
> PercChange1= (Close1-Close1[1])/Close1[1];
> PercChange2= (Close2-Close2[1])/Close2[1];
>
> Data1Change=XAverage(PercChange1,Parameter2);
> Data2Change=XAverage(PercChange2,Parameter2);
>
> Diff=Data1Change-Data2Change;
>
> SmoothDiff=XAverage(Diff,Parameter1);
>
> If SmoothDiff<>0 then begin
>
> Plot1(SmoothDiff, "Accutrack");
>
> End;
> End
That looks okay except it needs a semicolon ; after that last End.
--
Dennis
|