• 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.


No announcement yet.

Partner 728x90


Strategy Analyzer Log tab - View Strategy errors out

  • Filter
  • Time
  • Show
Clear All
new posts

    No, that's not quite what I have been doing. In the open SA window, I'm typically browsing various optimisations I've run. I usually just click the leftmost arrow to open up a walk-forward series, then double-click one of the test periods. Same as I would double-click if I wanted to view say a different Optimisation (not a walk-forward). Walk-forwards clearly need the extra step to get to specific test-run periods to display detail.

    So I just tested your method...interesting results!!

    If I Open in Strategy Analyzer Tab ... it works... I get the trade details, charts etc... BUT...
    If I Open in New Strategy Analyzer... it still fails. Summary only, no trade details. If then, in the new SA window, I do the new Tab thing... that works.

    Enjoy ;


      Hello tgn55,

      Thank you for confirming what I have posted in post #12.

      With the ID provided please check the release notes for this ID as each new release of NinjaTrader 8. Once the ID is listed please test and confirm the behavior is resolved.
      Chelsea B.NinjaTrader Customer Service


        Hi Chelsea... so I looked inside the sdf file, trying to get a handle on where trades from back-test/optimisations are saved. Seems they are not there either... so, not in .sdf nor .xml files.. can you please advise where they are located?



          Hello tgn55,

          Strategy Analyzer Logs are saved in Documents\NinjaTrader 8\strategyanalyzerlogs
          Chelsea B.NinjaTrader Customer Service


            I know that Chelsea... and the trades are NOT saved in that directory. Only the summary data, ie Total Profit, etc... basically the stuff reported in the Summary page. Nothing more.. I would like to know where the actual trades, as displayed in the SA are saved.


              Hello tgn55,

              The logs are saved in that folder. When you click on a log it runs the test again to get the results.

              There is no place orders or trades are saved.
              Chelsea B.NinjaTrader Customer Service


                Ahhh... OK. Wondered why I couldn't sniff them out! I did read that somewhere... but as I was getting results back really very quickly as I moved around the log list, for example if you have a pane showing trades, then click on a different row, it seemed the data must be cached somewhere. Maybe my computer is faster than I thought !!



                  Chelsea... I have an update on the issue of incorrect data being displayed.

                  1. It is NOT restricted to walk-forwards... plain old optimisations also do it.
                  2. I have positively confirmed that the incorrect performance data (and it is VERY incorrect) that is displayed is absolutely NOT anywhere in the XML files under the strategyanalyzerlogs folder
                  3. We already confirmed that each trade is NOT saved in XML... but generated afresh by re-running a backtest. OK...
                  4. If I open an optimisation in a new tab... the right (?) stuff is displayed

                  Conclusion has to be... the invalid data initially displayed is coming from memory.. and is very wrong. Careful inspection/comparison of the two reveals that they show a similar pattern of wins/losses (although the PnLs are quite different, sometimes by a huge amount) UNTIL the session close (which in my timezone is 6:30 AM) Then it just goes crazy for the next several hours. See pics. I think the dramatic change after session close is significant. Lastly, there is a different number of trades !! So it is not simply getting the PnL wrong/different on each trade... it goes deeper than that.

                  As said, opening this in a new TAB fixes it. But, the initial view presented to the user without jumping through any hoops is plain wrong. (or maybe the other view is wrong...) And no walk-forwards involved.

                  This was most graphically illustrated when I did some looking at analysis by exit time, as I just modified my strategy to use "Exit on session close".

                  This is the initial view immediately after optimisation: (Please see the notes I inserted in the pics...)
                  Click image for larger version

Name:	Exit Time Original.png
Views:	40
Size:	79.0 KB
ID:	1071605

                  ...and here is the SAME backtest displayed in a new tab...

                  Click image for larger version

Name:	Exit Time Tab 2.png
Views:	33
Size:	72.7 KB
ID:	1071606

                  Wow. What a difference!!
                  And, BTW... the Summary performance total net profit stat... $14K in one... $22K in the other.

                  Sigh... hope this helps developers to find what is going screwball.

                  Attached Files


                    Hello tgn55,

                    NinjaTrader has been released.

                    Please update to the latest version and confirm the behavior can still be reproduced.
                    Chelsea B.NinjaTrader Customer Service


                      Hi, following up after starting to test 8.0.19... ticket 13842.

                      View Strategy buttons... so they are now greyed out in the Log tab. This is not really a satisfactory fix...
                      Please see the image I attached in reply #13, which clearly states that code snapshots ARE available in the log... and NO MENTION of AI Generated-only.

                      I know the code snapshots are in the strategyanalyzerlogs folder... so it should be real easy to make the "View Strategy button work! The code is there... just need to pull it into the editor when the button is clicked !

                      Image from Ninja documentation repeated here...

                      Click image for larger version  Name:	Hint at View Code in userguide.png Views:	2 Size:	16.6 KB ID:	1071961

                      I can't easily check this, but I'm pretty sure the above wording existed looooong before AI-Generate was even a twinkle in a developers eye ;-)
                      That said... I recognise we may be talking two different things here...not clear if the View Strategy buttons were a recent addition in 8.0.18 along with AI generate...

                      So... can you please re-open the ticket, or raise a new one to get this sorted... and make the behaviour match the documentation?
                      Or I can raise it as a new feature request...

                      I'll reply to the other issue separately after more testing.

                      Last edited by tgn55; 09-25-2019, 12:20 AM.


                        ID 13842 is only partly fixed... or I might say fudged ;-) The buttons in the Log history are now greyed out so no object ref error occurs. But... the functionality is still missing! Ie, I am saying these buttons should NOT be greyed out... just make them display the strategy! Should be a no-brainer, as the code is sitting on the analyserlogs folder already...

                        Confirmed the bomb on right-click on SA Log History heading issue ID 13961 is fixed in 8.0.19.


                          Hello tgn55,

                          Run a backtest.

                          Show the Logs.

                          Right-click the log result for the backtest -> select Open in NinjaScript Editor.

                          Is this the functionality you are referring to that is mentioned in the help guide?
                          Chelsea B.NinjaTrader Customer Service


                            Hey Chelsea, you know I never noticed that option before! This whole thread started when I discovered the "View Strategy" things... (which incidentally is what I was referring to being greyed out now) which I understood would open the cached version of the .cs doc at the time the back-test was performed... terrific, just what I wanted ;-)

                            The Help guide included above does not refer to HOW you get to view the code... just says you can do it. I found what I believed was the method by poking around... probably just browsing the options in the right-click preferences view.

                            You know, I'm going to have to follow this up tomorrow... it's after 3AM where I am, and last night i was up the whole night... yep... traded straight through. This may be the solution I am looking for... but I need some shut-eye !!



                              Hello T,

                              I have received tracking ID# SFT-4286 for this request for the View Code button to also work with backtests and optimizations.

                              Please note it is up to the NinjaTrader Development to decide if or when any request will be implemented.

                              We appreciate your feedback on this.
                              Chelsea B.NinjaTrader Customer Service


                                Great - thanks for following up.

                                I finally did get to test myself the "Open in NS Editor" thing ... yes, it does exactly what I was looking for a way back, so that's a win... Thanks.


                                Latest Posts


                                Topics Statistics Last Post
                                Started by Benjaminf, Today, 02:21 PM
                                1 response
                                Last Post NinjaTrader_Kate  
                                Started by grayfrog, 05-24-2020, 09:29 PM
                                4 responses
                                Last Post natgasguy  
                                Started by chrismcdermut, Today, 01:46 PM
                                1 response
                                Last Post NinjaTrader_Kate  
                                Started by dpolyakov, Today, 01:13 PM
                                3 responses
                                Last Post dpolyakov  
                                Started by tjendra, Today, 12:15 PM
                                3 responses
                                Last Post tjendra
                                by tjendra