You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.