"KeepRunning: Keeps the strategy running and sends a disconnect email alert. When the connection is reestablished the strategy will resume as if no disconnect occurred."
Here's my setting in the Initialize() method:
ConnectionLossHandling = ConnectionLossHandling.KeepRunning;
However in reality my strategies do recover after temporary disconnect of less than 30 seconds, but I don't ever receive an email. The admin email account settings are correct as I'm sending myself other alerts via the strategy. Is there anything special I need to do?
FYI - I built myself a strategy to be alerted on permanent data disconnects. The method used is here:
protected override void OnConnectionStatus(ConnectionStatus orderStatus, ConnectionStatus priceStatus)
{
Print("On Connection Status Called.");
if (priceStatus == ConnectionStatus.Disconnected)
{
Print("Disconnected!");
StringBuilder sb = new StringBuilder();
sb.Append(HTML_STRONG_TAG_OPEN).Append("DATA FEED IS DOWN!!").Append(HTML_STRONG_TAG_CLOSE).Append(NEWLINE);
messageBuffer.Append(sb);
}
// else if (priceStatus == ConnectionStatus.ConnectionLost)
// {
// Print("Connection Lost!");
// StringBuilder sb = new StringBuilder();
// sb.Append(HTML_STRONG_TAG_OPEN).Append("CONNECTION LOST!!").Append(HTML_STRONG_TAG_CLOSE).Append(NEWLINE);
// messageBuffer.Append(sb);
// }
// ######## SENDING MESSAGE ###########
if (messageBuffer.Length > 0) {
sendMessage(MessageType.ALL);
}
}
What I am looking for is simply a means of being notified. Sometimes disconnects happen on my end and my strategies are down for six hours or more, which is just mindbogglingly scary.
Any input/help/suggestions are appreciated. Thanks in advance.

Comment