Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,098 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
tock() function #479901
05/04/20 03:11
05/04/20 03:11
Joined: Feb 2020
Posts: 1
CAPE CORAL,FL USA
J
jdubya27 Offline OP
Guest
jdubya27  Offline OP
Guest
J

Joined: Feb 2020
Posts: 1
CAPE CORAL,FL USA
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.
Re: tock() function [Re: jdubya27] #479905
05/04/20 13:27
05/04/20 13:27
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I would also expect that tock runs every minute even before the first bar period. Thanks for the info, I'll forward this to the developers for looking into it.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1