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 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 Max238, Today, 01:28 AM
      2 responses
      26 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by Shansen, 08-30-2019, 10:18 PM
      25 responses
      949 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by JonesJoker, 04-22-2024, 12:23 PM
      8 responses
      41 views
      0 likes
      Last Post JonesJoker  
      Started by timko, Today, 06:45 AM
      0 responses
      3 views
      0 likes
      Last Post timko
      by timko
       
      Started by Waxavi, 04-19-2024, 02:10 AM
      2 responses
      39 views
      0 likes
      Last Post poeds
      by poeds
       
      Working...
      X