I founded a strange behavior about costs

if I write inside the "function run()" these rows

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


In the performant report I found some costs!

Simulation mode Realistic (slippage 0.0 sec)
Capital invested 5000$

Gross win/loss 12728$ / -1195$ (+60334p)
Average profit 1967$/year, 164$/month, 7.56$/day
Max drawdown -622$ 5.4% (MAE -2570$ 22.3%)
Total down time 14% (TAE 85%)
Max down time 77 weeks from Dec 2015
Max open margin 8817$
Max open risk 206$
Trade volume 88079$ (15019$/year)
Transaction costs -151$ spr, 0 slp, 0 rol, -30$ com



instead if I write the same rows in the script "Workshop4_2.c" the result is as I want:

Simulation mode Realistic (slippage 0.0 sec)
Spread 0.0 pips (roll 0.00/0.00)
Contracts per lot 1.0

Gross win/loss 9.45$ / -0.31299591b (+914p)
Average profit 1.39$/year, 0.11589078b/month, 0.00534881b/day
Max drawdown -0.38999176b 4.3% (MAE -1.04$ 11.3%)
Total down time 1% (TAE 73%)
Max down time 14 weeks from Mar 2011
Max open margin 24$
Max open risk 0.82628334b
Trade volume 384$ (58$/year)
Transaction costs 0 spr, 0 slp, 0 rol