Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing panel where indicator added to chart by strategy will appear

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

    Changing panel where indicator added to chart by strategy will appear

    I suspect this will end up being a question for the forum community, because I'm pretty sure I'm dabbling with undocumented and therefore unsupported features. Nevertheless:

    When an indicator is added to a chart via a call to the Add() method in a strategy's Initialize() routine, is there a way to get that indicator to appear in a new panel?

    In Ninja 7 beta 23 I did this within OnStartUp():

    Code:
    for( i = 0; i < Indicators.Count; ++i )
    {
        if( Indicators[i].Name == "[I]<name of indicator I'm after>[/I]" )
        {
            // Use just one of the following two lines? Use both?
            Indicators[i].Panel = 2;
            Indicators[i].PanelUI = 2;
            break;
        }
    }
    And in fact this worked fine when I only had one indicator that I didn't want in panel 1. (I have a few indicators in panel 1, too.) But things got wacky when I did the above again with another indicator and specified panel 3, and "Error on calling 'GetYByValueFromPanel' method: index has to be smaller than length." was thrown.

    So back to the original question: Can a strategy designate the panel in which an indicator should appear?

    #2
    Hi Mike, indicators are Add() in Initialize() so you want to assign a panel then there, too - http://www.ninjatrader.com/support/f...ead.php?t=3228

    Comment


      #3
      Like they say, there's nothing so complicated that a little thought and ingenuity can't make it more complicated. I'm pleased to learn there's a simple solution.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      631 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      364 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      566 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      568 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X