Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (blaurock), 750 guests, and 3 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
Server status #463404
12/02/16 08:24
12/02/16 08:24
Joined: Oct 2016
Posts: 23
NSW
M
mayark Offline OP
Newbie
mayark  Offline OP
Newbie
M

Joined: Oct 2016
Posts: 23
NSW
Hi Folks,

I am trying to figure out the last time connection to the brokers server was inactive. The scenario is this. See below entries in the log.


[86: Thu 01.12.16 02:40] 1.05945
[87: Thu 01.12.16 02:45] 1.05953
[88: Thu 01.12.16 02:53] 1.05967
[89: Thu 01.12.16 02:58] 1.05996
[90: Thu 01.12.16 03:03] 1.06001Value :: Buy ::

If my script trade in five minutes window and lets say it was offline 3 minutes. As in the log entries between 02:45 and 02:53. At 02:53 it becomes active again and continues on and put through a sale at 03:03.
That sale it put through is based on inaccurate information (because it was offline for sometime and accumulated incorrect information). My question is, is there a flag in zorro to check the server status to see if it goes offline ? (except the change of color of the server label on application). If there is one, then that would help avoid the above scenario.

Please leave your response here.
Many thanks.
mayark

Re: Server status [Re: mayark] #463407
12/02/16 14:44
12/02/16 14:44
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
There is no flag, but you can check the status indirectly. Any new price quote triggers the tick() function. Store the time of the last tick and compare with the current time - then you can see how long the server was offline.

Re: Server status [Re: jcl] #463412
12/03/16 00:18
12/03/16 00:18
Joined: Oct 2016
Posts: 23
NSW
M
mayark Offline OP
Newbie
mayark  Offline OP
Newbie
M

Joined: Oct 2016
Posts: 23
NSW
Thank you very much for the answer. I will definitely try it.

mayark


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1