Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Bollinger Indicators

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

    Bollinger Indicators

    Looking for the Bollinger indicators "%b" and "Bandwidth" written in NinjaScript and downloadable. Anyone written these indicators for general use?

    #2
    Hello TraderMB,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    You can find two Percent Bs at the following links:
    As far as the Bandwidth, can you provide an example?

    I look forward to your response.

    Comment


      #3
      Bollinger indicator "Bandwidth"

      This indicator shows how wide apart are the Bollinger Bands. The width is normalized using the middle band. The indicator is commonly used to identify a condition Bollinger calls "the squeeze." It is also useful in identifying trend changes. The formula for the "Bandwidth" indicator is (Upper Bollinger Band - Lower Bollinger Band) / Middle Bollinger Band. Any help will be much appreciated.

      Comment


        #4
        Hello TraderMB,

        Thank you for your response.

        You may be looking for the indicator at the following link: http://www.ninjatrader.com/support/f...d=5&linkid=396

        Please let me know if I may be of further assistance.

        Comment


          #5
          Bollinger Band Width

          Originally posted by TraderMB View Post
          This indicator shows how wide apart are the Bollinger Bands. The width is normalized using the middle band. The indicator is commonly used to identify a condition Bollinger calls "the squeeze." It is also useful in identifying trend changes. The formula for the "Bandwidth" indicator is (Upper Bollinger Band - Lower Bollinger Band) / Middle Bollinger Band. Any help will be much appreciated.
          Bollinger Band Width:

          upper bollinger band = midband + i *standarddeviation
          lower bollinger band = midband - i * standarddeviation

          therefore

          upper bollinger band - lower bollinger band = 2 * i * standarddeviation

          You can ignore the scaling factor i and use the standard deviation alone. If you divide the standard deviation by the midband than you get a normalized standard deviation.

          All you need to do is to divide the standard deviation of the last N bars by the simple moving average of the last N bars. The indicator

          NormStdDev.Set( StdDev(N)[0] / SMA(N)[0]);

          is identical with the bollinger bandwidth indicator, with the exception of the scaling factor.

          However, the normalization by dividing through the SMA, is completely useless, as a standard deviation cannot be normalized that way. Even after normalization, the indicator values will not be coherent across different instruments and timeframes. Neither the standard deviation nor the bollinger band width will pass Eckhardt's coehrency test. Also it is impossible to define a threshold below which volatility can be considered as low.

          Therefore you can directly use the standard deviation instead of the Bollinger Band width. The bollinger bandwidth indicator adds nothing that you can use for your trading. It belongs to the class of absolutely useless indicators. By the way if you find one, put it below your chart and then add the StdDev indicator as well. Post the chart.

          Comment


            #6
            Originally posted by TraderMB View Post
            This indicator shows how wide apart are the Bollinger Bands. The width is normalized using the middle band. The indicator is commonly used to identify a condition Bollinger calls "the squeeze." It is also useful in identifying trend changes. The formula for the "Bandwidth" indicator is (Upper Bollinger Band - Lower Bollinger Band) / Middle Bollinger Band. Any help will be much appreciated.
            Squeeze:

            In the previous post I have explained that you cannot easily define an absolute value to find out, when the standard deviation is small enough to qualify for a squeeze. However, it is possible to define a relative value based on the ATR. This is the usual way the Bollinger Band Squeeze is defined: The squeeze is on, when the Bollinger Bands are inside the Keltner Channels.

            The chart belows shows when the squeeze is active. The histogram compares the Bollinger Band width to the Keltner Channel width. When the histogram values are negative, the Bollinger Bands are inside the Keltner Channels. The dots have been added as a visual aid to detect the squeeze.
            Attached Files

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Rapine Heihei, Today, 08:19 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by Rapine Heihei, Today, 08:25 PM
            0 responses
            6 views
            0 likes
            Last Post Rapine Heihei  
            Started by f.saeidi, Today, 08:01 PM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by Rapine Heihei, Today, 07:51 PM
            0 responses
            8 views
            0 likes
            Last Post Rapine Heihei  
            Started by frslvr, 04-11-2024, 07:26 AM
            5 responses
            98 views
            1 like
            Last Post caryc123  
            Working...
            X