PDA

View Full Version : Calling Python and R functions from NinjaTrader/C#


bluelou
06-05-2010, 11:24 PM
I'm looking to write a function in Python and using Python for .NET call it into a NinjaTrader strategy. I know that this can be done in C#/.NET but has this been tried in NinjaTrader? Also, is there anything about NinjaTrader that would not allow a Python function to be called into it? I'd be willing to consider IronPython which is Python built for the .NET platform,

Similarly, I'd be interested in calling functions into Ninja strategies that are written in R. Has this been tried? Is there anything about Ninja that would not permit this?

Thx,
Lou

NinjaTrader_Tim
06-06-2010, 01:31 PM
Hi bluelou,

I don't believe integration with Python is supported, however here is more information on integration though our ATI

http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?Overview

Perhaps others on this forum can speak to your specific requests.

bluelou
06-06-2010, 05:30 PM
Tim,
Thx for this. There is a .NET version of Python called IronPython and there are other ways of calling traditional CPython into .NET as well (e.g., Python for .NET). R has R D COM for use with .NET. But, I'd prefer not to be the 1st Ninja user to try this. If anyone has any experience with any of the above please chime in.

What about the Meta.Numerics C#/.NET open-source statistical library? Has this been tried w/Ninja? This sounds like the cleanest way to go for my purposes since the libraries are written in C#.

Thx,
Lou