Slippage?

 

Hello,

Here is my problem! I want to open a order at the market, I do not want to have a OrderSend failed due to the slippage.

How to do it?

Slippage = 0 and the Price = Ask (for a buy) ?

OrderSend(Sym, Op, Lot, Ask, 0, 0, 0, Comment, Magic, 0, CLR_NONE);


Thanks

 

You cannot force it or insist on being filled at this exact price. The market makes the price, not you.

Either you allow slippage or your order might be rejected because it cannot be filled at that exact price anymore and you have to try again at a later time or at another price.

 
I do not want to have a OrderSend failed due to the slippage.

There is no way to avoid having an order fail due to slippage. You can only change the frequency of its occurrence.

Set slippage value to zero to have maximum probability of an order failing because of slippage. Set slippage to a very very large value to have minimum probability of an order failing for slippage.
 
PaulHister:

Hello,

Here is my problem! I want to open a order at the market, I do not want to have a OrderSend failed due to the slippage.

How to do it?

Slippage = 0 and the Price = Ask (for a buy) ?

OrderSend(Sym, Op, Lot, Ask, 0, 0, 0, Comment, Magic, 0, CLR_NONE);


Thanks


On ECN brokers you will not failed due to the slippage.

They are giving you Market price, any price on the market. I'm using Slippage=0, no efect.

 
FXMan77:


On ECN brokers you will not failed due to the slippage.

They are giving you Market price, any price on the market. I'm using Slippage=0, no efect.

They all give you market prices. But if the market has already moved away during the split second between you received the quote and the server received your order you won't be filled at that now already old and invalid price. The ECN broker will instead simply ignore your requested price and slippage and fill you at whatever price it has moved to in the meantime!

ticket = OrderSend(...);
OrderSelect(ticket, SELECT_BY_TICKET);
Print(Ask + " " + Bid + " " + OrderOpenPrice());
and see the difference!
Reason: