Main only runs once at the beginning of the backtest, right? I added this line because the Zorro manual says:

Quote
Variables can be defined outside functions or inside functions. When defined outside, they are called global variables and are accessible by all functions. They keep their values until the script is compiled the next time.


and

Quote
Static and global variables keep their values until the script is compiled again. So make sure to initialize them at script start - if(Init) - to their initial values if required.


I wasn't really sure if was relevant or not, but since main should only run at the beginning, I felt there was no harm in ensuring the value was initialized once at the start for each test.