You can (untested) probably use the ZoomToIndex() function. The BI for the last bar is Lastvalue( barIndex()) If you want then blank bars you can make that LastValue( ref(BarIndex(),-10);
If you want a zoomwidth of 50 bars then the BI for the first bar in the Zoom range would be LastValue( ref(BarIndex(),-10-50); To zoom all windows at the same time use a staticvar counter for each chart. If the chart counter is less then the master zoom chart counter execute the zoom function and increment it the counter. gotta go... herman > This actually leads onto another question that you may be able to answer > Herman... > If I wanted to change chart zoom across a number of charts from the > clicking of a button on one chart only, the obvious thing that comes > to mind is to set a static variable flag which would then execute the zoom > routine on each chart... > The question is however, since I only want the zoom routine to > execute once (when the button is pressed) when exactly would I know > to change the static variable flag...? That is, when would I know > that the zoom of the last chart to be updated by AB had changed and > the static flag could now be reset...? > Any ideas...? > thanks > --- In [email protected], "Rob" <sidharth...@...> wrote: >> >> Actually Herman, I've been playing around with this, and one method that >> seems to work is to artificially construct some DateTime strings beyond the >> last bar... >> >> If you have other ideas, or indeed easy ideas for constructing those >> strings, I'd love to hear your views... >> >> TIA >> >> --- In [email protected], "Rob" <sidhartha70@> wrote: >> > >> > Hi Herman, >> > >> > Dennis has made me aware of your excellent work on programmable zoom >> > functions in UKB. It's exactly what I've been looking for. Thanks. >> > >> > One question... the procedure that performs a 'right justify'... is there >> > a way of getting that to justify including blank bars at on the right hand >> > side of the chart...? >> > >> > I've been racking my brain and can't think of a way to do it... >> > >> > Many Thanks >> > >> > Rob >> > >> > ------------------------------------ > **** 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
