OPEN-SOURCE SCRIPT
Two Supertrend Crossover Signal

This indicator is designed to visualize trend shifts using two Supertrend lines and a crossover-based signal system.
It also colors the area between the two Supertrend lines based on the current trend direction, making trend changes easy to identify at a glance.
How It Works
The indicator plots:
Fast Supertrend (shorter ATR length, lower factor)
Slow Supertrend (longer ATR length, higher factor)
A crossover between these two Supertrend lines indicates a possible trend shift.
Buy Signal
A BUY signal occurs when: Fast Supertrend crosses ABOVE Slow Supertrend
This suggests bullish momentum strengthening.
Sell Signal
A SELL signal occurs when: Fast Supertrend crosses BELOW Slow Supertrend
This suggests bearish momentum increasing.
Buy/Sell Signal Labels
The chart displays clear BUY (green) and SELL (red) labels at every crossover.
These signals help traders quickly pinpoint potential entries or exits.
This indicator is ideal for:
✓ Trend trading
✓ Swing trading
✓ Identifying momentum shifts
✓ Visual confirmation of market direction
✓ Combining with price action or EMA filters
You may adjust ATR length and multiplier depending on the timeframe:
For Scalping (1–5 min):
Fast ATR: 5–7
Slow ATR: 10–14
For Intraday (5–15 min):
Fast ATR: 7
Slow ATR: 10–14
For Swing Trading (1h–4h):
Fast ATR: 10
Slow ATR: 20
Important Notes
This indicator does not repaint the Supertrend values.
Signals are based on confirmed crossovers.
Use stop-loss and risk management appropriate for your strategy.
Always combine with market context (support/resistance, volume, etc.)
It also colors the area between the two Supertrend lines based on the current trend direction, making trend changes easy to identify at a glance.
How It Works
The indicator plots:
Fast Supertrend (shorter ATR length, lower factor)
Slow Supertrend (longer ATR length, higher factor)
A crossover between these two Supertrend lines indicates a possible trend shift.
Buy Signal
A BUY signal occurs when: Fast Supertrend crosses ABOVE Slow Supertrend
This suggests bullish momentum strengthening.
Sell Signal
A SELL signal occurs when: Fast Supertrend crosses BELOW Slow Supertrend
This suggests bearish momentum increasing.
Buy/Sell Signal Labels
The chart displays clear BUY (green) and SELL (red) labels at every crossover.
These signals help traders quickly pinpoint potential entries or exits.
This indicator is ideal for:
✓ Trend trading
✓ Swing trading
✓ Identifying momentum shifts
✓ Visual confirmation of market direction
✓ Combining with price action or EMA filters
You may adjust ATR length and multiplier depending on the timeframe:
For Scalping (1–5 min):
Fast ATR: 5–7
Slow ATR: 10–14
For Intraday (5–15 min):
Fast ATR: 7
Slow ATR: 10–14
For Swing Trading (1h–4h):
Fast ATR: 10
Slow ATR: 20
Important Notes
This indicator does not repaint the Supertrend values.
Signals are based on confirmed crossovers.
Use stop-loss and risk management appropriate for your strategy.
Always combine with market context (support/resistance, volume, etc.)
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.