Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Resizing an array
Collapse
X
-
Tags: None
-
Hello Stanfillirenfro,
NinjaScript is just C# language so you can very likely resize or recreate an array that you have made.
Do you have more details about what you are trying to accomplish? NinjaScript its self won't have anything specific for resizing an array but you could use google to search for "C# resize array" for some examples.
If the question is about one of the internal Series like Close then no, those cannot be resized. You would only be able to manipulate an array you specifically created in your code.
I look forward to being of further assistance.
-
Many thanks Jessse for your reply. What I want to achive is that I have an iniiaal array or series.. After a certain period of time, I want to have the new size of the array after adding the number of bars formed in this period of time.
Comment
-
Hello Stanfillirenfro,
Thanks for the details.
Yes in that case you could create a normal C# array and use the array's .Resize() method if necessary. You could also create a new array from the old array, it really depends on how your logic needs to work. For this question google will be able to provide many examples of how to do that, you can search for "C# resize array". The Top result is the MSDN reference but you can also find other examples on sites like stackoverflow.
I look forward to being of further assistance.
Comment
-
Many thanks Jesse!
Valuable advice!
I found in google what I habe been looking for.
Many thanks again!
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
603 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
349 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
104 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
560 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment