okay. i solved it.
Just changed the deal ticket to order ticket.
second last line to result.order and it is working fine in live trading.
However, at both instances my EA worked fine with backtesting, don't know why.
okay. i solved it.
Just changed the deal ticket to order ticket.
second last line to result.order and it is working fine in live trading.
However, at both instances my EA worked fine with backtesting, don't know why.
You agree to website policy and terms of use
I used the above code to store ticket of a position. the ticket stored was 210877044 while that shown beside position was 210921939. The journal shows both of them related to same market order.
perhaps,because of this confusion my EA is not closing any trades.
moreover it worked fine while backtesting, and this error poped up during testing on a demo account.
what can i do to get the ticket number shown beside my position in trade-toolbox window.