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
Multi-Series Indicators and Duplicate AddDataSeries
Collapse
X
-
Hello ntbone,
Yes, NinjaTrader caches the series objects and does not technically duplicate them. However, the indexes remain, and OnBarUpdate will still run for both of the duplicated series.
Leave a comment:
-
That's not what I was querying, nor what my conculsion was.
If I have a 1 minute chart, and I have a call to AddDataSeries(BarsPeriodType.Minute, 1); the BarsArray[0] will be the exact same object as BarsArray[i] for the index which correlates to AddDataSeries call. It doesn't appear to generate a separate object but puts the reference to the same object in both slots of the BarsArray[].
I would also expect, if for some odd reason, I called AddDataSeries(BarsPeriodType.Minute, 1) twice in a row, that the object in the BarsArray[] for both series would be the same object.Last edited by ntbone; 02-28-2021, 11:52 PM.
Leave a comment:
-
Hello ntbone,
It is expected that there will be a BarsInProgress and BarsArray index for the primary series and for each series added with AddDataSeries.
Leave a comment:
-
I checked for BarsArray[] equality and sure enough BarsArray[0] == BarsArray[i] if the data series for BarsArray[i] is the same time period as the chart.
Leave a comment:
-
Multi-Series Indicators and Duplicate AddDataSeries
If I am looking at a one minute chart and my indicator has code to AddDataSeries(BarsPeriodType.Minute, 1) I will have two bar series in the chart that are covering the exact same time period. Is the data duplicated?Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kaywai, 09-01-2023, 08:44 PM
|
5 responses
601 views
0 likes
|
Last Post Today, 12:32 AM | ||
Started by xiinteractive, 04-09-2024, 08:08 AM
|
6 responses
22 views
0 likes
|
Last Post Today, 12:31 AM | ||
Started by Pattontje, Yesterday, 02:10 PM
|
2 responses
19 views
0 likes
|
Last Post
by Pattontje
Yesterday, 11:49 PM
|
||
Started by flybuzz, 04-21-2024, 04:07 PM
|
17 responses
230 views
0 likes
|
Last Post
by TradingLoss
Yesterday, 11:45 PM
|
||
Started by agclub, 04-21-2024, 08:57 PM
|
3 responses
17 views
0 likes
|
Last Post
by TradingLoss
Yesterday, 11:42 PM
|
Leave a comment: