As this is a bit different than creating a strategy or indicator, its not quite as easy to tell if things are working correctly and I wouldn't mind if a few people (especially those familiar with expectancy) could test to see if this works.
Expectancy is based on the work of Van K. Tharp and although I found a few different formulas for it, the only one I could seem to get working was by the forum member 'anachronist'.
-Save this file to your '\NinjaTrader 6.5\bin\Custom\Type' folder.
-Compile any existing NinjaScript.
-Select 'max. expectancy' for the 'Optimize On' setting in the Strategy Analyzer/Optimize window
*(old version removed)
Comment