Ok ... This I understood. However, my
question was different from what you exposed.
If the order is there "somewhere"and I cannot see
it, how can I delete it?
My delete_orders() is only getting the
orders I see on my trade tab so I understand that I am using a wrong process to
"visualize/ delete this order".
IOW, I understood the order is there. How
can I catch/ reach it?
From the screenshot you posted, you don't have any order. You have a position with an SL and a TP. As already said, SL/TP are processed separately with MT5, they are not pending orders.
So once you have a position with an SL/TP, you can modify this SL/TP by modifying the position, see TRADE_ACTION_SLTP.
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.
Ok ... This I understood. However, my question was different from what you exposed.
If the order is there "somewhere"and I cannot see it, how can I delete it?
My delete_orders() is only getting the orders I see on my trade tab so I understand that I am using a wrong process to "visualize/ delete this order".
IOW, I understood the order is there. How can I catch/ reach it?
You are using MqlTradeRequest, and in this case you have to use the option
mrequest.action=TRADE_ACTION_SLTP;if you want to delete or modify your stop loss (or take profit). Please take a look at the possible trade request actions.
In my opinion, It would be easier to use the PositionModify function, found in the CTrade Standard Library.
FIRST
Ok ... This I understood. However, my question was different from what you exposed.
If the order is there "somewhere"and I cannot see it, how can I delete it?
My delete_orders() is only getting the orders I see on my trade tab so I understand that I am using a wrong process to "visualize/ delete this order".
IOW, I understood the order is there. How can I catch/ reach it?
From the screenshot you posted, you don't have any order. You have a position with an SL and a TP. As already said, SL/TP are processed separately with MT5, they are not pending orders.
So once you have a position with an SL/TP, you can modify this SL/TP by modifying the position, see TRADE_ACTION_SLTP.