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 could I feed custom external data source into NT and form all types of bar charts

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

    How could I feed custom external data source into NT and form all types of bar charts

    I would like to connect my external data source from a local private exchange to NinjaTrader 8 and form all types of charts within.
    I read something about DLL interface but am not sure whether I can do it or not.

    Please help where I can find more information about it.

    #2
    Welcome to the forums ybhx0315!

    This could be done using the DLL interface to have a custom application pump data through the External Data Feed, however the External Data Feed cannot be used with other connections.

    More information can be found below.

    External Data Feed - https://ninjatrader.com/support/help...connection.htm

    DLL interface - https://ninjatrader.com/support/help.../functions.htm

    Example application (Unsupported example) - https://ninjatrader.com/support/foru...442#post514442

    Brining data into the platform from an external source to form bars like other parts of the platform would be best done through a building a Connection Adapter, however that ability is only permitted for qualified vendors in the EcoSystem. (There are strict terms in Terms Of Service preventing users from building interfaces between broker API's without consent. If you think what you want to do is applicable for a business relationship, like making that data marketable to others, I may suggest contacting info [at] ninjatraderecosystem [dot] com.)

    If you want to bring in data and use it with your live trading (not use the External Data Feed,) you could try modifying existing BarsTypes so they pull data from a desired location. This would require making different BarsTypes to pull data from your desired source, and this would go beyond what we could support, but it may be worth checking into to see if it is a possible.

    BarsType source code can be referenced in the platform and BarsType documentation can be found below.

    BarsType - https://ninjatrader.com/support/help...?bars_type.htm

    We look forward to assisting.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Team,

      Does the NinjaTrader API support multi-threading? For example, I am thinking of running 2 processes, and they, at their own pace, call Ask(), Bid() and Last() function for different symbols.

      Comment


        #4
        Hello ybhx0315,

        This DLL interface is adapted from NinjaTrader 7 and is provided as is. NinjaTrader 7 was not built with multi threading in mind, but I am not aware of any limitations that would be seen when using the interface with a multi threaded application that has separate feeds on separate threads.

        I would suggest setting up a small test application to field this out, and to report your experience here.
        JimNinjaTrader Customer Service

        Comment


          #5
          Hello, I have a subscription to this data feed for options data and I was wondering if it would be possible to connect something this to NinjaTrader and create bars out of these various data streams.



          My goal is to use my TD account for the underlying stock data, the linked service for options data, and NT8 as the platform to bring that data together and do analysis.

          Would NinjaTrader allow for this configuration to be built, and if so, do you have any advice on how to best implement it within NinjaTrader.

          Comment


            #6
            Hello StoneMan78,

            Thank you for your inquiry.

            Since you would like to use TD Ameritrade for stock data and the other feed for options data, the External Data Feed is not an option because it may not be used in conjunction with any other connections. As my colleague Jim mentioned previously in this thread, you could try modifying a BarsTypes script so the bars are built based on the options data from your other feed by pulling the data from a desired location. This would go beyond what is supported, so we do not have any advice on how to best implement it within NinjaTrader. BarsType documentation in the help guide is linked below:Please let us know if we may be of further assistance.
            Emily C.NinjaTrader Customer Service

            Comment


              #7
              Thank you for the reply Emily. What about making that service the main data feed instead of TD? Would this be possible? The full suite of data available is "...all the data for US stocks/indexes and CME futures..." including the previously mentioned options data. Could that just be set up by me or is there more at play here with terms of service or other business factors on NinjaTraders end.

              So my new question is could I use that service as the external data feed, TD as my broker, and NinjaTrader as my platform for charting and trade execution (with the multi broker license).
              Last edited by StoneMan78; 04-27-2023, 11:15 AM.

              Comment


                #8
                Hello StoneMan78,

                Thank you for your reply.

                In that case, you could potentially set this up yourself with the External Data Feed connection. If this is for your own personal use and analysis, it wouldn't interfere with the terms of service. The External Data Feed uses the DLL interface to provide real-time data to NinjaTrader from an external application. The links mentioned by Jim are relevant in this case:Please feel free to reach out with any additional questions or concerns.
                Emily C.NinjaTrader Customer Service

                Comment


                  #9
                  Is there any advice you could give me for implementing the NinjaTrader.Client.dll considering the recently discontinued support for NtDirect.dll. Most of the support material I have found pertains to NtDirect.dll. I just don't want to get my wires crossed here because that change was very recent.

                  Also, what is the most current .NET version? And are there any other details I should know that I will need to "sync up" for the implementation.
                  Last edited by StoneMan78; 04-27-2023, 11:42 AM.

                  Comment


                    #10
                    Hello StoneMan78,

                    Thank you for your reply.

                    As mentioned in the forum post I linked, support for the API is very limited. I have already offered all of the relevant links that I know of to help you with this. I suggest reviewing the details in that post about the location of the NinjaTrader.Client.dll file, the functions, and the unsupported example video shared via Google Drive. Beyond that, I do not have any additional advice or documentation to share. Although the NtDirect.dll (native C/C++) has been discontinued, it provided the same functions as the NinjaTrader.Client.dll (managed .NET assembly).

                    This thread will remain open for any other forum community members to chime in with their experience using the NinjaTrader.Client.dll and offer any advice they might have.

                    Thank you for your time and patience.
                    Emily C.NinjaTrader Customer Service

                    Comment


                      #11
                      The NinjaTrader.Client.dll cannot be called from Easylanguage the same way as the NtDirect.dll could. I believe to use the new dll with Easylanguage, it will require the creation of another dll which can use the new dll functions and be also called from Easylanguage. I'd like to know if this is right, and if so, from anyone who has done it.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by maybeimnotrader, Yesterday, 05:46 PM
                      1 response
                      18 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by Perr0Grande, Yesterday, 08:16 PM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Started by f.saeidi, Yesterday, 08:12 AM
                      3 responses
                      25 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Started by algospoke, Yesterday, 06:40 PM
                      1 response
                      15 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Started by quantismo, Yesterday, 05:13 PM
                      1 response
                      14 views
                      0 likes
                      Last Post NinjaTrader_Gaby  
                      Working...
                      X