Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to create a multi-array dataseries

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

    how to create a multi-array dataseries

    Hey I am new here and trying to build a dataseries with multiple arrays in my strategy, but not quite sure how to do this.

    What I am trying to do is using multiple instruments (9 stocks), calculate each instrument's SMA and assign the value to its corresponding dataseries. Such as SMADataSeries[i][j][k], where i refers to the instrument index, j means its SMA value, while k stands for BarAgo.

    How can I do it in variable declaration and initial part?
    like this?
    private DataSeries [8][][];

    Thanks a lot!

    #2
    Hello cationic,

    Please see here for a tutorial on DataSeries.

    See here for help with multiple series.


    DataSeries are arrays, synced to each bar object. You don't have to create the array structure as the standard data series should do everything you need.

    To set a DataSeries array for the secondary series SMA, you would use something like this:

    myDataSeries.Set(SMA(Closes[1], Period)[0]
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks a lot!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      605 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      351 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      560 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      561 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X