The task of searching for orders - page 7

 
Vladimir Pastushak:

Maybe I didn't express myself correctly or didn't give enough information, I'm talking about orders in mt4.

And we are talking about market orders, which of course can be referred to as a position...

I was originally interested in a simple and reliable way to gather information about certain orders, to control them ...

Vladimir, what you wanted is clear.

But then we started talking about MT5

 
Михаил:

I don't think it makes sense to regain control of orders (with lost tickets),

but to "nail down" all orders and analyse the position (if there is one) and work

then work according to your algorithm.

Tickets cannot be lost - they are on the server. How do you manage to lose them?
 
Михаил:

Vladimir, what you wanted is clear.

But then we started talking about MT5.

Even if we take MT5 and do not take an open position, we can do different things with pending orders and delete them and set them from scratch at new prices or modify an order, in the case of other terminals, only delete, in the case of MT5, modification is better.

 
Artyom Trishkin:
Tickets cannot be lost - they are on the server. HOW do you manage to lose them?
On the server, but not in the Expert Advisor (after the crash)
 
Vladimir Pastushak:
Then why should I close an order which is in minus or in plus and has no potential to take out?

I am talking about MT5, there are no SL and TP orders, there is a position with SL and/or TP

And to change SL or TP you need to send an order which makes the change.

This order is immediately executed and does not hang on the MT5 server or the exchange.

 
Михаил:

I am talking about MT5, there are no SL and TP orders, there is a position with SL and/or TP

And to change SL or TP you need to send an order which will make the change.

Or an order which deletes these values and then an order which sets them again?
 
Михаил:
On the server there is, but not in EA (after the crash)
There is. Always there is. You just need to make sure that they are there, not stored in variables once written to them.
 
Vladimir Pastushak:
or an order to delete these values and then an order to set them again?
Yes, to make a change, you need to send an order which will immediately execute or cancel.
 
Михаил:
Yes, to make changes you have to send an order, which will be executed or cancelled immediately.
But it is possible to send one order with changes, right?
 
Artyom Trishkin:
There is. There always is. You just need to take care that there are, rather than storing them in variables once you have written them in.

Artyom!

It's your right to keep whatever you want (you can even keep all the orders you've placed in the entire history of your trading)!