I have recently go Accord.NET (an Aforge wrapper/add-on) working on NinjaTrader.
To get Accord functioning properly, you will need the ACCORD.NET (3.5 Ver) libraries as well as AForge libraries.
accord - Accord.NET Framework - Google Project Hosting (
aforge - AForge.NET Framework - Google Project Hosting (
If you use the 64Bit version of NT7 you will need to use the version I have compiled and attached. For convenience, I have enclosed the ACCORD & AFORGE libraries as well.
Due to how Accord saves/loads files, the normal location of "bin/custom" for putting the DLLs does not work properly. This is because of the binary stream loading the data and creating the class instance. The system needs to find the DLL in the search path. I have added them into the NinjaTrader install directory (only require the DLL files):
C:\Program Files (x86)\NinjaTrader 7\bin (for 32 bit)
C:\Program Files (x86)\NinjaTrader 7\bin64 (for 64 bit)
How I have tested the system is under 64 bits only. I added the Aforge library (DLLs only) into the "custom" directory but figure it can go into the same program directories above (I think it is 32 bits so would probably be better added in that location).
Once the files are loaded. Open the code editor, right click in the window, and select "References....". Then add the appropriate files as listed. Note, you will likely need to add the "System.data.dll" reference as well:
Once complete, add the following to the NinjaScript file:
using AForge;
using Accord;
using Accord.Math;
using Accord.Statistics.Analysis;
using Accord.Statistics.Kernels;
using Accord.Statistics.Formats;
using Accord.MachineLearning;
using Accord.MachineLearning.VectorMachines;
using Accord.MachineLearning.VectorMachines.Learning;