Slippage not working as expected on brokers with extra decimal

 

I have noticed that slippage doesn't seem to work (or the broker doesn't care) when I'm placing orders on a broker who uses the extra digit.

If the market price is 1.23456 and I try and place an order at 1.23450 it get "invalid price" even with a slippage > 10, that can't be right.

Am I missing something?

 
kieran.w:

I have noticed that slippage doesn't seem to work (or the broker doesn't care) when I'm placing orders on a broker who uses the extra digit.

If the market price is 1.23456 and I try and place an order at 1.23450 it get "invalid price" even with a slippage > 10, that can't be right.

Am I missing something?


you can place an order only to market price (Bid or Ask, depends what type of order)

Only Pending Orders can/must have another price then current market price

See https://book.mql4.com/trading/ordersend

 

The documentation states:

slippage is the maximum allowed deviation of the requested order open price from the market price for market orders (points). This parameter is not processed for placing of pending orders.

The above should mean that the slippage is taken into account when placing an order, so with a slippage of 3 the market price can deviate up to 3 pips.

Please correct me if I'm wrong.

 
kieran.w:

[...] slippage is the maximum allowed deviation of the requested order open price from the market price for market orders (points). [...] The above should mean that the slippage is taken into account when placing an order, so with a slippage of 3 the market price can deviate up to 3 pips.

Yes, but you must still send the latest received quote. If the price has moved from the time u sent the order to the time the server processed it then the order would still be accepted if the deviation is within slippage.

Not that not all brokers use slippage; specifically, ECN style brokers do not use slippage.

At opening of a market order (OP_SELL or OP_BUY), only the latest prices of Bid (for selling) or Ask (for buying) can be used as open price. If operation is performed with a security differing from the current one, the MarketInfo() function must be used with MODE_BID or MODE_ASK parameter for the latest quotes for this security to be obtained. 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 generated. If the requested open price is fully out of date, the error 138 (ERR_REQUOTE) will be generated independently on the slippage parameter. If the requested price is out of date, but present in the thread, the position will be opened at the current price and only if the current price lies within the range of price+-slippage.

Reason: