Download MetaTrader 5

rescue information from old OrderTicket()

To add comments, please log in or register
Alberto Tortella
586
Alberto Tortella  

Hi all, my expert writes a Global Variable in this way 

StringConcatenate(...,Symbol(),OrderTicket()); 

but when half position is closed on profit, the OrderTicket() is changed from the broker and the expert is not able to modify the Global Variable properly.

Is there a way to rescue the link to old OrderTicket() ?

Thank you! 

Thorsten Rohweder
1047
Thorsten Rohweder  
Alberto Tortella:

Hi all, my expert writes a Global Variable in this way 

but when half position is closed on profit, the OrderTicket() is changed from the broker and the expert is not able to modify the Global Variable properly.

Is there a way to rescue the link to old OrderTicket() ?

Thank you! 

Use OrderSelect() for OrderTotals() to identify the changed situation. If you keep your current positions/ticket in an array you can identify what is new or closed and compare new and old positions/ tickets 
To add comments, please log in or register