present
Sign up and get $50 off your first purchase
Since 02/06/2026
598
Free installs

Description

Machine Learning: Lorentzian Classification


An approximate k-nearest-neighbours classifier that measures similarity between market states using Lorentzian Distance instead of Euclidean Distance. Lorentzian geometry compresses the influence of outliers and volatility shocks, so historical analogues stay comparable across different market regimes. Each bar is scored against a chronologically spaced set of neighbours, and the resulting prediction is confirmed by Nadaraya-Watson kernel regression before a signal is issued.


CORE ENGINE

- Approximate Nearest Neighbours search with a minimum 4-bar spacing between neighbours, avoiding oversampling of adjacent price action

- Lorentzian Distance metric across up to 5 feature dimensions

- Neighbours Count adjustable from 1 to 100 (default 8)

- Max Bars Back up to the full chart history, plus an Include Full History mode for rare historical patterns

- Prediction value printed on every bar, from -N to +N, where N is the neighbours count


FEATURE ENGINEERING

- Five configurable feature slots, each selectable as normalised RSI, WaveTrend, CCI or ADX

- Independent length and smoothing parameters per feature

- Feature Count reducible from 5 to 2 for faster, coarser models


FILTERS

- Volatility filter (recent vs historical ATR)

- Regime filter based on a Kalman-style adaptive slope estimate, with adjustable threshold

- ADX filter with configurable threshold

- Optional EMA and SMA trend filters

- Kernel filter: signals only in the direction of the kernel estimate


KERNEL REGRESSION

- Rational Quadratic kernel for the main estimate, Gaussian kernel for crossover detection

- Adjustable lookback window, relative weighting, regression level and crossover lag

- Enhanced smoothing mode for fewer colour transitions and more entry signals

- Kernel line plotted in two colours, bullish and bearish


SIGNALS AND ALERTS

- BUY and SELL arrows with bold text labels, positioned by ATR so they scale across instruments

- Configurable label text and gap, so the visuals fit any chart style

- Optional exit markers, either fixed at 4 bars or dynamic via kernel logic

- Sound, popup and email alerts on new signals

- Alert on bar close by default, or intrabar for faster reaction

- One alert per bar, with no alert burst when the indicator is attached


ON-CHART PANEL

- Semi-transparent dark panel, collapsible from the header

- Live direction, prediction value, confidence, kernel state, trend filter state and filter pass/fail

- Trade statistics block: win rate, trade count, win/loss ratio and early signal flips

- Toggle buttons for bar colouring and signal visibility


DISPLAY

- Bar colouring by prediction strength, in gradient or solid mode

- Confidence gradient that scales colour intensity with model conviction

- Adjustable visual range to keep large charts responsive


NOTES

- The trade statistics are a calibration aid for tuning features and filters. They are not a backtest and do not account for spread, commission, slippage or position sizing. Validate any configuration in a proper backtest before trading it.

- Like the original, the model evaluates the forming bar in real time. Values settle once the bar closes. Use Alert On Bar Close if you want confirmed signals only.

- Recommended starting points: 5m to 4h timeframes, default 8 neighbours, all 5 features, volatility and regime filters enabled.


Based on the open-source Lorentzian Classification indicator by jdehorty, published under the Mozilla Public License 2.0.


This indicator is a technical analysis tool. It does not constitute financial advice, and past behaviour of any configuration does not predict future results.

Summary

AI summary
ML Lorentzian Classification PRO is a technical analysis indicator that applies a machine learning approach using an approximate k-nearest-neighbours classifier with Lorentzian Distance to measure similarity between market states. This distance metric reduces the impact of outliers and volatility shocks, maintaining comparability across different market regimes. The model scores each bar against chronologically spaced neighbors and confirms predictions via Nadaraya-Watson kernel regression before issuing BUY/SELL signals.

Key features include:
- Adjustable neighbors count (1–100) with a minimum 4-bar spacing to avoid oversampling.
- Up to five configurable feature inputs selectable from normalized RSI, WaveTrend, CCI, or ADX, each with independent length and smoothing parameters.
- Multiple filters including volatility (ATR-based), regime (Kalman-style adaptive slope), ADX threshold, EMA/SMA trend filters, and kernel direction filter.
- Kernel regression using rational quadratic and Gaussian kernels with adjustable parameters and enhanced smoothing options.
- Visual BUY/SELL alerts with ATR-scaled positioning, customizable labels, optional exit markers, and sound, popup, and email alerts triggered on bar close or intrabar.
- A collapsible on-chart panel displaying live prediction values, confidence, kernel and trend states, filter results, and trade statistics (win rate, trade count, win/loss ratio).
- Bar coloring by prediction strength with adjustable gradient or solid modes and visual range settings.

The indicator evaluates forming bars in real time, with values settling at bar close. It supports detailed feature and filter tuning but does not perform backtesting or account for trading costs. Recommended for use on 5-minute to 4-hour timeframes with default settings including eight neighbors and all five features enabled.
Indicator profile
Indicator category
Statistics
Output type
Visualisation
Signals
Filter
Data requirements
Tick data
Supported signals
Reversal
Trend strength

Discussion

Customer reviews

0.0
Reviews: 0
Customer reviews
No reviews for this product yet. Already tried it? Be the first to tell others!

FAQ

ADX
EMA
SMA
RSI
AI-assisted
ATR
CCI
Products available through cTrader Store, including trading bots, indicators and plugins, are provided by third-party developers and made available for informational and technical access purposes only. cTrader Store is not a broker and does not provide investment advice, personal recommendations or any guarantee of future performance.

Price

Since 02/06/2026
598
Free installs