Thank you for the links and help, but this still doesn't resolve the issue.

I simulated the strategy on a micro account and the broker account is also a micro account. And the strategy correctly opened micro lots. So this does not explain the factor of 10.

As for the factor of 19.5, I'm not sure what calculation mistake there can be in 10*ATR unless Zorro is calculating ATR incorrectly. It would be very helpful if the log file would show where the strategy has placed the SL and TP, that way I could verify whether it's placing the stop correctly and by deduction, if it's calculating ATR correctly. Is there anyway to do that?

The code to the strategy is above. As I said, it's basically the code from Workshops 4 & 5, so if there are any miscalculations in the code, they should appear there. If not, then Zorro is getting something wrong.

This is what I know to be true:

Zorro shows Risk 345
Zorro opens 0.01 lots with the broker
The pip value of 0.01 lots is $0.10

This means either:

a) all the above is true and the stop is 3,450 pips away, which means Zorro is miscalculating ATR by a factor of 10;

b) Zorro is correctly calculating ATR and placing the stop, but is miscalculating the risk; or

c) Zorro is calculating ATR and risk correctly, but thinks it's trading mini lots while in fact opening micro lots with the broker.

I tried adding "AssetList = "AssetsMicro.dta" to the code to test it, but got a syntax error, so I'm not sure how to ensure that Zorro knows it's trading micro lots, not minis.

Also, this doesn't explain the 22/391 discrepancy, which can only be explained by miscalculating ATR. It also doesn't explain the 5K pip SL placed with the broker.

Would it matter in any way that it's a 5-digit broker?

Thanks again for your help!