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 NullPointStrategies, Today, 05:17 AM
    0 responses
    52 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    70 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    48 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X