Gamestudio Links
Zorro Links
Newest Posts
Get a csv file into an array of structs, confused about lite-c
by easyX
6 minutes 32 seconds ago
Random walk vs Real price statistic
by kujo
Yesterday at 21:40
Inline functions in Lite-C
by MasterQ32
Yesterday at 21:04
Alpha Vantage API key - where to put?!
by veepsirtt
Yesterday at 10:26
Using standard C libraries with Zorro?
by Hredot
Yesterday at 02:51
AssetVars in Asset Lists
by Hredot
Yesterday at 02:50
How to count
by brax
02/17/18 20:15
AUM Magazine
Latest Screens
Forgotten Tales - Demo version
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Who's Online
21 registered (easyX, Hredot, kujo, alibaba, AndrewAMD, Kartoffel, DASFX, boatman, 4 invisible), 458 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
veepsirtt, trulala, elninio, Thwessen23, rmassip
17890 Registered Users
Topic Options
Rate This Topic
#470894 - 02/11/18 19:53 tick() - loop and execution during weekend
Sphin Offline
Senior Member

Registered: 12/11/13
Posts: 467
Loc: 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

Top
#470898 - 02/12/18 09:56 Re: tick() - loop and execution during weekend [Re: Sphin]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26216
Loc: 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.

Top
#470908 - 02/12/18 17:32 Re: tick() - loop and execution during weekend [Re: jcl]
Sphin Offline
Senior Member

Registered: 12/11/13
Posts: 467
Loc: 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.

Top
#470921 - 02/13/18 10:27 Re: tick() - loop and execution during weekend [Re: Sphin]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26216
Loc: Frankfurt
In the backtest, or in live trading?

Top
#470943 - 02/13/18 18:23 Re: tick() - loop and execution during weekend [Re: jcl]
Sphin Offline
Senior Member

Registered: 12/11/13
Posts: 467
Loc: 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.

Top
#470951 - 02/14/18 08:56 Re: tick() - loop and execution during weekend [Re: Sphin]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26216
Loc: 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.

Top
#470970 - 02/14/18 18:26 Re: tick() - loop and execution during weekend [Re: jcl]
Sphin Offline
Senior Member

Registered: 12/11/13
Posts: 467
Loc: Fuerth, DE
Thanks, this workaround will do it!

Top



Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net