Does anybody know how to access the MFE and MAE encountered by a single trade from within NinjaScript?
The context of my question is for use in a custom optimization type, where my override of the GetPerformanceValue method needs to access the MAE (Maximum Adverse Excursion) and MFE (Maximum Favourable Excursion) values for each individual trade.
The TradesPerformance interface permits access to AvgMfe and AvgMaE values for TradeCollection objects (through either .Points or .Percent or .Currency, e.g. systemPerformance.AllTrades.TradesPerformance.Perc ent.AvgMfe). However, no such interface seems to exist for Trade objects (e.g. systemPerformance.AllTrades[0])
So, we seem to have the situation where I can access an average of MFE and MAEs but not the individual values themselves! Obviously, NinjaTrader itself can access these values, as it can chart them in StrategyAnalyzer, and give the value for each if you roll the mouse over any individual datapoint.
Is there a method I have overlooked or an undocumented access that anybody is aware of?
I understand this may be outside the scope of support NinjaTrader folks can offer, but all help is greatly appreciated!
Kind Regards,
Dan
Comment