Hello,
TLDR;It would be nice to have an educational script in the documentation with the ideal order of the basic function calls.
DetailsI had an issue today: I did not understand why the backtest started one LookBack later than the StartDate. As I saw in the documentation at the StartDate description:
The LookBack period is added in front of the date and begins accordingly earlier.
But not added. I read the commands at the bottom of that page quickly, but I did not find the answer.
So I started to search in this forum, and during that, I had an idea that maybe it could be an order problem. So I tried some variations, and then I found the problem by trial-and-error: I called the "asset" function before defining LookBack. I checked the documentation again, and I found this line I slipped through before:
All variables that affect bar generation, such as StartDate, EndDate, NumYears, Holidays, UpdateDays etc. must be set before loading price data or calling asset the first time.
I'm not surprised I missed this line due to this problem. As developers, we don't really think about every aspect of what's going on under the hood in Zorro's engine. I understand if it's essential to keep the right order, but it would be nice to have the correct order list with all the available built-in functions and definitions somewhere in the beginning sections of the documentation. Then, if something strange is happening, you can check that document first.