Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Rsqueeze(BBSqueeze) indicator in the MA

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

    Rsqueeze(BBSqueeze) indicator in the MA

    morning all,

    I am using the above indicator but am having a few problems getting the blue and red dots
    to appear in the MA.

    All I want it to is display a cell alert when the dot is red, and another when the dot is blue.

    I think it is something to do with the the "Plot", where it has squeeze and squeeze on, and setting the cell conditions accordingly. I have played about with it but can't get the dots on the chart to correspond to the cell alerts in the MA.

    I have attached a screen shot so you can see what I am on about.

    thanks in advance,

    David
    Attached Files

    #2
    David, we would unfortunately not know how the indicator you refer to would be created, but you cannot access the dots plotted on the chart directly in the MA. For this to work the indicator would need to expose a signal, so for example if this reads +1, you could go ahead and create a cell condition to flag a certain pattern was found. If the indicator would not offer this for access, it would need to be recoded to work as desired in your MA.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Does anyone know of an example of the code that is described by Bertrand?

      Comment


        #4
        If needed you can contact one of our NinjaScript consultants to assist you with coding this.


        NinjaScript Consultants:

        Comment


          #5
          Originally posted by MLTDINO View Post
          morning all,

          I am using the above indicator but am having a few problems getting the blue and red dots
          to appear in the MA.

          All I want it to is display a cell alert when the dot is red, and another when the dot is blue.

          I think it is something to do with the the "Plot", where it has squeeze and squeeze on, and setting the cell conditions accordingly. I have played about with it but can't get the dots on the chart to correspond to the cell alerts in the MA.

          I have attached a screen shot so you can see what I am on about.

          thanks in advance,

          David
          Hi David,

          the RSqueeze was originally coded for NinjaTrader 6.5. The actual source is here



          The indicator comes with a collection of squeezes,

          BB Squeeze - a modified Bollinger Band squeeze
          PBFSqueeze - a MACD type oscillator based on Gaussian filters
          Countertrend - PBFSqueeze, which use a CCI for coloring the indicators bars

          As far as I understand you only wish to use the BBSqueeze. Then you should not use the RSqueeze for the following reasons

          -> The RSqueeze does not use genuine Keltner Channels but a modified Keltner version based on ATR, this modified version does not produce genuine squeeze dots
          -> The RSqueeze does not properly serialize the parameters, so you cannot access them via a strategy or another indicator.
          -> Only 10% of the code refers to the BBSqueeze, the remainder is needed for the two oscillators

          The BBSqueeze that comes with the RSqueeze is not the squeeze that should be used. The ATR uses Wilder's smoothing with a smoothing constant of 1/N as opposed to 2/(n+1) which is used for an EMA. The fact that the ATR is used instead of the range means that the period used for the smoothing is not appropriate and makes the RSqueeze in my opinion unusable as tool for a Bollinger Squeeze.

          If you want a genuine BBSqueeze, you would need to use the simple range instead of the average true range. The BBSqueeze is one of the simplest indicators to code for NinjaTrader. No need to use a tank, if a knife can do. The version I have coded is a simplified version, which only compares a multiple of the standard deviation to a multiple of the range, but does not take into account that classical Bollinger Bands calculate the SMA by using the close price, while the midband of the Keltner Channels is calculated from the typical price.

          The chart below shows genuine Bollinger Band and Keltner Channels. If have used the NinjaTrader default indicators, which are correctly implemented. The "Squeeze" is on, when the Bollinger Bands are inside the Keltner Channels. Please compare the dots produced by the two indicators, and you will immediately understand that the RSqueeze produces different dots. Please use the indicator attached instead.

          By the way, here is a little discussion on the RSqueeze .....

          Well, how about for $99 per month you can get a squeeze indicator? No thanks I'll use the one here for free! Can you believe it who is paying over $1k per year for this Ksqueeze? I'm sure it's basically identical to what we got here with the updated Rsqueeze. OR MAYBE it really is THE game changer with the 'intelligent smoothing logic" that NO one is privy to!!?? Taken from the website's KSqueeze.com and squeezeindicatortrading.com How is the KSqueeze different from other squeeze indicators? The …
          Attached Files
          Last edited by Harry; 08-16-2012, 02:58 PM.

          Comment


            #6
            Harry, thank you very much for the clarification on RSqueeze. I have downloaded your new Squeeze indicator and it plots fine.
            In ref to MLTDINO’s question , I am able to get TrendStrength to print values in Market Analyzer, but not “SqueezeDots” i.e. is there a way for the Market Analyzer to indicate that a squeeze is on?
            Thanks again.

            Comment


              #7
              Originally posted by PTE97 View Post
              Harry, thank you very much for the clarification on RSqueeze. I have downloaded your new Squeeze indicator and it plots fine.
              In ref to MLTDINO’s question , I am able to get TrendStrength to print values in Market Analyzer, but not “SqueezeDots” i.e. is there a way for the Market Analyzer to indicate that a squeeze is on?
              Thanks again.
              Here is an updated version of the Squeeze. I have added a BoolSeries squeezeOn, which carries the value "true", if the squeeze is on, and the value "false", when there is no squeeze. The BoolSeries can be accessed as anaSqueeze(....).SqueezeOn.
              I have also modified the code to allow for a displacement of the indicator.

              I have updated the indicator file in post #5.

              Please let me know, whether this is what you needed.
              Last edited by Harry; 08-16-2012, 09:48 AM.

              Comment


                #8
                Harry, thanks for the reply, my knowledge of C# is very limited. I am not clear on how BoolSeries true or false can be accessed to appear in Market Analyzer. i.e. do I have to add a statement somewhere ?

                Comment


                  #9
                  Originally posted by PTE97 View Post
                  Harry, thanks for the reply, my knowledge of C# is very limited. I am not clear on how BoolSeries true or false can be accessed to appear in Market Analyzer. i.e. do I have to add a statement somewhere ?
                  No, this was my problem. I thought that it would be possible to access an exposed BoolSeries with the Market Analyzer, but it seems that the Market Analyzer only accepts plots.

                  I have now set an arbitrary value to the Squeeze Dots. If the squeeze is on the dots will have the value = 0. If the value is > 0 this means no squeeze. In the market analyzer you would have to check the squeeze dots for equality with 0.

                  I have updated the indicator file in post #5. Please let me know, whether it works.

                  Comment


                    #10
                    Thanks Harry, that did it. Market Analyzer is reporting fine now =0,>0. Good luck in your trading, and thanks again for your patience and help.

                    Comment


                      #11
                      Originally posted by Harry View Post

                      If you want a genuine BBSqueeze, you would need to use the simple range instead of the average true range. The BBSqueeze is one of the simplest indicators to code for NinjaTrader. No need to use a tank, if a knife can do. The version I have coded is a simplified version, which only compares a multiple of the standard deviation to a multiple of the range, but does not take into account that classical Bollinger Bands calculate the SMA by using the close price, while the midband of the Keltner Channels is calculated from the typical price.

                      The chart below shows genuine Bollinger Band and Keltner Channels. If have used the NinjaTrader default indicators, which are correctly implemented. The "Squeeze" is on, when the Bollinger Bands are inside the Keltner Channels. Please compare the dots produced by the two indicators, and you will immediately understand that the RSqueeze produces different dots. Please use the indicator attached instead.
                      Thanks... I was looking to code an implementation because so many around are needlessly jazzed up with all sorts tweeks. The original is elegant.

                      This will serve as a good starting point.

                      Wish it was in the Shared file section so it would be easier to find.

                      Comment


                        #12
                        Problem with BBSqueeze?

                        Originally posted by Harry View Post
                        Hi David,

                        the RSqueeze was originally coded for NinjaTrader 6.5. The actual source is here



                        The indicator comes with a collection of squeezes,

                        BB Squeeze - a modified Bollinger Band squeeze
                        PBFSqueeze - a MACD type oscillator based on Gaussian filters
                        Countertrend - PBFSqueeze, which use a CCI for coloring the indicators bars

                        As far as I understand you only wish to use the BBSqueeze. Then you should not use the RSqueeze for the following reasons

                        -> The RSqueeze does not use genuine Keltner Channels but a modified Keltner version based on ATR, this modified version does not produce genuine squeeze dots
                        -> The RSqueeze does not properly serialize the parameters, so you cannot access them via a strategy or another indicator.
                        -> Only 10% of the code refers to the BBSqueeze, the remainder is needed for the two oscillators

                        The BBSqueeze that comes with the RSqueeze is not the squeeze that should be used. The ATR uses Wilder's smoothing with a smoothing constant of 1/N as opposed to 2/(n+1) which is used for an EMA. The fact that the ATR is used instead of the range means that the period used for the smoothing is not appropriate and makes the RSqueeze in my opinion unusable as tool for a Bollinger Squeeze.

                        If you want a genuine BBSqueeze, you would need to use the simple range instead of the average true range. The BBSqueeze is one of the simplest indicators to code for NinjaTrader. No need to use a tank, if a knife can do. The version I have coded is a simplified version, which only compares a multiple of the standard deviation to a multiple of the range, but does not take into account that classical Bollinger Bands calculate the SMA by using the close price, while the midband of the Keltner Channels is calculated from the typical price.

                        The chart below shows genuine Bollinger Band and Keltner Channels. If have used the NinjaTrader default indicators, which are correctly implemented. The "Squeeze" is on, when the Bollinger Bands are inside the Keltner Channels. Please compare the dots produced by the two indicators, and you will immediately understand that the RSqueeze produces different dots. Please use the indicator attached instead.

                        By the way, here is a little discussion on the RSqueeze .....

                        http://www.bigmiketrading.com/ninjat...eeze-work.html

                        This seems to be exactly what I'm looking for, but the "BBSqueeze" dots do not always line up with the Bollinger/Keltner channel crossover points. See screen shot (of XRX, daily) attached. Vertical blue lines added to show places where dots offset from squeeze in channels.

                        Click image for larger version

Name:	BBSqueeze-Chart.png
Views:	1
Size:	53.7 KB
ID:	869011

                        Most likely I'm not using it correctly. Maybe I need to change the default Bollinger and/or Keltner parameters in NinjaTrader?

                        Any ideas welcome.

                        Comment


                          #13
                          Originally posted by pwatty View Post
                          This seems to be exactly what I'm looking for, but the "BBSqueeze" dots do not always line up with the Bollinger/Keltner channel crossover points. See screen shot (of XRX, daily) attached. Vertical blue lines added to show places where dots offset from squeeze in channels.

                          [ATTACH]26436[/ATTACH]

                          Most likely I'm not using it correctly. Maybe I need to change the default Bollinger and/or Keltner parameters in NinjaTrader?

                          Any ideas welcome.
                          The Bollinger and Keltner Channel both have two parameters that can be selected

                          - the lookback period (used to calculate midband, standard deviation or average range)
                          - the multiplier (applied to standard deviation or average range to calculate the distance from the outer bands to the midband)

                          Your chart shows different lookback periods Bollinger Bands(14) , Keltner Channel (10) and the Squeeze indicator (20).

                          As the Squeeze indicator only has a single lookback period, you would need to select the same lookback period for both Bollinger Bands and Keltner Channel. Please set the period for all indicators to 20 or something else.

                          There is another subtle difference. The anaSqueeze just compares a multiple of the standard deviation to a multiple of the SMA calculated from the simple range. This simplification makes it faster to calculate. In reality the midband of a Bollinger Bands is calculated from the SMA of the last N closes, while the Keltner Channel uses the SMA of the last N typical prices as midband. Therefore you should use a Bollinger Band calculated from the typical price (select as input series) to obtain a perfect match.

                          The second point is not important, and probably nobody would even notice it, if had not explained it here. Attached below is a screenshot of the Bollinger Bands and Keltner Channel compared to the Squeeze indicator. I have used the original Bollinger Band calculation, just to show that the midbands do not deviate a lot from each other.


                          Summary:

                          Just select identical lookback periods for all three indicators.
                          Attached Files

                          Comment


                            #14
                            Yep - that was it. Many thanks for your help - and thanks again for such a quick response

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by GussJ, 03-04-2020, 03:11 PM
                            11 responses
                            3,229 views
                            0 likes
                            Last Post xiinteractive  
                            Started by andrewtrades, Today, 04:57 PM
                            1 response
                            14 views
                            0 likes
                            Last Post NinjaTrader_Manfred  
                            Started by chbruno, Today, 04:10 PM
                            0 responses
                            7 views
                            0 likes
                            Last Post chbruno
                            by chbruno
                             
                            Started by josh18955, 03-25-2023, 11:16 AM
                            6 responses
                            441 views
                            0 likes
                            Last Post Delerium  
                            Started by FAQtrader, Today, 03:35 PM
                            0 responses
                            12 views
                            0 likes
                            Last Post FAQtrader  
                            Working...
                            X