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.
    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        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 NeverDownMoney, Today, 02:42 PM
          3 responses
          11 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by localappleseed, Today, 02:20 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Jim  
          Started by asmmbillah, Today, 02:48 PM
          1 response
          19 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by KacemRhaz, Today, 01:31 PM
          3 responses
          15 views
          0 likes
          Last Post NinjaTrader_ChristopherD  
          Started by ronaldgreene828, Today, 12:08 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Kate  
          Working...
          X