CloseOrder error 4108 unknown ticket
Replace
for (i = OrdersTotal()-1; i >= 0; i--)
to
for (i = OrdersTotal()-1; i >= 0; i--) {
and count brackets
HO HO HO, thanks
Surprised it let me close the trades at all really.
I can't believe I missed this. NOOB Alert !
AND it only took me 2 weeks to figure this out - OUCH
OK I'll put my dunce cap on for a couple week now and go stand in the corner
Oh well, back to documents and back to the drawing board
Thanks again
Surprised it let me close the trades at all really.
I can't believe I missed this. NOOB Alert !
AND it only took me 2 weeks to figure this out - OUCH
OK I'll put my dunce cap on for a couple week now and go stand in the corner
Oh well, back to documents and back to the drawing board
Thanks again
for(pos = OrdersTotal()-1; pos >= 0 ; pos--) if ( OrderSelect(pos, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == magic.number // my magic number && OrderSymbol() == Symbol() // and my pair. ){
Hi all
I am not sure but seems like the code is trying to OrderSelect an already closed order.
I am struggling with creating codes I started this simplest code from here so I can understand whats going on a little better.
Getting 4108 unknown ticket errors
See code below