Band Very Slow Moving Average (supfabio)

At its core, the script plots a **Very Slow Moving Average (SMA)** and two **percentage bands** (Upper/Lower) that expand/contract based on your chosen offset. The MA and bands **share the same trend color**, so you can instantly see whether the baseline is rising or falling without needing extra indicators.
### What you get on the chart
* **Very Slow MA (SMA)** as the main baseline (right scale).
* **Upper/Lower Bands** at a configurable % distance from the MA.
* Optional **band fill** and **trend background** for faster visual scanning.
* Optional **BUY / SELL labels** when price closes outside the bands (mean-reversion / exhaustion style context).
* Optional **CLOSE reference markers + horizontal target lines** to help you visualize potential “return-to-mean” or reaction levels.
### How the signals work (high level)
This indicator is **not a strategy** and does not “predict” the market. Instead, it highlights **conditions**:
* **BUY label**: when price closes **below the lower band** (potential downside extension).
* **SELL label**: when price closes **above the upper band** (potential upside extension).
* An optional **“Only first candle beyond band (cross)”** mode helps reduce repeated labels by triggering only on the first decisive move beyond the band.
* A **cooldown** option can further reduce repeated same-direction signals.
### CLOSE reference lines (visual guidance, not a promise)
When enabled, the script can draw **horizontal dotted reference lines** derived from the MA’s turning structure (using confirmed swing logic) and manage them to keep the chart readable. As price action evolves, these lines may:
* Extend with time while the “case” is active (dotted),
* Flip to **solid** when a valid touch/confirmation occurs (based on your settings),
* And optionally print a small **CLOSE marker** on the level.
To prevent clutter near the current price, the indicator includes a **“Merge dotted lines within ticks (near price)”** setting that consolidates nearby dotted levels into a cleaner view.
### Inputs you’ll care about
* **MA Length**: controls how “slow” the baseline is.
* **Band offset (%)**: sets the distance of the upper/lower band from the MA.
* **Signals**: toggle labels, cross-only behavior, and cooldown.
* **Close module**: toggle close markers/lines and adjust confirmation behavior.
* **Merge dotted lines (ticks)**: keeps the chart readable when multiple levels form close together.
### Alerts
The script supports alerts for:
* **BUY / SELL**
* **BUY_CLOSE / SELL_CLOSE**
These are meant to help with notifications and workflow automation. Always validate signals in your own process before acting.
### Notes & limitations
* Designed for **standard OHLC candles/bars**. Results may be misleading on non-standard chart types.
* Any swing/turn-based logic can appear **after confirmation**, which means some elements naturally print with a delay.
* This tool is best used as **context** alongside your own confirmation rules (structure, trend, volume, risk management).
**Disclaimer:** This indicator is for educational and informational purposes only and does not constitute financial advice. Trading involves risk; always test settings and use proper risk management.
Tập lệnh chỉ hiển thị cho người được mời
Chỉ những người dùng được tác giả chấp thuận mới có thể truy cập tập lệnh này. Bạn sẽ cần yêu cầu và được cấp quyền sử dụng. Thông thường quyền này được cấp sau khi thanh toán. Để biết thêm chi tiết, làm theo hướng dẫn của tác giả bên dưới hoặc liên hệ trực tiếp với supfabio.
TradingView KHÔNG khuyến nghị bạn trả phí hoặc sử dụng một tập lệnh trừ khi bạn hoàn toàn tin tưởng vào tác giả và hiểu cách hoạt động của tập lệnh. Bạn cũng có thể tìm các lựa chọn miễn phí, mã nguồn mở trong các script cộng đồng của chúng tôi.
Hướng dẫn của tác giả
Thông báo miễn trừ trách nhiệm
Tập lệnh chỉ hiển thị cho người được mời
Chỉ những người dùng được tác giả chấp thuận mới có thể truy cập tập lệnh này. Bạn sẽ cần yêu cầu và được cấp quyền sử dụng. Thông thường quyền này được cấp sau khi thanh toán. Để biết thêm chi tiết, làm theo hướng dẫn của tác giả bên dưới hoặc liên hệ trực tiếp với supfabio.
TradingView KHÔNG khuyến nghị bạn trả phí hoặc sử dụng một tập lệnh trừ khi bạn hoàn toàn tin tưởng vào tác giả và hiểu cách hoạt động của tập lệnh. Bạn cũng có thể tìm các lựa chọn miễn phí, mã nguồn mở trong các script cộng đồng của chúng tôi.