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

Re: [amibroker] Re: Can chart interval be changed ("switched ") programmatically?



PureBytes Links

Trading Reference Links

Mike,

If you are looking to get it for an AutoIt function you can get it by  
using the utility in AutoIt that lets you explore the IDs of windows  
and elements.  You basically just point the cursor at the element and  
it tells you all about it.

It has been quite a while since I used it the one time to get the info  
for the Parameters Window and the Preferences Window.  That is the  
extent of my experience with it -- just enough to get the job done.

BR,
Dennis


On Dec 11, 2008, at 12:40 PM, mikesmith930b wrote:

> Dennis,
>
> Thanks for the quick reply.  Because my post was ambiguous you gave me
> a solution to a different problem.
>
> However, looking at it led me to a nice general way to do some things
> in AFL, (see below).
>
> I was originally looking for a way (programmatically) to "switch" to
> another interval that already existed in my preferences.  The solution
> was to use "SendKeys" to send a the right key sequence to the chart.
>
> SendKeys("^1"), for example, will switch to a 1-minute chart if
> "Ctr+1" is the shortcut key for that.  I added SendKeys to a small
> plugin so I could call it from AFL.
>
> Here's another one: do you know how to get the active chart's handle?
>
> Regards,
> Mike S
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, Dennis Brown <see3d@xxx> wrote:
>>
>> 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
>
>
>


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

**** 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/