OPEN-SOURCE SCRIPT
EDUVEST Lorentzian Classification

EDUVEST Lorentzian Classification - Machine Learning Signal Detection
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ ORIGINALITY
This indicator enhances the original Lorentzian Classification concept by jdehorty with EduVest's visual modifications and alert system integration. The core innovation is using Lorentzian distance instead of Euclidean distance for k-NN classification, providing more robust pattern recognition in financial markets.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ WHAT IT DOES
- Generates BUY/SELL signals using machine learning classification
- Displays kernel regression estimate for trend visualization
- Shows prediction values on each bar
- Provides trade statistics (Win Rate, W/L Ratio)
- Includes multiple filter options (Volatility, Regime, ADX, EMA, SMA)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ HOW IT WORKS
【Lorentzian Distance Calculation】
Unlike Euclidean distance, Lorentzian distance uses logarithmic transformation:
d = Σ log(1 + |xi - yi|)
This provides:
- Better handling of outliers
- More stable distance measurements
- Reduced sensitivity to extreme values
【Feature Engineering】
The classifier uses up to 5 configurable features:
- RSI (Relative Strength Index)
- WT (WaveTrend)
- CCI (Commodity Channel Index)
- ADX (Average Directional Index)
Each feature is normalized using the n_rsi, n_wt, n_cci, or n_adx functions.
【k-Nearest Neighbors Classification】
1. Calculate Lorentzian distance between current bar and historical bars
2. Find k nearest neighbors (default: 8)
3. Sum predictions from neighbors
4. Generate signal based on prediction sum (>0 = Long, <0 = Short)
【Kernel Regression】
Uses Rational Quadratic kernel for smooth trend estimation:
- Lookback Window: 8
- Relative Weighting: 8
- Regression Level: 25
【Filters】
- Volatility Filter: Filters signals during extreme volatility
- Regime Filter: Identifies market regime using threshold
- ADX Filter: Confirms trend strength
- EMA/SMA Filter: Trend direction confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ HOW TO USE
【Recommended Settings】
- Timeframe: 15M, 1H, 4H, Daily
- Neighbors Count: 8 (default)
- Feature Count: 5 for comprehensive analysis
【Signal Interpretation】
- Green BUY label: Long entry signal
- Red SELL label: Short entry signal
- Bar colors: Green (bullish) / Red (bearish) prediction strength
【Trade Statistics Panel】
- Winrate: Historical win percentage
- Trades: Total (Wins|Losses)
- WL Ratio: Win/Loss ratio
- Early Signal Flips: Premature signal changes
【Filter Recommendations】
- Enable Volatility Filter for ranging markets
- Enable Regime Filter for trend confirmation
- Use EMA Filter (200) for higher timeframes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ CREDITS
Original Lorentzian Classification concept and MLExtensions library by jdehorty.
Enhanced with visual modifications and alert integration by EduVest.
License: Mozilla Public License 2.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ ORIGINALITY
This indicator enhances the original Lorentzian Classification concept by jdehorty with EduVest's visual modifications and alert system integration. The core innovation is using Lorentzian distance instead of Euclidean distance for k-NN classification, providing more robust pattern recognition in financial markets.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ WHAT IT DOES
- Generates BUY/SELL signals using machine learning classification
- Displays kernel regression estimate for trend visualization
- Shows prediction values on each bar
- Provides trade statistics (Win Rate, W/L Ratio)
- Includes multiple filter options (Volatility, Regime, ADX, EMA, SMA)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ HOW IT WORKS
【Lorentzian Distance Calculation】
Unlike Euclidean distance, Lorentzian distance uses logarithmic transformation:
d = Σ log(1 + |xi - yi|)
This provides:
- Better handling of outliers
- More stable distance measurements
- Reduced sensitivity to extreme values
【Feature Engineering】
The classifier uses up to 5 configurable features:
- RSI (Relative Strength Index)
- WT (WaveTrend)
- CCI (Commodity Channel Index)
- ADX (Average Directional Index)
Each feature is normalized using the n_rsi, n_wt, n_cci, or n_adx functions.
【k-Nearest Neighbors Classification】
1. Calculate Lorentzian distance between current bar and historical bars
2. Find k nearest neighbors (default: 8)
3. Sum predictions from neighbors
4. Generate signal based on prediction sum (>0 = Long, <0 = Short)
【Kernel Regression】
Uses Rational Quadratic kernel for smooth trend estimation:
- Lookback Window: 8
- Relative Weighting: 8
- Regression Level: 25
【Filters】
- Volatility Filter: Filters signals during extreme volatility
- Regime Filter: Identifies market regime using threshold
- ADX Filter: Confirms trend strength
- EMA/SMA Filter: Trend direction confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ HOW TO USE
【Recommended Settings】
- Timeframe: 15M, 1H, 4H, Daily
- Neighbors Count: 8 (default)
- Feature Count: 5 for comprehensive analysis
【Signal Interpretation】
- Green BUY label: Long entry signal
- Red SELL label: Short entry signal
- Bar colors: Green (bullish) / Red (bearish) prediction strength
【Trade Statistics Panel】
- Winrate: Historical win percentage
- Trades: Total (Wins|Losses)
- WL Ratio: Win/Loss ratio
- Early Signal Flips: Premature signal changes
【Filter Recommendations】
- Enable Volatility Filter for ranging markets
- Enable Regime Filter for trend confirmation
- Use EMA Filter (200) for higher timeframes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
█ CREDITS
Original Lorentzian Classification concept and MLExtensions library by jdehorty.
Enhanced with visual modifications and alert integration by EduVest.
License: Mozilla Public License 2.0
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Custom Pine Script Development → fiverr.com/eduvest | 30 Years STEM Education × AI-Powered Trading Tools
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Custom Pine Script Development → fiverr.com/eduvest | 30 Years STEM Education × AI-Powered Trading Tools
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.