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

Re: Thanks for help with EL Question



PureBytes Links

Trading Reference Links

Bob,

Thank you for your help with my question and your many other contributions to
the list.

Lee

At 04:46 PM 12/21/01 -0500, Bob Fulks wrote:
>At 1:56 PM -0700 12/21/01, Lee Goldberg wrote:
>
>>EventA (StudyA MA crossover) occurs.
>>The value of StudyB at the same time as the MA crossover is 12 bars.
>>Begin counting and alert me when 6 bars (12 * Input(.5) ) have passed since
>>the MA crossover occurred.
>
>
>Something like this should work (untested).
>
>Bob Fulks
>
>
>Input: Ratio(0.5);
>
>Vars: MA1(Close), MA2(Close), StudyB(0), MaxCnt(0);
>
>MA1 = Average(...);
>MA2 = Average(...);
>StudyB = .....
>
>MaxCnt = iff(MA1 crosses over MA2, Ratio * StudyB, MaxCnt - 1);
>if MaxCnt <= 0 and CheckAlert then Alert = TRUE;
>