Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Trouble using Bollinger bands in strategy builder
Collapse
X
-
Trouble using Bollinger bands in strategy builder
I'm trying to build a strategy that checks the current low price against the lower Bollinger band, but have been unable to get it to trigger any action. The attached is a test strategy that is just supposed to draw a vertical line when the current price low is below the lower Bollinger band. Calculation is set to on tick, otherwise all default properties are at their defaults. There are several points on this chart where I expect this condition to trigger, but it does nothing. What am I doing wrong here?2 PhotosTags: None
-
Hello pantherito,
As you have used Bars ago set 1, you are comparing the previous bars low the bollinger lower plot, not the current bar's low.
Further, as you are not adding Current bar to the tag name string the tag is not unique and only 1 line will appear and will be moved to the last bar each time the condition is true.
To understand why the condition is evaluating as true or false, add prints to the code.
Please watch the video 'Debugging with the Strategy Builder' in the support article linked below.
Within the condition set actions, print the time of a bar and a label for the set number so we can see on what bars this has evaluated as true.
In a new condition set with no conditions, print the time of the bar, a label for the low of the previous bar Low[1], the value of Low[1], a label for the less than operator, a label for the bollinger lower plot value, and the bollinger lower plot value.
Save the output to a text file and include this with your next post.Chelsea B.NinjaTrader Customer Service
-
Hello DTSSTS,
To understand why the condition is evaluating as true or false, add prints to the code.
Please watch the video 'Debugging with the Strategy Builder' in the support article linked below.
https://support.ninjatrader.com/s/ar...wNDE0ODg5Ni4xN zQxMTc5ODgz
Within the condition set actions, print the time of a bar and a label for the set number so we can see on what bars this has evaluated as true.
In a new condition set with no conditions, print the time of the bar, print all values compared in your condition with labels for each value and comparison operator.
Save the output to a text file and include this with your next post.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
20 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
119 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
63 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
41 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
45 views
0 likes
|
Last Post
|

Comment