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 bortz, 11-06-2023, 08:04 AM
          47 responses
          1,602 views
          0 likes
          Last Post aligator  
          Started by jaybedreamin, Today, 05:56 PM
          0 responses
          8 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          18 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by Jon17, Today, 04:33 PM
          0 responses
          4 views
          0 likes
          Last Post Jon17
          by Jon17
           
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          12 views
          0 likes
          Last Post Javierw.ok  
          Working...
          X