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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.