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

Custom connection data feed

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

    Custom connection data feed

    Hi, how do I create my own data feed connection that NinjaTrader can use?

    I have my own real-time quoting generated real-time, but now how do I feed it so that NinjaTrader can use to create candlesticks, etc?

    Is there a way to code this, how do I expose the code that generates the real-time feed that Ninjatrader uses for data and quotes?

    I would just need to know where and how the data is being collected on the platform.
    Last edited by lakersfan; 07-28-2020, 09:59 AM.

    #2
    Hello lakersfan,

    NinjaTrader provides the API (Application Programming Interface) to send / receive data and orders to and from NinjaTrader from a external application.

    Below is a link to a forum post on the API.
    https://ninjatrader.com/support/foru...626#post793626
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello lakersfan,

      NinjaTrader provides the API (Application Programming Interface) to send / receive data and orders to and from NinjaTrader from a external application.

      Below is a link to a forum post on the API.
      https://ninjatrader.com/support/foru...626#post793626
      Thank you Chelsea, I'll take a stab at it. Thanks!

      Comment


        #4
        Originally posted by NinjaTrader_ChelseaB View Post
        Hello lakersfan,

        NinjaTrader provides the API (Application Programming Interface) to send / receive data and orders to and from NinjaTrader from a external application.

        Below is a link to a forum post on the API.
        https://ninjatrader.com/support/foru...626#post793626
        Hi Chelsea, I have initialized the program, but I am receiving 0.00 on BID ASK and LAST when I click "Receive AAPL" to test it out. Do I have to provide my own webclient / httprequest somewhere? If so, where do I find it? and if that gets answered, how would I have it Receive ES 09-20? What would I have to name the instrument in the code to have NT 7 recognize it as ES future with exp 09-20 etc. BTW I am using NT7

        Comment


          #5
          Hello lakersfan,

          Are you connected to a real-time data feed that provides data for AAPL?

          Do you see real-time data appearing on a chart with AAPL?

          No, a webclient or httprequest is not used for the API.

          You would need to change the instrument string supplied to MarketData() method to change the instrument data is received for.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_ChelseaB View Post
            Hello lakersfan,

            Are you connected to a real-time data feed that provides data for AAPL?

            Do you see real-time data appearing on a chart with AAPL?

            No, a webclient or httprequest is not used for the API.

            You would need to change the instrument string supplied to MarketData() method to change the instrument data is received for.
            Ah, I am not connected to a data feed provider (I can get through httprequest or webcleint).If this program, does not work in this manner, how do I have it receive ES 09-20, If i have the data (which can be gotten via webclient).
            Last edited by lakersfan; 07-28-2020, 11:14 AM.

            Comment


              #7
              Hello lakersfan,

              If you have data, you would be sending the data to NinjaTrader with the Last() and LastPlayback() methods and not receiving it with the MarketData() method.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_ChelseaB View Post
                Hello lakersfan,

                If you have data, you would be sending the data to NinjaTrader with the Last() and LastPlayback() methods and not receiving it with the MarketData() method.
                Found them. is there a certain string for ES 09-20 to pass so that NT 7 can understand that this is the feed for ES 09-20?
                Last edited by lakersfan; 07-28-2020, 11:18 AM.

                Comment


                  #9
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hello lakersfan,

                  If you have data, you would be sending the data to NinjaTrader with the Last() and LastPlayback() methods and not receiving it with the MarketData() method.
                  Hi Chelsea, to make this easier and simpler, how do I create a live feed with the BID of 20, Ask of 21, and Last of 20.50 for ES 09-20? Where do I have to input those numbers so that NT 7 knows, that this is live data?

                  Comment


                    #10
                    Hello lakersfan,

                    The string instrument is the string used for the instrument.


                    int Last(string instrument, double price, int size)
                    int LastPlayback(string instrument, double price, int size, string timestamp)



                    In the example the instrumentSend string variable is supplied as the string instrument.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_ChelseaB View Post
                      Hello lakersfan,

                      The string instrument is the string used for the instrument.
                      https://ninjatrader.com/support/help.../functions.htm

                      int Last(string instrument, double price, int size)
                      int LastPlayback(string instrument, double price, int size, string timestamp)



                      In the example the instrumentSend string variable is supplied as the string instrument.
                      I'm definitely doing something wrong.

                      on line 147: I entered the following int success = Last("ES 09-20", 250.75, 1); to send 250.75 price for ES 09-20


                      My last success still displays 0
                      And on Connect I get -1
                      Last edited by lakersfan; 07-28-2020, 01:38 PM.

                      Comment


                        #12
                        Hello lakersfan,

                        Is this using the example app I have provided or your custom app?

                        Is NinjaTrader 8 open or just NinjaTrader 7 (only one can be open at a time).

                        Are you connected to the External data feed?
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_ChelseaB View Post
                          Hello lakersfan,

                          Is this using the example app I have provided or your custom app?

                          Is NinjaTrader 8 open or just NinjaTrader 7 (only one can be open at a time).

                          Are you connected to the External data feed?
                          I was not connected to the external data feed, that was the issue. I am able to see results for MSFT now.
                          However, what string should I pass for ES 09-20?

                          Comment


                            #14
                            Hello lakersfan,

                            "ES 09-20"
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_ChelseaB View Post
                              Hello lakersfan,

                              "ES 09-20"
                              Thank you! Sometimes, you gotta go with gut feeling.

                              Comment

                              Latest Posts

                              Collapse

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