Thank you jcl, it gets better with BR_WEEKEND, now I get the same number of trades, but I still get different results.
When I compare the logs with a single asset vs all assets, I see that all trades have the same entries, but in some of them the exit is different. Same thing happens when I change the order of the assets inside the loop. Any idea why this could happen?
I simplified the script, here's the version I'm using:
BarMode = BR_WEEKEND+BR_FLAT;
LookBack = 500;
StartDate = 2016;
EndDate = 2017;
vars Price = series(price());
vars MM1 = series(LowPass(Price, 100));
if(NumOpenLong < 1 and valley(MM1))
if(NumOpenShort < 1 and peak(MM1) )
Stop = ATR(25)*3;
Trail = ATR(25)*3;