Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Advanced: Automate the Optimization Process

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

    Advanced: Automate the Optimization Process

    I've been creating strategies and now have several strategies with many variables to optimize, each at different times in the past. Optimization makes life easier, but it can still be quite tedious. I'd like to make an optimization code that takes each parameter and runs an optimization with the range of say 1-1000 in 100 increments, takes the best values, and runs 1-100 at 10 increments.... till it zeroes in on the best value for each. Essentially, an automated optimization procedure. Now, I know the staff will say it is possible with more advanced C# programming.... but perhaps there are some out there who have thought of and/or achieved this very thing? My programming skills aren't that deep yet. To start, I would need to call a backtest in the code and process the results. From there, it should be fairly straight forward. Staff/experts, is there a way to call backtesting in the programming?

    Thanks,
    - Daniel

    #2
    Does NinjaTrader have a SDK for third parties to develop plugins? Or an API?

    Comment


      #3
      Daniel, unfortunately there's no programmatic access to the Strategy Analyzer routines - we do have availabe the AT interface for managing / executing externally generated trades -

      BertrandNinjaTrader Customer Service

      Comment


        #4
        Originally posted by DanielB View Post
        I'd like to make an optimization code that takes each parameter and runs an optimization with the range of say 1-1000 in 100 increments, takes the best values, and runs 1-100 at 10 increments.... till it zeroes in on the best value for each.
        What you are looking for is sometimes called a "grid search optimizer". You usually have two basic parameters to the optimizer. The first is the number of subsets of the current search space (10 in your case, coming form 1000/100) to look at and then the number of sub-searches to make (1 in your case because you do a second search in increments of 10).

        NT 6.5 and 7 have the ability to plugin custom optimizers. Unfortunately, this process isn't documented or supported, so you have to look at existing examples to get some hints. For some initial help, see here:


        I'm getting this error as the optimizer starts on one strategy: There are no optimization results available, since the strategy has no parameters to optimize. GSPC: PH Genetic Optimizer Start @ 5/1/2010 3:10:06 PM, combinations: 0 System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.ThrowHelper.ThrowArgumentOutOfRangeException() …


        If you want something like this but don't have the ability/time to do it yourself, one of the programmers listed here might be able to help:

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        11 views
        0 likes
        Last Post XXtrader  
        Started by Waxavi, Today, 02:10 AM
        0 responses
        6 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        11 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        7 views
        0 likes
        Last Post elirion
        by elirion
         
        Working...
        X