mar: Here is my attempt but it doesn't work like I want to.
You are setting it false for every other event. So you never see it. | if (OrdersTotal() != TotalOrders || mouseClick) { : if(id==CHARTEVENT_CLICK) mouseClick = true; else mouseClick = false; |
Clear it, only if it has been handled. | if (OrdersTotal() != TotalOrders || mouseClick) { mouseClick = false; : if(id==CHARTEVENT_CLICK) mouseClick = true; // else mouseClick = false; |
Thank you! Works perfect!
I just think about the fact that one could also change the stoploss in the terminal. Then it is not a mouseclick anymore.
Do you have another idea how to check if a stoploss is changed without doing that each tick?
And I would beg you to have a look here: https://forum.mql4.com/66622
I am still trying to figure out if it is possible to wait for the current data to be loaded before taking a screenshot.
Thanks!
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
I wanted to use CHARTEVENT_OBJECT_DRAG but that doesn't work because the stoploss-lines from MT4 are no objects I can work with. So I thought about using a chart event like a mouse click. If a stoploss is changed it is usually done by dragging the stoploss level with the mouse.
Here is my attempt but it doesn't work like I want to. Does anyone have any advice for me? Maybe there is a better way instead of checking for a mouse click?