Is it possible to resize the Values[] from the indicator? I understand it's multidimensional and they can't be Array.Resize()'d? Is there a better implementation for me than to just declare my own single dimension array and resize it for every new element?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Value[] series without plotting
Collapse
X
-
Value[] series without plotting
I am unclear how AddPlot implements the Values[]. I'm looking more for general info than having a specific question. I am needing a couple arrays that would grow with Bars.length and be accessed programmatically in the same way High[] Low[] etc are accessed. I like the convenience of using the Values[] in my code, managing array size, etc but I do not want them to be plotted on my indicator. I would like to "add" (associate?) a value to each bar in the indicator and am wondering what the advantages or disadvantages there are to using the Values[] vs declaring my own array, if any.
Is it possible to resize the Values[] from the indicator? I understand it's multidimensional and they can't be Array.Resize()'d? Is there a better implementation for me than to just declare my own single dimension array and resize it for every new element?Tags: None
-
Hello Chippy,
Thank you for your post.
You can use a Series<t> to hold a value for each bar on the chart. A Series<T> is a special generic type of data structure that can be constructed with any chosen data type and holds a series of values equal to the same number of elements as bars in a chart. If you have 200 bars loaded in your chart with a moving average plotted, the moving average itself holds a Series<double> object with 200 historical values of data, one for each bar.
An example may be found in our help guide here:
Please let us know if we may be of further assistance to you.
- Likes 1
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
26 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
182 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
335 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
260 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|

Comment