Historical Slippage values


Does Metatrader normally store the historical slippage values for a chart?

I’ve noticed that there is a structure called


which contains a slippage value but from what I can see this just references the current slippage values (unless I read it incorrectly) for the existing open trade.

Obviously, I could create an indicator which records the slippage (probably by constantly opening and closing a trade) values for each candle but that not going to be as useful.

Any advice on how each I can record or get access to these values?

Thanks in advance.

That doesn’t make sense. Slippage is the difference between the requested price and the price you actually get when you open a trade. There is no “slippage” value for each candle, or historical.

If you “noticed” something please post a link, so we know exactly what you are talking about.

Thanks for your reponse.

I understand what slippage is but I want to be able to measure it and record it. I appreciate it is going to vary and depend on the moment of time that I pass an order but I need to test a theory of mine.

The only way of testing it, as far as I can see, is to open and close an order for a given period and recording the slippage that I obtained. This is the only way that I think of measuring and recording it.

Unless anyone else has some other ideas.

That could be an expensive experiment. I would surmise that values obtained from other servers (e.g. a demo account) would not be relevant.https://www.mql5.com/en/docs/constants/environment_state/accountinformation#enum_account_trade_mode

I was thinking demo as my calculations for the time being are all on demo. Just need to prove something right or wrong.

Interesting, I found this post about a formula for slippage. Don’t understand it yet but very interesting.

Anyone, care to put it into lay mans terms without needing advanced maths?

MT5 already has real tick historical data available to you from the broker, so “slippage” information is inherently already available to you as well.

As afinneyq has already stated, slippage is the change in price between the price (at time “t”) when an order is submitted and the price (at time “t+dt”) of when the order is finally placed at the server.