Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 05/17/25 09:02
Zorro S subscription disappears
by Petra. 05/15/25 16:02
What are you working on?
by Aku_Aku. 05/11/25 12:24
Flash USDT: Instant Transfer Utility
by jhacko. 05/07/25 04:44
AUM Magazine
Latest Screens
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Zeal-X2
Who's Online Now
2 registered members (AndrewAMD, Quad), 398 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Crazi, jhacko, EddieTest, Eirye, kalleutschie
19129 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Zorro not reconnecting to IB gateway after restart #488687
04/01/25 01:17
04/01/25 01:17
Joined: Dec 2023
Posts: 8
Paddington
O
opm Offline OP
Newbie
opm  Offline OP
Newbie
O

Joined: Dec 2023
Posts: 8
Paddington
Hi,

I'm having an issue where Zorro doesn't reconnect to the IBKR gateway after the daily restart. As you can see status is green, but no port is open or data sent/recieved. I've tested restart during market hours and outside.

Any help or advice would be much appreciated.

Thanks,
Adam

Attached Files 2025-03-31.png
Re: Zorro not reconnecting to IB gateway after restart [Re: opm] #488688
04/01/25 11:26
04/01/25 11:26
Joined: Jul 2000
Posts: 28,019
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,019
Frankfurt
I don't know a problem with a daily restart, but there is one with the automated weekly gateway shutdown. You must manually close and restart the gateway on any weekend. Zorro needs not be restarted, but the current gateway version won't recover properly from its automated shutdown.

Re: Zorro not reconnecting to IB gateway after restart [Re: opm] #488689
04/01/25 12:38
04/01/25 12:38
Joined: Dec 2023
Posts: 8
Paddington
O
opm Offline OP
Newbie
opm  Offline OP
Newbie
O

Joined: Dec 2023
Posts: 8
Paddington
Hi jcl,

thanks for your response. I'm finding that zorro doesn't reconnect to the gateway after the daily restart, weekly or manual restart. I have to manually stop/start zorro trading after every auto gateway restart.

I've tried multiple strategies and they are all the same. None of them reopen a port in the gateway.

Adam

Re: Zorro not reconnecting to IB gateway after restart [Re: opm] #488690
04/01/25 16:09
04/01/25 16:09
Joined: Feb 2017
Posts: 1,784
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,784
Chicago
Do you have any logs? Set Verbose = 7|DIAG.

Re: Zorro not reconnecting to IB gateway after restart [Re: opm] #488691
04/02/25 01:53
04/02/25 01:53
Joined: Dec 2023
Posts: 8
Paddington
O
opm Offline OP
Newbie
opm  Offline OP
Newbie
O

Joined: Dec 2023
Posts: 8
Paddington
Hi,

yes I've attached an extract of the log file.

Restart occurs at 01:34 UTC. Log either side of restart time below.

Code
Intrabar 45749.06523 (04-02 01:33:56)
BrokerTime=> 2025-04-02 01:33:56 PC 01:33:56: 2 0.019400 ms
UpdatePrices 01:33:56
BrokerAsset EUR/USD 0 => 1  (1.0788 223.380900 ms)
No Quote
Server [2025-04-02 01:33:56   1.07879 *] 01:33:56
Messages 01:33:56
Loop 3879.6 ms
Intrabar 45749.06528 (04-02 01:34:00)
BrokerTime=> 2025-04-02 01:34:00 PC 01:34:00: 2 0.018100 ms
UpdatePrices 01:34:00
BrokerAsset EUR/USD 0 => 1  (1.0788 250.129800 ms)
No Quote
Server [2025-04-02 01:34:00   1.07879] 01:34:00
Messages 01:34:00
Loop 3891.6 ms
Intrabar 45749.06532 (04-02 01:34:04)
BrokerTime=> 2025-04-02 01:34:04 PC 01:34:04: 2 0.025400 ms
UpdatePrices 01:34:04
BrokerAsset EUR/USD 0 => 0  (0.0000 32672.776300 ms)
No Quote
Server [2025-04-02 01:34:04   1.07879] 01:34:37
Messages 01:34:37
Loop 3872.4 ms
Intrabar 45749.06575 (04-02 01:34:40)
BrokerTime=> 2025-04-02 01:34:40 PC 01:34:40: 2 0.018700 ms
UpdatePrices 01:34:40
BrokerAsset EUR/USD 0 => 0  (0.0000 28959.669300 ms)
No Quote
Server [2025-04-02 01:34:40   XXXXX] 01:35:09
Messages 01:35:09
Loop 3879.1 ms
Intrabar 45749.06613 (04-02 01:35:13)
BrokerTime=> 2025-04-02 01:35:13 PC 01:35:13: 2 0.018700 ms
UpdatePrices 01:35:13
BrokerAsset EUR/USD 0 => 0  (0.0000 28679.320700 ms)
No Quote
Server [2025-04-02 01:35:13   XXXXX] 01:35:41
Messages 01:35:41
Loop 3888.6 ms
Intrabar 45749.06650 (04-02 01:35:46)
BrokerTime=> 2025-04-02 01:35:46 PC 01:35:46: 2 0.108200 ms
UpdatePrices 01:35:46
BrokerAsset EUR/USD 0 => 0  (0.0000 28447.444100 ms)
No Quote
Server [2025-04-02 01:35:46   XXXXX] 01:36:14
Messages 01:36:14


Attached Files
TWS_Restart_Log.txt (16 downloads)
Last edited by opm; 04/02/25 08:50.
Re: Zorro not reconnecting to IB gateway after restart [Re: jcl] #488692
04/02/25 13:17
04/02/25 13:17
Joined: Feb 2017
Posts: 1,784
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,784
Chicago
Did you see this?
Originally Posted by jcl
the current gateway version won't recover properly from its automated shutdown.

Which gateway version are you running? Do you have any gateway logs?

Re: Zorro not reconnecting to IB gateway after restart [Re: opm] #488693
04/03/25 00:56
04/03/25 00:56
Joined: Dec 2023
Posts: 8
Paddington
O
opm Offline OP
Newbie
opm  Offline OP
Newbie
O

Joined: Dec 2023
Posts: 8
Paddington
I'm running the latest version and build.

Yeah, jcl references the weekly restart, so I thought daily might be different. Maybe the same issue. Its happening with both the gateway and TWS.

I've looked at the logs, but nothing there. A "client" tab isn't opened either. I'll turn on verbose logging and check it.

Re: Zorro not reconnecting to IB gateway after restart [Re: opm] #488694
04/03/25 10:43
04/03/25 10:43
Joined: Jul 2000
Posts: 28,019
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,019
Frankfurt
I was referring to the weekly shutdown, but if you have set it up for daily shutdown, it's the same. Shutdown requires manually closing and opening the gateway. Zorro can reconnect automatically, you can even set BarMode to let it explicitly disconnect and re-connect, but it won't help. After a shutdown, the gateway is in a state that it does not accept API connections. Only closing it solves that.

I hope that this behavior changes with a new gateway version, but so far, all versions behave this way.

Re: Zorro not reconnecting to IB gateway after restart [Re: opm] #488696
04/09/25 11:02
04/09/25 11:02
Joined: Dec 2023
Posts: 8
Paddington
O
opm Offline OP
Newbie
opm  Offline OP
Newbie
O

Joined: Dec 2023
Posts: 8
Paddington
Hi jcl,

the gateway restarts every day by default. All I can do is change the time. This is what I'm referring to. I know the weekly restart/shutdown is different.

Any thoughts on why it won't reconnect? I can add a video if that helps. The zorro log just shows it isn't restablishing a connection. ¯\_(?)_/¯

I'll try BarMode to force reconnection and set StartDate to NOW, so I don't keep missing trades.


Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1