You're right. The price problem can be easily solved, but the more serious problem is that it opens up to 10 new pending trades with different price levels at each bar because it checks only the number of open trades, but not the number of pending trades.

We could cycle through all trades and check how many are pending, but the better solution is just to implement two variables NumPendingShort and NumPendingLong. This will be implemented in the next Zorro update.