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

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 trilliantrader, Today, 08:16 AM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by bill2023, Yesterday, 08:51 AM
          3 responses
          20 views
          0 likes
          Last Post bltdavid  
          Started by yertle, Today, 08:38 AM
          0 responses
          4 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by Mestor, 03-10-2023, 01:50 AM
          15 responses
          378 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by samish18, Yesterday, 08:57 AM
          10 responses
          28 views
          0 likes
          Last Post samish18  
          Working...
          X