Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator with both overlay and separate pane

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

    indicator with both overlay and separate pane

    I'm a newbie to Ninjatrader.

    Suppose I have an indicator where I have two lines, e.g. two moving averages that I need to draw over the price and a third indicator, e.g. difference of two moving averages that I want to draw on a separate pane. How can I do this?

    From browsing the documentation, the way to choose overlay or not is to put a line

    Overlay = true;

    in the Initialize() function/method, e.g.

    protected override void Initialize()
    {
    Add(new Plot(Color.Orange, "SMA1"));
    Add(new Plot(Color.Orange, "SMA2"));
    Add(new Plot(Color.Orange, "SMADiff"));
    Overlay = true;
    }

    How can I change this to allow overlay for some plots (e.g. SMA1, SMA2) and a separate pane for others (e.g. SMADiff) ?

    #2
    Hello uday12,

    Thanks for your post.

    Regrettably this is not possible (plotting in more than one panel in the same indicator). The solution here would be to separate into two indicators. Alternative would be to manually add the SMAs to the main panel and use the indicator to show the difference in an added panel.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    129 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    74 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    116 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    111 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    89 views
    0 likes
    Last Post CarlTrading  
    Working...
    X