OPEN-SOURCE SCRIPT
Aggiornato

4 Independent Shaded MA Pairs + Envelopes

277
This Pine Script creates a highly customizable multi-pair Moving Average indicator with shading and optional envelopes. It displays up to 4 completely independent MA pairs on the chart, where each pair consists of two moving averages (MA1 and MA2) that can have:
Different timeframes (multi-timeframe capable)
Different lengths and types (SMA, EMA, WMA, HMA, RMA, VWMA)
Different sources (close, open, hl2, etc.)
Individual colors

For each pair, you can also add envelopes (bands) around either MA1 or MA2, in either Points or Percent, with Upper, Lower, or Both lines.

The script includes shaded fills between MA1 MA2 (the main visual feature) and optional fills between MAs and their envelopes.

Main Use Cases:
Multi-Timeframe Trend & Structure Analysis

The most powerful use. Example setup:Pair 1: Two 32-period Dailies (fast structure)
Pair 2: Two 64-period Dailies or 4H
Pair 3/4: Higher timeframes (Weekly or 200+ periods)
This gives you a clean "layered" view of trend across different scales.

Visual "Zones" or Dynamic Support/Resistance
The shaded areas between each MA pair act as visual value zones. When price is inside a fill, it's in "equilibrium"; when it breaks out, it shows conviction.

Envelope Trading Strategies
Use the envelopes like dynamic Keltner Channels or Donchian-style bands for: Mean reversion (price touching envelope)
Breakout entries
Volatility visualization

Clean Alternative to MA Ribbons
Instead of 8–10 individual MAs cluttering the chart, you get 4 controlled, color-coded, shaded pairs that are easier to read.

Confluence Tool
Look for moments when multiple pairs align (e.g., all MA1s above MA2s + price breaking upper envelopes) for high-probability directional bias.

Strengths: Very flexible and clean
Excellent for discretionary traders who use multiple moving averages
Great visual clarity thanks to the fills

Typical Trading Style:
Swing trading, position trading, and ICT/SMC-style traders who like higher-timeframe bias combined with lower-timeframe execution.

Note di rilascio
Added ability for dynamic shading between the ma's in each pair based on ma1/ma2 over/under...

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.