Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Copying Prices series into an Array
Collapse
X
-
Hello Icus1,
Thanks for your reply.
With the data series, you can use the MAX() and MIN() method directly. For example double maxHigh = MAX(High, 20)[0]; // Highest high of last 20 bars
References:
https://ninjatrader.com/support/help...aximum_max.htm
https://ninjatrader.com/support/help...inimum_min.htm
In an array, which is more of a C# question, you could use the name of the array with .Min() and .Max()
From an external reference: https://www.dotnetperls.com/max
-
@soon123: can you explain what the difference is to what Paul said? I have to admit that I do understand what an array is. Simply said it's a variable that can hold more than 1 values. One can add values to the array and modify the array to the needs. I hope that's correct so far. But what exactly iSeries is?
couldn't Icus1 just use the suggestion of Paul to get the highest high and the lowest high by using
trying to understand what the difference is and what iSeries is. Please be patient with me, still learning C# and NinjascriptCode:[I]lowestHigh = MIN(High, 20)[0]; [/I] [I]highestHigh = MAX(High, 20)[0];[/I]
Comment
-
Hello Patricia70,
An Array structure would be an independent storage of values.
A data series (series <t>) is an array that is synchronized (number of elements) with the number of bars in the data series of the chart. For example, if you wanted to calculate something on every bar and store that result in a custom series and be able to pull that value using the various methods such as MIN, MAX or access by a bars ago value.
Please see the help guide here: https://ninjatrader.com/support/help.../?iseriest.htm
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
656 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
371 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 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
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
579 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment