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 PaulMohn, Today, 03:49 AM
        0 responses
        7 views
        0 likes
        Last Post PaulMohn  
        Started by inanazsocial, Today, 01:15 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by rocketman7, Today, 02:12 AM
        0 responses
        10 views
        0 likes
        Last Post rocketman7  
        Started by dustydbayer, Today, 01:59 AM
        0 responses
        4 views
        0 likes
        Last Post dustydbayer  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        5 responses
        23 views
        0 likes
        Last Post trilliantrader  
        Working...
        X