gbBollingerKeltnerSqueezeMTF, Ver 1.1, TraderGB, April 7, 2021
Description: Draws rectangle around price bars to indicate Bollinger Band / Keltner Channel squeeze based on a given timeframe.
This is a multiple timeframe version of gbBollingerKeltnerSqueeze. On the included chart you'll see both indicators. The large blue rectangle is from gbBollingerKeltnerSqueezeMTF and is based on 30-min bars. The smaller red rectangles are from gbBollingerKeltnerSqeeze and are based on the timeframe of the chart, 5-min.
Included with this are two WAV files: put these in your sound folder (usually C:\Program Files (x86)\NinjaTrader 8\sounds)
BollingerKeltnerSqueezePoint.wav
BollingerKeltnerBreakout.wav
Details:
At the point where both the upper and lower Bollinger bands enter the Keltner channel, the upper and lower rectangle points are defined and are fixed for the life of the rectangle.
A TriangleUp/TriangleDown is used to indicate the point where the squeeze starts (squeeze point). The left most point of the rectangle is also defined and fixed at this point. It draws backward based on breakTypeUsed (UseClose, UseHiLo).
If breakTypeUsed=UseClose is used, it keeps drawing the rectangle backwards until there is a close outside of the rectangles upper or lower points. If breakTypeUsed=UseHiLo is used, it keeps drawing the rectangle backwards until there is either a low that is above the
upper squeeze point or a high that is below the lower squeeze point.
This same logic is used for escaping the rectangle going forward. It keeps moving the right most point until this criteria is met. Since BB/KB are based off of lagging moving averages, a rectangle is draw backwards/forwards from the squeeze point to give context.
Note, there can be overlapping rectangles. If the criteria is met to end the rectangle, another squeeze can take place shortly after and the new rectangle will form and start drawing backwards and possible into a prior rectangle. This is normal and happens more often with
breakTypeUsed=UseClose since this is easier to achieve than breakTypeUsed=UseHiLo.
Please DM me if you find any issues.
Updates:
1) 04/07/2021, Ver 1.1: Fixed repeating sound alert.
Category NinjaTrader 8 Indicators and More
|
|
|