How do I issue the SendOrder command for a Buy Stop with the Limit set 1 tick above the High and the Stop Loss set 1 tick below the Low? I tried the following:
if(check!=ERR_NO_ERROR) Print("Message not sent. Error: ", ErrorDescription(check));
I get the error: invalid stops.
You have to find minimum stop level set by your broker for current instrument.
It's minimum number of points your S/L and T/P must be from order price.
double stopLevel = MarketInfo(Symbol(), MODE_STOPLEVEL); // Stop level in points
If you have fast market movement, you still need to check if order is opened, because price can change in time your order is sent to the broker.
See this for other marketinfoconstants information you can get about trading conditions.
To add comments, please log in or register