Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (TipmyPip, AndrewAMD, dBc, clonman), 18,621 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Unexpected behaviour with transaction costs #477866
08/07/19 21:23
08/07/19 21:23
Joined: Oct 2018
Posts: 72
J
JamesHH Offline OP
Junior Member
JamesHH  Offline OP
Junior Member
J

Joined: Oct 2018
Posts: 72
I have the line:

Spread = RollLong = RollShort = Commission = Slippage = 0;

in my run() loop, yet when I run this strategy with 4 assets, Zorro is calculating nonzero transaction costs in the results:

Transaction costs -1.26$ spr, 0$ slp, 0$ rol, -1.26$ com

Debugging with printf(...) shows that the Spread is 0 for 2 of the assets, but 0.01 for the other 2. Is this not incorrect behaviour?

When I add

Spread = Commission = 0;

inside the while(loop(Assets)) loop, the transaction costs are then 0, but is that supposed to be necessary?

Re: Unexpected behaviour with transaction costs [Re: JamesHH] #477868
08/08/19 06:48
08/08/19 06:48
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Definitely.

Re: Unexpected behaviour with transaction costs [Re: jcl] #477871
08/08/19 17:45
08/08/19 17:45
Joined: Oct 2018
Posts: 72
J
JamesHH Offline OP
Junior Member
JamesHH  Offline OP
Junior Member
J

Joined: Oct 2018
Posts: 72
Yeah, that makes sense, that the values are taken from the AssetList file unless specifically overridden.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1