Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, bigsmack), 1,609 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Zorro Calculate Commission and Spread Even Setting Is Off #488249
05/13/24 09:17
05/13/24 09:17
Joined: Apr 2023
Posts: 22
V
vicknick Offline OP
Newbie
vicknick  Offline OP
Newbie
V

Joined: Apr 2023
Posts: 22
I have set Spread and Commission to zero when running a script that trades a portfolio of assets.

But from the performance report, it seems Zorro still run the trades with spread and commission. Below is the script and performance report.

Code
function run() 
{
	set(LOGFILE);
	StartDate = 1985;
	LookBack = 105;
	Capital = 1000000;
	Spread = Commission = 0;
	RollLong = RollShort = Slippage = Penalty = 0;
	
	//Loop through different instruments
	while(asset(loop("ZCeod","NGeod","EURUSDeod","HEeod","PLeod")))
	{
	// code here...
	}
}


Code
Test Strategy-Portfolio , Zorro 2.606

Transaction costs   -326180$ spr, 0$ slp, -92948$ rol, -178320$ com
Capital required    213741$


Is there a way to set spread and commission to zero, and only runs it when needed? Thanks.

Last edited by vicknick; 05/13/24 09:18.
Re: Zorro Calculate Commission and Spread Even Setting Is Off [Re: vicknick] #488250
05/14/24 10:16
05/14/24 10:16
Joined: Aug 2017
Posts: 296
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 296
Netherlands
Did you checked your asset list?

https://zorro-project.com/manual/en/account.htm

Re: Zorro Calculate Commission and Spread Even Setting Is Off [Re: Grant] #488251
05/16/24 06:31
05/16/24 06:31
Joined: Apr 2023
Posts: 22
V
vicknick Offline OP
Newbie
vicknick  Offline OP
Newbie
V

Joined: Apr 2023
Posts: 22
Yes, the asset list has the spread and commission entered. But I would like to turn off them for this script, that's why I added Spread = Commission = 0 in the script.

However from the performance report, it seems that they are still included.

Re: Zorro Calculate Commission and Spread Even Setting Is Off [Re: vicknick] #488252
05/16/24 10:41
05/16/24 10:41
Joined: Jul 2017
Posts: 785
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 785
Those variables are asset-specific; so, you need to set them after an asset() call. (i.e. in your case - in the body of the loop)


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1