OPEN-SOURCE SCRIPT
DeepClean Linear indicator

1. Indicator Name
DeepClean Linear indicator
2. One-Line Introduction
A trend-recognition indicator that overlays a “transparent wave” on price, removing noise and revealing directional bias and trend intensity in a highly intuitive visual form.
3. Overall Summary
The DeepClean Linear indicator calculates trend direction using changes in linear regression slope and determines trend strength by comparing how consistently the regression line moves over a defined lookback window.
Rather than merely identifying trend direction, the indicator applies a triple-layer noise-filtering process (EMA → SMA → RMA) to produce a clean, wave-shaped data line that filters out unnecessary market noise.
This transparent wave sits directly on top of price, allowing traders to visually compare price movement and trend strength at the same time.
A stronger trend results in a taller, thicker wave, while weakening momentum causes the wave to thin, making it easier to spot trend continuation, exhaustion, or upcoming reversal.
Color automatically shifts based on trend:
Bright cyan/teal during bullish conditions
Reddish tones during bearish conditions
Transparency dynamically adjusts depending on strength
The indicator excels at identifying the true underlying trend by ignoring minor fluctuations and is well suited for scalping, swing trading, and position trading.
It also significantly reduces false signals in ranging markets, making it ideal for trend-following strategies.
4. Advantages
① Ultra-Clean Noise-Reduced Wave
Utilizes a 3-stage smoothing filter (EMA → SMA → RMA) to produce a much cleaner wave than standard moving averages, highlighting only core trend movement.
② Trend Direction & Strength at a Glance
Based on comparative linear regression behavior, the indicator quantifies both direction and strength, making convergence/divergence highly visible.
③ Intuitive Price Overlay Visualization
The semi-transparent wave sits directly on price action, allowing traders to instantly see divergence from price, trend weakening, or early turning points.
④ Dynamic Transparency Coloring
Strong trends appear bold and intense, while weaker trends fade visually—making signal interpretation effortless.
⑤ Excellent Range Filtering
During low-direction phases (state = 0), the wave turns neutral, preventing forced or premature entries.
⑥ Multi-Timeframe Compatibility
The wave remains stable from 1-minute to weekly charts, making it suitable for trend analysis, execution, and risk control across all timeframes.
📌 Core Concept Overview
The indicator evaluates the relative comparison of linear regression values over the last n periods.
A positive trend value indicates bullish bias
A negative trend value indicates bearish bias
Intensity represents strength and controls wave height
waveTop / waveBot define the visual wave area relative to price
State Values
1 = Bullish Trend
-1 = Bearish Trend
0 = Neutral / Weak Direction
⚙️ Settings Overview
Option Description
Trend Lookback (n) Comparison window for regression slope. Higher = bigger trend focus.
Range Tolerance (%) Strength threshold to classify bullish/bearish movement. Higher = more conservative.
Source Price source for regression calculations.
Linear Reg Length Length of the linear regression.
Noise Filter Strength (smoothK) Controls the smoothing intensity. Higher = smoother wave.
Wave Amplitude (amp) Adjusts the height/thickness of the wave.
Bull/Bear Color Colors for bullish/bearish waves.
Base Transparency Base opacity level; modified dynamically by trend strength.
📈 Bullish Timing Recognition Examples
Wave begins turning brighter teal and more opaque, indicating strengthening upward pressure.
waveTop expands above price, signaling early trend expansion.
State flips to 1, often marking a trend restart or early reversal phase.
A steadily rising wave height suggests sustained bullish momentum.
📉 Bearish Timing Recognition Examples
Wave shifts into red tones, showing bearish dominance.
waveBot expands below price, indicating rising downside volatility.
State stays at -1 while intensity increases, signaling entry into strong downtrend conditions.
A shift from weak → strong bearish intensity can provide short-entry timing cues.
🧪 Recommended Usage
Use as a core component in trend-following systems
Adjust position size based on wave thickness (trend strength)
Combine with RSI/MACD to reduce false signals during overbought/oversold zones
Sudden wave expansion during volatility increases helps detect trend acceleration
In sideways markets, frequent state = 0 readings help avoid low-probability trades
🔒 Important Notes
As a trend-based indicator, it may misread choppy/ranging markets
Because of smoothing, signals may appear slightly delayed
Extreme news volatility can temporarily distort trend clarity
DeepClean Linear indicator
2. One-Line Introduction
A trend-recognition indicator that overlays a “transparent wave” on price, removing noise and revealing directional bias and trend intensity in a highly intuitive visual form.
3. Overall Summary
The DeepClean Linear indicator calculates trend direction using changes in linear regression slope and determines trend strength by comparing how consistently the regression line moves over a defined lookback window.
Rather than merely identifying trend direction, the indicator applies a triple-layer noise-filtering process (EMA → SMA → RMA) to produce a clean, wave-shaped data line that filters out unnecessary market noise.
This transparent wave sits directly on top of price, allowing traders to visually compare price movement and trend strength at the same time.
A stronger trend results in a taller, thicker wave, while weakening momentum causes the wave to thin, making it easier to spot trend continuation, exhaustion, or upcoming reversal.
Color automatically shifts based on trend:
Bright cyan/teal during bullish conditions
Reddish tones during bearish conditions
Transparency dynamically adjusts depending on strength
The indicator excels at identifying the true underlying trend by ignoring minor fluctuations and is well suited for scalping, swing trading, and position trading.
It also significantly reduces false signals in ranging markets, making it ideal for trend-following strategies.
4. Advantages
① Ultra-Clean Noise-Reduced Wave
Utilizes a 3-stage smoothing filter (EMA → SMA → RMA) to produce a much cleaner wave than standard moving averages, highlighting only core trend movement.
② Trend Direction & Strength at a Glance
Based on comparative linear regression behavior, the indicator quantifies both direction and strength, making convergence/divergence highly visible.
③ Intuitive Price Overlay Visualization
The semi-transparent wave sits directly on price action, allowing traders to instantly see divergence from price, trend weakening, or early turning points.
④ Dynamic Transparency Coloring
Strong trends appear bold and intense, while weaker trends fade visually—making signal interpretation effortless.
⑤ Excellent Range Filtering
During low-direction phases (state = 0), the wave turns neutral, preventing forced or premature entries.
⑥ Multi-Timeframe Compatibility
The wave remains stable from 1-minute to weekly charts, making it suitable for trend analysis, execution, and risk control across all timeframes.
📌 Core Concept Overview
The indicator evaluates the relative comparison of linear regression values over the last n periods.
A positive trend value indicates bullish bias
A negative trend value indicates bearish bias
Intensity represents strength and controls wave height
waveTop / waveBot define the visual wave area relative to price
State Values
1 = Bullish Trend
-1 = Bearish Trend
0 = Neutral / Weak Direction
⚙️ Settings Overview
Option Description
Trend Lookback (n) Comparison window for regression slope. Higher = bigger trend focus.
Range Tolerance (%) Strength threshold to classify bullish/bearish movement. Higher = more conservative.
Source Price source for regression calculations.
Linear Reg Length Length of the linear regression.
Noise Filter Strength (smoothK) Controls the smoothing intensity. Higher = smoother wave.
Wave Amplitude (amp) Adjusts the height/thickness of the wave.
Bull/Bear Color Colors for bullish/bearish waves.
Base Transparency Base opacity level; modified dynamically by trend strength.
📈 Bullish Timing Recognition Examples
Wave begins turning brighter teal and more opaque, indicating strengthening upward pressure.
waveTop expands above price, signaling early trend expansion.
State flips to 1, often marking a trend restart or early reversal phase.
A steadily rising wave height suggests sustained bullish momentum.
📉 Bearish Timing Recognition Examples
Wave shifts into red tones, showing bearish dominance.
waveBot expands below price, indicating rising downside volatility.
State stays at -1 while intensity increases, signaling entry into strong downtrend conditions.
A shift from weak → strong bearish intensity can provide short-entry timing cues.
🧪 Recommended Usage
Use as a core component in trend-following systems
Adjust position size based on wave thickness (trend strength)
Combine with RSI/MACD to reduce false signals during overbought/oversold zones
Sudden wave expansion during volatility increases helps detect trend acceleration
In sideways markets, frequent state = 0 readings help avoid low-probability trades
🔒 Important Notes
As a trend-based indicator, it may misread choppy/ranging markets
Because of smoothing, signals may appear slightly delayed
Extreme news volatility can temporarily distort trend clarity
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.