problem with magic number

 
I recently migrate from mql4 to mql5 .when I put a pending order with a magic number , I can modify or delete the same order by the magic number. But my problem is when the pending order opened . After it opened i couldn't access to position by the magic number I specified for pending order. I think magic number of pending order get changed after it opened.

How can I access to the position to close or modify ?

Thank you for Help 🙏🙏
 

Once a pending order is triggered it becomes a position, not an order in MQL5.

Check the positions, not the orders.

 
hadi_hahsemi:

When you quote somebody, do not post your reply inside the quote.

I have edited your post and moved the reply outside of the quote.

Show the relevant code if you want help.

 
hadi_hahsemi:

Please don't edit your OP without making a note.

I see that you have now changed your OP because you did not mention positions before. You have also deleted a post that I referred to.

It makes my replies look a bit odd.