• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 B6 Strategy Analyzer optimizer bug

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

    NT8 B6 Strategy Analyzer optimizer bug

    Hello,

    I am testing a multi-instrument strategy using the Strategy Analyzer and experiencing some odd behavior.

    The primary bars object is the instrument I wish to trade (ES), and the secondary object is used to identify entries (^VIX).

    When I run a simple backtest using the strategy analyzer, it works as expected and trades are made in ES, but when I switch to optimization and run the optimizer, it tries to trade on the secondary bars object (^VIX in this case) and hence the results are garbage.

    Thanks!

    #2
    Hello,
    Thank you for your post.
    Do you see the same outcome with running the SampleMultiInstrument strategy?
    Can you provide the strategy that you ran?
    You can attach your Strategy to your response by going to Tools> Export ? NinjaScript > select your Strategy> > Export. The file will be located under (My) Documents\NinjaTrader8\bin\Custom\ExportNinjaScrip t.
    What optimization settings did you have selected?
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Yes I can reproduce this behaviour in your sample multi-instrument strategy (once I added some parameter fields, since the template has none), but it is kind of intermittent. It initially seems to work OK, then when you change the optimizer settings (eg. optimize on) and re-run you get the garbage results I described.

      Theres not much point adding my strat here as its based off of your template, I just added 4 parameters for optimization and changed the indicators used etc..

      Comment


        #4
        Hello,
        So I may reproduce this on my end can you provide a screenshot of your optimizer settings you receive this with?
        To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

        Click here for instructions

        Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

        Click here for detailed instruction
        Cody B.NinjaTrader Customer Service

        Comment


          #5
          JPEGs

          OK here are two captures, the first is the results of the initial optimization using max. profit, the second is the result after I change the optimizer to max. Sharpe ratio. Note in the second that the trades are in ^VIX instead of ES.
          Attached Files

          Comment


            #6
            Hello ours_solaire,

            In the SampleMultiInstrument strategy nothing specifies what instrument to take the trade on, so an optimization can produce trades on the secondary instrument.

            You can control this by submitting the orders specifically to the barsInProgress index needed. For example, you can use the EnterLongLimit() below to enter only on the primary series:
            Code:
            EnterLongLimit(0, true, 1, GetCurrentAsk(), "RSI");
            Patrick H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Jschmelz, Yesterday, 04:45 PM
            1 response
            18 views
            0 likes
            Last Post NinjaTrader_Marco  
            Started by sisenberg, Today, 07:29 AM
            1 response
            9 views
            0 likes
            Last Post sisenberg  
            Started by Oceans, Today, 02:22 AM
            2 responses
            25 views
            0 likes
            Last Post Oceans
            by Oceans
             
            Started by sisenberg, Yesterday, 08:06 PM
            1 response
            25 views
            0 likes
            Last Post sisenberg  
            Started by PLeary, Today, 06:25 AM
            1 response
            18 views
            0 likes
            Last Post NinjaTrader_SergeyS  
            Working...
            X