Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
nbarsup / nbarsdown not working as expected
Collapse
X
-
nbarsup / nbarsdown not working as expected
I've been trying to get these two indicators to work in a strategy (using strategy builder), but they don't seem to trigger as expected. Here, as a test, I'm trying to get it to draw a green vertical line on the chart every time there are three green bars in a row. The plot along the bottom shows that it's identifying some, but not all, instances of three green bars in a row. In the same range, though, it only triggered drawing the vertical green line one time. What am I missing here? I've tried a bunch of different settings for this indicator with similar results.
Tags: None
-
Hello pantherito,
Thank you for your post.
Based on what I see in your screenshot, it appears that all parameters for NBarsUp are currently set to true.
When all three parameters are set to true, the indicator will trigger only if there are three consecutive bars that not only close higher than they open but when both their highs and lows increase consecutively. This stricter set of conditions excludes cases where there are three green bars, but both their highs and lows are not higher consecutively.- higherHigh: Requires consecutive higher highs;
- higherLow: Requires consecutive higher lows
Here is what the condition would look like (index values are barsago):- if (Close[0] > Open[0] && Close[1] > Open[1] && Close[2] > Open[2])
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
86 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
125 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
64 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
117 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
67 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment