OPEN-SOURCE SCRIPT
Supertrend Alignment Score — MTF Stack (v6)

Supertrend Alignment Score — MTF Stack (v6)
Aggregates up to 7 Supertrends across custom timeframes, weights them, and converts the stack into a single 0–100 alignment score (50 = neutral). Includes faint MTF ST lines, GO/NO-GO bar paints, a per-TF mini table, a live score badge, and “All TFs Up/Down” stamps. Four alert conditions included.
How it works
Pulls Supertrend from up to 7 selectable TFs (e.g., 5/15/30/60/120/240/D).
For each TF it computes:
dir = ST direction (+1 bull, −1 bear)
prox = (close − ST) / ATR (distance in ATRs)
Per-TF score = dir * (0.7 + 0.3 * clamp01(dir*prox)) * 10 → −10…+10
Scores are weighted by your TF weights (1–5), summed, then normalized to 0…100.
All TFs Up/Down triggers when every enabled TF agrees.
Visuals
Optional faint ST lines per TF (color-coded by direction).
Bar paints on GO/NO-GO thresholds (defaults: GO ≥ 70, NO-GO ≤ 30).
Badge showing live composite % and stack state.
Mini table listing each TF’s score % and note (↑/↓ plus ATR proximity).
Inputs
Supertrend: Factor & ATR Length
7 TF slots with enable toggles & weights
Display toggles: bar paints, badge, table, ST lines, line opacity
GO / NO-GO thresholds (editable)
Alerts
GO (score ≥ threshold)
NO-GO (score ≤ threshold)
ALL TFs UP
ALL TFs DOWN
(Also posts a bar-close alert message with the current %.)
Tips
Use a logical TF ladder (e.g., 5m/15m/30m/1h/2h/4h/1D).
Give higher TFs more weight if you’re trend-following.
Tune GO/NO-GO to your market & timeframe; 70/30 is a solid starting point.
Consider confluence with volume/structure before entries.
Notes
This is an analysis tool, not financial advice. Backtest & validate before live use.
Requires real-time data on higher TFs for timely MTF updates.
Aggregates up to 7 Supertrends across custom timeframes, weights them, and converts the stack into a single 0–100 alignment score (50 = neutral). Includes faint MTF ST lines, GO/NO-GO bar paints, a per-TF mini table, a live score badge, and “All TFs Up/Down” stamps. Four alert conditions included.
How it works
Pulls Supertrend from up to 7 selectable TFs (e.g., 5/15/30/60/120/240/D).
For each TF it computes:
dir = ST direction (+1 bull, −1 bear)
prox = (close − ST) / ATR (distance in ATRs)
Per-TF score = dir * (0.7 + 0.3 * clamp01(dir*prox)) * 10 → −10…+10
Scores are weighted by your TF weights (1–5), summed, then normalized to 0…100.
All TFs Up/Down triggers when every enabled TF agrees.
Visuals
Optional faint ST lines per TF (color-coded by direction).
Bar paints on GO/NO-GO thresholds (defaults: GO ≥ 70, NO-GO ≤ 30).
Badge showing live composite % and stack state.
Mini table listing each TF’s score % and note (↑/↓ plus ATR proximity).
Inputs
Supertrend: Factor & ATR Length
7 TF slots with enable toggles & weights
Display toggles: bar paints, badge, table, ST lines, line opacity
GO / NO-GO thresholds (editable)
Alerts
GO (score ≥ threshold)
NO-GO (score ≤ threshold)
ALL TFs UP
ALL TFs DOWN
(Also posts a bar-close alert message with the current %.)
Tips
Use a logical TF ladder (e.g., 5m/15m/30m/1h/2h/4h/1D).
Give higher TFs more weight if you’re trend-following.
Tune GO/NO-GO to your market & timeframe; 70/30 is a solid starting point.
Consider confluence with volume/structure before entries.
Notes
This is an analysis tool, not financial advice. Backtest & validate before live use.
Requires real-time data on higher TFs for timely MTF updates.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。