Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Why can't i display the indicators in the strategy analyzer?

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

    Why can't i display the indicators in the strategy analyzer?

    Hi,
    I'm running a strategy in the strategy analyzer, and it was coded to display all the relevant indicators on the chart.
    And still, when i use the analyzer, i see nothing but the trades itself.

    Is it a bug or am i doing something wrong?

    thank you,

    Offer

    #2
    Hello Offer,

    Thanks for your post.

    What version of NT8 are you using? (Help>About)

    If you add your strategy to a chart of live data, do the indicators appear?

    Do you see any error messages listed in the "log" tab of the control center when you apply or run the strategy?

    Please test with the strategy SampleMACrossover, do you see the moving averages on the strategy analyzer chart when you backtest the strategy?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      The problem could be due to ChartControl being null.

      Comment


        #4
        Hi,

        I'm using the latest version of NT8.
        Yes i can see the indicators in the sample MA strategy.
        I don't see the indicators on live data and there is no error in the log.

        My programmer says it might be related to ChartControl being null.

        How can it be solved?

        thanks

        Comment


          #5
          Hello Offer,

          Without directly observing the code I would not be able to say. Please post your strategy and indicators so we can test on our end, or provide a smaller demonstration strategy/indicator combination that presents the issue.

          Alternatively, if you would prefer not to post in a public forum, please feel free to send into PlatformSupport[at]NinjaTrader[dot]Com mark the e-mail Atten:Paul and include a link to this thread.
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            My programmer has confirmed that ChartControl is null in the strategy analyzer.
            is this behavior is intended?

            Comment


              #7
              Hello offeraz,

              Thanks for your post.

              As the SampleMACrossover demonstrated that indicators do show in the strategy analyzer chart, it would suggest there may be something with the custom coding. We recommend reviewing the helpguide here: http://ninjatrader.com/support/helpG.../?onrender.htm with particular scrutiny towards the section: "Calling the base.OnRender() method to ensure Plots are rendered along with custom render logic"
              Paul H.NinjaTrader Customer Service

              Comment


                #8
                In the Strategy Analyzer ChartControl is null and Draw.Triangle throws a NullReferenceException. The following line in @Shapes.cs throws it:

                midAnchor =
                newChartAnchor((owner as Gui.NinjaScript.IChartBars).ChartBars.GetTimeByBarIdx(chartControl, currentBar - midBarsAgo), midY, currentBar, chartControl);

                Comment


                  #9
                  Hello YuriyGulyayev,

                  Thank you for your response.

                  It is expected that ChartControl is null on the Strategy Analyzer. I am checking with development for alternatives for the Chart Display on the Strategy Analyzer.

                  Comment


                    #10
                    It's OK that ChartControl is null, but it's not OK that Draw.Triangle throws an exception.

                    Comment


                      #11
                      Hello YuriyGulyayev,

                      Thank you for your patience.

                      We are looking into the drawing tools under case id NTEIGHT-11830.

                      Comment


                        #12
                        Originally posted by YuriyGulyayev View Post
                        It's OK that ChartControl is null, but it's not OK that Draw.Triangle throws an exception.
                        Hello YuriyGulyayev,

                        Thank you for your patience.

                        A planned fix for this item should be seen in the next release of NinjaTrader 8. Please let me know if you would like to test an internal build for this item by writing to me at platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H' in the subject line and a reference to this thread, or you can reply to our previous email conversation.

                        Please let me know if you have any questions.

                        Comment


                          #13
                          Thank you for fixing this.
                          Now there is another problem. All draw objects created by indicators that have not been added to the chart by calling AddChartIndicator are now always visible in the strategy analyzer. Is this behavior by design?

                          Comment


                            #14
                            Hello YuriyGulyayev,

                            Thank you for your post.

                            So these drawing objects are from indicators that are manually added to the Chart? Can you provide a screen shot of this?

                            I look forward to your response.

                            Comment


                              #15
                              Nothing is manually added. It's in a strategy analyzer chart only. On a regular chart everything works correct. The strategy creates a bunch of indicators. Some indicators create other indicators. All indicators are created by calling the indicator method, such as MyIndicator(...), when State becomes Historical or Configure. The strategy calls AddChartIndicator for only some of the created indicators, but regardless of that all indicators draw objects become visible. At least Draw.RegionHighlightX become visible.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Barry Milan, Yesterday, 10:35 PM
                              3 responses
                              10 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by WeyldFalcon, 12-10-2020, 06:48 PM
                              14 responses
                              1,428 views
                              0 likes
                              Last Post Handclap0241  
                              Started by DJ888, 04-16-2024, 06:09 PM
                              2 responses
                              9 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by jeronymite, 04-12-2024, 04:26 PM
                              3 responses
                              41 views
                              0 likes
                              Last Post jeronymite  
                              Started by bill2023, Yesterday, 08:51 AM
                              2 responses
                              16 views
                              0 likes
                              Last Post bill2023  
                              Working...
                              X