OPEN-SOURCE SCRIPT
Multi-Coin Spaghetti

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
What this indicator does
Why the symbol input workflow matters
How symbol resolution works
Functional options and purpose
Important behavior notes
How to view it clearly on chart
Alert conditions included
How to add alerts in TradingView
Alert interpretation
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
- Rank: current position by % value (1 = strongest)
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
- Add the indicator to chart.
- Click Alert (clock icon) or press Alt + A.
- In Condition, choose this script name.
- Select one of the script conditions:
Deviation Outlier Cross
Threshold Upside Cross
Threshold Downside Cross - Set alert frequency and expiration.
- Configure notification channels (popup/app/email/webhook).
- 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的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。