OPEN-SOURCE SCRIPT
Updated

Daily Bubble Risk Adjustment

660
This script calculates the ratio of the asset's closing price to its 20-week moving average (20W MA) and visualizes it as a color-coded line chart. The script also includes a customizable moving average (default: 111-day MA) to help smooth the ratio trend.

It identifies overbought and oversold conditions relative to the 20W MA, making it a valuable tool for long-term trend analysis.
Release Notes
This script calculates the ratio of the asset's closing price to its 20-week moving average (20W MA) and visualizes it as a color-coded line chart. The script also includes a customizable moving average (default: 111-day MA) to help smooth the ratio trend.

It identifies overbought and oversold conditions relative to the 20W MA, making it a valuable tool for long-term trend analysis.
Release Notes
Key Updates:
BMSB Implementation:
Added 20-SMA and 21-EMA calculations based on the ratio instead of price.
Introduced a shaded area between the two for better visualization.

Revised Color Assignments:
Adjusted the color gradient for different ratio ranges.
Improved color contrast for better readability.
Divergence Detection:
Implemented regular bullish and bearish divergences using pivot points.
Added labels and markers for easier trend identification.
Release Notes
some adjustments for colors

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.