[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Acceleration & Velocity codes?



PureBytes Links

Trading Reference Links

:   Does anyone have any TradeStation codes called Acceleration and
Velocity?
: A friend of mine said he saw some charts with 2 indicators called
:Acceleration and velocity that seemed to him would work very good in some
:markets?

Here's my version of it:

{Indicator: GM_Velocity}
Inputs: R(6),Price(Close);
Vars: Dist(0),Velo(0);

Dist=Price-Price[R];
Velo=Dist/R;

Plot1(Velo,"Velocity");
Plot2(0,"0");

-----------------------

{Indicator: GM_Acceleration}
Inputs: SpdLen(6),AccLen(4),Price(Close);
Vars: Dist(0),Velo(0),Acc(0);

Dist=Price-Price[SpdLen];
Velo=Dist/SpdLen;
Acc=(Velo-Velo[AccLen])/AccLen;

Plot1(Acc,"Acceleration");
Plot2(0,"0");