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.