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

How to force two indicators on same panel from strategy?

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

    #16
    Hello PN720,

    This is expected in the strategy analyzer and the ability to plot in separate panels is being tracked as a feature request I will add your vote to.

    More information,

    The strategy analyzer chart in NinjaTrader 8 is a feature limited chart, which you can see by right-clicking on an indicator in the chart and selecting properties. This is an intentional change from NinjaTrader 7. Users who want more control over how Indicators are displayed will want to run their strategies with the Playback connection.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #17
      Hi Alan,

      Sorry to revisit this again but I wanted to confirm. Does this not work in the latest NJT 8 version? For example, I'm trying to put 2 EMAs in a new panel and they still appear in the price panel.
      This is from the sample MA Crossover that I've just changed over to EMA.

      emaFast = EMA(Fast);
      emaSlow = EMA(Slow);

      emaFast.Plots[0].Brush = Brushes.Lime;
      emaSlow.Plots[0].Brush = Brushes.Yellow;

      emaFast.Panel=2;
      emaSlow.Panel=2;

      AddChartIndicator(emaFast);
      AddChartIndicator(emaSlow);
      Attached Files

      Comment


        #18
        Hello PN720,

        Thank you for your response.

        This will work on charts opened from the NinjaTrader Control Center > New > Charts menu.

        This will not work on the Strategy Analyzer charts.

        Please let me know if you have any questions.

        Comment


          #19
          Hello,


          Has this been resolved - I also do NOT get what Alan P shows. I have applied Alan's script, and I also get what PN720 shows.

          Comment


            #20
            Hello jaf123,

            If you go to Control Center>Help>About, what version of NinjaTrader are you on? For example, 8.0.14.1.

            I look forward to your reply.
            Alan P.NinjaTrader Customer Service

            Comment


              #21
              Hello Alan,


              My version is 8.0.15.1 64-bit , I believe that is current.


              However, I should have been more specific. PatrickH wrote in a reply above:


              "This will work on charts opened from the NinjaTrader Control Center > New > Charts menu.
              This will not work on the Strategy Analyzer charts."


              I was wondering if it will ever become possible on Strategy Analyzer charts. It would certainly be useful to programmatically plot on more than one indicator panel for back testing.

              Comment


                #22
                Hello jaf123,

                Its currently being tracked for interest.

                I will add your vote to SFT-3258.

                Please let us know if you need further assistance.
                Alan P.NinjaTrader Customer Service

                Comment


                  #23
                  Hey guys,

                  I have a follow-up question..

                  Since it is not yet supported in Strategy Analyzer, one thing I wanted to do as a workaround is to put 2 indicators in 1 combined indicator (i.e. 2 plots, 10EMA, 20EMA). Is there a reference sample or something available that I can look at it to see how this is done?
                  Last edited by PN720; 09-25-2018, 10:37 PM.

                  Comment


                    #24
                    Hello PN720,

                    Attached is an indicator which has two plots, a 50 day SMA and 200 Day SMA.

                    Please let us know if you need further assistance.
                    Attached Files
                    Last edited by NinjaTrader_AlanP; 09-26-2018, 07:49 AM.
                    Alan P.NinjaTrader Customer Service

                    Comment


                      #25
                      Hi Patrick,

                      Originally posted by NinjaTrader_PatrickH View Post
                      Hello PN720,

                      Thank you for your response.

                      This will work on charts opened from the NinjaTrader Control Center > New > Charts menu.

                      This will not work on the Strategy Analyzer charts.

                      Please let me know if you have any questions.

                      It is clear that the ability to plot two indicators on the same panel is not supported in the Strategy analyzer. However, you claim that by opening the chart through Control Center > New > Charts menu the strategy is able to plot two indicators on the same panel.

                      This is not what I experience. I am running 8.0.15.1 64-bit and when I use the code from Alan (attached on the below response) the indicators are plotted in different panels

                      Originally posted by NinjaTrader_AlanP View Post
                      Hello PN720,

                      Thank you for your note.

                      When I apply the code you provided both plot in the 1st extra panel applied to the chart.

                      If you import the attached strategy, are you seeing differently?

                      What version of NinjaTrader 8 are you running? Control Center>Help>About?

                      I look forward to your reply.
                      Last edited by xbionicx; 02-20-2019, 08:33 AM.

                      Comment


                        #26
                        Hello xbionicx,

                        Below is a link to an example of a strategy that places indicators in different panels.
                        https://ninjatrader.com/support/foru...592#post788592

                        For an example of a strategy that places indicators in the same panel, take a look at the SampleMACrossOver strategy that is included with NinjaTrader.


                        Also, please update to the latest version of NinjaTrader 8 (8.0.17.2).

                        Updates to NinjaTrader will contain the latest security updates and bug fixes, as well as new instruments and rollover dates.

                        To update NinjaTrader
                        • Shutdown all programs including NinjaTrader
                        • Download NinjaTrader from the public link below
                          Click here to download NinjaTrader
                        • Double click the downloaded file to execute it
                        • Follow the on screen instructions
                        • Restart NinjaTrader
                        Below is a link to the release notes.
                        https://ninjatrader.com/support/help...ease_notes.htm
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #27
                          I just retried the sample code I attached with my original first post and am happy to report that it works as expected.
                          I am running: 8.0.16.3 64-bit

                          Thanks Ninja folks for fixing this.

                          Gary Albers

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by EB Worx, 04-04-2023, 02:34 AM
                          7 responses
                          161 views
                          0 likes
                          Last Post VFI26
                          by VFI26
                           
                          Started by Mizzouman1, Today, 07:35 AM
                          1 response
                          6 views
                          0 likes
                          Last Post NinjaTrader_Gaby  
                          Started by Radano, 06-10-2021, 01:40 AM
                          20 responses
                          616 views
                          0 likes
                          Last Post NinjaTrader_BrandonH  
                          Started by i019945nj, 12-14-2023, 06:41 AM
                          6 responses
                          68 views
                          0 likes
                          Last Post i019945nj  
                          Started by aa731, Today, 02:54 AM
                          1 response
                          8 views
                          0 likes
                          Last Post NinjaTrader_BrandonH  
                          Working...
                          X