Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to connect to python

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

    How to connect to python

    Hello,
    I'm trying to connect Python to ninja in order to create a custom strategy. I have a compiled custom indicator but I don't have access to methods that return useful parameters to me. To solve the problem I thought of connecting python so that I could use image recognition and use the data that the indicator provides me. So far there should be no problems, the problem arises when this data must be imported within the strategy and unfortunately I have not found documentation about it.
    Thanks to who will help me!

    #2
    Hello angelvincent37,

    NinjaTrader uses the C# 5.0 programming language targeting .NET 4.8 for developing custom NinjaScript AddOns. Using external programming languages is not documented or supported and we would not be able to provide assistance.
    Documents\NinjaTrader 8\bin\Custom is the proper place for a 3rd party referenced assembly dll.

    Support for 3rd party assemblies is limited. Our team is able to assist with adding the dll and a reference to the dll, however we cannot assist with its use, or with any errors or unexpected behavior that may occur.

    With that said, we are happy to forward any insightful information we happen to be aware of.

    Below is a link to the help guide on referencing a 3rd party assembly dll.
    https://ninjatrader.com/support/help...indicators.htm

    Any referenced managed assembly will need to target .NET Framework 4.8 or lower. Other versions of .NET will not work, such as .NET Core or .NET 5.

    Alternatively, unmanaged assemblies can be P/Invoked:
    https://docs.microsoft.com/en-us/dot...nterop/pinvoke
    https://ninjatrader.com/support/foru...300#post777300
    It's possible to use Nuget with Visual Studio to compile dlls for use in NinjaTrader:
    https://ninjatrader.com/support/foru...72#post1042872

    Determining the targeted .NET version for an assembly dll:
    https://ninjatrader.com/support/foru...858#post798858

    Another option to consider is using the NinjaTrader API NTDirect.dll to interface an external application written in another language with NinjaTrader.
    https://ninjatrader.com/support/foru...626#post793626

    Forum posts about Python / TensorFlow:
    https://ninjatrader.com/support/foru...74#post1110774
    https://ninjatrader.com/support/foru...89#post1104989

    If you have an error message you would like assistance with, provide the full error message.​​
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you Chelsea

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      601 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      347 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      559 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      558 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X