LB Squeeze Momentum Divergences

This study tries to highlight LazyBear Squeeze Momentum divergences
as they are defined by
TradingLatino TradingView user
Squeeze momentum green peaks are connected by a line
Associated prices to these green peaks are also connected
If both lines have a different slope orientation
then there is a divergence.

It only shows two last divergence lines and angles.

The original chart screenshot shows some divergence lines
on the top or main chart
these were drawn manually
because you cannot write to two different charts
from the same pine script study (Well, not in August 2020 anyways)

It's aimed at BTCUSDT pair and 4h timeframe.

Simple geometric mathematics are used
to calculate the two lines degrees
Then both degrees are compared
to show if both lines agree ( // or \\ )
or if they disagree ( /\ or \/ )

(SQZDiver) Show degrees : Show degrees of each Squeeze Momentum Divergence
lines to the x-axis.
(SQZDiver) Show desviation labels : Whether to show
or not desviation labels for the Squeeze Momentum Divergences.
(SQZDiver) Show desviation lines : Whether to show
or not desviation lines for the Squeeze Momentum Divergences.

( ADX ) Smoothing
( ADX ) DI Length
( ADX ) key level
( ADX ) Print : Whether to show
or not scaled ADX line

(SQZMOM) BB Length
(SQZMOM) BB MultFactor
(SQZMOM) KC Length
(SQZMOM) KC MultFactor
(SQZMOM) Use TrueRange (KC)
(SQZMOM) Print : Whether to show
or not Squeeze Momentum indicator .

Some securities and timeframes might output degrees
too next to zero.
The code might need to be tweaked to meet your needs.

One strategy is to sell when you are in a long entry
when you find out that the price slope is upwards ( / )
while the lb smilb slope is downwards: ( \ )
E.g. You will see:
on the indicator.

Because it might signal you that the price is
going to correct downwards soon.

Please let me know if there is any
other strategy based on the red side of
LB Squeeze Momentum
so that I might add support for it in the future.

Calculating degrees in a chart
with a different x-axis scale
is a nightmare
that's why I did not a range settings
so that values next to zero are
converted into zero
and thus showing an horizontal line.

Feedback is welcome on this matter.

If you turn off showing the divergence lines
and if you turn off showing the divergence labels
you almost get what TradingLatino user uses
as its default momentum indicator .

Optionally this indicator can show you
a rescaled ADX (it only works properly on 2020 Bitcoin charts)

TradingLatino user has both dark green and light green
inverted compared to this LB SQZMOM chart.

I have reused and adapted some code from
'Squeeze Momentum Indicator' study
which it's from TradingView LazyBear user.

I have reused and adapted some code from
'Directional Movement Index + ADX & Keylevel Support' study
which it's from TradingView console user.
Phát hành các Ghi chú: ADX improvements:
  • Now the ADX value is properly plotted with the correct scale.
  • Added different colours for ADX when it goes downwards or upwards
  • ADX Keylevel (23) line is now shown in silver colour when ADX is below the keylevel. It is shown in white colour when ADX is above the keylevel.
  • Added optional label for knowing what's the last bar ADX value.
  • Now you can see the ADX value for every bar on the Data Window.
Phát hành các Ghi chú: ADX improvements:
  • Added ADX Scale
  • Option to enable or disable ADX scale

Please be aware that the drawn ADX Scale is only accurate on the last values of ADX.
Gỡ bỏ khỏi Script Ưa thích Thêm vào Script Ưa thích

Bình luận

beautiful. would be amazing to make it work in all charts.
+1 Phản hồi
ruckard lorenzoscoccia
@lorenzoscoccia, I am tempted to do the same indicator for the top char but I'm afraid of TV considering it a non original study and thus duplicated (so that they delete it).
Phản hồi
Phản hồi
Bro. Me me encanta tu indicador.. Ya vi que el adx le cambiaste color dependiendo su sube o baja.. Pero veo que esta diferente al keylevel de Jaime.. Si ajustas el adx quedaría perfecto tu indicador.
Phản hồi
ruckard lorenzoscoccia
@lorenzoscoccia, Gracias.

En realidad no está diferente.
La línea blanca o color plata corresponde al keylevel de Jaime de 23.

En el stream v433 en 1h su keylevel está media altura del Squeeze, en 4h su keylevel está positivo y casi tocando el cero del Squeeze, en 1d es parecido al de 4h.

El dibujo del ADX es independiente del de Squeeze (por mucho que al mirar la gráfica de Jaime muchas veces nos parezca la contrario).

En nuestro caso no puedo poner la escala completa así que puedes ver la línea 23 (la importante) para tener una idea de cómo va el ADX.

Espero que esto lo deje claro y si no te estoy entendiendo correctamente me explicas y, si necesario, haríamos ajustes.
Phản hồi
ruckard lorenzoscoccia
@lorenzoscoccia, Mira a ver si ahora al activar la (nueva funcionalidad) escala de ADX ahora ya no deja lugar a dudas de cómo interpretar los valores del ADX.
Phản hồi
Estaria bien, poner la linea del ADX en dos colores para diferenciar si esta subiendo o esta bajando,da buena precison, como en este script:
Buen trabajo :)
Phản hồi
ruckard dilace
@dilace, Interesante sugerencia. Este estudio intenta ayudar a la comunidad de TradingLatino y estos colores que propones no se corresponden a lo que suele usar Jaime (un solo color).
Podría añadirlo como un setting adicional pero lo dudo.

Si lo pide mucha más gente lo reconsideraría.
+1 Phản hồi
dilace ruckard
el tema que asi ves exactamente de un golpe de vista cuando esta pendiente arriba o abajo con maxima precisión, una simple sugerencia :)
+1 Phản hồi
Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Cách thức hoạt động Tính năng Biểu đồ Trả phí Giới thiệu bạn Quy tắc Áp dụng Trung tâm Trợ giúp Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Thư viện Biểu đồ Lightweight Blog & Tin tức Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Giới thiệu bạn Xu Ticket Hỗ trợ của tôi Trung tâm Trợ giúp Các ý tưởng đã đăng Người theo dõi Đang theo dõi Tin nhắn riêng Trò chuyện Đăng xuất