Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

connection lost - alert!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    connection lost - alert!

    Today my Kinetick stops sending data at 11,30. I ve just noticed it 1,30 hours after.
    Is there any alert (email,etc) that I can use to alert me about that?
    It could be even on script level.

    #2
    Hello dafonseca,


    You could create a custom strategy to alert you in the event of a disconnection by using OnConnectionStatus().
    The method parameter ConnectionStatus. Disconnected can be used to return the disconnected statues and allow to set an action to take place at the onset of the disconnection.


    I have included the OnConnectionStatus() Help Guide to assist you further.

    Comment


      #3
      Can I use this script in one of my current strategies? Or you advice use a strategy only for this?
      another question would be:
      protected override void OnConnectionStatus(ConnectionStatus orderStatus, ConnectionStatus priceStatus)
      {
      dataFeed = priceStatus;
      }

      how can I check dataFeed (if) to send me an email in case os disconnection?
      what priceStatus would return?

      Comment


        #4
        Hello dafonseca,

        You could use the OnConnectionStatus() method in a separate strategy or along with an existing strategy.


        To send an email from the strategy, ensure you have configured the SMTP outgoing mail server to use your own ISP's mail server. You can set this information via the Control Center window Tools > Options > Misc.


        PriceStatus will return the status of the price server.


        I have included the SendMail() and Email SMPT SetupsHelp Guide to assist you further.


        Here is an example below:
        Code:
        [COLOR=#000000][FONT=Tahoma][LEFT][FONT=Courier New][SIZE=2][COLOR=#0000FF]private[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] ConnectionStatus dataFeed = ConnectionStatus.Connected;[/SIZE][/FONT]
        [FONT=Courier New][SIZE=2]
        [/SIZE][/FONT]
        
        
        [FONT=Courier New][SIZE=2][COLOR=#0000FF]protected[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000FF]override[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#0000FF]void[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2]OnConnectionStatus(ConnectionStatus orderStatus, ConnectionStatus priceStatus)[/SIZE][/FONT]
        [FONT=Courier New][SIZE=2]{  dataFeed = priceStatus;[/SIZE][/FONT]
        [FONT=Courier New][SIZE=2][COLOR=#0000FF]if[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] (dataFeed != ConnectionStatus.Connected)[/SIZE][/FONT]
        [FONT=Courier New][SIZE=2]   SendMail([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000] "From email address"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]"To email address"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] , [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]"Email Alert"[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2], [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]"Connection Lost!"[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2]);[/SIZE][/FONT]
        [FONT=Courier New][SIZE=2]}[/SIZE][/FONT][/LEFT]
        [/FONT][/COLOR]
        [COLOR=#000000][FONT=Tahoma]
        [/FONT][/COLOR]

        Comment


          #5
          Interesting.
          I am working connected with Kinetick (primary) and with IB,,,
          the method will email me when Kinetick lose coneection only, am i right?

          Comment


            #6
            Hello dafonseca,


            Yes, if Kinetick is your primary data feed, then your actions will trigger when it is disconnected.


            You will be alerted whenever the primary data feed of the strategy on your chart using the OnConnectionStatus() is running on is disconnected.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            558 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X