OPEN-SOURCE SCRIPT
Atualizado 8MA Compass — HTF map + GC/DC cues

8MA Compass provides a clean trend context by combining strict 4-of-4 confluence (Current TF vs Higher TF) with SMA200 repainting on Golden/Death Cross (GC/DC).
What it shows
SMA200 color on GC/DC (Current TF):
Why “8MA”? The 4-of-4 logic uses 8 moving averages in total: 4 on the Current TF and 4 on the HTF (EMA10/20 and SMA50/200 on both frames). HTF EMAs are used in calculations but are not plotted by default—hence the name 8MA Compass.
Auto HTF mapping
Settings
1. Display
2. Filter
3. Golden/Death
Alerts
Visual details
Usage
1. Use the 4-of-4 background as inter-timeframe momentum context.
2. Use SMA200 color to gauge long-term regime confirmation:
Disclaimer: For educational purposes only. Not financial advice. Trading involves risk.
What it shows
- 4-of-4 background (context): compares EMA10, EMA20, SMA50, SMA200 on the Current TF against the same four MAs on the Higher TF (HTF).
- All 4 above their HTF values → bullish background.
- All 4 below their HTF values → bearish background.
SMA200 color on GC/DC (Current TF):
- Last signal is DC and price below SMA200 → SMA200 turns red.
- Price above SMA200 but the last signal is DC (no GC afterward) → SMA200 stays base color.
- Last signal is GC and price above SMA200 → SMA200 turns green #089981.
Why “8MA”? The 4-of-4 logic uses 8 moving averages in total: 4 on the Current TF and 4 on the HTF (EMA10/20 and SMA50/200 on both frames). HTF EMAs are used in calculations but are not plotted by default—hence the name 8MA Compass.
Auto HTF mapping
- Current 1H → HTF 4H
- Current 4H → HTF 1D
- Current 1D → HTF 1W
- All other timeframes: HTF defaults to Current TF (4-of-4 will typically be neutral).
- Manual mode: choose any HTF. If Manual HTF equals Current TF, HTF SMAs are hidden to avoid overlap.
Settings
1. Display
- Show CURRENT TF — plot EMA10/20, SMA50/200 on Current TF.
- Show HARD TF — plot SMA50/200 on HTF (hidden if HTF == Current TF).
- HTF mode — Auto / Manual, with Hard TF (Manual) selector.
2. Filter
- Show base background (4-of-4) — enable/disable confluence shading.
- Epsilon (in ticks) — small tolerance in Cur vs HTF comparisons to reduce flicker.
3. Golden/Death
- Color SMA200 on GC/DC (Cur TF) — repaint SMA200 on GC/DC per rules above (enabled by default).
Alerts
- GC/DC (Current TF, SMA50/200): Golden Cross / Death Cross (on bar close).
- EMA10/20 (Current TF): “Bull regime ON” / “Bear regime ON” on crossovers.
- Optional HTF GC/DC alerts (SMA50/200 on chosen HTF).
Visual details
- HTF SMA50/200 are drawn first; Current TF lines are drawn on top for clarity.
- SMA200 (Current TF) is drawn last (and slightly thicker) to remain readable.
- HTF EMAs are used in 4-of-4 logic but not plotted by design.
Usage
1. Use the 4-of-4 background as inter-timeframe momentum context.
2. Use SMA200 color to gauge long-term regime confirmation:
- Prefer longs when last GC and price holds above SMA200 (#089981 line).
- Avoid longs when last DC and price is below SMA200 (red line).
Disclaimer: For educational purposes only. Not financial advice. Trading involves risk.
Notas de Lançamento
Minor updateNotas de Lançamento
MA Compass delivers a clean, actionable context by combining (1) regime-aware moving averages on the current timeframe, (2) a thin HTF SMA200 layer, and (3) Bill Williams Fractals with level lines for precise break/flip triggers.What changed vs the old “8MA Compass”
• Removed the “4-of-4” confluence logic and its background shading.
• Removed HTF EMA10/EMA20 and HTF SMA50 from logic and plots.
• Removed “Epsilon (ticks)” and all HTF-confluence inputs.
• Removed optional HTF GC/DC alerts.
• Kept Auto-HTF mapping; HTF layer is now SMA200 only (thin, 1 px).
• Added Bill Williams Fractals with mandatory Teeth filter (above/below).
• Added fractal level lines (Ray/Segment), max-lines cap, and auto-delete on break.
What it shows now
• Current TF: EMA21 (color = local trend), optional EMA10, SMA50, SMA200 (dynamic color).
• HTF: SMA200 (auto-mapped or manual).
• Fractals: BW triangles at pivot bars + horizontal fractal levels.
Color logic
• EMA21 color = local trend:
– Green → bullish bias.
– Red → bearish bias.
– Base line color → neutral/transition.
• SMA200 color (Current TF):
– Green (#089981): last signal is Golden Cross and price is above SMA200 → bullish regime.
– Red: last signal is Death Cross and price is below SMA200 → bearish regime.
– Blue (base): no strong regime → range or complex correction.
Simple trading workflow
1. Bias: Follow EMA21 color for the local trend. Best setups align with a green SMA200 for longs or a red SMA200 for shorts. If SMA200 is blue, expect chop/range; tighten risk.
2. Triggers (trade with the local trend):
– Bull case: break and close above the latest bearish-fractal level → optional retest (flip to support).
– Bear case: break and close below the latest bullish-fractal level → optional retest (flip to resistance).
3. Risk: Initial stop beyond the opposite fractal level (or k×ATR). Invalidate if EMA21 flips against you or SMA200 color degrades (e.g., green → blue/red for longs).
4. Management: Scale at prior swing levels; trail behind newly formed fractals. Avoid fresh entries when SMA200 is blue and EMA21 keeps flipping (choppy regime).
5. HTF context: Prefer trades that also look reasonable vs the HTF SMA200 slope (visually rising/falling), but do not override local invalidation rules.
Notas de Lançamento
Minor updateScript de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
✅My Telegram
t.me/trading_mura
t.me/trading_mura
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
✅My Telegram
t.me/trading_mura
t.me/trading_mura
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.