OPEN-SOURCE SCRIPT
Adaptive Gap Bands - DolphinTradeBot

1️⃣Overview
Adaptive Gap Bands is a momentum indicator that measures the percentage difference between fast and slow moving averages. This helps identify potential overbought or oversold zones.
The goal is to analyze “gap” behaviors within a trend and generate clearer entry–exit signals.
Since the bands are anchored to the slow moving average, they are more sensitive to the trend direction, making signals stronger in line with the prevailing trend.
📌 Signals do not repaint — once confirmed, they remain fixed on the chart.
2️⃣How It Works ?
The indicator tracks the distance between fast and slow MAs.
3️⃣How to Use It ?
Add the script to your chart.
4️⃣⚙️Settings
Adaptive Gap Bands is a momentum indicator that measures the percentage difference between fast and slow moving averages. This helps identify potential overbought or oversold zones.
The goal is to analyze “gap” behaviors within a trend and generate clearer entry–exit signals.
Since the bands are anchored to the slow moving average, they are more sensitive to the trend direction, making signals stronger in line with the prevailing trend.
📌 Signals do not repaint — once confirmed, they remain fixed on the chart.
2️⃣How It Works ?
The indicator tracks the distance between fast and slow MAs.
- The indicator measures the percentage gap between the fast and slow moving averages, relative to the slow MA.
- Each time the gap reaches a new extreme during a swing, that value is stored.
When the averages cross, the stored values from the last N swings (defined by Swing Count) are collected. - These gap values are then averaged to create a smoother and more adaptive reference.
- The bands are built by multiplying this average gap with the % Multiplier and projecting it around the slow MA.
3️⃣How to Use It ?
Add the script to your chart.
- Green label → potential Long signal.
- Red label → potential Short signal.
- Signals often appear when price moves outside the adaptive bands, showing extreme momentum.
- Can also be used as a reference tool in manual trades to set profit/loss expectations.
- By comparing upward vs. downward gaps, it can help analyze and confirm the dominant trend direction.
4️⃣⚙️Settings
- Swing Count → Number of past swings considered.
- % Multiplier → Adjusts band width (narrower or wider).
- MA Lengths & Types → Choose fast and slow moving averages (EMA, SMA, RMA, etc.).
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.