Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 533 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Suspicious slippage values (live trading) #464569
02/26/17 21:49
02/26/17 21:49
Joined: May 2016
Posts: 180
Prague
pcz Offline OP
Member
pcz  Offline OP
Member

Joined: May 2016
Posts: 180
Prague
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?

Re: Suspicious slippage values (live trading) [Re: pcz] #464574
02/27/17 12:44
02/27/17 12:44
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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.

Re: Suspicious slippage values (live trading) [Re: jcl] #464613
03/01/17 12:48
03/01/17 12:48
Joined: May 2016
Posts: 180
Prague
pcz Offline OP
Member
pcz  Offline OP
Member

Joined: May 2016
Posts: 180
Prague
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).

Re: Suspicious slippage values (live trading) [Re: pcz] #464635
03/02/17 13:27
03/02/17 13:27
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
I believe you can get the individual slippage from the TRADE struct after closing a trade. It's stored in ThisTrade->fSlippage.

Re: Suspicious slippage values (live trading) [Re: jcl] #464638
03/02/17 14:54
03/02/17 14:54
Joined: May 2016
Posts: 180
Prague
pcz Offline OP
Member
pcz  Offline OP
Member

Joined: May 2016
Posts: 180
Prague
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?

Re: Suspicious slippage values (live trading) [Re: pcz] #465330
04/18/17 12:36
04/18/17 12:36
Joined: May 2016
Posts: 180
Prague
pcz Offline OP
Member
pcz  Offline OP
Member

Joined: May 2016
Posts: 180
Prague
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).

Re: Suspicious slippage values (live trading) [Re: pcz] #465334
04/18/17 16:18
04/18/17 16:18
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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.

Re: Suspicious slippage values (live trading) [Re: jcl] #465340
04/19/17 10:21
04/19/17 10:21
Joined: May 2016
Posts: 180
Prague
pcz Offline OP
Member
pcz  Offline OP
Member

Joined: May 2016
Posts: 180
Prague
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.

Re: Suspicious slippage values (live trading) [Re: pcz] #465342
04/19/17 12:25
04/19/17 12:25
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
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.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1