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.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.
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.