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

[amibroker] Synchronize zoom levels with static variables and ZoomToRange



PureBytes Links

Trading Reference Links

I would appreciate some help from more experienced programmers.

Assume several chart windows open and Symbol- as well as Interval-
linked. Challenge is to link the View Ranges, or Zoom levels: when 
zooming in/out or scrolling back/forth in any chart window all others 
would follow suit right away. (Personally I am used to zoom with 
Ctrl+"+" and Ctrl+"-" and scroll with PageDown and PageUp keys.)

Marcin at support help me on the way by providing this code:

_SECTION_BEGIN("ZOOM");

AB = CreateObject("Broker.Application");
AW = AB.ActiveWindow;

startDate = ParamDate("startDate", "2006-01-01", 1);
endDate = ParamDate("endDate", "2006-06-01", 1);
trigger = ParamTrigger("trigger", "ZOOM IN");
if( trigger ) AW.ZoomToRange( startDate , endDate);

_SECTION_END();

which, when added to to any window, enables triggering the zoom level 
from the parameters dialogue.

The additional step necessary would be to use static variables to 
pass the zoom dates from one window to another (i.e. set the static 
variable from one window, then in others read it and adjust the zoom 
level).

This is way beyond my programming expertise, and hope someone can 
help me with what explicit code to add to the various chart windows.

Thanks very much in advance!

-treliff


------------------------------------

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/