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

 

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? 

 
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...
 
thanks
 
If I use SellStop, or BuyStop, after it was be actived, how to know the slippage ?
 
It is simple. In orderComment send price of opening than compare price in comment and price actual(price of order).
 
Vasyl Nosal:
It is simple. In orderComment send price of opening than compare price in comment and price actual.
cool!
Reason: