Getting no error but ordersend returns -1

 

Hello,

m‌y 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?

 
Some code.
 

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

 
Not weird at all. 660 is  Thu, 01 Jan 1970 00:11:00 GMT. Your order would expire as soon as you placed it.
Reason: