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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
82 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
43 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
64 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
68 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
56 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment