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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.