Download MetaTrader 5

How can I know the slippage after a order placed finished?

To add comments, please log in or register
Store your source codes in MQL5 Storage. It is secure!
HongDi s& t development co.,ltd.
1603
hongbin fei 2016.02.18 02:34 

ticket=OrderSend(Symbol(),OP_SELL,dLots,dPrice,iSlippage,dStopLoss,dTakeProfit,sEAComment,MagicNumber,tExpiration,clrRed);

 

1.if I define iSlippage =2, is it equal 20point under 5 - digits system?

2.How can I know the slippage after a order placed finished? 

Abdul Rahman
1368
Abdul Rahman 2016.02.18 03:22  
hongbin fei:

1.if I define iSlippage =2, is it equal 20point under 5 - digits system?

2.How can I know the slippage after a order placed finished? 

1. No, it equal 2 point under 3 or 5 digits system, and it will be equal 2 pips (20 point) on 2 or 4 digits system.

2. unfortunately there is no function in mt4 by default that may it be obtained instantly.

we should check it out by writing some code corresponding needs, for example can be found here: http://www.forexpeacearmy.com/community/threads/mql-code-to-record-order-execution-duration-and-slippage.18985/

p.s. some brokers have to provide facilities such as notes slippage in the Orders Comment (I forgot the broker name). But it would be better if you note itself.

MQL code to record order execution duration and slippage
MQL code to record order execution duration and slippage
  • www.forexpeacearmy.com
Here is some MQL code for sending an order that records execution duration and slippage to use in MetaTrader expert advisors or scripts. You can modify it or copy and paste bits of...
HongDi s& t development co.,ltd.
1603
hongbin fei 2016.02.18 15:28  
thanks
HongDi s& t development co.,ltd.
1603
hongbin fei 2016.03.06 15:48  
If I use SellStop, or BuyStop, after it was be actived, how to know the slippage ?
Vasyl Nosal
18553
Vasyl Nosal 2016.03.06 16:31  
It is simple. In orderComment send price of opening than compare price in comment and price actual(price of order).
HongDi s& t development co.,ltd.
1603
hongbin fei 2016.03.08 12:38  
Vasyl Nosal:
It is simple. In orderComment send price of opening than compare price in comment and price actual.
cool!
To add comments, please log in or register