OPEN-SOURCE SCRIPT
Super-trend Signal Engine Quantum Edge

Short description
ATR-based Supertrend strategy that flips long or short on confirmed trend reversals, with optional signal labels, trend highlighting, bar coloring, and built-in date-range backtesting.
Description
Signal Engine Quantum Edge is a public Supertrend-based strategy built to track volatility-adjusted trend shifts and execute long or short entries when trend direction flips. The script uses ATR-expanded bands around hl2, then updates those bands as price develops so the strategy can detect reversals and stay aligned with the active move. TradingView describes Supertrend as a trend-following tool built from ATR and price-based bands, where changes in the line’s position relative to price signal shifts in trend direction.
How it works
Calculates ATR using either the built-in ATR method or an alternative SMA-of-true-range method.
Builds dynamic upper and lower trend bands from price and ATR.
Triggers a long entry when trend flips from bearish to bullish.
Triggers a short entry when trend flips from bullish to bearish.
Restricts entries to the user-defined backtest date window.
This strategy follows the same general Supertrend logic TradingView documents for reversal-based entries, where long positions begin when the trend changes from above price to below price, and short positions begin on the opposite transition.
Inputs
ATR Period — default 10.
ATR Multiplier — default 3.0.
Source — default hl2.
Change ATR Calculation Method? — switch between built-in ATR and SMA-of-TR.
Show Buy/Sell Signals? — toggle signal labels.
Highlighter On/Off? — toggle trend fill shading.
Bar Coloring On/Off? — color candles by active trend.
From / To Date — define the backtest window.
Visual features
Green Supertrend line and fills for bullish phases.
Red Supertrend line and fills for bearish phases.
Optional Buy/Sell labels at trend flips.
Bar coloring to reflect the most recent active signal.
Usage notes
This is a strategy, not an indicator, so it uses strategy.entry() to simulate long and short trades directly from reversal signals.
Like most Supertrend systems, it is designed for trending conditions and can produce false signals during sideways or highly compressed markets, which TradingView also notes as a common limitation of Supertrend-based methods.
For more realistic testing, set commission, slippage, and position sizing in the strategy properties before evaluating results.
ATR-based Supertrend strategy that flips long or short on confirmed trend reversals, with optional signal labels, trend highlighting, bar coloring, and built-in date-range backtesting.
Description
Signal Engine Quantum Edge is a public Supertrend-based strategy built to track volatility-adjusted trend shifts and execute long or short entries when trend direction flips. The script uses ATR-expanded bands around hl2, then updates those bands as price develops so the strategy can detect reversals and stay aligned with the active move. TradingView describes Supertrend as a trend-following tool built from ATR and price-based bands, where changes in the line’s position relative to price signal shifts in trend direction.
How it works
Calculates ATR using either the built-in ATR method or an alternative SMA-of-true-range method.
Builds dynamic upper and lower trend bands from price and ATR.
Triggers a long entry when trend flips from bearish to bullish.
Triggers a short entry when trend flips from bullish to bearish.
Restricts entries to the user-defined backtest date window.
This strategy follows the same general Supertrend logic TradingView documents for reversal-based entries, where long positions begin when the trend changes from above price to below price, and short positions begin on the opposite transition.
Inputs
ATR Period — default 10.
ATR Multiplier — default 3.0.
Source — default hl2.
Change ATR Calculation Method? — switch between built-in ATR and SMA-of-TR.
Show Buy/Sell Signals? — toggle signal labels.
Highlighter On/Off? — toggle trend fill shading.
Bar Coloring On/Off? — color candles by active trend.
From / To Date — define the backtest window.
Visual features
Green Supertrend line and fills for bullish phases.
Red Supertrend line and fills for bearish phases.
Optional Buy/Sell labels at trend flips.
Bar coloring to reflect the most recent active signal.
Usage notes
This is a strategy, not an indicator, so it uses strategy.entry() to simulate long and short trades directly from reversal signals.
Like most Supertrend systems, it is designed for trending conditions and can produce false signals during sideways or highly compressed markets, which TradingView also notes as a common limitation of Supertrend-based methods.
For more realistic testing, set commission, slippage, and position sizing in the strategy properties before evaluating results.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.