Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

bands beyond bollinger bands

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

    bands beyond bollinger bands

    hi,
    i am interested in creating a band above & one below the bollinger bands, based on the difference between the bollinger bands at any moment, where this difference is added to the upper band, & subtracted from the lower band.
    i've had no luck finding something similar in the posted indicators, & any help would be appreciated. thanks.

    #2
    Hello upsndowns,

    Below are two data series that will do this. You can create these as data series according to the principles in the document below:


    Code:
     
    myDataSeries.Set(Bollinger(2,14).Upper[0] - Bollinger(2,14).Lower[0] + Bollinger(2,14).Upper[0]);
     
     
    myDataSeries2.Set(Bollinger(2,14).Upper[0] - Bollinger(2,14).Lower[0] - Bollinger(2,14).Lower[0]);
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      thanks ryanm
      i created a new indicator that would just plot this upper & lower band only. it "compiled" ok, but when placing it on my chart, everything in the price panel 1 "scrunched up" to the top edge ?? here's my progress...


      protectedoverridevoid Initialize()
      {
      Add(
      new Plot(Color.Orange, PlotStyle.Line, "Above band"));
      Add(
      new Plot(Color.Orange, PlotStyle.Line, "Below band"));
      CalculateOnBarClose =
      true;
      Overlay =
      true;
      PriceTypeSupported =
      true;


      protectedoverridevoid OnBarUpdate()
      {
      Above.Set(Bollinger(
      2,14).Upper[0] - Bollinger(2,14).Lower[0] + Bollinger(2,14).Upper[0]);
      Below.Set(Bollinger(
      2,14).Upper[0] - Bollinger(2,14).Lower[0] - Bollinger(2,14).Lower[0]);
      }

      Comment


        #4
        Originally posted by upsndowns View Post
        hi,
        i am interested in creating a band above & one below the bollinger bands, based on the difference between the bollinger bands at any moment, where this difference is added to the upper band, & subtracted from the lower band.
        I dont think you need a new indicator. All you need to do is add another instance of the existing Bollinger indicator to your chart, keep the same Period, but set the "# of std. dev." to three times whatever you have used for the first instance.

        Comment


          #5
          hi davee, the result i am after is not the same as simply "upping" the standard deviation number.
          i also attempted to create it as a new indicator as i did not want to play with the existing BB indicator & stuff it up (very likely!!), as i have it looking just how i want on the chart with color fill, etc.

          Comment


            #6
            That should do it for you, if I understand what you want: (this is untested)

            Above.Set(Bollinger(2,14).Upper[0] + (Bollinger(2,14).Upper[0] - Bollinger(2,14).Lower[0]));
            Below.Set(Bollinger(
            2,14).Lower[0] - (Bollinger(2,14).Upper[0] - Bollinger(2,14).Lower[0]));

            You may the bollinger triplestat v4 useful:
            http://www.ninjatrader-support2.com/...catid=1&sort=d


            ...I wrote it.

            Last edited by mountainclimber; 05-07-2010, 10:40 AM.

            Comment


              #7
              Hello UpsnDowns,

              This might work better for you, with parentheses in the right places.

              Above.Set(Bollinger(2,14).Upper[0] + (Bollinger(2,14).Upper[0] - Bollinger(2,14).Lower[0]));
              Below.Set(Bollinger(
              2,14).Lower[0] - (Bollinger(2,14).Upper[0] - Bollinger(2,14).Lower[0]));


              Edit: Great, Thanks for sharing mountainclimber!
              Last edited by NinjaTrader_RyanM1; 04-30-2010, 09:20 AM. Reason: Replies crossed
              Ryan M.NinjaTrader Customer Service

              Comment


                #8
                You will find that
                Bollinger(2,14).Upper[0] + (Bollinger(2,14).Upper[0] - Bollinger(2,14).Lower[0])

                is a longer way of saying

                Bollinger(6,14).Upper[0]

                and
                Bollinger(2,14).Lower[0] - (Bollinger(2,14).Upper[0] - Bollinger(2,14).Lower[0])

                is a longer way of saying

                Bollinger(6,14).Lower[0]


                That is simply multiply the Std Dev parameter by 3.

                The reason is simple: Whatever value you specify for "# of Std Dev" parameter the "difference" between Upper and Lower bands will be 2 times the Standard Deviation times your parameter value.
                A band whose upper is the same distance above the original upper as the original's "difference", and whose lower is the same distance below the lower as the original's "difference", must be three times as deep as the original band.

                Comment


                  #9
                  thanks everyone for your help...i've sorted it out & learn't some more!
                  mountainclimber...thanks again. you helped me with the "macd avgupdwn" indicator, & your top of the list when i need someones help devising my super indicator.

                  Comment


                    #10
                    Glad to help and thanks for the props!

                    Last edited by mountainclimber; 05-07-2010, 10:40 AM.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    579 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    334 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    101 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    554 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    551 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X