Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Want to use something other than SystemPerformance in an OptimizationType

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Want to use something other than SystemPerformance in an OptimizationType

    I've developed a learning algorithm, and I want to port it directly into NinjaTrader. I want to use the optimizer to basically control the learning of the algorithm for future strategy use. I'm trying to pass my neural network to an OptimizationType (i.e.: System Quality Number || Net Profit per Trade), but as far as I know, optimization types can only accept an argument of SystemPerformance. While this makes perfect sense, I was wondering if there was a way I could pass my neural network in there, either by attaching it to the SystemPerformance instance somehow or by getting the optimization type to accept something other than SystemPerformance.

    Here's basic OptimizationType code:

    Code:
    using System;
    using NinjaTrader.Gui.Design;
    using NinjaTrader.Strategy;
    
    namespace MoGo.NinjaTrader.OptimisationMeasures
    {
        /// <summary>
        /// </summary>
        [DisplayName("MoGo Entry Efficiency")]
        public class entryeff : OptimizationType
        {
            /// <summary>
            /// Return the performance value of a backtesting result.
            /// </summary>
            /// <param name="systemPerformance"></param>
            /// <returns></returns>
            public override double GetPerformanceValue(SystemPerformance systemPerformance)
            {
                var entryefficiency = systemPerformance.AllTrades.TradesPerformance.Currency.AvgMfe;
                return entryefficiency;
            }
        }
    }
    I would like to change the GetPerformanceValue argument to accept the following:

    Code:
    /// <returns></returns>
            public override double GetPerformanceValue(BasicNetwork mynetwork)
            {
    I guess I'm just fuzzy on the how.

    I'm using Matt Craig's badass MoGo optimizer as a starting point, if anyone has experience.

    Note: I know this doesn't fall under standard support, feel free to ignore this if you must regular support team.

Latest Posts

Collapse

Topics Statistics Last Post
Started by CaptainJack, 05-29-2026, 05:09 AM
0 responses
475 views
0 likes
Last Post CaptainJack  
Started by CaptainJack, 05-29-2026, 12:02 AM
0 responses
315 views
0 likes
Last Post CaptainJack  
Started by charlesugo_1, 05-26-2026, 05:03 PM
0 responses
253 views
1 like
Last Post charlesugo_1  
Started by DannyP96, 05-18-2026, 02:38 PM
1 response
340 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 05-11-2026, 05:56 AM
0 responses
305 views
0 likes
Last Post CarlTrading  
Working...
X