mroHigh = MRO((MAX(High, 10)[0]), 1, 20);
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
MRO + MAX/MIN functions
Collapse
X
-
MRO + MAX/MIN functions
I was hoping to have get advice on a code segment using the MRO and MAX or MIN functions something such as
Would this evaluate to find the most recent occurrence of the max high close price over the last 20 bars?Code:Tags: None
-
Hello MisterGee,
MRO() requires a lambda bool condition as the Func<bool> condition parameter, not a double.
Perhaps you want HighestBar?
https://ninjatrader.com/support/help...highestbar.htm
https://ninjatrader.com/support/foru...96#post1113896Chelsea B.NinjaTrader Customer Service
-
Thank you Chelsea, that is helpful. I will play with this tonight and see if it works for me.
I would like to find, for example, the most recent highest bar and compare it's value to the second most recent highest bar value. -- if this changes your response at all?
Comment
-
Hello MisterGee,
HighestBar could find the most recent occurrence of the max high close price over the last 20 bars as you inquired in your first inquiry.
Finding the "the second most recent highest bar value" would require custom logic.
With MRO you could find the previous recent bar that had that same high by providing a lambda condition and not a double.. (() => High[0] == MAX(High, 20)[0])Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
89 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
135 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
119 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
69 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment