Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

External Data Feed Using C#.

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

    External Data Feed Using C#.

    Hi,

    I'm going to start working on building an external data feed for NT using C#. It looks like I will have use the following .NET function to push the last price into NT from the external data source.

    ---
    int Last(string instrument, double price, int size)
    Sets the last price and size for the specified instrument. A return value of 0 indicates success and -1 indicates an error.
    ---

    So if I am working for 10 different futures symbols, do I have to repeat that function call above 10 times (once for each symbol)?

    Also I have to map these symbols to NT, right?

    Thank you!

    #2
    Hello BlueWaters,

    Welcome to the NinjaTrader forums!

    Yes, instrument is a parameter here so you need this for each instrument.

    Yes, the mapping is done under the External feed for individual instruments. Tools > Instrument Manager > Edit instrument > Misc tab.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ryan,

      Thank you for your quick response. Have a great weekend.

      Comment


        #4
        Hi Ryan,

        The external data feed I'm working on will be running on historical data too. Will NT see the incoming historical data as real-time data since I can't pass date and time into the 'Last(string instrument, double price, int size)' function?

        Another question... I'm running the Ninja Trader C# Sample Application. However, I get the following error:

        "Unable to connect to NinjaTrader (127.0.0.1/36973). Please make sure NinjaTrader is running: Object reference not set to an instance of an Object." Any suggestions? AT interface under File menu is checked.

        Thanks
        Last edited by Blue Waters; 01-11-2011, 02:54 AM.

        Comment


          #5
          You can use LastPlayback for historical prices.
          int LastPlayback(string instrument, double price, int size, string timestamp)

          Unfortunately we no longer offer support for the C# application. It should still work but you will have to work through any issues that come up.
          Ryan M.NinjaTrader Customer Service

          Comment


            #6
            Ryan,

            Thanks. I will post the connection problem as a separate thread. Maybe other users might be able to help me.

            Comment


              #7
              Ryan,

              One more question... Does NinjaTrader officially support the .NET interface?

              Thanks.

              Comment


                #8
                Blue Waters, officially supported would be those AT interface types - http://www.ninjatrader.com/support/h...ed_trading.htm
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Bertrand,

                  This is where I am getting confused at. The text of the link you sent says:

                  "NinjaTrader provides TradeStation and eSignal integration, File Interface, DLL Interface, and a .NET Interface which ensures that you can communicate with NinjaTrader from any application such as but not limited to:

                  • Popular charting applications such as but not limited to TradeStation, eSignal, NeoTicker, and Investor RT
                  • Custom applications written in but not limited to Visual Studio .NET, Visual Basic, Delphi, and MS Excel
                  • Black box trading systems"


                  Then it only lists the following.

                  Interface Options
                  ► File
                  ► DLL

                  This is where I get confused. Does .NET interface still get supported?

                  Thanks.

                  Comment


                    #10
                    NinjaTrader is built with .net and we support the .net items documented in our help guide and the reference samples.

                    .net items that are not included in the help guide or reference samples are not supported.

                    You're welcome to add additional libraries and use unsupported items, but we are unable to assist with implementation or if any issues come up while using them.
                    Ryan M.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Haiasi, Today, 06:53 PM
                    1 response
                    4 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by ScottWalsh, Today, 06:52 PM
                    1 response
                    10 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by ScottW, Today, 06:09 PM
                    1 response
                    5 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by ftsc2022, 10-25-2022, 12:03 PM
                    5 responses
                    256 views
                    0 likes
                    Last Post KeyonMatthews  
                    Started by Board game geek, 10-29-2023, 12:00 PM
                    14 responses
                    244 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Working...
                    X