Any statement to reconnect Pi bridge from AFL?

I have been using trial of NeoTrade data feed with Amibroker to generate signals in Pi using Neo bridge and Pi bridge. Once every 1-2 hours, the connection gets disconnected and I get 2 pop-ups once after another with error message:

1. "Error: The underlying connection was closed: The connection was closed unexpectedly."
2. "Current session expired. Re-login to continue."

I am not sure why this happens so frequently despite no power interruption or internet issues. Even after this error crops up, I can see "Pi Bridge" as connected (solid green dot) at the bottom right corner of Pi platform. However any new signal that is generated in Amibroker, gets logged in NeoTradeBot but it does not reach Pi.

To continue working seamlessly, I need to close Pi, Neo bridge and Amibroker and open all of them again in the sequence: Pi --> Neo --> Amibroker

1. Why does the connection issue crop up so frequently?

2. Is there any code in AFL that I can add that would reconnect? I read somewhere that if one is using only Pi bridge (without NeoBot), below statement would help. However this statement does not work when I am using NeoBot and gives a syntax error for function "GetConnectionStatus()".

if(!brd.GetConnectionStatus()) brd.Reconnect();

3. Could I do anything that would avoid frequent disconnection problem?

Hi Amit,

Reconnectivity option to Pi through NeoBridge will be added in the next release shortly. We will keep you posted on the updates.



Good to hear that. However the connection should not get disconnected so frequently. What could be the reason for connection getting disconnected so frequently?