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
Can I add a dynamic second data series?
Collapse
X
-
Can I add a dynamic second data series?
Lets say I am using 15 min candles for my data series. I have an indicator that I would like to use 5 minute candles for to get more granular. But I want to build the indicator so that whatever the main data series is, my second data series will just take it and divide it by a number like 3. Is this possible?Tags: None
-
Hello ErikY,
Yes that is possible. The indicator can use AddDataSeries to add a more granular series. You can then use the BarsInProgress property to separate different parts of your logic.
To get the primary bar prices you can use the plural close series Closes[0][0] which represents the primary price.
I look forward to being of further assistance.
JesseNinjaTrader Customer Service
-
Thanks Jesse.
Is there a way that I can figure out the main data series value, so that I can simply divide that value by 2 when i do the AddDataSeries?
So something like this:
int DSMinutes = MainDataSeries.value;
AddDataSeries(Data.BarsPeriodType.Minute, DSMinutes/2);
So what I don't know how to do is get the main data series minutes value, or whatever that type may be, ticks, minutes, seconds, etc.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
61 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
9 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
18 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
5 responses
48 views
0 likes
|
Last Post Today, 02:36 PM |
Comment