Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 818 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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