khorosh: Made the SL and TP move with buttons as conceived in the previous post. It works fine. I think it's better and more convenient than moving SL and TP by dragging additional objects like lines, arrows, etc. The step of movement can be changed the same way with buttons.
In this case, the cyclic order search should be implemented analogously. The active one is the one you want to change. It is possible to mark the selected one with some icon.
Artyom Trishkin: Well, then do the same for cyclical order retrieval. The one that is active is selected to be changed. You can mark the selected one with some icon.
If there are several orders in the market, then it would be better to try to do dragging, as it is done on a real chart. I just do not know yet how to associate cursor coordinates in pixels with points. I'll have to read the documentation. If you know where to read it, please tell me so I don't have to search for it.
khorosh: If there is more than one order in the market, then it is better to try dragging and dropping as it is done on a real chart. I just don't know yet how to associate cursor coordinates in pixels with points. I'll have to read the documentation. If you know where to read it, tell me, so I don't have to search for it.
khorosh: If there are several orders in the market, then it would be better to try and do a drag and drop, like on a real chart. I just do not know yet how to associate cursor coordinates in pixels with points. I'll have to read the documentation. If you know where to read it, please give me a hint so I don't have to search for it.
Well, it's already been suggested...
In general, of course, you should not only look at mouse buttons, but also the Ctrl key. Then only when the Ctrl key is held will you be able to drag stops, otherwise there should be no reaction (just in case you might accidentally hit a line - you can't drag it behind the cursor).
Made a variant of dragging the stoploss on the visual test chart exactly the same as on the real chart. No difference and without any additional buttons or graphical objects. I can consult you on questions that are not clear to you. The branch may be closed.
Artyom Trishkin: Well, then do the same for cyclical order retrieval. The one that is active is selected to be changed. You can mark the selected one with some icon.
I start a search of orders and determine which stop differs from the price accepted from the cursor by less than 2 points, then I save the ticket of this order in a global variable and exit the loop. Then I select the order by the ticket and set the stop loss price read from the cursor to that order when modifying it. After releasing the mouse button, the ticket of the selected order is reset.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Made the SL and TP move with buttons as conceived in the previous post. It works fine. I think it's better and more convenient than moving SL and TP by dragging additional objects like lines, arrows, etc. The step of movement can be changed the same way with buttons.
The current state of the left mouse button can now be monitored by theCHARTEVENT_MOUSE_MOVE event (parameter sparam).
Well, then do the same for cyclical order retrieval. The one that is active is selected to be changed. You can mark the selected one with some icon.
If there is more than one order in the market, then it is better to try dragging and dropping as it is done on a real chart. I just don't know yet how to associate cursor coordinates in pixels with points. I'll have to read the documentation. If you know where to read it, tell me, so I don't have to search for it.
https://docs.mql4.com/ru/chart_operations/chartxytotimeprice
,
https://docs.mql4.com/ru/chart_operations/chartxytotimeprice
Thank you, that's it.
Thank you, that's it.
If there are several orders in the market, then it would be better to try and do a drag and drop, like on a real chart. I just do not know yet how to associate cursor coordinates in pixels with points. I'll have to read the documentation. If you know where to read it, please give me a hint so I don't have to search for it.
Well, it's already been suggested...
In general, of course, you should not only look at mouse buttons, but also the Ctrl key. Then only when the Ctrl key is held will you be able to drag stops, otherwise there should be no reaction (just in case you might accidentally hit a line - you can't drag it behind the cursor).
Well, then do the same for cyclical order retrieval. The one that is active is selected to be changed. You can mark the selected one with some icon.
Bragging? )
Either show the code or close the thread.