OPEN-SOURCE SCRIPT
Pro Scalper - Kalman Supertrend with Dynamic OB/OS Zones

═══════════════════════════════════════════════════════════════════
PRO SCALPER - KALMAN SUPERTREND WITH DYNAMIC OB/OS ZONES
Developed by Zakaria Safri
═══════════════════════════════════════════════════════════════════
A powerful day trading and scalping indicator designed for the 30-minute
timeframe, combining advanced Kalman filtering with Supertrend analysis
and VWMA-based overbought/oversold detection for stocks and cryptocurrencies.
🎯 KEY FEATURES
═══════════════════════════════════════════════════════════════════
✅ Kalman-Filtered Supertrend
• Advanced noise reduction using Kalman Filter mathematics
• Reduces false signals by filtering market noise
• Adaptive trend-following with dynamic support/resistance
✅ Clear Buy/Sell Signals
• Green "BUY" labels for long entries
• Red "SELL" labels for short entries
• Signals trigger on confirmed trend reversals
• Matrix-style candle coloring (Green=Bull, Red=Bear)
✅ Dynamic Overbought/Oversold Zones
• VWMA-based adaptive zones
• Automatically adjusts to market volatility
• Visual zone highlighting with fills
✅ Reversal Signal Detection
• "R" markers identify potential reversals
• Vertical lines highlight reversal bars
• Based on price rejection from OB/OS zones
✅ Smart Take Profit System
• Automatic TP levels at OB/OS zones
• "X" markers when targets are hit
• Based on higher-high/lower-low logic
✅ Live Entry Price Table
• Shows current trend direction
• Displays last signal type (BUY/SELL)
• Real-time entry price tracking
✅ Comprehensive Alert System
• Buy/Sell signal alerts
• Reversal detection alerts
• Take profit hit notifications
• All alerts are non-repainting
📊 HOW IT WORKS
═══════════════════════════════════════════════════════════════════
1. KALMAN FILTER
The indicator applies Kalman filtering to price and ATR data, using
mathematical equations derived from Rudolf E. Kalman's work. This
advanced filtering technique:
• Smooths price data while maintaining responsiveness
• Removes outliers and reduces market noise
• Adapts to changing market conditions
• Improves signal accuracy and reliability
2. MODIFIED SUPERTREND
A customized Supertrend calculation that uses:
• Kalman-filtered HL2 price instead of raw prices
• Filtered ATR for volatility measurement
• Adaptive trailing bands that follow price
• Trend detection with minimal lag
3. VWMA DYNAMIC ZONES
Volume-Weighted Moving Average bands that:
• Calculate from highest/lowest prices over lookback period
• Adapt to current volatility and price range
• Identify true overbought/oversold conditions
• Provide logical take-profit targets
4. SIGNAL GENERATION
• BUY: When price breaks above Supertrend (trend flips bullish)
• SELL: When price breaks below Supertrend (trend flips bearish)
• REVERSAL: When price rejects from OB/OS zones
• TAKE PROFIT: When price reaches target zones or forms HH/LL
⚙️ SETTINGS GUIDE
═══════════════════════════════════════════════════════════════════
🔧 KALMAN FILTER SETTINGS
┌─────────────────────────────────────────────────────────────┐
│ Gain (0.7) → Higher = More responsive, Less smooth │
│ Momentum (0.3) → Higher = More momentum, Less filtering │
└─────────────────────────────────────────────────────────────┘
📈 SUPERTREND SETTINGS
┌─────────────────────────────────────────────────────────────┐
│ ATR Period (10) → Lookback for volatility calculation │
│ ATR Multiplier (3.0) → Distance of bands (lower = more sigs)│
└─────────────────────────────────────────────────────────────┘
📊 VWMA BANDS (OB/OS ZONES)
┌─────────────────────────────────────────────────────────────┐
│ VWMA Length (20) → Smoothing period │
│ Overbought Multiplier (1.5) → OB zone distance │
│ Oversold Multiplier (1.5) → OS zone distance │
│ Band Lookback (20) → Range calculation period │
└─────────────────────────────────────────────────────────────┘
💡 USAGE INSTRUCTIONS
═══════════════════════════════════════════════════════════════════
RECOMMENDED SETUP:
• Timeframe: 30 minutes (optimized for intraday trading)
• Markets: Stocks, Cryptocurrencies, Forex
• Risk Management: Always use stop losses
• Confirmation: Combine with volume and support/resistance
ENTRY SIGNALS:
1. Wait for BUY/SELL label to appear
2. Check trend direction (candle color)
3. Confirm entry on next candle open
4. Set stop loss below/above Supertrend line
EXIT SIGNALS:
1. Take profit at "X" markers
2. Exit on opposite signal
3. Exit on reversal "R" if against your position
4. Manual exit at predetermined R:R ratio
REVERSAL TRADING:
1. Wait for "R" marker in OB/OS zone
2. Confirm with candlestick pattern
3. Enter counter-trend trade
4. Target middle VWMA or opposite zone
🎨 VISUAL ELEMENTS
═══════════════════════════════════════════════════════════════════
• GREEN LINE → Bullish Supertrend (support)
• RED LINE → Bearish Supertrend (resistance)
• CYAN LINE → VWMA baseline
• RED ZONE → Overbought area
• GREEN ZONE → Oversold area
• GREEN CANDLES → Bullish trend active
• RED CANDLES → Bearish trend active
• BUY LABEL → Long entry signal
• SELL LABEL → Short entry signal
• R MARKER → Reversal signal
• X MARKER → Take profit hit
⚠️ IMPORTANT NOTES
═══════════════════════════════════════════════════════════════════
✓ NON-REPAINTING: All signals are confirmed on candle close
✓ BACKTESTING: Test on your specific market before live trading
✓ RISK MANAGEMENT: Use proper position sizing and stop losses
✓ MARKET CONDITIONS: Works best in trending and range-bound markets
✓ CONFLUENCE: Combine with other analysis for best results
⚡ Best Performance:
• Trending markets with clear momentum
• Moderate to high volatility environments
• 30-minute to 1-hour timeframes
• Liquid markets with tight spreads
⚠️ Avoid Using:
• During major news events (high slippage)
• In extremely choppy/sideways markets
• On illiquid assets with wide spreads
• Without proper risk management
📚 METHODOLOGY
═══════════════════════════════════════════════════════════════════
This indicator combines three proven technical analysis methods:
1. TREND FOLLOWING (Supertrend)
Captures major price movements and momentum
2. MEAN REVERSION (VWMA Zones)
Identifies extremes and potential reversals
3. NOISE FILTERING (Kalman)
Reduces false signals and improves accuracy
By integrating these approaches with volume weighting and adaptive
calculations, the Pro Scalper provides a comprehensive trading system
suitable for active traders and scalpers.
⚖️ DISCLAIMER
═══════════════════════════════════════════════════════════════════
This indicator is provided for educational and informational purposes
only. It does not constitute financial advice, and past performance
does not guarantee future results.
Trading carries substantial risk of loss and is not suitable for all
investors. Always:
• Do your own research and analysis
• Use proper risk management
• Never risk more than you can afford to lose
• Test thoroughly before live trading
• Consult a financial advisor if needed
The creator (Zakaria Safri) assumes no liability for trading losses
incurred using this indicator.
📞 ABOUT THE DEVELOPER
═══════════════════════════════════════════════════════════════════
Developer: Zakaria Safri
Specialization: Advanced algorithmic trading indicators
Focus: Noise reduction, signal filtering, and trend analysis
• Regular updates and improvements
• Community feedback integration
• Bug fixes and optimization
• Feature requests welcome
📋 VERSION INFO
═══════════════════════════════════════════════════════════════════
Version: 1.0
Created: 2024
License: Mozilla Public License 2.0
Author: Zakaria Safri
═══════════════════════════════════════════════════════════════════
Happy Trading! 📈
Developed with precision by Zakaria Safri
═══════════════════════════════════════════════════════════════════
PRO SCALPER - KALMAN SUPERTREND WITH DYNAMIC OB/OS ZONES
Developed by Zakaria Safri
═══════════════════════════════════════════════════════════════════
A powerful day trading and scalping indicator designed for the 30-minute
timeframe, combining advanced Kalman filtering with Supertrend analysis
and VWMA-based overbought/oversold detection for stocks and cryptocurrencies.
🎯 KEY FEATURES
═══════════════════════════════════════════════════════════════════
✅ Kalman-Filtered Supertrend
• Advanced noise reduction using Kalman Filter mathematics
• Reduces false signals by filtering market noise
• Adaptive trend-following with dynamic support/resistance
✅ Clear Buy/Sell Signals
• Green "BUY" labels for long entries
• Red "SELL" labels for short entries
• Signals trigger on confirmed trend reversals
• Matrix-style candle coloring (Green=Bull, Red=Bear)
✅ Dynamic Overbought/Oversold Zones
• VWMA-based adaptive zones
• Automatically adjusts to market volatility
• Visual zone highlighting with fills
✅ Reversal Signal Detection
• "R" markers identify potential reversals
• Vertical lines highlight reversal bars
• Based on price rejection from OB/OS zones
✅ Smart Take Profit System
• Automatic TP levels at OB/OS zones
• "X" markers when targets are hit
• Based on higher-high/lower-low logic
✅ Live Entry Price Table
• Shows current trend direction
• Displays last signal type (BUY/SELL)
• Real-time entry price tracking
✅ Comprehensive Alert System
• Buy/Sell signal alerts
• Reversal detection alerts
• Take profit hit notifications
• All alerts are non-repainting
📊 HOW IT WORKS
═══════════════════════════════════════════════════════════════════
1. KALMAN FILTER
The indicator applies Kalman filtering to price and ATR data, using
mathematical equations derived from Rudolf E. Kalman's work. This
advanced filtering technique:
• Smooths price data while maintaining responsiveness
• Removes outliers and reduces market noise
• Adapts to changing market conditions
• Improves signal accuracy and reliability
2. MODIFIED SUPERTREND
A customized Supertrend calculation that uses:
• Kalman-filtered HL2 price instead of raw prices
• Filtered ATR for volatility measurement
• Adaptive trailing bands that follow price
• Trend detection with minimal lag
3. VWMA DYNAMIC ZONES
Volume-Weighted Moving Average bands that:
• Calculate from highest/lowest prices over lookback period
• Adapt to current volatility and price range
• Identify true overbought/oversold conditions
• Provide logical take-profit targets
4. SIGNAL GENERATION
• BUY: When price breaks above Supertrend (trend flips bullish)
• SELL: When price breaks below Supertrend (trend flips bearish)
• REVERSAL: When price rejects from OB/OS zones
• TAKE PROFIT: When price reaches target zones or forms HH/LL
⚙️ SETTINGS GUIDE
═══════════════════════════════════════════════════════════════════
🔧 KALMAN FILTER SETTINGS
┌─────────────────────────────────────────────────────────────┐
│ Gain (0.7) → Higher = More responsive, Less smooth │
│ Momentum (0.3) → Higher = More momentum, Less filtering │
└─────────────────────────────────────────────────────────────┘
📈 SUPERTREND SETTINGS
┌─────────────────────────────────────────────────────────────┐
│ ATR Period (10) → Lookback for volatility calculation │
│ ATR Multiplier (3.0) → Distance of bands (lower = more sigs)│
└─────────────────────────────────────────────────────────────┘
📊 VWMA BANDS (OB/OS ZONES)
┌─────────────────────────────────────────────────────────────┐
│ VWMA Length (20) → Smoothing period │
│ Overbought Multiplier (1.5) → OB zone distance │
│ Oversold Multiplier (1.5) → OS zone distance │
│ Band Lookback (20) → Range calculation period │
└─────────────────────────────────────────────────────────────┘
💡 USAGE INSTRUCTIONS
═══════════════════════════════════════════════════════════════════
RECOMMENDED SETUP:
• Timeframe: 30 minutes (optimized for intraday trading)
• Markets: Stocks, Cryptocurrencies, Forex
• Risk Management: Always use stop losses
• Confirmation: Combine with volume and support/resistance
ENTRY SIGNALS:
1. Wait for BUY/SELL label to appear
2. Check trend direction (candle color)
3. Confirm entry on next candle open
4. Set stop loss below/above Supertrend line
EXIT SIGNALS:
1. Take profit at "X" markers
2. Exit on opposite signal
3. Exit on reversal "R" if against your position
4. Manual exit at predetermined R:R ratio
REVERSAL TRADING:
1. Wait for "R" marker in OB/OS zone
2. Confirm with candlestick pattern
3. Enter counter-trend trade
4. Target middle VWMA or opposite zone
🎨 VISUAL ELEMENTS
═══════════════════════════════════════════════════════════════════
• GREEN LINE → Bullish Supertrend (support)
• RED LINE → Bearish Supertrend (resistance)
• CYAN LINE → VWMA baseline
• RED ZONE → Overbought area
• GREEN ZONE → Oversold area
• GREEN CANDLES → Bullish trend active
• RED CANDLES → Bearish trend active
• BUY LABEL → Long entry signal
• SELL LABEL → Short entry signal
• R MARKER → Reversal signal
• X MARKER → Take profit hit
⚠️ IMPORTANT NOTES
═══════════════════════════════════════════════════════════════════
✓ NON-REPAINTING: All signals are confirmed on candle close
✓ BACKTESTING: Test on your specific market before live trading
✓ RISK MANAGEMENT: Use proper position sizing and stop losses
✓ MARKET CONDITIONS: Works best in trending and range-bound markets
✓ CONFLUENCE: Combine with other analysis for best results
⚡ Best Performance:
• Trending markets with clear momentum
• Moderate to high volatility environments
• 30-minute to 1-hour timeframes
• Liquid markets with tight spreads
⚠️ Avoid Using:
• During major news events (high slippage)
• In extremely choppy/sideways markets
• On illiquid assets with wide spreads
• Without proper risk management
📚 METHODOLOGY
═══════════════════════════════════════════════════════════════════
This indicator combines three proven technical analysis methods:
1. TREND FOLLOWING (Supertrend)
Captures major price movements and momentum
2. MEAN REVERSION (VWMA Zones)
Identifies extremes and potential reversals
3. NOISE FILTERING (Kalman)
Reduces false signals and improves accuracy
By integrating these approaches with volume weighting and adaptive
calculations, the Pro Scalper provides a comprehensive trading system
suitable for active traders and scalpers.
⚖️ DISCLAIMER
═══════════════════════════════════════════════════════════════════
This indicator is provided for educational and informational purposes
only. It does not constitute financial advice, and past performance
does not guarantee future results.
Trading carries substantial risk of loss and is not suitable for all
investors. Always:
• Do your own research and analysis
• Use proper risk management
• Never risk more than you can afford to lose
• Test thoroughly before live trading
• Consult a financial advisor if needed
The creator (Zakaria Safri) assumes no liability for trading losses
incurred using this indicator.
📞 ABOUT THE DEVELOPER
═══════════════════════════════════════════════════════════════════
Developer: Zakaria Safri
Specialization: Advanced algorithmic trading indicators
Focus: Noise reduction, signal filtering, and trend analysis
• Regular updates and improvements
• Community feedback integration
• Bug fixes and optimization
• Feature requests welcome
📋 VERSION INFO
═══════════════════════════════════════════════════════════════════
Version: 1.0
Created: 2024
License: Mozilla Public License 2.0
Author: Zakaria Safri
═══════════════════════════════════════════════════════════════════
Happy Trading! 📈
Developed with precision by Zakaria Safri
═══════════════════════════════════════════════════════════════════
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menjadikannya sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Hormat untuk penulisnya! Meskipun anda dapat menggunakannya secara gratis, ingatlah bahwa penerbitan ulang kode tersebut tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.