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

receive of trades through the API

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

    receive of trades through the API

    Hi,
    We developed an indicator, which requires trades and depth data. It overrides methods:
    OnMarketDepth()
    OnMarketData()
    The problem is that sometimes it takes minutes until the first data event arrives into one of these methods. After that everything works as expected. Please note, this indicator does not require any historical data. What chart and indicator settings do we need to use to begin receiving the data as fast as possible without delays?

    Sergey

    #2
    Hi Sergey, the event would be given to you through those methods whenever it's broadcasted by your datafeed provider. The chart time frame would not have an impact on this outcome (only the OnBarUpdate() itself would be tied to the bar update timings). It would also depend on the activity of your market monitored if events are generated or not.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand,

      We have detected the problem. Out indicator actually starts a small external UI application during OnStartUp(). This takes some time ~50 milliseconds. We noticed that the first updates OnBarUpdate, OnMarketDepth, OnMarketData - begin to arrive few milliseconds before that application is fully loaded.

      We resolved it by adding Thread.Sleep(100) at the end the OnStartUp().

      Thanks
      Sergey

      Comment


        #4
        Thanks for sharing that update, glad to hear.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,403 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        94 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        6 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X