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

Re: Better Method



PureBytes Links

Trading Reference Links


-----Message d'origine-----
De : Bob Fulks <bfulks@xxxxxxxxxxxx>
À : Bert <mbcsne@xxxxxxx>
Cc : omega-list@xxxxxxxxxx <omega-list@xxxxxxxxxx>
Date : dimanche 2 mai 1999 14:58
Objet : Re: Better Method


>At 7:41 PM -0400 5/1/99, Bert wrote:
>
>>Is there a better way to check for a series of similar events?
>>
>>I know this works, but I can't believe it's the best way to do
>>it...... any help would be appreciated.
>>
>>If C > C[1] and C[1] > C[2] and C[2] > C[3] and C[3] > C[4]
>>........{etc. out to 7, 9, 17, or 23 days ago.....}
>
>

>You could also use the MRO function:
>
>    if MRO(C <= C[1], 30, 1) > Length then
>
>
>This finds the "Most Recent Occurrence" of the opposite condition so if it
>reports a value greater than the number of bars you are looking for, your
>condition would be true.
>
>Bob Fulks
>


Yes, this will work but this is also time consuming  because tou call the
MRO function every bar.
This function uses a while loop and two counters.
This aspect of smart coding is of course obvious if you use the  TS
optimization for the considered system.

Sincerely,

-Pierre Orphelin
Représentant exclusif de Omega Research en France.
web: http://www.sirtrade.com