Brooke,
If you liked that one, I suspect you will really enjoy this one. I entered this directly from the Chande book you were so kind to send me. Remember that VIDYA is sensitive to the multiplyer and period variables (which you may define up front in this scan).
// // Scan Title : Variable Moving Average // (TS Chande's VIDYA) // // Written By : Jeffrey L. Grover // noman@gatech.edu // // Create Date: 15 Sept 1997 // // ********+-----------------------------------+******* // ********| NO WARRENTY EXPRESSED OR IMPLIED |******* // ********+-----------------------------------+******* //
input ="ibd_7070.lst"; output = "vidya.lst"; issuetype=common; exchange nyse,nasdaq,amex;
float t, vidya, vidyay, vidyab, cmo, a; integer d, trdpd, start;
t := .4; trdpd := 9; start :=-60; vidya :=0.0; vidyay:=0.0;
for d = start to 0 step 1 do cmo := ( 2 * MovAvg(d,trdpd,rsi) - 100 ) / 100; if cmo < 0 then a := t * cmo * -1; else a := t * cmo; endif; vidyab:= vidyay; vidyay:= vidya; vidya := a * close(d) + ( 1 - a ) * vidyay; next d;
if close(0) >= vidya and close(-1) >= vidyay and close(-2) < vidyab then println Symbol:-6,"BUY , Cl: ":-5,Close(0):7:3," VIDYA: ":-5,vidya:7:3; endif;
if close(0) <= vidya and close(-1) <= vidyay and close(-2) > vidyab then println Symbol:-6,"SELL, Cl: ":-5,Close(0):7:3," VIDYA: ":-5,vidya:7:3; endif; |