Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trouble using Bollinger bands in strategy builder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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
    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

    Comment


      #3
      fwiw I am having big issues with Bollinger bands when referenced in a condition being much ignored

      Comment


        #4
        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 NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        119 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        63 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        41 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        45 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X