Is there a way to programatically detect how many series are active on a chart, the instruments and their times and types? For example, suppose I create a chart with 5 min ES candlestick chart (primary series), a 1000V HiLo bar chart of ES, and a 500 Tick Box chart of NQ. Can I retieve this info programatically? Thanks for any suggestions.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multi Series Programming
Collapse
X
-
Multi Series Programming
Hi,
Is there a way to programatically detect how many series are active on a chart, the instruments and their times and types? For example, suppose I create a chart with 5 min ES candlestick chart (primary series), a 1000V HiLo bar chart of ES, and a 500 Tick Box chart of NQ. Can I retieve this info programatically? Thanks for any suggestions.Tags: None
-
Hello Zeos6,
Yes, you can do so using the unsupported ChartControl class.
Unfortunately the ChartControl class is not officially supported and thus not documented.Code:ChartControl.BarsArray[0]; //returns the primary series ChartControl.BarsArray[1]; //returns the secondary series
JoydeepNinjaTrader Customer Service
-
Hi Joydeep,
Thank you. I am aware of those ChartControl objects. It provides more info than I need, but the chart type has to be obtained separately. I simply thought there might be a cleaner way to get this info.
However, is there any way to determine how many data series are present?
Thank you.
Comment
-
Hi Joydeep,
One additional issue came up for me. When you have a multi data series chart and add an indicator, say an EMA, you can add the indicator for each of the data series in the chart - there is an Input Data Series option in the indicator parameters.
1. Is there a way to create an Input Data Series input variable parameter for use in custom code so that the code will only run on that data series in a multi data series environment?
2. Give a data series in a multi data seies chart, is there a way to determine its BarrsArray[Index] value?
Any help would be greatly appreciated. Thank you.
Comment
-
Hi Joydeep,
The issue is as follows:
Some of the indicators, for example EMA, allow you to specify the input series to be used with that indicator. How can I specify the input series to be used with a custom indicator and get the BarsArray index of that input series for use in a multi data series/mullti instrument chart?
Based on the EMA code it would appear that the Input series input indicator parameter is linked to the Value data series objects. Is that correct?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, Yesterday, 10:06 AM
|
0 responses
20 views
0 likes
|
Last Post
by argusthome
Yesterday, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
18 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
14 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
9 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
38 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment