Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to pass an added data series into a loaded indicator?

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

    Is it possible to pass an added data series into a loaded indicator?

    I have a chart that has a main data series of 10 minute candles

    On this chart I have an indicator that I built.

    Inside of this indicator, I would like to pull in dynamically another indicator, but I want that other indicator to use a data series of say 50 minute candles or something bigger.

    Is there a way to do that when I initialize the dynamically loaded indicator inside of the indicator where I pass in the data series I want it to use so that it doesnt use the default chart 10 minute data series?


    #2
    Hello ErikY,

    Thank you for your note.

    When you say "pull in dynamically another indicator, do you mean you're calling the indicator inside your indicator, and you want to have it use an added data series?

    Yes, you can do that.

    For example, if I added a 50 minute data series in State.Configure in an indicator like so:

    else if (State == State.Configure)
    {
    AddDataSeries(BarsPeriodType.Minute, 50);
    }

    I could then use that then to call the SMA and specify the bars array to calculate the SMA from:

    mySMAValue = SMA(BarsArray[1], 14);

    I'd recommend reviewing this section of our help guide on Multi-series scripts as it goes over calculating indicators from added data series:



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

    Comment


      #3
      Awesome, thanks, exactly what I was hoping to do. I will also read up on that section. Much appreciated

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      68 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      55 views
      0 likes
      Last Post CarlTrading  
      Working...
      X