PureBytes Links
Trading Reference Links
|
I'm trying to get the Accutrack formula (from Fasttrack) right, and I'm getting a plot in TS2000i
but the plot isn't right. Would someone look at the description, and the formula I'm using and help
me with it.
Description from Investors Fasttrack website:
AccuTrack Histogram Indicator (A Chart)
AccuTrack Parameter 1 is a smoothing factor. Parameter 2 governs the length of the moving averages
used internally in the computation of AccuTrack. To compute each day's AccuTrack bar:
1.. Compute a daily change for the issue and the index by the formula:
Change= (TodayPrice - YesterdayPrice)/YesterdayPrice
2.. Exponentially smooth Change of the red and green lines by Parameter 2 days starting from the
1st date in the database. 3.. Subtract the smoothed Red Line Change and Green Line Change computed
above.
Diff= Red Line Change - Green Line Change
4.. Exponentially smooth Diff by Parameter 1.
5.. Check the data for the maximum and minimum values. Then scale the data to fit in the
range -100 to +100 range. The computation is based on the greatest high or low absolute value. This
means that only the positive side or the negative will actually reach the +/-100 value.
6.. Plot each day's value as a vertical bar with 0 falling at the centerline
====================================================
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");
========================
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
=================================
Any suggestions would be welcome.
John
|