gbBollingerKeltnerSqueeze, Ver 1.0, TraderGB, February 6, 2021 [Updated to Ver 1.1]
Description: Draws rectangle around price bars to indicate squeeze.
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.
Updates:
Ver 1.1 04-19-2021:
1) Fixed XML settings on Opacity
Category NinjaTrader 8 Indicators and More
|
|
|