Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to control heartbeat of data + orders connection without OnConnectionStatus()?

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

    How to control heartbeat of data + orders connection without OnConnectionStatus()?

    Hello.
    If I would like to control health of market data connection and brokerage connection, without (or in parallel to) using OnConnectionStatus() what would be the best ways?
    Or just good ways.
    Or, at least, reliable ways?

    Thank you.
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Hello fx.practic,

    Can you provide more detail about what you are trying to do?

    The OnConnectionStatus is the only override a script has to monitor the connection. Addons can also access that information through its connection however you would just access the event directly like shown in the addon sample. This is only for monitoring though and based on your posts title it sounds like you want to edit some of the connections internal parameters.



    I look forward to being of further assistance.

    Comment


      #3
      Hello, Jesse.

      I mean monitoring connection health only.
      Just a watch dog.

      I suspect, OnConnectionStatus() may work with delays sometimes (I am just suspect and want to make additional checks).
      I think about running Timer instance that will check something.
      The most primitive way to check data health is to measure time between ticks. I am sure there are better ways to do it.
      And I have no idea how to check brokerage connection.

      I will look at AddOnFramework.cs, thank you.
      Can you, please provide additional advice?

      With respect, Andrii.
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment


        #4
        Hello fx.practic,

        There is not necessarily anything I could suggest that would be different for that use case. Even if you are polling for changes you still have to wait for the internal connection event/status objects to be updated which in turn will call OnConnectionStatus(). This is the information for the Addon connection information, you can see there is an event and also some status objects. You may be able to try and confirm a delay with that however as noted you are likely still going to be waiting on the internal values in either case of polling or waiting on the override.
        https://ninjatrader.com/support/help...sub=connection

        I look forward to being of further assistance.

        Comment


          #5
          Thank you, Jesse.
          I'll try to find the way using example as foundations.
          fx.practic
          NinjaTrader Ecosystem Vendor - fx.practic

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          574 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          333 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
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X