Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to add indicator for different data series other than Price

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

    How to add indicator for different data series other than Price

    Hey guys,

    I have a simple question.

    I want to add an indicator to a strategy but have it point to a different series other than Price and I want that indicator and subsequent indicators to appear in Panel 2. How can I do this?

    Example for 2 indicators that I want to point to RSI instead of price and both indicators to appear in Panel 2:

    private SUM SUMInd1;
    private SUM SUMInd2;

    SUMInd1 = SUM(13);
    AddChartIndicator(SUMInd1);

    SUMInd2 = SUM(8);
    AddChartIndicator(SUMInd2);
    Last edited by PN720; 12-22-2019, 11:19 AM.

    #2
    Hello PN720,

    Thank you for your post.

    For pretty much all indicators, there will be an overload that will allow you to specify the data series for use with that instance of the indicator. For example:

    Code:
    // Prints the current value of a 20 period SUM using high price type
    double value = SUM(High, 20)[0];
    Print("The current SUM value is " + value.ToString());
    To clarify on the plotting part, you're trying to plot multiple indicators to panel 2 from within your strategy, is that correct?

    This example from our help guide goes over plotting from within a strategy: https://ninjatrader.com/support/help..._a_ninjasc.htm

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X