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

Re: metastock-digest Digest V97 #32



PureBytes Links

Trading Reference Links

Score one for Equis.  Recent discussion on this topic cast doubt on
Equis' implementation of Vidya (CMO-based) in the form of the Moving
Average - Variable type.

To settle the matter I built my own (MS v.6.5) code for both Vidya and
the CMO.  These are based on the book "The New Technical Trader" by
Chande and Kroll, and articles in the TASC magazine. 

Plot the MS Chande Momentum Oscillator (9-period) in one colour and my
TC~CMO in another, and move both to the same inner window.  You'll find
that they coincide exactly.  The TC~CMO is scaled from 1 to -1, so
multiply by 100 to get the same scale as the canned version, or overlay
without scale.

Do the same with the MS Moving Average - Variable type and the
TC~VIDYA.  Input the same number of time periods to each.  The TC~CMO
must have been installed under that name.  Depending on your machine and
amount of data it may take a few seconds for the TC~CMO to click in,
probably  because of the PREV function which Equis warns us is slow. 
There is a little discrepancy at the beginning of the data, but the
lines quickly merge and become indistinguishable.  The initial
discrepancy is probably because Equis used a different seed value, or
perhaps no seed.

I think this prooves that the MS Moving Average - Variable type is
exactly Chande's Vidya based on a 9-period CMO.  If you disagree,
justify your opinion.  Where Equis is wrong is in the VMA formula in the
manual and the help file.  That is quite misleading.

These codes allow you to experiment with Vidya based on CMO with other
periods than 9.  You can also experiment with Vidya based on other
oscillators.  Chande suggests R-squared, Standard Deviation, or any
volatility or momentum oscillator that is bounded and can be scaled to
range between 1 and zero.

One point that was brought up in the discussion was that Time Periods
are inappropriate to Vidya.  In fact "Time Periods' is a misnomer, as it
is for the exponential MA.  It is simply a figure which is input into
the expression (2/(n+1)) with n>=1 to give a scaling factor in the range
between one and zero.  This determines the ratio of new data to old data
at each period.  There are other ways to arrive at the same goal.

TC~VIDYA

TimPer:= Input( "Enter Time Periods  (1<=TP<=99)",1,99,20);
VI:=  Abs( Fml( "TC~CMO" )); 
If( PREV > 0,
{THEN}  ((2/(TimPer + 1) * VI * C) + (1 - ((2 / (TimPer + 1)) * VI)) *
PREV),
{ELSE}  Ref(C, -1))

TC~CMO

Periods:=9;
SumUp:=Sum(If(C>Ref(C,-1),C-Ref(C,-1),0),Periods);
SumDn:=Sum(If(C<Ref(C,-1),-(C-Ref(C,-1)),0),Periods);
((SumUp-SumDn)/(SumUp+SumDn))

Harvey Pearce, Victoria, B.C, Canada.

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

Max Turner wrote:
> 
> List'rs
> 
> Has anyone programmed the indicators from Chande and Kroll's book (The New
> Technical Trader) into Metastock formulae? In particular I am interested in
> VIDYA and the Stops indicator at the end of their book.
> 
> Nowadays many authors give the formulae but in this interesting book they
> give the general formulae only.
> 
> Would appreciate any replies.
> 
> Thanks in advance.
> 
> Max
> 
> K