OPEN-SOURCE SCRIPT
Regime Overlay — 30m/1h Supertrend + Tint + Flip Alerts

One-liner
Fast/slow Supertrend (30m & 1h) with majority-vote bias tinting and flip alerts—quickly see when structure changes.
What it does
Plots 30m (fast) and 1h (slow) Supertrend lines.
Computes a majority regime (Bull / Bear / Mixed) from the 30m & 1h directions.
Tints candles by the majority regime (green = bull, red = bear, orange = mixed).
Marks and alerts on regime flips (30m, 1h, and Majority).
How it works
Uses TradingView’s built-in ta.supertrend(multiplier, atrLength) on 30m and 1h via MTF security calls.
Direction is +1 (up) or –1 (down). The majority vote is the sum of both directions:
0 → Bull Regime
< 0 → Bear Regime
= 0 → Mixed (disagreement)
Inputs
TF A / TF B: default 30m and 1h (change if you prefer other pairs).
ATR Length, Multiplier: Supertrend parameters (defaults 10 & 3.0).
Toggles: Show 30m, Show 1h, Tint candles, Tint transparency, Flip markers.
Alerts included
30m Flip Up/Down
1h Flip Up/Down
Majority Regime Flip Up/Down
Turn on the ones you care about (fast flips for scalps, 1h/majority for bigger bias shifts).
How to use
Keep both lines visible to read fast vs slow structure.
Use the tint as a quick bias filter; trade only with the prevailing color if that’s your style.
Combine with your entries/exits (e.g., RSI/volume/price action); the overlay provides context, not signals.
If you change the TFs, retune ATR/Multiplier to match volatility.
Notes
MTF behavior: The 30m/1h values finalize on their bar close; they may update intra-bar.
Works on crypto, FX, stocks; parameters may need per-asset tuning.
Credits
Built by @hacklenajee with GPT-5 Thinking (ChatGPT).
For education/research only. Not financial advice.
Fast/slow Supertrend (30m & 1h) with majority-vote bias tinting and flip alerts—quickly see when structure changes.
What it does
Plots 30m (fast) and 1h (slow) Supertrend lines.
Computes a majority regime (Bull / Bear / Mixed) from the 30m & 1h directions.
Tints candles by the majority regime (green = bull, red = bear, orange = mixed).
Marks and alerts on regime flips (30m, 1h, and Majority).
How it works
Uses TradingView’s built-in ta.supertrend(multiplier, atrLength) on 30m and 1h via MTF security calls.
Direction is +1 (up) or –1 (down). The majority vote is the sum of both directions:
0 → Bull Regime
< 0 → Bear Regime
= 0 → Mixed (disagreement)
Inputs
TF A / TF B: default 30m and 1h (change if you prefer other pairs).
ATR Length, Multiplier: Supertrend parameters (defaults 10 & 3.0).
Toggles: Show 30m, Show 1h, Tint candles, Tint transparency, Flip markers.
Alerts included
30m Flip Up/Down
1h Flip Up/Down
Majority Regime Flip Up/Down
Turn on the ones you care about (fast flips for scalps, 1h/majority for bigger bias shifts).
How to use
Keep both lines visible to read fast vs slow structure.
Use the tint as a quick bias filter; trade only with the prevailing color if that’s your style.
Combine with your entries/exits (e.g., RSI/volume/price action); the overlay provides context, not signals.
If you change the TFs, retune ATR/Multiplier to match volatility.
Notes
MTF behavior: The 30m/1h values finalize on their bar close; they may update intra-bar.
Works on crypto, FX, stocks; parameters may need per-asset tuning.
Credits
Built by @hacklenajee with GPT-5 Thinking (ChatGPT).
For education/research only. Not financial advice.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。