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.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
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?