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:

    https://ninjatrader.com/support/help...nstruments.htm

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    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 Realsmooth3, Yesterday, 09:10 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by wooofad, 06-15-2020, 01:08 PM
      8 responses
      92 views
      0 likes
      Last Post echoxray  
      Started by bubblegum, Today, 12:00 AM
      0 responses
      2 views
      0 likes
      Last Post bubblegum  
      Started by eseorvuda, Yesterday, 10:28 PM
      0 responses
      2 views
      0 likes
      Last Post eseorvuda  
      Started by ctrent, Yesterday, 09:58 PM
      0 responses
      5 views
      0 likes
      Last Post ctrent
      by ctrent
       
      Working...
      X