OPEN-SOURCE SCRIPT

Multi EMA with Smoothing & BB

56
Multi EMA with Smoothing & BB
────────────────────────────
This script overlays **four exponential moving averages**—fully adjustable (defaults 20/30/40/50)—to give an instant read on trend direction via “EMA stacking.”
• When the faster lines (short lengths) sit above the slower ones, the market is in up-trend alignment; the opposite stack signals down-trend momentum.

┌─ Optional Smoothing Engine
│ The 4th EMA (slowest) can be run through a second moving-average filter to cut noise:
│ ─ SMA ─ EMA ─ SMMA/RMA ─ WMA ─ VWMA ─ None
│ You choose both the type and length (default 14).
│ This smoothed line often acts as dynamic support/resistance for pull-back entries.
└───────────────────────────

┌─ Built-in Bollinger Bands
│ If you pick **“SMA + Bollinger Bands,”** the script wraps the smoothed EMA with upper/lower bands using a user-set standard-deviation multiplier (default 2.0).
│ • Band expansion ⇒ rising volatility / breakout potential.
│ • Band contraction ⇒ consolidation / squeeze conditions.
└───────────────────────────

Extra Utilities
• **Offset** (±500 bars) lets you shift every plot forward or backward—handy for visual back-testing or screenshot aesthetics.
• Selectable data *source* (close, HLC3, etc.) for compatibility with custom feeds.
• Transparent BB fill improves chart readability without hiding price.

Typical Uses
1. **Trend Confirmation** – Trade only in the direction of a clean EMA stack.
2. **Dynamic Stops/Targets** – Trail stops along the smoothed EMA or take profit at opposite BB.
3. **Volatility Filter** – Enter breakout strategies only when BB width begins to widen.

Parameter Summary
• EMA Lengths: 1–500 (defaults 20 | 30 | 40 | 50)
• Smoothing Type: None / SMA / EMA / SMMA / WMA / VWMA / SMA + BB
• Smoothing Length: 1–500 (default 14)
• BB StdDev: 0.001–50 (default 2.0)
• Offset: -500…+500 bars

No repainting – all values calculated on fully closed candles.
Script written in Pine Script v6. Use at your own discretion; not financial advice.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。