Historical Slippage values

 

Hi,

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

I've noticed that there is a structure called  

trade_settings


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.

 
Alain Verleyen:

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. 

 
imamushroom:

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. 
 
honest_knave:
That could be an expensive experiment. I would surmise that values obtained from other servers (e.g. a demo account) would not be relevant. 

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.

http://quant.stackexchange.com/questions/17349/intraday-versus-daily-volatility-in-slippage-estimation 

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

Intraday versus daily volatility in slippage estimation
Intraday versus daily volatility in slippage estimation
  • quant.stackexchange.com
$\gamma = 0.314$ In the paper [page 11], Almgren says $\sigma$ is an "an intraday estimator that makes use of every transaction in the day." Does anyone have an idea of how this estimator works? I'm using a 40 day moving...
 
imamushroom

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. 

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 @Alain Verleyen 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.
 
imamushroom:

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

There is no slippage with demo account. Except maybe with some bad brokers/servers, as I have already seen.


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

http://quant.stackexchange.com/questions/17349/intraday-versus-daily-volatility-in-slippage-estimation 

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

The formula could be interesting (I didn't read the paper though), but it does make sense only on a real account.
 
Fernando Carreiro:
MT5 already has real tick historical data available to you from the broker, so "slippage" information is inherently already available to you as well.
..
How is that ? You can never say what the slippage should be, if you open an order, from these ticks data. I am missing something ?
 
Alain Verleyen: How is that ? You can never say what the slippage should be, if you open an order, from these ticks data. I am missing something ?
I am not talking about forcing a particular future slippage in orders. I am saying that you can measure it by looking back at historical tick data and taking into consideration the average delay (+/- deviations) and thus do a statistical analysis of what average slippage (+/- deviations) has occurred at any point in time in the past, such as during news events.

This way, you can have some notion of what kind of slippage you can expect in the future, not control it.
 
Fernando Carreiro:
I am not talking about forcing a particular future slippage in orders.
Me neither, my post was confusing.
I am saying that you can measure it by looking back at historical tick data and taking into consideration the average delay (+/- deviations) and thus do a statistical analysis of what average slippage (+/- deviations) has occurred at any point in time in the past, such as during news events.

This way, you can have some notion of what kind of slippage you can expect in the future, not control it.
I am afraid I don't understand or we are talk about different things.

How could you get "average delay" from ticks data ? what delay could you get from ticks ?
 
Alain Verleyen:
Me neither, my post was confusing.
I am afraid I don't understand or we are talk about different things.

How could you get "average delay" from ticks data ? what delay could you get from ticks ?
You don't get average delay from the tick data, you get average slippage.

You use an approximate delay value (that you would derive from average network latency and order execution delays) to observe what slippage you would get for that value.
Reason: