error close order

hi community!

can anyone help me with this error? i close an order with "orderclose", it works without any problems, on the same bar an new order is opened, also o.k.,

and then the EA tries to close the the same order again, it was closed before. of course now with the error output "unknown ticket" (because the order was already closed ???!!!). what am i doing wrong??

ur help is highly appreciated, regards, traderoli

traderoli:

hi community!

can anyone help me with this error? i close an order with "orderclose", it works without any problems, on the same bar an new order is opened, also o.k.,

and then the EA tries to close the the same order again, it was closed before. of course now with the error output "unknown ticket" (because the order was already closed ???!!!). what am i doing wrong??

ur help is highly appreciated, regards, traderoli

Post the code...You should have a condition if met that will stop the loop