OPEN-SOURCE SCRIPT

Multi-Coin Spaghetti

94
Multi-Coin Spaghetti is a Pine Script v6 indicator for comparing the relative performance of multiple crypto symbols in one dedicated indicator pane.
Inspiration and originality
  • Inspired in part by "Multi-Asset Performance [Spaghetti] - By Leviathan".
  • Implementation logic in this script was written from scratch.
  • Some feature ideas (including parts of table analytics) were adapted conceptually and reimplemented for this workflow.

What this indicator does
  • Plots up to 20 symbols as percentage-change lines from a shared anchor.
  • Uses one bulk Ticker List text field so you can copy/paste many symbols at once.
  • Supports two comparison modes:
    Raw %: each symbol's own anchored return.
    Relative to Base: each symbol's outperformance/underperformance versus a selected base ticker.
  • Supports anchor/reset modes:
    Visible Range
    Timestamp Anchor
    Time-based periods from 5m to 1Y
  • Includes group context:
    Mean line
    Optional +/- N sigma deviation bands
    Outlier and threshold alerts
  • Includes an auto-ranked table (sorted by current % each bar):
    • Rank: current position by % value (1 = strongest)
    • Symbol: ticker name (base row is marked)
    • %: anchored performance from selected period start (depends on Comparison Mode: Raw % or Relative to Base)
    • Delta %: bar-to-bar change in the above % value
    • Direction: quick up/down/flat signal from Delta %
    • RSI: 14-period RSI of that symbol
    • r: correlation of percentage returns vs selected base ticker over 20 bars
    • beta: relative volatility vs the selected base ticker

Why the symbol input workflow matters
  • Many multi-symbol scripts require one-by-one symbol fields.
  • This script is designed for fast bulk paste setup using Pine v6 string/array handling.
  • Useful when rotating baskets frequently.

How symbol resolution works
  • Input supports comma-separated or newline-separated symbols.
  • Bare symbols can be auto-resolved using selected Exchange + Quote Currency + Market Type.
  • Fully qualified symbols containing ":" are preserved (uppercased only).
  • Futures mode appends ".P" where needed. Spot mode does not.
  • Max active symbols: 20.

Functional options and purpose
  • Color palettes (Vivid, Jewel Tones, Pastel): tune contrast/readability for your chart theme.
  • Color modes:
    All Colored: identity tracking for each line.
    Threshold Highlight: each symbol's indicator performance line is green if current % > +X, red if < -X, otherwise dim gray.
  • Threshold Highlight affects indicator lines only. It does not color main-chart candles.
  • Highlight Selected Ticker: isolate one symbol to inspect leadership/lagging behavior while fading others.
  • Highlight Selected Ticker works only for symbols already present in Ticker List; non-listed symbols are ignored.
  • Smoothing (SMA): reduce noise for cleaner trend comparison (with lag tradeoff).
  • Period separators: make reset boundaries visually explicit.
  • Table color modes (Threshold, Line Color, Gradient, None): choose emphasis style for your workflow.
  • Status table: warns when more than 20 symbols are requested or data is missing.

Important behavior notes
  • In Visible Range mode, values re-anchor when you scroll/zoom. Historical values can move after viewport changes.
  • For stable alerting behavior, prefer Timestamp or fixed time-based period modes.
  • Missing market data for a symbol can result in no plotted line for that slot.
  • Comparative analytics tool only, not financial advice.

How to view it clearly on chart
  • This script runs in a separate indicator pane (not over price candles).
  • For best readability: shrink the main price pane and expand the indicator pane.
  • Hide unnecessary chart elements/other indicators to make lines and table easier to read.

Alert conditions included
  • Deviation Outlier Cross
  • Threshold Upside Cross
  • Threshold Downside Cross

How to add alerts in TradingView
  1. Add the indicator to chart.
  2. Click Alert (clock icon) or press Alt + A.
  3. In Condition, choose this script name.
  4. Select one of the script conditions:
    Deviation Outlier Cross
    Threshold Upside Cross
    Threshold Downside Cross
  5. Set alert frequency and expiration.
  6. Configure notification channels (popup/app/email/webhook).
  7. Create the alert.

Alert interpretation
  • Threshold alerts: trigger when a symbol crosses above +Threshold or below -Threshold.
  • Deviation alerts: trigger when a symbol crosses outside configured deviation context.
  • In Visible Range mode, historical trigger locations can shift after viewport changes.

免責事項

この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。