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

Re: [amibroker] Can chart interval be changed programmatically?



PureBytes Links

Trading Reference Links

Mike,

Short answer is yes.

I have a rather complex interaction between AFL, AutoIt, and the open  
Preferences window open to the Intraday tab to be able to change time  
settings from AFL.  I use one each of the custom settings for Constant  
Range, Volume, and Time chart settings.

I have made suggestions for giving AFL direct control over chart  
timeframe settings.  I hope Tomasz will eventually provide that.

Here is the hack AFL from my system that works for now.  Perhaps  
someone else has a more elegant solution.  This one routine is the  
only reason that I still use AutoIt with AB.

BR,
Dennis

//================================================================
// AUTO TIME/VOLUME/RANGE BAR SETTING
// the bar time information must be faked by using
// autoit to enter the data into the intraday preferences (must be Open)
function SetIntradayPreferencesText( fieldID,Text )
{
	autoit.WinActivate( "Preferences", "" ); //change the preference
	success = autoit.ControlSetText( "Preferences", "", fieldID, Text );
	if(!success)
		{PopupWindow( "please open intra-day preferences", "Operation  
Failure Notice", timeout = 10, left = -1, top = -1 );}
	else
		{success = autoit.ControlClick( "Preferences", "", "[CLASS:Button;  
Text:&Apply; INSTANCE:11]" );}
	return Success;
}
SetIntradayPreferencesText( 1028,NumToStr( desiredVolumeBar, 0, 0 );
SetIntradayPreferencesText( 1027,NumToStr( desiredRangeBar, 0, 0 );
SetIntradayPreferencesText( 1023,NumToStr( desiredTimeBar, 0, 0 );


On Dec 9, 2008, at 7:55 AM, mikesmith930b wrote:

> Hi,
>
> I want to limit the number of bars in any chart to about one-third the
> number of pixels in my display (1280/3 = 425).
>
> So if I'm looking at a 1-min chart for a single day (~390 bars = 6.5
> hrs x 60 min) and zoom out momentarily to look at  5 days worth of
> data (1950 overlapping visible bars), I'd like the chart to switch
> down to 4-min bars automatically as I zoom out.
>
> Can this be done?
>
> Thanks,
> Mike S.
>
>
>
>
>
>
> ------------------------------------
>
> **** IMPORTANT ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> *********************
> TO GET TECHNICAL 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
>
>
>


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

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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/