Skip to main content

Lorentzian Classification

Lorentzian Classification compares the current market's indicator readings with historical readings, then combines the selected neighbors' labels into a directional vote. Kernel regression and filters add context to the resulting chart signals. It is a tool for examining market behavior, not an automatic trading service.

Lorentzian Classification is a Pine Script® indicator by Justin Dehorty that runs on TradingView charts. The original version is free and open source on TradingView, and a free version also runs on MetaTrader 5. Lorentzian Classification Premium is a paid, invite-only TradingView indicator. It is included with an AI Edge Pro or Max membership and is also offered through the AI Edge Paid Space on TradingView.

What Lorentzian Classification Does​

  • It describes each bar with a set of features. The original version uses two to five, chosen from RSI, WaveTrend (WT), CCI and ADX.
  • It compares historical feature readings with the current readings using Lorentzian distance and an approximate neighbor-selection procedure.
  • It assigns historical labels using a four-bar source-price comparison, then adds selected labels into a vote. The selection procedure does not guarantee the globally closest bars.
  • It shows the vote, entry and exit markers and an optional kernel regression estimate on the chart. You can create TradingView alerts for the entry and exit signals.

What Lorentzian Classification Does Not Do​

  • It does not place trades, size positions or connect to a broker. Its markers and alerts are signals for you to review.
  • It does not forecast prices or give probabilities. A vote of +4 counts neighbor labels; it is not a 4% or 50% chance of a rise.
  • It does not guarantee results. Signals on past bars are hypothetical, and settings that worked on one period can fail on another.

Start with the Right Version​

Original Lorentzian Classification is an open-source TradingView indicator with two to five features, configurable filters, and kernel settings. Open the original script or inspect its source. Copies with similar names exist on TradingView; the official original and Premium scripts are published by jdehorty.

Lorentzian Classification Premium adds up to fifteen features, ten custom-source inputs, and additional pullback, mean-reversion, and display controls. Read Premium features and membership access.

The settings explorers in this guide describe Premium. When using the original indicator, compare its actual Inputs panel with the guide before looking for a Premium-only control.

The original open-source script received Most Valuable Pine Script 2023 in the 2023 TradingView Community Awards. That recognition refers to the original script, not Premium or evidence of profitable trading.

Read the Chart in Layers​

Published Premium chart with prediction-colored candles, vote labels, kernel envelopes, and entry, pullback, and reversion markers.

Chart and platform UI: TradingView.

The chart published with Lorentzian Classification Premium. Select it for full resolution. It is a historical illustration; the on-chart calibration statistics are not a full backtest.

  1. Candles and vote labels: inspect the direction and strength of the neighbor vote. A vote is not a probability.
  2. Kernel line and envelopes: compare price with a smoothed estimate and surrounding bands.
  3. Event markers: distinguish entry labels, exit crosses, pullback triangles, and mean-reversion symbols. Use the symbols and alerts legend.

Understand the Distance​

The implemented Lorentzian distance adds the logarithm of one plus each absolute feature difference. Large differences grow more slowly under this rule than under Euclidean (straight-line) distance, so the two rules can select different historical bars as neighbors. Read the formula and a worked example.

The spacetime and price-time imagery is an analogy. The indicator does not establish that markets obey relativistic physics, and the particle shape on the AI Edge homepage is not a probability distribution or a forecast.

Make a Useful First Comparison​

  1. Add the intended version to a TradingView chart and record its version, symbol, timeframe, and loaded history.
  2. Read the signal legend so an entry, exit, pullback, and mean reversion are not mistaken for the same event.
  3. Keep the data and remaining settings fixed. Change one input and note which votes or signals move.
  4. Restore the baseline, then investigate a separate historical period. A better-looking chart or a calibration score does not validate a trading strategy.

Continue with core concepts, General Settings, or your first Optimizer study. Premium access does not expose its private source or guarantee that it can be compiled in another platform.