Error submitting Limit Orders
It seems that you are trying to set a pending limit order at the current price, which isn't permitted. You have to set your pending orders at some distance from the current price.
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
- www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
Jon.Humphries79:
You need to add the minimum stop distance to the Ask Price
Thank you for the comment. I'll definitly look at the buy price and adjust it; however, the error's i'm getting state a problem with the stop loss not the price...
Hi,
I've been pouring over documentation and trying different order submission methods for a week or two now and haven't been able to figure out what I'm doing wrong. When I submit a trade I receive error 10016 - Invalid Stops. I've simplified my code to elminiate potential errors with no change. As you can see I had some more complicated code that I commented out. Here is what I'm submitting at the moment yet still getting an error. Thank you for your response.