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, 03-31-2026, 09:41 PM
|
1 response
72 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
39 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
63 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment