Hi, Paul: Have you used the VIDYA (21,5) System with the Expert Advisor in Metastock (posted on the formula page at the Equis site)? Why is it that although the system calls for green price bars when the close is over 1.01*VIDYA, the bars aren't always green in that case, and when the system calls for red price bars when the close is below .99*VIDYA, the price bars don't always show up as red? Am I doing something wrong?
The system in the Expert Advisor is:
Bullish:
Length:=21;
Smooth:=5;
AbsCMO:=(Abs(CMO(C,Length)))/100;
SC:=2/(Smooth+1);
VIDYA:=If(Cum(1)<=(Length+1),C,(SC*AbsCMO*CLOSE)+(1-(SC*AbsCMO))*PREV);
C>(Vidya*1.01)
Bearish:
Length:=21;
Smooth:=5;
AbsCMO:=(Abs(CMO(C,Length)))/100;
SC:=2/(Smooth+1);
VIDYA:=If(Cum(1)<=(Length+1),C,(SC*AbsCMO*CLOSE)+(1-(SC*AbsCMO))*PREV);
C<(VIDYA*.99)
But then if you plot VIDYA (21,5) over the chart, using the VIDYA formula below, the price bar colors don't always quite make sense:
VIDYA:
Length:=Input("Length",1,200,21);
Smooth:=Input("Smoothing",1,200,5);
AbsCMO:=(Abs(CMO(C,Length)))/100;
SC:=2/(Smooth+1);
VIDYA:=If(Cum(1)<=(Length+1),C,(SC*AbsCMO*CLOSE)+(1-(SC*AbsCMO))*PREV); Upperband:=VIDYA*1.01; Lowerband:=VIDYA*.99; VIDYA; Upperband; Lowerband;
Sometimes the close is well under that lower band, and yet the price bar remains green. What am I missing?
Brooke |