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 cmtjoancolmenero, Yesterday, 03:58 PM
        11 responses
        42 views
        0 likes
        Last Post cmtjoancolmenero  
        Started by FrazMann, Today, 11:21 AM
        0 responses
        5 views
        0 likes
        Last Post FrazMann  
        Started by geddyisodin, Yesterday, 05:20 AM
        8 responses
        52 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by DayTradingDEMON, Today, 09:28 AM
        4 responses
        27 views
        0 likes
        Last Post DayTradingDEMON  
        Started by George21, Today, 10:07 AM
        1 response
        22 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Working...
        X