Thanks d,
I have been struggling with this since the mouse functions were introduced years ago, and aborted a variety of interesting real-time chart-trading projects. Please post an example which distinguishes between different panes/windows, i.e., returns the chartID for the chart over which the mouse is clicked. Of course, also needed is to have the function reject normal click on menus, off-chart areas, and other monitors.
Much obliged!
herman.
For tips on developing Real-Time Auto-Trading systems visit:
http://www.amibroker.org/userkb/
Thursday, October 11, 2007, 10:41:48 AM, you wrote:
> THat's what
> GetCursorXPosition - get current X position of mouse pointer (AFL 2.80)
> GetCursorYPosition - get current Y position of mouse pointer (AFL 2.80)
> are for. play with these and you'll develop a way to tell where the mouse
> was clicked.
> d
>> -----Original Message-----
>> From: amibroker@xxxxxxxxxxxxxxx
>> [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of peterbiro
>> Sent: Wednesday, October 10, 2007 4:16 PM
>> To: amibroker@xxxxxxxxxxxxxxx
>> Subject: [amibroker] Usage of GetCursorMouseButtons()
>> Hi Tomasz
>> I developed an indicator to help me sizing the positions. So this
>> indicatior is an interactive one, e.g. i set price level using a mouse
>> click.
>> So for mouse interactions i use the GetCursorMouseButtons() function.
>> Unfortunatelly this function not good enough alone (or i do not know
>> how to use it properly). It gives a true signal for a left-click if
>> the click happend outside the window's canvas. E.g. click on the
>> scrollbar or selecting a new ticker using the mouse.
>> This generates a problem in this case also (I'd like to use this way):
>> 1. I have two linked window arranged horizontally, the top one is a
>> weekly one, the bottom is daily about the same ticker.
>> 2. In the lower window there is this indicator:
>> if( GetCursorMouseButtons() & 1 ) Plot(1,"Test",colorRed);
>> If i start picking different weeks in the upper window (to see it in
>> daily view in the lower window) this indicator will draw a red line
>> sometimes. Not always, sometimes.
>> So this is my problem. I like to filter the click
>> - if it happend above the canvas of the indicator where i use the
>> GetCursorMouseButtons() (or give a feedback on what indicator the
>> click happend )
>> - if it happend above the window of the indicatior where i use the
>> GetCursorMouseButtons() (excluding scrollbars, etc.)
>> - if the click happend to make the window active ( if i want to pick a
>> value on the second click, after i make the window active)
>> Improving on this could make a lot of possibilities to develop
>> interactive indicators.
>> Thanks, Peter
>>
>> 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
> 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/
>
__._,_.___
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
__,_._,___
|