How to avoid the bad slippage?

 
I wish there is a method/function to tell us what is the broker's slippage going to be if I trade?

If broker's slippage is greater than x pips then do not trade.

To avoid like this:
NZDUSD 
Ask Price: 0.86952
After BUY trade is executed the opened price is 0.87004 
That is 5.2 pips slippage which is unacceptable.

Possible?
 

Hi Dear

I guess it depends on broker

as you must know there is a parameter in order send for slippage that you can set it (you can control max accepted slippage by this parameter)

int  OrderSend(
   string   symbol,              // symbol
   int      cmd,                 // operation
   double   volume,              // volume
   double   price,               // price
   int      slippage,            // slippage
   double   stoploss,            // stop loss
   double   takeprofit,          // take profit
   string   comment=NULL,        // comment
   int      magic=0,             // magic number
   datetime expiration=0,        // pending order expiration
   color    arrow_color=clrNONE  // color
   );

slippage

[in]  Maximum price slippage for buy or sell orders.

but i guess it do not work on Market Execution accounts (brokers) (like ecn accounts), in Market Execution mode order will open at last seen price by broker

but in Instant Execution accounts it should work

hope it helps you

 
hnp2500:

Hi Dear

I guess it depends on broker

as you must know there is a parameter in order send for slippage that you can set it (you can control max accepted slippage by this parameter)

slippage

[in]  Maximum price slippage for buy or sell orders.

but i guess it do not work on Market Execution accounts (brokers) (like ecn accounts), in Market Execution mode order will open at last seen price by broker

but in Instant Execution accounts it should work

hope it helps you

I have tested that "slippage" -- all brokers (who says "no requotes platform" i.e. ECN) have ignored that. It does not work. Thank you.
 
ROMAN5:
I have tested that "slippage" -- all brokers (who says "no requotes platform" i.e. ECN) have ignored that. It does not work. Thank you.

that's right, i believe it will not work on these brokers

 
ROMAN5:
I have tested that "slippage" -- all brokers (who says "no requotes platform" i.e. ECN) have ignored that. It does not work. Thank you.

Of course, it only works with Instant execution (or Request which is the same right now if I am not wrong).

On "ECN" brokers which use Market (or Exchange) execution, this doesn't work, which is perfectly normal by definition.

Market Execution
In this order execution mode, broker makes a decision about the order execution price without any additional discussion with the trader. Sending of the order in such a mode means advance consent to its execution at this price.

If it's not acceptable don't use this type of broker. Nothing is perfect in live and particularly in trading, you can't get the advantages of both execution type simultaneously.
 

Hmmm,

I have a code in my EA that set the slippage. I'm using a ECN broker as claim by the broker. Does that mean I can actually remove that line of code? 

 
doshur:

Hmmm,

I have a code in my EA that set the slippage. I'm using a ECN broker as claim by the broker. Does that mean I can actually remove that line of code? 

If your code is running only on this kind of broker it's unneeded, but you can let it, it's not a problem either. If you want you code to run on any broker you have to adapt your code accordingly.
 
angevoyageur:
If your code is running only on this kind of broker it's unneeded, but you can let it, it's not a problem either. If you want you code to run on any broker you have to adapt your code accordingly.
Noted. I will just leave it as it is. Harmless...
 

Do you think Depth of Market is helpful to avoid large slippage? you can know buy/sell orders nearby the last price, if the volume is large enough so it may avoid bad slippage. but i didn't test it.

 
song_song:

Do you think Depth of Market is helpful to avoid large slippage? you can know buy/sell orders nearby the last price, if the volume is large enough so it may avoid bad slippage. but i didn't test it.

When market is in high volatility and 'depth of market' will be too fast to read and miss it.
 
ROMAN5:
When market is in high volatility and 'depth of market' will be too fast to read and miss it.

This is a very interesting discussion. In my point of view, you have to know beforehand what is the "goal" of the order.

If you want to open a position, then the best thing to do, IMHO, is to use Limit Orders with 0 slippage (as pointed out by HNP2500). If you do this you will NEVER get slippage. In this case, you will face the risk of no execution of your order, but I think a "no execution" is better than a bad execution with high slippage.

However, if the idea is to use the order to stop an ongoing position, then Limit Orders are a very bad idea. In this case, the best thing to do, IMHO, is to use Stop Orders and face the risk of a bad execution with high slippage. The use of Depth of Market is a good idea, however, in high volatile markets (as point out by ROMAN5) it might not work.

Anyway, a very interesting discussion. 

Reason: