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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
227 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
146 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
160 views
1 like
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
237 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
197 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment