NexusFi: Find Your Edge


Home Menu

 





How does RSqueeze work?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 16 posts (131 thanks)
    2. looks_two wldman with 14 posts (8 thanks)
    3. looks_3 gcaldridge with 5 posts (18 thanks)
    4. looks_4 Raj1 with 4 posts (2 thanks)
      Best Posters
    1. looks_one Zondor with 10.7 thanks per post
    2. looks_two Fat Tails with 8.2 thanks per post
    3. looks_3 ThatManFromTexas with 3.8 thanks per post
    4. looks_4 gcaldridge with 3.6 thanks per post
    1. trending_up 55,293 views
    2. thumb_up 232 thanks given
    3. group 44 followers
    1. forum 81 posts
    2. attach_file 18 attachments




 
Search this Thread

How does RSqueeze work?

  #41 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


wldman View Post
gone on vacation till sometime in July.

@Fat Tails

I would be thrilled if you could take a look and possibly create that option to apply the HA calc to a regular price bar.

I fixed the time stamp issue and will do so on the new machine when it arrives. Thanks again to everyone for their valuable shared input. Trade well!


Just let me know via PM, when you are back from holidays, will fix that Heikin Ashi thing for you, as it is quick to implement.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
Battlestations: Show us your trading desks!
18 thanks
  #42 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

I had a closer look again at the RSqueeze and discovered that the Bollinger Band squeeze is not optimal. Actually it triggers too many signals and I will try to explain what is the problem.


Original Definition of Bollinger Band Squeeze:

The Bollinger Band Squeeze occurs, when the Bollinger Bands are contracting and thereby indicating that directional volatility has decreased. It is possible to study the bandwith of the Bollinger Bands over a longer period, and then calculate some confidence intervals. However, a simpler method is to compare Bollinger Bands to Keltner Channels. Bollinger Bands indicate directional volatility, whereas Keltner Channel show the non-directional volatility (friction). When the Bollinger Band stay inside the Keltner Channel, the volatility has not moved price thus indicating a congestion. The Bollinger Squeeze typically relies on this definition.


The RSqueeze does not correctly compare Bollinger Bands and Keltner Channels

The original Keltner Channels use a SMA calculated from the typical price and add/subtract a multiple of the SMA of the simple range of the bars. The crime committed by the RSqueeze indicator is that the average true range is used. This leads to 3 differences

(a) the range is replaced with the true range
(b) the true range is smoothed with an EMA instead of a SMA
(c) the smoothing period used is too large

(c) is not easy to understand, but I will give an example. If you have a Keltner Channel with a period of 20, then the offset used for the bands is a multiple of SMA(Range(), 20). However, if you use the average true range ATR(20), then the average is calculated by using Wilder's smoothing, the smoothing factor for Wilder's smoothing is 1/20 = 2/(39+1), which is the equivalent of an EMA(TrueRange(),39). Even if there is not much difference between the range and the true range, there is a difference between a lookback period of 20 and a lookback period of 39. The RSqueeze effectively uses a larger lookback period, and typically this results in too large values for the offset, as the recent low volatility period is now underweighted. A larger offset results in too many signal dots, and the indicator becomes unusable.

Sample Chart for 6E: RSqueeze fires too many signals.


Squeeze Exposed as BoolSeries for Access via Strategy or Market Analyzer

The Squeeze version, which is attached does use the original Keltner Channels, except that for the sake of simplicity I have not used the typical price for calculating the center line of the Keltner Channel. Otherwise it is a genuine application of the original idea, and as explained by John Carter in his book "Mastering The Trade".

I have added a BoolSeries to the indicator, which can be accessed via a strategy or the market analyzer of NinjaTrader. This would allow you to display for which instruments the squeeze is on, indicating a favourable condition to enter a trade, as directional volatility has been low.



Edit: I could not access the BoolSeries from the market analyzer. I have now used the SqueezeDots to detect the squeeze. If the Squeeze Dots have a value of 0, then the squeeze is on. If the value is > 0 , then there is no squeeze. You can check the Squeeze Dots for equality with 0 to detect the squeeze. Indicator file replaced. The BoolSeries is still there, as it can be used by a strategy to detect low volatility conditions.

Attached Files
Elite Membership required to download: Squeeze.zip
Reply With Quote
  #43 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,507 since Aug 2011
Thanks Given: 2,046
Thanks Received: 9,491


is gonna explode. I want to review this as well. I use the "PBFSqueeze" as an element in a primary method...it is quite different from the typical John Carter Squeeze. Love the roll you are on Fat Tails

Visit my NexusFi Trade Journal Reply With Quote
  #44 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


wldman View Post
is gonna explode. I want to review this as well. I use the "PBFSqueeze" as an element in a primary method...it is quite different from the typical John Carter Squeeze. Love the roll you are on Fat Tails

The PBF squeeze has nothing to do with the Bollinger Squeeze, it is just a MACD type indicator based on Gaussian filters. My comment above ONLY applies to the Bollinger Band Squeeze, which is in fact one of the simplest indicators.

Reply With Quote
  #45 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,507 since Aug 2011
Thanks Given: 2,046
Thanks Received: 9,491

What I would really enjoy is a discussion with you about the Gaussian filter and the PBFSqueeze, how it is derived and how it works. On many things, I've learned that I'd benefit from sitting at the feet of a master. Some of the talents you share here are right into my biggest weaknesses. I really appreciate the contribution. DB

Visit my NexusFi Trade Journal Reply With Quote
  #46 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


wldman View Post
What I would really enjoy is a discussion with you about the Gaussian filter and the PBFSqueeze, how it is derived and how it works. On many things, I've learned that I'd benefit from sitting at the feet of a master. Some of the talents you share here are right into my biggest weaknesses. I really appreciate the contribution. DB

I have not even looked closely at the PBF, and I do not know the intentions of the guy who has created it.

For the BB Squeeze this is easier, because it is a widely known simple indicator.

Reply With Quote
  #47 (permalink)
 
Anatta's Avatar
 Anatta 
Toronto, ON, Canada
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Global futures (Continum), IB, FXCM
Trading: ES 6E Forex ETF
Posts: 41 since Sep 2012
Thanks Given: 209
Thanks Received: 28


ThatManFromTexas View Post
@gcaldridge

The dots shows the Bollinger/Keltner "squeeze".

The bars are a momentum indicator .



I recently 'found' this RSqueeze indiator. I am ok with the "squeeze" part. My problem is that I don't UNDERSTAND how the momentum bar is calculated. Can someone either point me to a description about how this momentum indicator works.

Thanks

Reply With Quote
  #48 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


wipca201 View Post
I recently 'found' this RSqueeze indiator. I am ok with the "squeeze" part. My problem is that I don't UNDERSTAND how the momentum bar is calculated. Can someone either point me to a description about how this momentum indicator works.

Thanks

As explained above the Squeeze part is flawed.

The histogram is calculated as follows, where period = 20 refers to the momentum period shown in the indicator dialogue box

(1) calculate the midline of a Donchian Channel (20)
(2) calculate an EMA(20)
(3) calculate the arithmetic mean of (1) and (2)
(4) subtract the arithmetic mean (3) from price
(5) calculate the linear regression(20) from the result (4)

To summarize: It is a modified raw MACD(1,20), which is then smoothed with a linear regression indicator.

Reply With Quote
Thanked by:
  #49 (permalink)
 Dave G 
Minneapolis MN USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: CL
Posts: 14 since May 2012
Thanks Given: 2
Thanks Received: 9


Zondor View Post
Let me know if you can import this. I got rid of the RSqueezeUtility Namespace that may have been causing the problems. I don't know why that was in there at all.

I also got rid of a lot of ridiculous plot switcheroo code that was being used to change the colors of plots à la Ninjatrader 6.5 because somebody did not know how to use the PlotColors method.

I further optimized it by eliminating any usage of external instances of several indicators that are now calculated inside the OnBarUpdate() method.

If you can manage to import this, you may be shocked at how quickly it loads.

I do, indeed, appreciate your generosity for providing such excellent code. I have added this indicator to my charts.

Thanks Again,

David

Reply With Quote
  #50 (permalink)
 
john2000's Avatar
 john2000 
Chicago, IL
 
Experience: Intermediate
Platform: Ninjatrader, TOS
Broker: Amp Futures/CQG/IB
Trading: ES, ZB, ZN, Forex
Posts: 162 since Jan 2010
Thanks Given: 244
Thanks Received: 59



Fat Tails View Post
I had a closer look again at the RSqueeze and discovered that the Bollinger Band squeeze is not optimal. Actually it triggers too many signals and I will try to explain what is the problem.


Original Definition of Bollinger Band Squeeze:

The Bollinger Band Squeeze occurs, when the Bollinger Bands are contracting and thereby indicating that directional volatility has decreased. It is possible to study the bandwith of the Bollinger Bands over a longer period, and then calculate some confidence intervals. However, a simpler method is to compare Bollinger Bands to Keltner Channels. Bollinger Bands indicate directional volatility, whereas Keltner Channel show the non-directional volatility (friction). When the Bollinger Band stay inside the Keltner Channel, the volatility has not moved price thus indicating a congestion. The Bollinger Squeeze typically relies on this definition.


The RSqueeze does not correctly compare Bollinger Bands and Keltner Channels

The original Keltner Channels use a SMA calculated from the typical price and add/subtract a multiple of the SMA of the simple range of the bars. The crime committed by the RSqueeze indicator is that the average true range is used. This leads to 3 differences

(a) the range is replaced with the true range
(b) the true range is smoothed with an EMA instead of a SMA
(c) the smoothing period used is too large

(c) is not easy to understand, but I will give an example. If you have a Keltner Channel with a period of 20, then the offset used for the bands is a multiple of SMA(Range(), 20). However, if you use the average true range ATR(20), then the average is calculated by using Wilder's smoothing, the smoothing factor for Wilder's smoothing is 1/20 = 2/(39+1), which is the equivalent of an EMA(TrueRange(),39). Even if there is not much difference between the range and the true range, there is a difference between a lookback period of 20 and a lookback period of 39. The RSqueeze effectively uses a larger lookback period, and typically this results in too large values for the offset, as the recent low volatility period is now underweighted. A larger offset results in too many signal dots, and the indicator becomes unusable.

Sample Chart for 6E: RSqueeze fires too many signals.


Squeeze Exposed as BoolSeries for Access via Strategy or Market Analyzer

The Squeeze version, which is attached does use the original Keltner Channels, except that for the sake of simplicity I have not used the typical price for calculating the center line of the Keltner Channel. Otherwise it is a genuine application of the original idea, and as explained by John Carter in his book "Mastering The Trade".

I have added a BoolSeries to the indicator, which can be accessed via a strategy or the market analyzer of NinjaTrader. This would allow you to display for which instruments the squeeze is on, indicating a favourable condition to enter a trade, as directional volatility has been low.



Edit: I could not access the BoolSeries from the market analyzer. I have now used the SqueezeDots to detect the squeeze. If the Squeeze Dots have a value of 0, then the squeeze is on. If the value is > 0 , then there is no squeeze. You can check the Squeeze Dots for equality with 0 to detect the squeeze. Indicator file replaced. The BoolSeries is still there, as it can be used by a strategy to detect low volatility conditions.

@Fat Tails

Thanks for this Squeeze indicator. The Squeeze Dots work great. I'm trying to understand how to read the momentum histogram. Is seems to me it sometimes goes against the price action. This seems to happen more with downtrends as oppose to uptrends.


Reply With Quote




Last Updated on September 2, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts