I was wondering if anyone could help me make my programs more efficient. I often need to determine the OHLCV values of specific 1-minute bars throughout the day, but especially the first, second, and third 1-minute bars in the morning (usually occurring at 9:30, 9:31, and 9:32 a.m. eastern or NYSE time).
I currently use the following to retrieve the third bar of the day where 1060727 would be yesterday's date for example: TimeFrameSet(in1Minute); BARS = BarsSince(DateNum()==1060727) - 3; L1 = LastValue( Ref(Close, -BARS) ); ...PerformSomeActionUsingL1(L1); TimeFrameRestore(); So let's say I am running an AFL program and it is about 20 minutes after the opening bell (or 9:50 a.m. Eastern time). And I wish my program to retrieve the CLOSE value of the third 1-minute bar of the day. The above routine seems kind of lengthy to me. Is there a simpler, more concise way of doing this? Or perhaps a simpler way to state this. What is the easiest way to retrieve the OHLCV value of any 1-minute bar throughout the day. Here is an example (a fake or fantasy example) of what I believe would be a really concise way of doing this, if the command existed, using direct referencing instead of relative referencing. Fake command example: L1 = DirectClose(Today(ThirdBar)); Or, another example might be... L1 = CloseValue(Today,093300); Or, a better example where 3 means the 3rd bar... L1 = CloseValue(Today,3); Can I construct anything even close to this using the AFL command set? Thank you, Ryan __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com 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/
