Try using BarsSince. e.g.
cond1 = whatever
cond2 = something else
cond3 = yet another thing
Buy =
BarsSince(cond1) <= 5
AND BarsSince(cond2) <= 5
AND BarsSince(cond3) <= 5;
dan
On Monday 10 July 2006 08:03 pm, professor77747 wrote:
> I would like to get a buy signal when 3 conditions are met within a 5
> trading day period. For instance, when the Macd has crossed the
> signal, the stochastic has been below 30, and the MA has changed
> direction from down to up. I know how to write the code when the all
> happen on one day, but I do not understand how to write the code when
> they all happen on different days.
>
> As you can tell, I do not understand how AFL works. I can just do a
> few things.
>
> Thanks,
> Tom
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/