OPEN-SOURCE SCRIPT
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.
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.
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.