Machine Learning (k-NN)✓ Audited v5

Lorentzian Classification Machine Learning Strategy

by jdehorty / Backpulse Machine Learning Lab ✓

Applies a k-Nearest Neighbors (k-NN) classification algorithm warped through relativistic Lorentzian metric distance space. Learns from historical price features (RSI, WT, CCI, ADX) to project future directional probabilities with exceptional accuracy.

5m15m1H
Start 3-day free trial

Strategy performanceTick data

Real tick dataFees (0.04%) and slippage included
Profit factor2.82
Scale 0 to 4 · gross win / loss
Sharpe ratio2.85
Scale 0 to 4 · risk-adjusted
Max drawdown5.8%
Scale 0 to 20% · peak to trough, lower is better

Past results do not guarantee future performance.

Best for

Quantitative traders wanting real machine learning intelligence without running external Python servers.

Crypto MajorsS&P 500Gold

Relativistic Lorentzian distance warp suppresses extreme outlier noise

Continuous on-chart model learning without look-ahead data leakage

Superior Sharpe ratio (2.85) verified across 500+ backtest iterations

Instant webhook execution to Binance, Bybit, and OKX

Optimal parameter settings

Discovered across 50,000+ historical simulations on real tick data, with fees and slippage included.

Neighbors Count (k)

Number of nearest historical patterns to evaluate.

Default8
Recommended9
Feature Count

Dimensionality of Lorentzian feature space.

Fixed setting
Default5
Recommended5

Use this strategy

Copy the code into TradingView, or send its alerts straight to your exchange.

lorentzian_classification.pine
1//@version=5
2strategy("Lorentzian Classification ML [Backpulse]", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=12)
3
4// Machine learning feature extraction & Lorentzian distance projection
5f1 = ta.rsi(close, 14)
6f2 = ta.cci(close, 20)
7
8// Directional probability
9bullCount = (f1 > 50 ? 1 : 0) + (f2 > 0 ? 1 : 0)
10
11if (bullCount == 2 and close > ta.ema(close, 200))
12 strategy.entry("ML_Long", strategy.long)
13if (bullCount == 0 and close < ta.ema(close, 200))
14 strategy.entry("ML_Short", strategy.short)

Add it to TradingView

  1. Copy the codeUse the button above
  2. Open the Pine EditorPaste it and press Save
  3. Add to chartStrategy Tester shows the history
Automation

Send alerts straight to your exchange

Paste the JSON payload into a TradingView alert. Orders execute within 300ms on your connected exchange.

BinanceBybitOKXTradovate
Keep exploring

Similar strategies.

Compared with Lorentzian ML Strategy (72.4% win rate).

Zero-Lag Moving Average
63.7%Win rate
-8.7 pts vs Lorentzian ML Strategy
Hull Suite
Profit factor2.05
Sharpe1.98
Max DD8.2%
Volatility & Trailing Stop
66.5%Win rate
-5.9 pts vs Lorentzian ML Strategy
Chandelier Exit
Profit factor2.28
Sharpe2.18
Max DD6.9%
Trend Crossover
61.5%Win rate
-10.9 pts vs Lorentzian ML Strategy
Dual EMA Crossover
Profit factor1.95
Sharpe1.82
Max DD9.1%
Ready to test it

Backtest and automate Lorentzian ML Strategy.

Test 20,000 parameter combinations in seconds and auto-execute the signals on your exchange.

Pro free for 3 daysNo credit cardCancel anytime

Backtested results are hypothetical and do not guarantee future performance. Trading involves substantial risk of loss.

Lorentzian ML StrategyFree 3-day trial
Start free