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

[amibroker] AFL: Fastest way of determining when a price was hit



PureBytes Links

Trading Reference Links

Hi,

I am somewhat new to AFL, so please bear with me.

I'm trying to find the fastest way to determine when a price was hit
intraday, either it be some mid value or a peak/lowest low.

For the highest high and lowest low, I could do a HHVBars/LLVBars to
find the number of bars since that point, then use a Ref() on OCHLV to
work with the data of that bar.

For non peak/bottom prices, I'm not sure of any way of finding the
time/bar when it occurred except by doing a for loop scan of the
entire array.  Performance is an issue, otherwise I'd just do that. 
Is there an elegant way of saying NumBarsSince(condition) ? 
ValueWhen() returns the value of an array when a condition is met, but
I'd have to do multiple calls to that to get data from that bar.  I'd
rather get the bar index and use that to access the data, as I believe
it'd be much faster than re-calculating ValueWhen().  

Just thought of something.. what if that function did a linear search
of the arrays.... :(  That's just as slow.

I've gone through the user's guide and the amibroker message
board/this yahoo board and haven't seen very many questions along this
line, and no real answers.

Anyone have any suggestions?

Thanks





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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/