PureBytes Links
Trading Reference Links
|
Jeff,
Vidya is a subject that comes up with some regularity on this list. It
is already available in MStk as the variable moving average (Mov(C,n,V)
but Equis for their own inscrutable reasons choose not to identify it by
name. If you refer to the manual be aware that there is a typo in the
formula (0.078 should read 0.78). Two or three years ago I coded the
version given in TAS&C and it overlaid the MStk version precisely,
except that at the time the MStk version was not correctly initialised -
that has since been corrected. They acknowledged the typo at the time
but have done nothing about it.
As far as the 'circular reference' is concerned, you are right that
eventually you run out of data. However adding a portion of yesterdays
value to a portion of todays value is common to several indicators, such
as the exponential moving average. If no provision is made then usually
the indicator will start with a value of zero, rise rapidly at first,
then take some time to stabilise. One answer is to initialise it. For
a Vidya of the close, period N, you can initialise with something like
"If(Cum(1) < N, C,{else} ...)" with the Vidya formula as the 'else'.
Then at day N the indicator uses the (N-1) close for yesterdays data and
takes much less time to stabilise.
HHP
===========================
Jeff wrote:
> Has anyone read The New Technical Trader by Tushar Chande? If so,
> how did you recitify what seems to me to be a circular reference in
> the following formula given on pg. 180 VIDYAd =
> A*Close+(1-A)*VIDYAd-1? How can one calculate a VIDYA based on the
> previous day's VIDYA? It seems to me that eventually one would run
> out of previous days. Any enlightenment on this one would be
> helpful. The following is my attempt at rectifying this problem, but
> it doesn't feel right A:=0.05*Abs(CMO(C,9)); VIDYA:=
> (0.1*Fml("Volatility index"))*C + (1-0.1*Fml("volatility
> index"))*Ref(C,-1);
> Vidyab:=a*CLOSE+(1-a)*Ref(vidya,-1); VIDYA here is a VIDYA Moving
> Average. The formulation for the volatility index is as follows:
> Stdev(C,21)/Mov(Stdev(C,21),5,S) Now I've seen this in Tradestation
> code in TASC (2000 Bonus Issue) with the same apparent circular
> reference. Again, thanks in advance for suggestions. Jeff
|