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
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 847 guests, and 4 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
tick() - loop and execution during weekend #470894
02/11/18 18:53
02/11/18 18:53
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
loop() is not present in tick()? I get an "Error 041: Invalid call in TMF!"
Is there a chance to prevent the tick() function from being executed during weekends?

Thanks, Sphin

Re: tick() - loop and execution during weekend [Re: Sphin] #470898
02/12/18 08:56
02/12/18 08:56
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Weekend = 3 should prevent it.

Loop is a special function and cannot be used in ticks. Use a normal for or while loop instead.

Re: tick() - loop and execution during weekend [Re: jcl] #470908
02/12/18 16:32
02/12/18 16:32
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Sorry, I forgot to mention that I tried Weekend = 3 already, it seems to have no effect to the tick function. Therefore I asked at all.

Re: tick() - loop and execution during weekend [Re: Sphin] #470921
02/13/18 09:27
02/13/18 09:27
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
In the backtest, or in live trading?

Re: tick() - loop and execution during weekend [Re: jcl] #470943
02/13/18 17:23
02/13/18 17:23
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
In live trading in an experiment with BrokerArb. One of the brokers quotes prices for crypto assets throughout the whole weekend while the other broker does not and of course there is soon a nice price difference which is alerted all time by the tick function.

Re: tick() - loop and execution during weekend [Re: Sphin] #470951
02/14/18 07:56
02/14/18 07:56
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Ok, we'll check that. For ensuring that no quote is processed, enter at the begin of the tick function a line like: if(!workday(0)) return;

Update: Yes, tick() is still active on Weekend = 3. My first answer was wrong.

Re: tick() - loop and execution during weekend [Re: jcl] #470970
02/14/18 17:26
02/14/18 17:26
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Thanks, this workaround will do it!


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1