OPEN-SOURCE SCRIPT

5 in 1 Colored SMA or EMA (w/ Custom Source)

100
This custom Pine Script indicator plots five moving averages (MAs) — each of which can be configured as:

EMA, SMA, or a shaded zone between EMA & SMA

With individual lengths, line widths, and custom sources (like close, open, hl2, etc.)

It includes:

Dynamic coloring: MAs change color based on trend direction (up/down)

Shaded Zones: Optional visual bands between EMA and SMA of same length

Crossover dots: Marks crossover points between any pair of MAs (when enabled)

💡 Strategy Ideas Using This Indicator (High Probability Concepts)
Here are a few strategy foundations you can build on:

1. Trend-Following Cross Strategy
Entry: Buy when fast MA (e.g., MA1 - 5 EMA) crosses above slower MA (e.g., MA2 - 20 EMA)

Confirm: Only take trade if both are green (uptrend)

Exit: Sell on cross below or when MAs turn red (downtrend)

✅ Works best in trending markets
❌ Avoid in sideways/choppy conditions

2. EMA/SMA Zone Pullback Entry
Zone Type: Use “Shaded EMA/SMA Zone” mode on MAs

Entry: Enter long when price dips into the zone of an up-trending MA (color is green) and shows a bullish candle

Stop Loss: Below the zone

Target: Next MA level or fixed risk/reward ratio (e.g., 1:2)

✅ Great for buying dips in strong uptrends

3. Multiple MA Confluence
Setup: Align 3 or more MAs upward (e.g., MA1 > MA2 > MA3)

Entry: When price pulls back to MA1 or MA2 and bounces

Exit: When structure breaks or MAs lose alignment

✅ Filters out weak trends
❌ Can be late to reverse

4. Cross + Zone Confirmation
Combo: Wait for a bullish MA crossover (e.g., MA1 > MA2)

Confirm: Price is above at least one shaded zone (e.g., MA3 in zone mode)

Entry: On breakout candle or retest of the crossover point

✅ Provides strong confirmation before entry

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.