my EA suddenly stopped placing orders so I am trying to debug and find out why not. OrderSend now seems to return -1 but when I add GetLastError() just after the OrderSend, nothing happens. What am I missing here?
actually I just figured what caused the problem. I deleted magicNumber = 0 and expirationDate = 660 out of the OrderSend and now it seems to work again. Very weird. I think magicNumber = 0 is standard and expirationDate requries at least 660 seconds.
OrderSend(symbol,OP_SELLSTOP,lot,sellstop,0,0,goal,comment,0,660) <-- this returned - 1