Mapping Bitcoin trend and BTC dominance into relative altcoin behavior.
Analyzing altcoin markets in isolation misses the two macro variables that drive most crypto liquidity rotation: Bitcoin's own directional trend and Bitcoin Dominance (CRYPTOCAP:BTC.D).
Built in TradingView Pine Script v6, the BTC & Altcoins Trend Indicator evaluates both BTCUSDT and CRYPTOCAP:BTC.D simultaneously across eight timeframes—1M, 1W, 1D, 4H, 1H, 15MIN, 5MIN, and 1MIN—and displays a configurable overlay matrix directly on any chart.
Traders can switch between raw close-over-close trend detection (Mode 1) and EMA alignment mode (Mode 2) with up to four customizable EMAs (20, 50, 100, 200) and one SMA (200), complete with optional forward projection lines, chart background cues, and selectable Binance, Bybit, Coinbase, or Kraken feeds.
Add directly in TradingView or paste script.pine.
Written in Pine Script v6 (//@version=6, overlay=true) under the Mozilla Public License 2.0 for educational multi-timeframe BTC and altcoin analysis.
//@version=6
indicator("Indicador de Tendências do BTC e Altcoins", overlay=true)
exchange = input.string("BYBIT",
options=["BINANCE", "BYBIT", "COINBASE", "KRAKEN"])
btc_usd = exchange + ":BTCUSDT"
btc_dominance = "CRYPTOCAP:BTC.D"// BTC vs. Altcoin relative momentum matrix
if (btc_trend == "Subindo" and btc_dominance_trend == "Subindo")
altcoins := "1x up"
btc := "2x up"
else if (btc_trend == "Subindo" and btc_dominance_trend == "Caindo")
altcoins := "2x up"
btc := "1x up"
else if (btc_trend == "Caindo" and btc_dominance_trend == "Subindo")
altcoins := "2x down"
btc := "1x down"
else if (btc_trend == "Caindo" and btc_dominance_trend == "Caindo")
altcoins := "1x down"
btc := "2x down"Multi-timeframe analysis inside one chart overlay.
Combines security-requested BTCUSDT and BTC.D series, customizable moving averages, and an on-chart summary table.
8-Timeframe Security Evaluation
get_trend2x queries BTCUSDT and CRYPTOCAP:BTC.D via request.security across 1M, 1W, 1D, 240 (4H), 60 (1H), 15, 5, and 1 minute periods alongside the active chart timeframe.
Dual Trend Detection Modes
Mode 1 compares current vs. previous close for immediate directional momentum; Mode 2 evaluates EMA alignment between the primary EMA (20) and long-horizon EMA/SMA filters (up to 200) for Up, Down, or Lateral states.
4 EMAs + 1 SMA & Extended Lines
Plots configurable EMA 1–4 (defaults 20, 50, 100, 200) and MA 1 (default 200) with optional line.new + label.new four-bar forward projections and current-timeframe background tinting.
Configurable On-Chart Summary Table
Populates a 10x10 Pine table across all 8 intervals showing Period, BTC Trend, Dominance Trend, BTC Behavior, and Altcoins Behavior with customizable corner placement, borders, text sizes, and heatmap colors.
Exchanges, Behavior States & Disclaimer
- BYBIT:BTCUSDT (default exchange)
- BINANCE:BTCUSDT
- COINBASE:BTCUSDT
- KRAKEN:BTCUSDT (XBTUSD)
- CRYPTOCAP:BTC.D dominance index
- BTC Up + BTC.D Up -> BTC 2x / Alts 1x
- BTC Up + BTC.D Down -> BTC 1x / Alts 2x
- BTC Down + BTC.D Up -> BTC 1x / Alts 2x
- BTC Down + BTC.D Down -> BTC 2x / Alts 1x
- Lateral EMA zone -> Neutral indicator cell
- Published on TradingView (script/jgwMdlN7)
- Source hosted in single-file script.pine
- Mozilla Public License 2.0 (MPL 2.0)
- Customizable table position & palette
- Educational tool only — not financial advice