once begin
SetUp(iHost, iPort); // iHost & iPort are inputs to strategy
if NTConnected(1) then print("connected to ", iHost)
else print("NOT connected to ", iHost);
end;
It runs once at the begining of the startegy, and works well.
The issue I have is that it assumes that NT is already up and then TS comes up. If it is not, then I need to restart the strategy every day if I take NT down at the end of the day.
The question then is how do I force a reconnect from TS? There is no Connect() method that I am aware of that would force a reconnect. Can the above code be called again if NTConnected() returned a disconnected status? Or does calling NTConnected trigger a connection attempt?
Ideally, I would like to have my strategy reconnect if not connected.
Comment