PureBytes Links
Trading Reference Links
|
>Subject: Re: Fwd: EL Help
> Date: Tue, 31 Aug 1999 22:47:25 -0500
> From: "Samuel K. Tennis" <skTennis@xxxxxxxxxxxxxxxxxx>
> To: TennisSte@xxxxxxx
>
>In the code example you have given, you are checking that this bar has an
>XMA value below that of twenty bars ago but you are not checking the
>overall direction of the average.
>
>I do have a question for you though... When, if ever, are you setting the
>return value to FALSE. it appears to me that once TRUE, your function will
>stay that way forever!
>
>Try something like...
>
>If (XAverage(close,50 ) - XAverage(close,50 )[20] > 00)
> and (Close > XAverage(close, 50))
> then Test01 = TRUE
> else Test01 = FALSE ;
Good point, Sam. ALso, using such a long period allows odd things to
happen.
In 20 days a stock could go way above the 50-day MA, then dive, but
still
be above its value 20 days ago. Try any Net stock :-)
I would be good to qualify the buy with a shorter MA, like 3 days.
Simply add " AND C > Xaverage(c,3)".
donc
|