Coming from Python and being relatively new in C#, I thought it would be helpful to have an example strategy that utilizes the Accord.NET machine learning library. Since I couldn't find any good examples, I coded one myself.

This strategy trains a Linear SVM (Support Vector Machine) with historical returns. Then at the open of the market, it attempts to predict whether the market will close UP or DOWN. If the trend is predicted to be UP, we enter a LONG position. If the trend is DOWN, we exit the market. If we are already in a LONG position, we do nothing. As mentioned, I am quite new to C#, so there might be bugs and there is certainly room for improvement. Would be nice to discuss possible improvements/ideas here.