&& ((Low[1] == (MIN(Low,HLbars))[0]) || (Low[2] == (MIN(Low,HLbars))[0]) || (Low[3] == (MIN(Low,HLbars))[0]) || (Low[4] == (MIN(Low,HLbars))[0]) || (Low[5] == (MIN(Low,HLbars))[0]) )
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Filtering a swing high or low
Collapse
X
-
Filtering a swing high or low
I'm using this to filter out a condition for a strategy. Any thoughts on a more efficient way to code this so that I can input the number of lookback bars instead of brute force coding this?
&& ((Low[1] == (MIN(Low,HLbars))[0]) || (Low[2] == (MIN(Low,HLbars))[0]) || (Low[3] == (MIN(Low,HLbars))[0]) || (Low[4] == (MIN(Low,HLbars))[0]) || (Low[5] == (MIN(Low,HLbars))[0]) )Tags: None
-
Baseheadz, to write this more efficiently you could use a looping command in C# - http://www.ninjatrader.com/support/h...g_commands.htm
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
651 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 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
577 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment