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

RE: [amibroker] Point Profit Trailing Stop Question



PureBytes Links

Trading Reference Links

Dave,
you can Sum(binary Condition,BarsSince(Binary event))
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Dave Merrill" <dmerrill@xxxx> 
wrote:
> Does anyone have an idea for non-looping code to count or add the 
values in
> some array since some logical event?
> 
> For instance:
> 
>   CountSince(Cross(Close, EMA(Close, 13)), Close > Open);
> 
> ...should return the number of days that closed higher than they 
opened,
> since the last time closing price crossed its 13 day EMA.
> 
> I have a looping version, but it seems like there ought to be some 
simple
> non-looping way to do this that I'm missing. A version that sums 
instead of
> counting would be useful too; it could also be used to count.
> 
> Thanks,
> 
> Dave Merrill



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/