PROTECTED SOURCE SCRIPT
Lylytics Supertrend Fakeout

Overview
This is an enhanced version of the classic Supertrend indicator that helps identify false breakouts (fakeouts) before committing to a trend change. It's designed to reduce whipsaws and improve trade timing by filtering out brief price movements that don't result in genuine trend reversals.
What Problem Does It Solve?
Standard Supertrend indicators change direction immediately when price crosses the trend line. This can lead to:
- False signals during choppy markets
- Premature entries that get stopped out
- Frequent trend changes that aren't sustainable
This indicator adds a "grace period" that allows price to briefly cross the Supertrend line without triggering an immediate trend change, helping you avoid these false signals.
How It Works
Core Concept
The indicator tracks potential trend changes but waits to confirm them. When price crosses the Supertrend line:
1. A fakeout detection period begins
2. If price returns within the limits, it's marked as a fakeout (triangle appears)
3. If price continues beyond the limits, the trend officially changes
Key Parameters
ATR Length (14): Period for calculating Average True Range, which measures volatility.
ATR Multiplier (3.0): Distance of the Supertrend line from price. Higher = wider bands, fewer signals.
Fakeout Bar Limit (5): Maximum number of bars to wait before confirming a trend change. If price stays beyond the line for more than this many bars, the trend changes.
Fakeout ATR Multiplier (1.5): How far price must move to force an immediate trend change, regardless of bar limit. Measured in ATR units.
Fakeout Type:
- High/Low: Uses candle wicks for detection (more sensitive)
- Close: Uses closing prices only (more conservative)
Visual Signals
- Green Line: Bullish trend (price above support)
- Red Line: Bearish trend (price below resistance)
- Green Triangle (▲): Bullish fakeout detected - price tested below but bounced back
- Red Triangle (▼): Bearish fakeout detected - price tested above but pulled back
- Shaded Area: Fill between price and Supertrend line
Use on Volatile Chart!
Higher Timeframes
- Use on 4H, Daily, or Weekly charts for more reliable signals
- Better for swing trading and position trading
- Fewer false signals, clearer trend identification
Lower Timeframes (Scalping/Day Trading)
- Can be used on 5m, 15m, or 1H charts
- Recommended adjustments:
- Reduce ATR Length for faster response
- Increase ATR Multiplierto filter noise
- Lower Fakeout Bar Limit
- Use "Close" mode instead of "High/Low" for cleaner signals
- Expect more signals but combine with volume and price action confirmation
Trading Strategy
1. Trend Following: Trade in the direction of the colored line (green = buy, red = sell)
2. Fakeout Confirmations: Triangles show rejected breakouts, confirming trend strength
3. Trend Changes: When the line color changes, consider position adjustments
Alerts Available
- Bullish Fakeout Detected
- Bearish Fakeout Detected
- Any Fakeout
- Trend Changed to Bullish
- Trend Changed to Bearish
Best Practices
- Adjust ATR Multiplier based on asset volatility (stocks: 2-3, crypto: 3-4)
- Lower Fakeout Bar Limit for faster response, higher for fewer false signals
- Combine with support/resistance levels for confirmation
- Use multiple timeframe analysis for better context
About the Supertrend Concept
The Supertrend indicator was developed by Olivier Seban, a French trader and author. Seban created this indicator to provide a simple yet effective trend-following system based on Average True Range (ATR). His approach focused on identifying the current market trend and providing clear entry/exit signals. The original Supertrend quickly became popular among traders for its simplicity and effectiveness in trending markets. This Fakeout version builds upon Seban's foundation by adding intelligent filtering to reduce false signals while maintaining the indicator's core trend-following principles.
Technical Notes
This indicator uses a state-based approach to track potential trend changes and validates them against time and distance thresholds before confirming. It's built on Pine Script v6 and works on all TradingView charts.
---
This indicator helps you stay in trends longer and avoid premature exits during temporary price fluctuations.
This is an enhanced version of the classic Supertrend indicator that helps identify false breakouts (fakeouts) before committing to a trend change. It's designed to reduce whipsaws and improve trade timing by filtering out brief price movements that don't result in genuine trend reversals.
What Problem Does It Solve?
Standard Supertrend indicators change direction immediately when price crosses the trend line. This can lead to:
- False signals during choppy markets
- Premature entries that get stopped out
- Frequent trend changes that aren't sustainable
This indicator adds a "grace period" that allows price to briefly cross the Supertrend line without triggering an immediate trend change, helping you avoid these false signals.
How It Works
Core Concept
The indicator tracks potential trend changes but waits to confirm them. When price crosses the Supertrend line:
1. A fakeout detection period begins
2. If price returns within the limits, it's marked as a fakeout (triangle appears)
3. If price continues beyond the limits, the trend officially changes
Key Parameters
ATR Length (14): Period for calculating Average True Range, which measures volatility.
ATR Multiplier (3.0): Distance of the Supertrend line from price. Higher = wider bands, fewer signals.
Fakeout Bar Limit (5): Maximum number of bars to wait before confirming a trend change. If price stays beyond the line for more than this many bars, the trend changes.
Fakeout ATR Multiplier (1.5): How far price must move to force an immediate trend change, regardless of bar limit. Measured in ATR units.
Fakeout Type:
- High/Low: Uses candle wicks for detection (more sensitive)
- Close: Uses closing prices only (more conservative)
Visual Signals
- Green Line: Bullish trend (price above support)
- Red Line: Bearish trend (price below resistance)
- Green Triangle (▲): Bullish fakeout detected - price tested below but bounced back
- Red Triangle (▼): Bearish fakeout detected - price tested above but pulled back
- Shaded Area: Fill between price and Supertrend line
Use on Volatile Chart!
Higher Timeframes
- Use on 4H, Daily, or Weekly charts for more reliable signals
- Better for swing trading and position trading
- Fewer false signals, clearer trend identification
Lower Timeframes (Scalping/Day Trading)
- Can be used on 5m, 15m, or 1H charts
- Recommended adjustments:
- Reduce ATR Length for faster response
- Increase ATR Multiplierto filter noise
- Lower Fakeout Bar Limit
- Use "Close" mode instead of "High/Low" for cleaner signals
- Expect more signals but combine with volume and price action confirmation
Trading Strategy
1. Trend Following: Trade in the direction of the colored line (green = buy, red = sell)
2. Fakeout Confirmations: Triangles show rejected breakouts, confirming trend strength
3. Trend Changes: When the line color changes, consider position adjustments
Alerts Available
- Bullish Fakeout Detected
- Bearish Fakeout Detected
- Any Fakeout
- Trend Changed to Bullish
- Trend Changed to Bearish
Best Practices
- Adjust ATR Multiplier based on asset volatility (stocks: 2-3, crypto: 3-4)
- Lower Fakeout Bar Limit for faster response, higher for fewer false signals
- Combine with support/resistance levels for confirmation
- Use multiple timeframe analysis for better context
About the Supertrend Concept
The Supertrend indicator was developed by Olivier Seban, a French trader and author. Seban created this indicator to provide a simple yet effective trend-following system based on Average True Range (ATR). His approach focused on identifying the current market trend and providing clear entry/exit signals. The original Supertrend quickly became popular among traders for its simplicity and effectiveness in trending markets. This Fakeout version builds upon Seban's foundation by adding intelligent filtering to reduce false signals while maintaining the indicator's core trend-following principles.
Technical Notes
This indicator uses a state-based approach to track potential trend changes and validates them against time and distance thresholds before confirming. It's built on Pine Script v6 and works on all TradingView charts.
---
This indicator helps you stay in trends longer and avoid premature exits during temporary price fluctuations.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
