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()...
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
loading a chart with two DataSeries
Collapse
X
-
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()...Tags: None
-
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
-
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
-
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
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by johnMoss, 03-04-2024, 01:53 PM
|
3 responses
46 views
0 likes
|
Last Post
by AndyM
Today, 06:13 PM
|
||
Started by algospoke, Today, 06:01 PM
|
0 responses
8 views
0 likes
|
Last Post
by algospoke
Today, 06:01 PM
|
||
Started by cre8able, Today, 05:53 PM
|
0 responses
8 views
0 likes
|
Last Post
by cre8able
Today, 05:53 PM
|
||
Started by Wessel, 03-23-2024, 02:37 PM
|
3 responses
24 views
0 likes
|
Last Post Today, 04:58 PM | ||
Started by martini, Yesterday, 04:45 PM
|
4 responses
32 views
0 likes
|
Last Post
by martini
Today, 04:48 PM
|
Comment