Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Price Connection Loss

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

    Price Connection Loss

    H, How do I track a connection loss that affects a strategy?

    #2
    I used these if statements to send me an email when this happens to restart the strategy, but neither one of them is reporting on the attached error...
    if(connectionStatusUpdate.PriceStatus == ConnectionStatus.ConnectionLost)

    if(connectionStatusUpdate.Status == ConnectionStatus.ConnectionLost)
    Attached Files

    Comment


      #3
      Hello aaadetos,

      Thank you for your post.

      Are you using this inside OnConnectionStatusUpdate? Where within your code are you checking for the status update?

      Do any errors appear in the log when this fails to function?

      Thanks in advance; I look forward to assisting you further.
      Kate W.NinjaTrader Customer Service

      Comment


        #4
        Yes, I'm using them inside OnConnectionStatusUpdate. The if statements specified capture other connection losses for which I'm notified but not the one specified in my previous post
        For instance, at the end of the week on Friday evening or on Saturdays, the feed gets disconnected maybe to restart servers, etc and I get notified.
        The error specified in my previous post ends up disabling the strategy. I don't mind, so long as I get the notification as I can't be watching the market 24/7.
        Thanks for any help you can render!

        Comment


          #5
          Hello aaadetos,

          Thank you for your reply.

          Are you connected to more than one connection simultaneously, like one that provides data and one that connects to the account you route your orders to?

          If you test by disconnecting your feed(s) while the strategy is running, do you get an email when it is disconnected?

          What I would recommend is to add prints to print out the details for ConnectionStatusEventArgs and check the connection name and what is coming up twice so you can make an informed choice to filter that event for the exact criteria you want to send the message.



          Thanks in advance; I look forward to assisting you further.
          Kate W.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Belfortbucks, Today, 09:29 PM
          0 responses
          6 views
          0 likes
          Last Post Belfortbucks  
          Started by zstheorist, Today, 07:52 PM
          0 responses
          7 views
          0 likes
          Last Post zstheorist  
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          151 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          6 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Working...
          X