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

[Metastockusers] Variable Moving Average initialization



PureBytes Links

Trading Reference Links

Can anyone shed light on how I could initialize a Variable Moving 
Average in the same way that Metastock's built-in VMA indicator is 
initialized?  This indicator is based on Chande's VIDYA, which uses 
Chande's CMO as a volatility index to control the rate of change of 
the variable moving average.  The built-in VMA is based on a 9-period 
CMO, and if the selected length of the moving average is 10, it 
appears that MetaStock waits 9 bars to calculate the starting CMO 
value, then begins calculating the moving average, so it's about 20 
bars before the first value of the MA is plotted.  And, that first 
value appears to be the close of the initial bar.

When I attempt to duplicate this in the indicator builder, using 
formulas from the Guppytraders site as a starting point, my indicator 
starts at the 10th bar for a 10-period moving average, so I'm 
obviously starting the calculation of both the CMO-based volatility 
index and the MA itself, together on the first bar.  In addition, 
depending on how I use the IF() and Cum() functions to initialize it, 
the initial values of the VMA are either at or near zero, or using 
the close for the first several bars, which means it takes quite a 
while for the weight of those incorrect initial values to drop enough 
that my VMA stabilizes and matches the MetaStock version.

Seems to me that it would be helpful if I had a MetaStock equivalent 
of the Excel =N/A function - the indicator simply wouldn't exist to 
be plotted until a specified bar, and the first calculated value 
would simply be based on the close of the previous bar.  Using the IF 
and CUM functions, the best I can do is have two alternative 
calculations for before and after the desired bar, rather than simply 
starting the calculation at the desired bar and having NO value for 
the indicator prior to that point.  Any suggestions, anyone?

Thank you.

Gary



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Naturally Painless & Spray Away Backaches & Joint Pain. $19.97
http://www.challengerone.com/t/l.asp?cid=2867&lp=m331.html
http://us.click.yahoo.com/tJIe0D/79VGAA/ySSFAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/