Hello,

I am running Zorro 2.26. I am using the tock() function to output data to a file and experience some odd behavior. When the strategy starts it executes code in tock() once creating my output file. It should then output again after 60,000ms (1m), but it does not. At first I thought it only ran once, but after letting my script run for a while, I noticed tock() started working. I have this in several different scripts and some of them have different BarPeriods. What i believe is happening, is tock() runs at first (initial run), but then not again until the after the BarPeriod. For example in a script with a BarPeriod 10, tock() starts running again after 10min and the consistently runs every 60,000ms. So the issue seems to be betwen the script start and the BarPeriod, once the barperiod has passed, it runs as expected. I have some scripts that have Barperiod 60 and some 1440, so this is not ideal. I would assume tock() runs every 60,000ms from the start of the script. I have my tock() function in the section of the code just above the run() function. I have verified if i change tock() to tick() it does work as expected - every tick. So the issue seems to be specific to tock().

Either a bug, or I'm misunderstanding how to use tock().

Thanks
Josh

Last edited by jdubya27; 05/04/20 06:47.