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

One instance of an indicator displayed on more panels

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

    One instance of an indicator displayed on more panels

    Hello,

    is it possible to display one instance of an indicator on 3 panels?
    I have an indicator which contains 3 different plots. Displaying of every plot is conditioned by bool variable. Let´s say that I would like to plot all of them. Do I need to add 3 instances of the indicator (every to a new panel), or is it possible to maintain it by script?

    Thank you

    #2
    Hello emuns,

    Thanks for your question.

    Indicators can only plot to one panel, that can be the Price Panel or the indicator can create its own panel. This is controlled by IsOverlay.

    To plot to additional panels, you could create an indicator that hosts your main indicator and uses IsOverlay = false. This indicator can then plot the plots of the indicator it is hosting, and those plots would appear in a new panel.

    IsOverlay - https://ninjatrader.com/support/help...?isoverlay.htm

    Please let me know if I can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,

      you could create an indicator that hosts your main indicator and uses IsOverlay = false
      beeing familiar with SampleStrategyPlot and SamplePanelPlot, I tried to imitate it like below, where MyIndic1 is on price panel and MyIndic2 is the indicator we try to plot on a second panel.
      Code:
      else if (State == State.Configure)
      {
                      myPanel2Plot = MyIndic2();
                      myPanel2Plot.MyIndic1= this;
                      AddChartIndicator(myPanel2Plot);
      }
      AddChartIndicator() does not compile in the indicator class.
      How should we proceed to host between two indicators like suggested ?

      Comment


        #4
        AddChartIndicator only works in a strategy. Maybe NinjaTrader_Jim meant to create a strategy that hosts your indicator?
        Bruce DeVault
        QuantKey Trading Vendor Services
        NinjaTrader Ecosystem Vendor - QuantKey

        Comment


          #5
          Hello Amedeus,

          Thanks for your notes.

          AddChartIndicator() can only be used in NinjaScript strategies as QuantKey_Bruce mentioned.

          Indicators can only plot in one panel determined by IsOverlay.

          IsOverlay: https://ninjatrader.com/support/help.../isoverlay.htm

          It is advised to create 2 separate indicators if you want plots to appear on separate panels. One that plots to the Price Panel and one that plots to a new indicator panel.

          It is possible to have a strategy place the indicators in a specified panel, but this is possible because the added indicators are managed by the strategy.

          Plotting from within a NinjaScript Strategy: https://ninjatrader.com/support/help...asc.htm​
          Brandon H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by fwendolynlpxz, Today, 05:19 AM
          0 responses
          1 view
          0 likes
          Last Post fwendolynlpxz  
          Started by traderqz, Yesterday, 12:06 AM
          11 responses
          27 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by PaulMohn, Today, 03:49 AM
          0 responses
          8 views
          0 likes
          Last Post PaulMohn  
          Started by inanazsocial, Today, 01:15 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by rocketman7, Today, 02:12 AM
          0 responses
          11 views
          0 likes
          Last Post rocketman7  
          Working...
          X