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 arvidvanstaey, Today, 02:19 PM
        4 responses
        11 views
        0 likes
        Last Post arvidvanstaey  
        Started by samish18, 04-17-2024, 08:57 AM
        16 responses
        61 views
        0 likes
        Last Post samish18  
        Started by jordanq2, Today, 03:10 PM
        2 responses
        9 views
        0 likes
        Last Post jordanq2  
        Started by traderqz, Today, 12:06 AM
        10 responses
        18 views
        0 likes
        Last Post traderqz  
        Started by algospoke, 04-17-2024, 06:40 PM
        5 responses
        48 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X