OPEN-SOURCE SCRIPT
Dynamic Anchored BB (RSI reset selectable)

🔵 Overview 🔵
🔵 How it works 🔵
🔵 How to use 🔵
🔵 Notes 🔵
Sometimes, rather than using Bollinger Bands based on a fixed, static period, you might want to plot them starting from a specific trigger point.
This indicator plots Bollinger Bands that originate at points where the RSI reaches 80 or higher (or, 20 or lower); the look-back period expands with each subsequent bar.
🔵 How it works 🔵
Please take a look at the chart above. It shows the display with the "Upper Only" setting and the EMA selected for the moving average.
Starting from the point where the RSI reaches 80, the Bollinger Bands' period extends progressively with each passing bar; this continues until the RSI reaches 80 again.
This indicator views the market not as something static, but as a dynamic, living entity driven by specific events; it maps the starting point of a separate trend indicator—in this case, the RSI—onto the Bollinger Bands.
You can observe a clear correlation between the price's position relative to the Bollinger Bands and the actual price movement as the bars progress.
The image below shows the "Upper and Lower" display option.
🔵 How to use 🔵
Please open the settings and configure the values and options according to your preferences:
- Choose the price source: close, ohlc4, or another option.
- RSI length: the default is set to the standard 14.
- Reset mode: select whether the reset is triggered by reaching the Upper level, the Lower level, or both.
- Specify the threshold values for both the Upper and Lower levels.
- Base MA: select the type of moving average to serve as the basis for the Bollinger Bands.
- You can adjust the Bollinger Bands' standard deviation value. An option to plot pi (3.14) is also included.
- Three color schemes are available.
🔵 Notes 🔵
This indicator can be used on charts for any asset and any timeframe.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
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.