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

[amibroker] Usage of GetCursorMouseButtons()



PureBytes Links

Trading Reference Links

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

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