• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ralett, Yesterday, 07:29 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Marco  
        Started by bboyle1234, Yesterday, 10:46 PM
        1 response
        5 views
        0 likes
        Last Post bltdavid  
        Started by swcooke, Yesterday, 04:29 PM
        0 responses
        5 views
        0 likes
        Last Post swcooke
        by swcooke
         
        Started by bboyle1234, Yesterday, 04:27 PM
        0 responses
        2 views
        0 likes
        Last Post bboyle1234  
        Started by swcooke, Yesterday, 03:31 PM
        2 responses
        12 views
        0 likes
        Last Post swcooke
        by swcooke
         
        Working...
        X