If you're only printing out the CSV at INITRUN and
not a subsequent run() call, then it's going to only give you the initial value, which in your case is 10. Verify which run() call it is by checking for is(INITRUN). If this is your first run() call, then you'll obviously have insufficient lookback.
You need 11 run calls to get 10 items in a series, one for INITRUN and 10 more after that.Reconsider your usage of series() and consider when exactly run() is called. If this is a daily bar system, run() will basically be called once a day. In this case, it can be useful to use a static series with a manual shift call.
From the manual:
Since the LookBack value is normally only known after the INITRUN, series are allocated in the FIRSTRUN. During the INITRUN they are set to a temporary pointer and filled with the initial value. This temporary content is overwritten by the series allocation in the FIRSTRUN. Series are only valid during the session and released after the EXITRUN.
https://zorro-project.com/manual/en/series.htmAnd this:
At the first call of the run function, is(INITRUN) and is(FIRSTINITRUN) are true. Since price and bar data are not yet set up at that initial run before the first asset call, all price functions and indicators return 0.
https://zorro-project.com/manual/en/run.htmBy the way, you cannot trade during the lookback period. If your CSV data has all of the data it needs, you can even set lookback to zero in Trade mode so that you can trade immediately.