Just that question. Am adding 4/5 digit broker detection to an ea I wrote on a 5 digit broker. On the 5 digit broker I might send an order with a take profit or a stop loss of say 125 points which would be translated to 12.5 points for the 4 digit broker. So adding that to the four digit price would give five digits and might cause an error. Is it typical to just limit the tp or sl on a five digit broker to a multiple of 10 and truncate or round that extra digit off?
You have to normalize your price. See documentation of OrderSend.
Calculated or unnormalized price cannot
be applied. If there has not been the requested open price in the price
thread or it has not been normalized according to the amount of digits
after decimal point, the error 129 (ERR_INVALID_PRICE) will be
To add comments, please log in or register