Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

loading a chart with two DataSeries

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

    loading a chart with two DataSeries

    why when loading a chart with two DataSeries objects (selected from the new chart wizard), the BarsArray still holds just the primary Bars object?

    i imagine it takes the primary and any addition made via Add(), but is there a way to manually add the loaded DataSeries objects to it? maybe even run it by Add()...

    #2
    Hello savekad,
    To assist you further may I know are you trying to load data for another instrument via the Add method.

    If you you can use the below overload to do it
    Add(string instrumentName, PeriodType periodType, int period)


    The below overload will always refer to the primary bar series.
    Add(PeriodType periodType, int period)
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      i want to load two instruments, early at the stage of opening a new chart, so later, a script will be loaded and the instruments will be accessible to it from BarsArray or other container.

      i don't, however, want to use Add() to add the second instrument when loading the script.

      Comment


        #4
        Hello savekad,
        We only advise to use the Add method to refer to any additional instrument.

        You can however refer to the additonal bars on the chart using the below unsupported codes.
        Code:
        ChartControl.BarsArray[0]		//refers to the primary bar on the chart	
        ChartControl.BarsArray[1]	        //refers to the secondary bar on the chart
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          you the man.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          581 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          338 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X