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.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
✅My Telegram
t.me/trading_mura
t.me/trading_mura
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
✅My Telegram
t.me/trading_mura
t.me/trading_mura
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.