OPEN-SOURCE SCRIPT
Linear % ST | QuantEdgeB

๐ Introducing Linear Percentile SuperTrend (Linear % ST) by QuantEdgeB
๐ ๏ธ Overview
Linear % SuperTrend (Linear % ST) by QuantEdgeB is a hybrid trend-following indicator that combines Linear Regression, Percentile Filters, and Volatility-Based SuperTrend Logic into one dynamic tool. This system is designed to identify trend shifts early while filtering out noise during choppy market conditions.
By utilizing percentile-based median smoothing and customized ATR multipliers, this tool captures both breakout momentum and pullback opportunities with precision.
โจ Key Features
๐น Percentile-Based Median Filtering
Removes outliers and normalizes price movement for cleaner trend detection using the 50th percentile (median) of recent price action.
๐น Linear Regression Smoothing
A smoothed baseline is computed with Linear Regression to detect the underlying trend while minimizing lag.
๐น SuperTrend Structure with Adaptive Bands
The indicator implements an enhanced SuperTrend engine with custom ATR bands that adapt to trend direction. Bands tighten or loosen based on volatility and trend strength.
๐น Dynamic Long/Short Conditions
Long and short signals are derived from the relationship between price and the SuperTrend threshold zones, clearly showing trend direction with optional "Long"/"Short" labels on the chart.
๐น Multiple Visual Themes
Select from 6 built-in color palettes including Strategy, Solar, Warm, Cool, Classic, and Magic to match your personal style or strategy layout.
๐ How It Works
1๏ธโฃ Percentile Filtering
The source price (default: close) is filtered using a nearest-rank 50th percentile over a custom lookback. This normalizes data to reflect the central tendency and removes noisy extremes.
2๏ธโฃ Linear Regression Trend Base
A Linear Regression Moving Average (LSMA) is applied to the filtered median, forming the core trend line. This dynamic trendline provides a low-lag yet smooth view of market direction.
3๏ธโฃ SuperTrend Engine
ATR is applied with custom multipliers (different for long and short) to create dynamic bands. The bands react to price movement and only shift direction after confirmation, preventing false flips.
4๏ธโฃ Trend Signal Logic
โข When price stays above the dynamic lower band โ Bullish trend
โข When price breaks below the upper band โ Bearish trend
โข Trend direction remains stable until violated by price.
โ๏ธ Custom Settings
โข Percentile Length โ Lookback for percentile smoothing (default: 35)
โข LSMA Length โ Determines the base trend via linear regression (default: 24)
โข ATR Length โ ATR period used in dynamic bands (default: 14)
โข Long Multiplier โ ATR multiplier for bullish thresholds (default: 0.8)
โข Short Multiplier โ ATR multiplier for bearish thresholds (default: 1.9)
โ How to Use
1๏ธโฃ Trend-Following Strategy
โ๏ธ Go Long when price breaks above the lower ATR band, initiating an upward trend
โ๏ธ Go Short when price falls below the upper ATR band, confirming bearish conditions
โ๏ธ Remain in trend direction until the SuperTrend flips
2๏ธโฃ Visual Confirmation
โ๏ธ Use bar coloring and the dynamic bands to stay aligned with trend direction
โ๏ธ Optional Long/Short labels highlight key signal flips
๐ฅ Who Should Use Linear % ST?
โ Swing & Position Traders โ To ride trends confidently
โ Trend Followers โ As a primary directional filter
โ Breakout Traders โ For clean signal generation post-range break
โ Quant/Systematic Traders โ Integrate clean trend logic into algorithmic setups
๐ Conclusion
Linear % ST by QuantEdgeB blends percentile smoothing with linear regression and volatility bands to deliver a powerful, adaptive trend-following engine. Whether you're a discretionary trader seeking cleaner entries or a systems-based trader building logic for automation, Linear % ST offers clarity, adaptability, and precision in trend detection.
๐น Key Takeaways:
1๏ธโฃ Percentile + Regression = Noise-Reduced Core Trend
2๏ธโฃ ATR-Based SuperTrend = Reliable Breakout Confirmation
3๏ธโฃ Flexible Parameters + Color Modes = Custom Fit for Any Strategy
๐ Use it to spot emerging trends, filter false signals, and stay confidently aligned with market momentum.
๐ Disclaimer: Past performance is not indicative of future results. No trading strategy can guarantee success in financial markets.
๐ Strategic Advice: Always backtest, optimize, and align parameters with your trading objectives and risk tolerance before live trading.
๐ ๏ธ Overview
Linear % SuperTrend (Linear % ST) by QuantEdgeB is a hybrid trend-following indicator that combines Linear Regression, Percentile Filters, and Volatility-Based SuperTrend Logic into one dynamic tool. This system is designed to identify trend shifts early while filtering out noise during choppy market conditions.
By utilizing percentile-based median smoothing and customized ATR multipliers, this tool captures both breakout momentum and pullback opportunities with precision.
โจ Key Features
๐น Percentile-Based Median Filtering
Removes outliers and normalizes price movement for cleaner trend detection using the 50th percentile (median) of recent price action.
๐น Linear Regression Smoothing
A smoothed baseline is computed with Linear Regression to detect the underlying trend while minimizing lag.
๐น SuperTrend Structure with Adaptive Bands
The indicator implements an enhanced SuperTrend engine with custom ATR bands that adapt to trend direction. Bands tighten or loosen based on volatility and trend strength.
๐น Dynamic Long/Short Conditions
Long and short signals are derived from the relationship between price and the SuperTrend threshold zones, clearly showing trend direction with optional "Long"/"Short" labels on the chart.
๐น Multiple Visual Themes
Select from 6 built-in color palettes including Strategy, Solar, Warm, Cool, Classic, and Magic to match your personal style or strategy layout.
๐ How It Works
1๏ธโฃ Percentile Filtering
The source price (default: close) is filtered using a nearest-rank 50th percentile over a custom lookback. This normalizes data to reflect the central tendency and removes noisy extremes.
2๏ธโฃ Linear Regression Trend Base
A Linear Regression Moving Average (LSMA) is applied to the filtered median, forming the core trend line. This dynamic trendline provides a low-lag yet smooth view of market direction.
3๏ธโฃ SuperTrend Engine
ATR is applied with custom multipliers (different for long and short) to create dynamic bands. The bands react to price movement and only shift direction after confirmation, preventing false flips.
4๏ธโฃ Trend Signal Logic
โข When price stays above the dynamic lower band โ Bullish trend
โข When price breaks below the upper band โ Bearish trend
โข Trend direction remains stable until violated by price.
โ๏ธ Custom Settings
โข Percentile Length โ Lookback for percentile smoothing (default: 35)
โข LSMA Length โ Determines the base trend via linear regression (default: 24)
โข ATR Length โ ATR period used in dynamic bands (default: 14)
โข Long Multiplier โ ATR multiplier for bullish thresholds (default: 0.8)
โข Short Multiplier โ ATR multiplier for bearish thresholds (default: 1.9)
โ How to Use
1๏ธโฃ Trend-Following Strategy
โ๏ธ Go Long when price breaks above the lower ATR band, initiating an upward trend
โ๏ธ Go Short when price falls below the upper ATR band, confirming bearish conditions
โ๏ธ Remain in trend direction until the SuperTrend flips
2๏ธโฃ Visual Confirmation
โ๏ธ Use bar coloring and the dynamic bands to stay aligned with trend direction
โ๏ธ Optional Long/Short labels highlight key signal flips
๐ฅ Who Should Use Linear % ST?
โ Swing & Position Traders โ To ride trends confidently
โ Trend Followers โ As a primary directional filter
โ Breakout Traders โ For clean signal generation post-range break
โ Quant/Systematic Traders โ Integrate clean trend logic into algorithmic setups
๐ Conclusion
Linear % ST by QuantEdgeB blends percentile smoothing with linear regression and volatility bands to deliver a powerful, adaptive trend-following engine. Whether you're a discretionary trader seeking cleaner entries or a systems-based trader building logic for automation, Linear % ST offers clarity, adaptability, and precision in trend detection.
๐น Key Takeaways:
1๏ธโฃ Percentile + Regression = Noise-Reduced Core Trend
2๏ธโฃ ATR-Based SuperTrend = Reliable Breakout Confirmation
3๏ธโฃ Flexible Parameters + Color Modes = Custom Fit for Any Strategy
๐ Use it to spot emerging trends, filter false signals, and stay confidently aligned with market momentum.
๐ Disclaimer: Past performance is not indicative of future results. No trading strategy can guarantee success in financial markets.
๐ Strategic Advice: Always backtest, optimize, and align parameters with your trading objectives and risk tolerance before live trading.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites โ learn more here.
๐น Get access to our premium tools:
whop.com/quantedgeb/ ๐
๐น Unlock our free toolbox:
tradinglibrary.carrd.co/ ๐ ๏ธ
Disclaimer: All resources and indicators provided are for educational purposes only
whop.com/quantedgeb/ ๐
๐น Unlock our free toolbox:
tradinglibrary.carrd.co/ ๐ ๏ธ
Disclaimer: All resources and indicators provided are for educational purposes only
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites โ learn more here.
๐น Get access to our premium tools:
whop.com/quantedgeb/ ๐
๐น Unlock our free toolbox:
tradinglibrary.carrd.co/ ๐ ๏ธ
Disclaimer: All resources and indicators provided are for educational purposes only
whop.com/quantedgeb/ ๐
๐น Unlock our free toolbox:
tradinglibrary.carrd.co/ ๐ ๏ธ
Disclaimer: All resources and indicators provided are for educational purposes only
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.