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

Is there any way to communicate with Ninjatrader application from another C# app?

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

    Is there any way to communicate with Ninjatrader application from another C# app?

    Is there API available to use NT functionality outside Nt script? Remoting? Webservice? Plug-in .NET assembly?

    #2
    Please check out the Automated trading interface section in the docs.

    Note: Next 6.5 update (should be available this week) will have a C# sample.

    Comment


      #3
      Is it possible to retrieve market data from the NinjaTrader API?

      Comment


        #4
        Yes, check out the OnMaketData() method.

        RayNinjaTrader Customer Service

        Comment


          #5
          Thanks for the quick reply, but I meant accessing market data from an external application not from within NinjaTrader Script.

          Comment


            #6
            Unfortunately API is not supported.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Does NinjaTrader do anything to disallow a script or assembly (developed by whatever means) from setting up its own remote communication?

              Comment


                #8
                Unfortunately this is not supported.

                Comment


                  #9
                  Originally posted by NinjaTrader_Dierk View Post
                  Unfortunately this is not supported.
                  I'm not clear on whether this means NinjaTrader actively does something "to disallow a script or assembly (developed by whatever means) from setting up its own remote communication", whether it means NinjaTrader does not support blocking a "a script or assembly (developed by whatever means) from setting up its own remote communication", or whether it simply means its technically possible, but not officially supported.

                  If its the later that's not an issue as I'm more then willing to implement it myself. Its just a question of whether NinjaTrader has configured the CLR's Code Access Security to prevent scripts and assemblies, which implement indicators and strategies, from accessing sockets, files, pipes, shared memory, etc.

                  I asked a similar question regarding two assemblies loaded by NinjaTrader talking to each other through non-NinjaTrader APIs (i.e. names pipes, shared memory, etc.) on this thread and the response there was that NinjaTrader did not block this so it seems like that the later is meant, but I'd like to get clarification before I start working on an implementation that potentially isn't technically possible.
                  Last edited by Josh Heitzman; 05-29-2008, 10:56 PM.

                  Comment


                    #10
                    >> whether NinjaTrader has configured the CLR's Code Access Security to prevent scripts and assemblies
                    No

                    Comment


                      #11
                      Originally posted by NinjaTrader_Dierk View Post
                      >> whether NinjaTrader has configured the CLR's Code Access Security to prevent scripts and assemblies
                      No
                      Excellent. Thanks for the quick response.

                      Comment


                        #12
                        Originally posted by Josh Heitzman View Post
                        I I'd like to get clarification before I start working on an implementation that potentially isn't technically possible.
                        Do you mean that you're planning to develop a component that makes NinjaTrader's market data and other API features available to external applications? That would be really useful.

                        Comment


                          #13
                          Originally posted by AgeKay View Post
                          Do you mean that you're planning to develop a component that makes NinjaTrader's market data and other API features available to external applications? That would be really useful.
                          At present I'm still evaluating NinjaTrader, so I'd wouldn't say I'm planning it at this point. If I decide to go with NinjaTrader I will likely provide myself a means to implement indicators and strategies in external processes created using a combination of Python and C++ (standard, not C++/CLI) as I strongly prefer those languages. Based on the information I've gathered thus far, it appears there would still need to be a proxy assembly loaded into NinjaTrader for each indicator or strategy (even if your external app wasn't really an indicator or strategy, as I have not yet observed another way of plugging into NinjaTrader, but I've only been looking at the API for less the 24 hours at present).

                          Comment


                            #14
                            When you code your external application in C++/python, you can include the NinjaTrader.Client.Dll.

                            As your external application makes a decision to trade something, you call the NinjaTrader.Client.Dll's API to submit an order.

                            Very simple.

                            If your external application requires a data feed then that's another story.

                            Which brings up another question... why not code your strategy in NinjaScript? If you've already master C++ and python, then C# is easy enough.

                            Think about it... You would be coding your strategy that is 100% .NET Framework.

                            Comment


                              #15
                              Originally posted by mgbloomfield View Post
                              Which brings up another question... why not code your strategy in NinjaScript? If you've already master C++ and python, then C# is easy enough.

                              Think about it... You would be coding your strategy that is 100% .NET Framework.
                              Its the additional language features of C++ and Python, which make them harder to master then C#, that also allow for higher productivity once mastered. While the .Net Framework may have more features then the standard libraries of either C++ or Python, both C++ and Python have a wealth of freely available libraries that provide for everything the .Net Framework provides in lighter weight and more extensible frameworks.

                              Or to put it more succinctly...personal preference.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by helpwanted, Today, 03:06 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post helpwanted  
                              Started by Brevo, Today, 01:45 AM
                              0 responses
                              7 views
                              0 likes
                              Last Post Brevo
                              by Brevo
                               
                              Started by aussugardefender, Today, 01:07 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post aussugardefender  
                              Started by pvincent, 06-23-2022, 12:53 PM
                              14 responses
                              242 views
                              0 likes
                              Last Post Nyman
                              by Nyman
                               
                              Started by TraderG23, 12-08-2023, 07:56 AM
                              9 responses
                              384 views
                              1 like
                              Last Post Gavini
                              by Gavini
                               
                              Working...
                              X