Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Use Optimizer in Strategy

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

    Use Optimizer in Strategy

    Hello,

    Is it possible to create Optimizer object and use Optimizer results within Strategy?

    Thanks.

    #2
    Hello BobSk,

    Welcome to the NinjaTrader forums!

    Not sure I follow. You can optimize variables with numeric values. The optimization object must be a user defined input (public property). You can create these through the wizard when creating your strategy.

    The link below can also help adding these inputs to code.


    See here for the help guide article on strategy optimization.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank you, I know and use Optimizer Wizard.
      But Optimizer give me results from old data.
      But Market is still changing and I would like to try calculate fresh Optimizer results from last data.
      Can I create such Strategy:
      1. Create instance of Optimizer in Initialize of Strategy
      2. Create instance of Strategy in Initialize of Strategy (instance of the same strategy class)
      3. Link Optimizer and Strategy instance, fill Optimizer parameters and run Optimizer over actual data - all in runtime, in strategy
      4. Get Best Optimizer results and use it in Strategy ( in OnBarUpdate)

      Or is it possible run Optimizer cyclic like Strategy?
      Then Optimizer would calculate fresh optimal parameters over last data and write them somewhere for running Strategy instance.

      Comment


        #4
        Unfortunately this is not supported. Optimization can only be done through the strategy analyzer on an historical basis.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        102 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X