Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnConnectionStatus() firing at startup?

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

    OnConnectionStatus() firing at startup?

    Hi,

    Still migrating from 6.5 to 7. I've noticed that it seems like at the startup of my strategy, I'm always getting an OnConnectionStatus() event... order status shows as "Connecting", then goes immediately to "Connected".

    I thought at first these were real events, but looking at the log in the control panel, don't see anything indicating an actual disconnect/reconnection.

    Is this now just part of the normal init/startup process for a strategy?

    #2
    Hello,

    Thanks for the forum post.

    Yes you will get a call to this at the start of the strategy to check the connection status and is part of the Init Process in NinjaTrader 7 as a strategy cannot start if it is not in a connected state.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Brett View Post
      Hello,

      Thanks for the forum post.

      Yes you will get a call to this at the start of the strategy to check the connection status and is part of the Init Process in NinjaTrader 7 as a strategy cannot start if it is not in a connected state.

      Let me know if I can be of further assistance.
      Hi,

      Hmm, not sure why *my* strategy code is being queried as to the connection status.

      So, what's the recommended behavior...? I want to be alerted as to any changes in connection status, but only after my code is running live. Can I do a if (Historical)?

      Comment


        #4
        Hello,

        You would need to filter out the first call to OnConnectionStatus() with a counter or whatever way works best for you to filter it out.

        Or only send emails when ConnectionLost events occur if this works for what your trying to do. These are 2 idea's you can do.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

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