Asking someone to keep rereading the same documents and checking the same files might not be very useful to solve the issue.
Anyway, here I outline steps to reproduce the bug:
1. I created a new asset file with no cost, i.e. with all the Spread, RollLong, RollShort, MarginCost, and Commission set to zero. I have provided them as an attachment. This is to remove any costs associated with them, though it is not necessary to reproduce the bug.
2. I modified the Workshop4.c file, and add these 2 lines in the run function:
assetList("AssetsNoCost");
Lots = 1;
This is to set the lot size to be 1. I have also provided the file Workshop4_setLots.c as attachment.
3. I modified the LotAmount of EUR/USD in the AssetNoCost, and observe the following output in the logfiles.
For the LotAmount set to 1:
Test Workshop4_setLots EUR/USD, Zorro 2.409
Simulated account AssetsNoCost
Bar period 1 hour (avg 86 min)
Total processed 52532 bars
Test period 2012-01-18..2017-12-29 (35990 bars)
Lookback period 300 bars (18 days)
Montecarlo cycles 200
Simulation mode Realistic (slippage 5.0 sec)
Avg bar 17.5 pips range
Spread 0.0 pips (roll 0.00/0.00)
Contracts per lot 1.0
Gross win/loss 1.49$-0.95$, +5429.5p, lr 0.58$
Average profit 0.0913$/year, 0.0076$/month, 0.0004$/day
Max drawdown -0.33$ 61.0% (MAE -0.34$ 62.7%)
Total down time 67% (TAE 95%)
Max down time 97 weeks from Nov 2015
Max open margin 0.0448$
Max open risk 0.18$
Trade volume 477$ (80.18$/year)
Transaction costs 0$ spr, -0.0210$ slp, 0$ rol
Capital required 0.28$
Number of trades 399 (68/year, 1/week)
Percent winning 24.3%
Max win/loss 0.10$ / -0.0528$
Avg trade profit 0.0014$ 13.6p (+153.8p / -31.4p)
Avg trade slippage -0.00005$ -0.5p (+2.6p / -1.5p)
Avg trade bars 106 (+286 / -48)
Max trade bars 1165 (14 weeks)
Time in market 118%
Max open trades 4
Max loss streak 18 (uncorrelated 23)
...
For the LotAmount set to 10000:
Test Workshop4_setLots EUR/USD, Zorro 2.409
Simulated account AssetsNoCost
Bar period 1 hour (avg 86 min)
Total processed 52532 bars
Test period 2012-01-18..2017-12-29 (35990 bars)
Lookback period 300 bars (18 days)
Montecarlo cycles 200
Simulation mode Realistic (slippage 5.0 sec)
Avg bar 17.5 pips range
Spread 0.0 pips (roll 0.00/0.00)
Contracts per lot 10000.0
Gross win/loss 1.49$-0.95$, +5429.5p, lr 0.58$
Average profit 0.0913$/year, 0.0076$/month, 0.0004$/day
Max drawdown -0.33$ 61.0% (MAE -0.34$ 62.7%)
Total down time 67% (TAE 95%)
Max down time 97 weeks from Nov 2015
Max open margin 0.0448$
Max open risk 0.18$
Trade volume 477$ (80.18$/year)
Transaction costs 0$ spr, -0.0210$ slp, 0$ rol
Capital required 0.28$
Number of trades 399 (68/year, 1/week)
Percent winning 24.3%
Max win/loss 0.10$ / -0.0528$
Avg trade profit 0.0014$ 13.6p (+153.8p / -31.4p)
Avg trade slippage -0.00005$ -0.5p (+2.6p / -1.5p)
Avg trade bars 106 (+286 / -48)
Max trade bars 1165 (14 weeks)
Time in market 118%
Max open trades 4
Max loss streak 18 (uncorrelated 23)
Which, as you can see, are pretty much identical to each other, except for the line "Contracts per lot". With Lots set to 1, and for different LotAmount, this would have produced a different "Capital required", "Avg trade profit", etc (i.e. multiplied by the LotAmount). It's quite interesting that opening 10000 contracts of EUR/USD (for 1 lot) only manage to gain around 1 dollar in profit after a few years.
I have also provided another logfile, for the case of using the default asset list (AssetsFix), by removing/commenting on the assetList function (see below). Interestingly, in this scenario, the reported numbers are more reasonable, with values multiplied roughly by the LotAmount (1000 in this case), except for the associated trading costs.
Test Workshop4_setLots EUR/USD, Zorro 2.409
Simulated account AssetsFix
Bar period 1 hour (avg 86 min)
Total processed 52532 bars
Test period 2012-01-18..2017-12-29 (35990 bars)
Lookback period 300 bars (18 days)
Montecarlo cycles 200
Simulation mode Realistic (slippage 5.0 sec)
Avg bar 17.5 pips range
Spread 1.5 pips (roll -0.10/-0.11)
Contracts per lot 1000.0
Gross win/loss 1461$-1004$, +4565.9p, lr 489$
Average profit 76.78$/year, 6.40$/month, 0.30$/day
Max drawdown -354$ 77.6% (MAE -367$ 80.4%)
Total down time 68% (TAE 96%)
Max down time 97 weeks from Nov 2015
Max open margin 0.0480$
Max open risk 177$
Trade volume 476803$ (80182$/year)
Transaction costs -59.85$ spr, -20.95$ slp, -26.50$ rol
Capital required 252$
Number of trades 399 (68/year, 1/week)
Percent winning 21.6%
Max win/loss 103$ / -53.09$
Avg trade profit 1.14$ 11.4p (+169.9p / -32.1p)
Avg trade slippage -0.0525$ -0.5p (+2.9p / -1.5p)
Avg trade bars 106 (+319 / -48)
Max trade bars 1165 (14 weeks)
Time in market 118%
Max open trades 4
Max loss streak 18 (uncorrelated 27)
[/code]