Suspicious slippage values (live trading)

Posted By: pcz

Suspicious slippage values (live trading) - 02/26/17 21:49

I checked the performance report for strategies I'd been running. It's for period from 4.12.2016 to 19.1.2017. There is over 1200 trades. It says that avg trade slippage is 4.9p, +9.5p positive and -0.3p negative. The transaction costs are -4581$ for spread and +8104$ for slippage. I would say this has to be wrong but I don't know how to check. The event log has been overwritten and in the new one I don't see any weird values. Can it be caused by some of the previously discussed bugs? E.g. price outliers? Or Zorro/MT bridge mixing trades belonging to different assets?
Posted By: jcl

Re: Suspicious slippage values (live trading) - 02/27/17 12:44

Take this value with a grain of salt. The real slippage is unknown, so in live trading the slippage is simply estimated from the difference of the last price and the fill price, or the stop limit and the exit price. It can be positive or negative, and can be way off when prices change fast.
Posted By: pcz

Re: Suspicious slippage values (live trading) - 03/01/17 12:48

Well, I can definitely imagine it can be way off for some trades but I don't see how could I get 9.5p positive slippage on average for a sample of 1200 trades made during a month period on majors. Don't you think there's something a bit off?

Is it possible to parse the slippage info out of event log? From what I understand you have to compare them to MT logs to get this kind of information.

When there are lines like...

[EUR/USD:STRATEGY:S####] Reverse 1@xyz
or
[EUR/USD:STRATEGY:L####] Long 1@xyz

...in Zorro's event log, is xyz a price Zorro is trying to use for order placement? (i.e. the last price, not the fill price).
Posted By: jcl

Re: Suspicious slippage values (live trading) - 03/02/17 13:27

I believe you can get the individual slippage from the TRADE struct after closing a trade. It's stored in ThisTrade->fSlippage.
Posted By: pcz

Re: Suspicious slippage values (live trading) - 03/02/17 14:54

Thank you, that would help me to log the slippage. What I currently need though is to analyze the slippage in the period when there were the weird values. That's why I was asking for the meaning of the price in Zorro event log. From Zorro manual it seems like it's the fill price but when I compare it with MetaTrader log the prices are different. So is it the last price Zorro received before the position had been filled?
Posted By: pcz

Re: Suspicious slippage values (live trading) - 04/18/17 12:36

Based purely on (newer) observation I would say it's like this: the trade log contains the actual entry/exit prices (the same as displayed in MT) and the event log contains the last price Zorro knew when it'd tried to place an order (although the formulation in the manual indicates otherwise). On the other hand the profit displayed in the event log is the same as in the trade log (i.e. the actual profit). Now that the trade log contains prices with higher precision (0.1p) it's possible to estimate the slippage by computing the differences between trade log and event log prices. When doing so I get the same value as in the live results overview (-0.1p) which is in line with measurements performed using different software. I think the previous value (+9.5p) had to be caused by a bug in the old Zorro version as it was almost hundred times higher (in absolute terms).
Posted By: jcl

Re: Suspicious slippage values (live trading) - 04/18/17 16:18

I don't think that slippage has something to do with differences between trade and event log. If there is a difference, it is due to the fact that Zorro displays always ask prices, while the trade log reflects the prices from the broker, which are ask or bid dependent on the trade direction.
Posted By: pcz

Re: Suspicious slippage values (live trading) - 04/19/17 10:21

Thank you for the info. That would suggest that the prices should be the same as those in the trade log for long entries and short exits. But if I look at a small sample from trade log the differences are between -0.1p and 0.3p. On the other hand it's true that for short entries and long exits the numbers are bigger and almost always negative. Anyway - my computed number was the same as in Zorro results purely by chance and the conclusion is that the only way to explore slippage in depth is by aligning the downloaded market data with trades.
Posted By: jcl

Re: Suspicious slippage values (live trading) - 04/19/17 12:25

There are 2 sources of slippage. One is caused by hitting an entry and exit limit, and is the difference of the limit and the fill price. Second is caused by entering or exiting a trade at market. It is the difference of the current price and the fill price. You can check the slippage with ThisTrade->fSlippage, either in a loop over all open trades or in a loop over all trades.
© 2024 lite-C Forums