
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Simply swap the images it will need a bit more coding in that case.</i></pre>
Could you please tell more details ablout this.
Regarding the button, now it works when I release the mouse button, i.e. click mouse nothing happen, release mouse then the button pressed, execute the code and release button. Is there any way to make like this: click mouse- button press, release mouse - execute the code and release the button.
I guess it should be done by CHARTEVENT_MOUSE_MOVE event.
Yes only if you use two images one for on state and one for off state.
Otherwise you can just use one image for both states then it won't really matter.
You can also just use a OBJ_BUTTON directly.
Or if you want to go with the CHARTEVENT_MOUSE_MOVE then take that route.
There are many way's.
Yes only if you use two images one for on state and one for off state.
Otherwise you can just use one image for both states then it won't really matter.
You can also just use a OBJ_BUTTON directly.
Or if you want to go with the CHARTEVENT_MOUSE_MOVE then take that route.
There are many way's.
Yes I am using button with two bitmap images for on and off states.
How I can use CHARTEVENT_MOUSE_MOVE to realize this.
There is no much informaiton about this.
I have seen this article but it doesn't explain properly how is it possible to capture left mouse down and change the state of the button.
I need code sample to understand this.
Have you tried to run this code:
You can also talk to someone at Freelance.This code is using Ternary Operators.
How I can integrate it to the code which @Marco vd Heijden posted before, i.e. to use the left mouse down (expression "DN" ) to change the button state to "pressed", then reset the button state to "released" when the left mouse button up (expression "UP" ) .
Any idea?I do not know what you are trying to do but I never use it that way.
The OnChartEvent() and OBJ_BUTTON should suffice.
If you want to use the MOUSE_MOVE then you also have to implement a means to id the object.
That is what the OBJECT_CLICK is for so why not use that ?
I do not know what you are trying to do but I never use it that way.
The OnChartEvent() and OBJ_BUTTON should suffice.
If you want to use the MOUSE_MOVE then you also have to implement a means to id the object.
That is what the OBJECT_CLICK is for so why not use that ?
I am trying to have button press experience like in any normal windows application, when “left mouse down“ changes the button appearance but don’t execute actions unless you “left Mouse up” on the button, if you make “left mouse down” on the button but “left mouse up” somewhere else it will not press the button.
When I use OnChartEvent OBJECT CLICK, it is changing the button appearance to press and release and execute the action all after “left mouse up”, nothing happens on “left mouse down”.
The code which you sent seems to be the one I am looking for, but I don’t know how to make OnChartEvent based on it.
In other word, instead of EVENT OBJECT CLICK need to use EVENT MOUSE MOVE and take actions depending on mouse UP or Down. This is how I understand.
Ok so it appears you want to make your own
CHARTEVENT_CUSTOM
Please see: https://www.mql5.com/en/code/19703