ð Multi-Ticker SMA Distance & Trend Table - SAINT

ð Overview
This indicator creates a real-time dashboard on your TradingView chart showing the price distance from the SMA(20) and SMA(200) for up to 10 tickers, along with their trend status and directional arrow based on recent candles.
It is designed for traders who want a quick, side-by-side comparison of multiple assets (stocks, futures, crypto) to identify which are trending, stretched from moving averages, or approaching key support/resistance areas.
âïļ Key Features
ð§Đ Multi-Ticker Support
Accepts manual ticker input (comma-separated list, up to 10 tickers).
Optionally includes the current chart symbol automatically.
âąïļ Timeframe Logic
Uses custom timeframe if provided.
Automatically defaults to the chartâs timeframe if not specified.
Each symbol is auto-validated â if the requested timeframe is unsupported, it falls back intelligently:
Futures â 60-minute
Crypto â 4-hour
Stocks â Daily
If all fail â chart timeframe
ð Distance Calculation
For each symbol:
It shows the distance of current price from SMA(20) and SMA(200) in points and percentage format.
Example: +5.12 (+1.23%)
ð Trend Classification
Includes direction arrow (âē / âž) based on recent trend of the last N candles (user-defined input).
ð Sorting Options
Sort dashboard rows dynamically by:
Distance from SMA(20)
Distance from SMA(200)
Trend Strength
or keep original order
ðĻ Display & Layout
Draws a table directly on the main chart (overlay=true)
Configurable table position: Top-Left / Top-Right / Bottom-Left / Bottom-Right (default = Bottom-Left)
Each cell color-coded by distance:
Green â price above SMA
Red â price below SMA
Footer line shows timeframe, sorting mode, number of fallbacks used, and skipped tickers.
ð§ Example Use-Cases
Example 1 â Daily Trend Comparison
Input:
AAPL, MSFT, TSLA, AMZN, NVDA, META
Custom Timeframe: D
Output:
A compact dashboard showing each tickerâs distance from its daily SMAs â helping you see which are extended (potential mean-reversion plays) or trending cleanly.
Example 2 â Futures Dashboard
Input:
ES1!, NQ1!, YM1!, RTY1!, CL1!, GC1!
Custom Timeframe: 60
If some futures symbols donât support the exact 60-min resolution, the indicator automatically falls back to the next best timeframe.
Example 3 â Mixed Watchlist with Auto Chart Symbol
Input:
AAPL, BTCUSD, ETHUSD, NQ1!
Auto-Include Chart Symbol: â
Custom Timeframe: blank
The dashboard uses your chartâs current timeframe and merges both stocks and crypto seamlessly.
ð§ū Example Dashboard Layout
Ticker Dist SMA(20) Dist SMA(200) Trend
AAPL +2.35 (+1.1%) +20.40 (+9.3%) ðĒ Buy âē
MSFT -1.25 (-0.4%) +15.30 (+5.2%) ð Neutral
TSLA -12.10 (-4.9%) -40.70 (-15.0%) ðī Sell âž
TF: D | Sorted: SMA(20)% | Fallbacks: 1 | Skipped: 0
ð§Đ Inputs Summary
Input Description
Manual Tickers Comma-separated list (up to 10)
Auto-Include Chart Symbol Adds current chart ticker automatically
Custom Timeframe Overrides chart TF if supported
Use Custom Timeframe? Enables/disables custom TF
Table Position Choose table placement (default: Bottom Left)
Candles for Trend Arrow Number of bars to analyze for short-term trend
Sort By Sorting preference for dashboard
â ïļ Notes
For best performance, limit to âĪ10 symbols.
Pine does not allow reading actual TradingView watchlists directly â you must manually input tickers or use the chart symbol auto-include option.
Table updates only on last bar for performance reasons.
āļŠāļāļĢāļīāļāļāđāđāļāļāđāļāļāļēāļ°āļāļđāđāđāļāđāļĢāļąāļāđāļāļīāļāđāļāđāļēāļāļąāđāļ
āđāļāļāļēāļ°āļāļđāđāđāļāđāļāļĩāđāđāļāđāļĢāļąāļāļāļēāļĢāļāļāļļāļĄāļąāļāļīāļāļēāļāļāļđāđāđāļāļĩāļĒāļāđāļāđāļēāļāļąāđāļāļāļĩāđāļŠāļēāļĄāļēāļĢāļāđāļāđāļēāļāļķāļāļŠāļāļĢāļīāļāļāđāļāļĩāđāđāļāđ āļāļļāļāļāļ°āļāđāļāļāļĢāđāļāļāļāļāđāļĨāļ°āđāļāđāļĢāļąāļāļāļāļļāļāļēāļāļāđāļāļāļāļķāļāļāļ°āļŠāļēāļĄāļēāļĢāļāđāļāđāļāļēāļāđāļāđ āđāļāļĒāļāļāļāļīāļāļ°āđāļāđāļĢāļąāļāļāļāļļāļāļēāļāļŦāļĨāļąāļāļāļēāļāļāļģāļĢāļ°āđāļāļīāļāđāļĨāđāļ§ āļŠāļģāļŦāļĢāļąāļāļĢāļēāļĒāļĨāļ°āđāļāļĩāļĒāļāđāļāļīāđāļĄāđāļāļīāļĄ āļāļģāļāļēāļĄāļāļģāđāļāļ°āļāļģāļāļāļāļāļđāđāđāļāļĩāļĒāļāļāđāļēāļāļĨāđāļēāļāļŦāļĢāļ·āļāļāļīāļāļāđāļ smthakur78 āđāļāļĒāļāļĢāļ
TradingView āđāļĄāđāđāļāļ°āļāļģāđāļŦāđāļāļģāļĢāļ°āđāļāļīāļāļŦāļĢāļ·āļāđāļāđāļŠāļāļĢāļīāļāļāđ āđāļ§āđāļāđāļāđāļ§āđāļēāļāļļāļāļāļ°āđāļāļ·āđāļāļāļ·āļāļāļđāđāđāļāļĩāļĒāļāļŠāļāļĢāļīāļāļāđāđāļĨāļ°āđāļāđāļēāđāļāļ§āļīāļāļĩāļāļēāļĢāļāļģāļāļēāļāļāļāļāļĄāļąāļ āļāļļāļāļĒāļąāļāļāļēāļāļāļāļāļēāļāđāļĨāļ·āļāļāļāļāļāđāļāđāļāļāļāļāļĢāđāļŠ āđāļāļāļāļĢāļĩāđāļāļŠāļāļĢāļīāļāļāđāļāļļāļĄāļāļāļāļāļāđāļĢāļē
āļāļģāđāļāļ°āļāļģāļāļāļāļāļđāđāđāļāļĩāļĒāļ
āļāļģāļāļģāļāļąāļāļŠāļīāļāļāļīāđāļāļ§āļēāļĄāļĢāļąāļāļāļīāļāļāļāļ
āļŠāļāļĢāļīāļāļāđāđāļāļāđāļāļāļēāļ°āļāļđāđāđāļāđāļĢāļąāļāđāļāļīāļāđāļāđāļēāļāļąāđāļ
āđāļāļāļēāļ°āļāļđāđāđāļāđāļāļĩāđāđāļāđāļĢāļąāļāļāļēāļĢāļāļāļļāļĄāļąāļāļīāļāļēāļāļāļđāđāđāļāļĩāļĒāļāđāļāđāļēāļāļąāđāļāļāļĩāđāļŠāļēāļĄāļēāļĢāļāđāļāđāļēāļāļķāļāļŠāļāļĢāļīāļāļāđāļāļĩāđāđāļāđ āļāļļāļāļāļ°āļāđāļāļāļĢāđāļāļāļāļāđāļĨāļ°āđāļāđāļĢāļąāļāļāļāļļāļāļēāļāļāđāļāļāļāļķāļāļāļ°āļŠāļēāļĄāļēāļĢāļāđāļāđāļāļēāļāđāļāđ āđāļāļĒāļāļāļāļīāļāļ°āđāļāđāļĢāļąāļāļāļāļļāļāļēāļāļŦāļĨāļąāļāļāļēāļāļāļģāļĢāļ°āđāļāļīāļāđāļĨāđāļ§ āļŠāļģāļŦāļĢāļąāļāļĢāļēāļĒāļĨāļ°āđāļāļĩāļĒāļāđāļāļīāđāļĄāđāļāļīāļĄ āļāļģāļāļēāļĄāļāļģāđāļāļ°āļāļģāļāļāļāļāļđāđāđāļāļĩāļĒāļāļāđāļēāļāļĨāđāļēāļāļŦāļĢāļ·āļāļāļīāļāļāđāļ smthakur78 āđāļāļĒāļāļĢāļ
TradingView āđāļĄāđāđāļāļ°āļāļģāđāļŦāđāļāļģāļĢāļ°āđāļāļīāļāļŦāļĢāļ·āļāđāļāđāļŠāļāļĢāļīāļāļāđ āđāļ§āđāļāđāļāđāļ§āđāļēāļāļļāļāļāļ°āđāļāļ·āđāļāļāļ·āļāļāļđāđāđāļāļĩāļĒāļāļŠāļāļĢāļīāļāļāđāđāļĨāļ°āđāļāđāļēāđāļāļ§āļīāļāļĩāļāļēāļĢāļāļģāļāļēāļāļāļāļāļĄāļąāļ āļāļļāļāļĒāļąāļāļāļēāļāļāļāļāļēāļāđāļĨāļ·āļāļāļāļāļāđāļāđāļāļāļāļāļĢāđāļŠ āđāļāļāļāļĢāļĩāđāļāļŠāļāļĢāļīāļāļāđāļāļļāļĄāļāļāļāļāļāđāļĢāļē