Look in the Users Guide for "Bar Replay" ----- Original Message ----- From: wangfang25 To: [email protected] Sent: May 30, 2010 3:03 AM Subject: [amibroker] Display first 100 bars by default
Dear all, How do I always display the first 100 bars by default when I go through the symbols via ALT + RIGHT/LEFT? I want to do this to carry a bar by bar exercise for pattern recognition training hence I want to start with the left side instead of the right. I've tried the ZoomToIndex( FirstBarIndex, LastBarIndex) function given in http://www.amibroker.org/userkb/2007/06/28/zoom-to-range-applications/ but due to my limited knowledge in AFL I can only make it work in such a way that I have to click the "Apply Indicator" button every time when I change to the next ticker. My AFL as followed - ================================================================== _SECTION_BEGIN("Price"); Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); FirstBarIndex =1; LastBarIndex =100; StaticVarSet( "FirstBarIndex", FirstBarIndex ); StaticVarSet( "LastBarIndex", LastBarIndex ); DT = DateTime(); BI = BarIndex(); LastDateTime = LastValue( ValueWhen( LastBarIndex == BI, DT ) ); FirstDateTime = LastValue( ValueWhen( FirstBarIndex == BI, DT ) ); LastDateTimestr = DateTimeToStr( LastDateTime ); FirstDateTimestr = DateTimeToStr( FirstDateTime ); AB = CreateObject( "Broker.Application" ); AW = AB.ActiveWindow; AW.ZoomToRange( FirstDateTimestr, LastDateTimestr ); _SECTION_END(); ================================================================== Thanks in advance! Warm regards, Wang Fang ------------------------------------ **** IMPORTANT PLEASE READ **** This group is for the discussion between users only. This is *NOT* technical support channel. TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at http://www.amibroker.com/feedback/ (submissions sent via other channels won't be considered) For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ Yahoo! Groups Links
