There's most likely a bug in your code:
Quote
Error 041: series size / number / usage
Something was wrong with a series, loop, or matrix call in your script. They are special functions that cannot be arbitrarily called. Series might have been called in wrong order or with different size, or loop might have been called outside the run function. Check all such calls and all indicators or functions that are described to create series, such as Volatility, ATR, LowPass, etc. Any run must have the same series with the same size in the same order. Don't skip series calls with if statements, don't create them in event-triggered functions such as tmf, tick, or tock, and don't chnage the size of a series. The error message tells you at which bar the problem occured first. If you need an extremely large number of series, increase TradesPerBar until the error message disappears.
https://zorro-project.com/manual/en/errors.htm