Supertrend Zones + RSI Dots

This is a single TradingView indicator that combines a Supertrend-based trend zone with an RSI display and dot signals. The RSI appears in its own pane below the chart. The zone shading and the dots are drawn on your main price chart, so you only need one indicator.
**The zones**
The script calculates a Supertrend from an ATR length and a multiplier. When Supertrend is in an uptrend, the chart is in the buying zone and the background turns a faint green. When it is in a downtrend, the chart is in the selling zone and the background turns a faint red. The zone changes whenever Supertrend flips direction. You can also switch on small BUY and SELL markers where each new zone starts, and show the Supertrend line itself. Both are off by default.
**The dots**
The dots depend on the current zone and on the RSI crossing a middle level, which is 50 by default.
- In a buying zone, a green dot appears below the candle when the signal crosses up through 50.
- In a selling zone, a red dot appears above the candle when the signal crosses down through 50.
- Crosses in the opposite direction inside a zone are ignored, so a zone only ever shows its own color of dot.
You can choose whether the dots follow the raw RSI or the smoothed RSI (RSI SMA), and you can change the dot colors and the middle level.
**The RSI pane**
The pane shows the standard RSI line with the usual 70, 50 and 30 lines. It has a purple band between 70 and 30 and gradient shading when RSI moves into overbought or oversold territory. A yellow smoothing line follows the RSI. Its type can be changed (SMA, EMA, RMA, WMA, VWMA, or SMA with Bollinger Bands), or it can be turned off. The smoothing line is the same one the "RSI SMA" dot option uses.
**Extra features**
- **Divergence:** an optional feature, off by default, that labels regular bullish and bearish divergences between price and RSI in the pane.
- **Alerts:** available for the start of each zone, for the green and red dots, and for the two divergence types.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.