What is slippage? - page 2

 
I obviously want to know if/how I can avoid losses or lost opportunities. I hope that someone can answer my questions about the difference between what the slippage parameter in OrderSend does and what the Options|Trade|Deviation setting does in the Client Terminal and if they should be the same or if I should just put 0 in both of them or what.
 
I also read somewhere that testing mode ignores slippage. Does it ignore Options|Trade|Deviation too?
 

I was able to talk to someone at FXCM Customer Service. He was very helpful. He even called one of the programmers there. The Options|Trade|Deviation setting is similar to the Slippage parameter in OrderSend() but the Slippage amount specified in OrderSend() should take precedence. That said, it is a good idea to set the two to be the same. Also, when MetaTrader4 was updated to 5 they forgot to update that Deviation field to accommodate 5 decimal point systems. So if you use a broker that uses a 5 decimal point price and if you have 3 in the Deviation field it is interpreted as .3 pips not 3 pips. If you desire to set an acceptable price deviation of 3 pips you need to enter 30.

The same is true for Slippage in OrderSend(). Therefore, if you want to control Slippage to, say, 3 pips, you can have an extern int Slippage =  30. (Not 3)

 
gburg14:

I was able to talk to someone at FXCM Customer Service. He was very helpful. He even called one of the programmers there. The Options|Trade|Deviation setting is similar to the Slippage parameter in OrderSend() but the Slippage amount specified in OrderSend() should take precedence. That said, it is a good idea to set the two to be the same. Also, when MetaTrader4 was updated to 5 they forgot to update that Deviation field to accommodate 5 decimal point systems. So if you use a broker that uses a 5 decimal point price and if you have 3 in the Deviation field it is interpreted as .3 pips not 3 pips. If you desire to set an acceptable price deviation of 3 pips you need to enter 30.

The same is true for Slippage in OrderSend(). Therefore, if you want to control Slippage to, say, 3 pips, you can have an extern int Slippage =  30. (Not 3)

Please don't double post.
 
Alain Verleyen:
There is no wrong slippage for limit orders.
I love this guy! Everytime I google for an answer on MQL5, there comes him. :D
 

Arthur Albano:
I love this guy! Everytime I google for an answer on MQL5, there comes him. :D

You must have good questions as I only answer those ;-)

 
gburg14:

I have some questions about slippage and deviation, especially the difference between the two. 

I am testing an EA to autotrade Forex. The timespan tested was from 2010.01.01 to 2015.12.31 The period was H4. The pair was the EURUSD. The code identifies levels of support and they can occur anytime of the day, meaning it does not take into consideration changing liquidity or velocity of price movement based on time of day or news releases. It is dumb to those factors.

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

How to verify Slippage / Deviation is working as expect?  

It's try to record each ask price compare with the result market price. That always satisfy our slippage? I get question as we sending order the sending time it not in the MqlTradeRequest. How broke know that client see ask price as system have different latency.

 

In my humble opinion slippage happens when market is more volatile(ex:high impact news,etc), your order will not fill up or closed on the specified price instead it gaps higher or lower from your entry/tp price,some brokers slippage is so high that it is difficult to make profits if you are into scalping, but for swing trader that has bigger SL and TP the effect are negligible. Slippage may vary from broker to broker, so the trader must choose the broker that fits to his style of trading to hasten the effect of slippage.

Reason: