I am an algorithmic trader. I am transitioning from handcrafted signals to a signal produced by a Neural Network. The description below describes the basics of the setup I have and what I want to be done.
Functionality wanted: C# (Ninjatrader Custom Strategy Script) will call Python and pass inputs to a DNN which will interpret the signals coming in and produce an output action based on reinforcement.
Environment and Inputs
This is a windows server environment.
Python will need to process inputs streaming from C# in real time and not from a file.
The C# application is Ninjatrader8. It can be downloaded here: [login to view URL]
Attached is the Ninjtrader custom code to be modified to include the call to Python
C# Work for start of process
Provide me with modified C# code to be used to call Python.
Call Python and pass DNN Input parameters created from C# process
Over time, I will certainly modify the input parameters I am sending to Python. Ideally, modifying input parameters should be pretty straight forward
The example file includes two inputs and one output
Instructions for configuring python installation
Determine best setup for Python to receive any number of C# streaming inputs
Keras seems to be a good library from which to call TensorFlow to execute the Neural Network code. I am open to feedback on what the best options are here
Process for allowing Python to listen for the C# call
I am assuming that Python needs to be listening for the C# call. That means I would need to turn python on before I could expect to call it. Some help with error trapping during this process would be nice.
Process inputs sent from C# consistent with a scalar reinforcement as one of those inputs
Send back to C# the DNN output as represented by 14 action states (-7 through 7)
Provide code for several different DNN's with sample code in Python for us to iterate through as we provide different inputs to the DNN from C#
C# Work for end of Process
Provide C# code that will receive the DNN output from Python and make that output available within a C# class
Note: This should be the Action determination produced by the DNN
· Medium article discussing how to call python from within C#: [login to view URL]@[login to view URL]