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

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.

    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.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,606 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        9 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        19 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        6 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        15 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X