My PROBLEM is: The EA sometimes closes the trade very well, but sometimes the EA closes the tarde BUT it is continuing to look for the ticket to close it, although it was closed already.
(I get the error: "Unknown ticket number.." .
I think taht I have a logic mistake.
Thank you for you kind help.
Y
It's very, very simple . . . .
Just answer this simple question and you will have your answer . . .
You pass the TICKET number to the Function so the ticket can be closed . . . . why do you then loop through ALL the other orders ? you already KNOW the Ticket number you need to close . . . why the loop ?
Just answer this simple question and you will have your answer . . .
You pass the TICKET number to the Function so the ticket can be closed . . . . why do you then loop through ALL the other orders ? you already KNOW the Ticket number you need to close . . . why the loop ?
Thanks Raptor, I did it once without the ORDERSELECT, but it had the same mistake.
My PROBLEM is: The EA sometimes closes the trade very well, but sometimes the EA closes the tarde BUT it is continuing to look for the ticket to close it, although it was closed already.
(I get the error: "Unknown ticket number.." .
I think taht I have a logic mistake.
Thank you for you kind help.
Y
It's very, very simple . . . .
Just answer this simple question and you will have your answer . . .
You pass the TICKET number to the Function so the ticket can be closed . . . . why do you then loop through ALL the other orders ? you already KNOW the Ticket number you need to close . . . why the loop ?
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.
You gonna have problem that no one replies you if you're not using SRC button to post your code :D
Hello freinds,
OrderT is the order Ticket number,
My PROBLEM is: The EA sometimes closes the trade very well, but sometimes the EA closes the tarde BUT it is continuing to look for the ticket to close it, although it was closed already.
(I get the error: "Unknown ticket number.." .
I think taht I have a logic mistake.
Thank you for you kind help.
Y
It's very, very simple . . . .
Just answer this simple question and you will have your answer . . .
You pass the TICKET number to the Function so the ticket can be closed . . . . why do you then loop through ALL the other orders ? you already KNOW the Ticket number you need to close . . . why the loop ?
I hope that it is more clear, now.
Thanks
It's very, very simple . . . .
Just answer this simple question and you will have your answer . . .
You pass the TICKET number to the Function so the ticket can be closed . . . . why do you then loop through ALL the other orders ? you already KNOW the Ticket number you need to close . . . why the loop ?
Thanks Raptor, I did it once without the ORDERSELECT, but it had the same mistake.
Y.
Thanks onewithzachy, and I did as you suggested and I got the error
massage that it did not found the TICKET..
Hello freinds,
OrderT is the order Ticket number,
My PROBLEM is: The EA sometimes closes the trade very well, but sometimes the EA closes the tarde BUT it is continuing to look for the ticket to close it, although it was closed already.
(I get the error: "Unknown ticket number.." .
I think taht I have a logic mistake.
Thank you for you kind help.
Y
It's very, very simple . . . .
Just answer this simple question and you will have your answer . . .
You pass the TICKET number to the Function so the ticket can be closed . . . . why do you then loop through ALL the other orders ? you already KNOW the Ticket number you need to close . . . why the loop ?
I already gave a clue on very first page. https://www.mql5.com/en/forum/139543
Thanks Raptor, I did it once without the ORDERSELECT, but it had the same mistake.
O.K. Here is the modified version, which I got the same mistake.
Y.