Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Python.RunTime in ninjatrader 8
Collapse
X
-
Hello Nyman,
I am not aware of a specific way to use python in NinjaScript that would work. There are external C# libraries that utilize python that you could try however that is outside of what our support can assist with. You would need to search in external C# websites for how to use python in C# in general and then use what you learned to test in NinjaScript.
- Likes 1
-
Is there any update on this? Has anyone accomplished this yet? I've been wanting to attempt this as well but haven't given it a go yet. One way to achieve this is by using Python.NET (pythonnet), a package that lets you call .NET code from Python and vice versa.
Here is a high-level overview of how you could make it work (according to ChatGPT): Steps to Integrate Python.NET:- Installation: Install Python.NET in your Python environment.
- Importing .NET Libraries in Python: After installing Python.NET, you can import .NET assemblies into Python.
- Calling .NET Methods: Once the DLL is referenced, you can instantiate .NET classes and call methods.
- Embedding Python Code in NinjaTrader C# Scripts: You can also use Python.NET to call Python code from within NinjaTrader’s C# scripts.
Comment
-
Ymcapital I ran into a lot of problems many months ago with Python.Net, but I don't recall exactly what they were. I think it was too limited in it's support of data structures, and maybe there was a problem with the library being compiled against a different .net version than NT. I really don't remember it well. That said, I did get a python integration up and working well over sockets using the post below as a rough reference. It was a lot easier in the end. Check it out if you are stuck.
Hello all, I have become increasingly more interested in the prospect of implementing machine learning into my trading, there is one article in particular that piqued my interest. https://inovancetech.com/how-to-trade-rsi.html He/She uses a support vector machine to find optimal values for trading the RSI. I found the
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
333 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment