TT-Lorentzian — Strategy by ai_distribution_express
By ai_distribution_express
Performance Metrics
- Author: ai_distribution_express
- Symbol: BINANCE:YFIUSDT.P
- Timeframe: 4 hours
- Win Rate: 38.3%
- Profit Factor: 0.571
Description
## TT-Lorentzian — The Stock Lorentzian Classifier, Made Executable and HonestMachine Learning: Lorentzian Classification by jdehorty is one of the mostpopular indicators on TradingView — and it is exactly that: an indicator.It paints signals, but it can't hold a position, size an order, bracket atrade, or fire a single alert that a bot can actually execute.TT-Lorentzian is that classifier turned into a complete, automatablestrategy — with one strict rule we imposed on ourselves: DON'T TOUCH THEBRAIN. The k-nearest-neighbors core with Lorentzian distance, the fivefeature slots (RSI / WT / CCI / ADX), the kernel regression filter, thevolatility / regime / ADX filters, the published v2 defaults, even theoriginal oldest-bars neighbor pool — all of it runs verbatim throughjdehorty's own MLExtensions and KernelFunctions libraries (used underMPL-2.0, full credit to the original author). If you know the original,every input here will look familiar, because it is the original.### Why publish an unmodified classifier?Because this script has a second job: it is the CONTROL ARM of TensorTrader'slive A/B experiment. Our optimized fork, TT-Autotune, trades machine-evolved,regime-switched parameters; TT-Lorentzian trades the stock defaults on thesame markets under the same execution shell. When we claim the optimizer addsedge, this script is the baseline that claim is measured against — publicly,not in a private spreadsheet. The companion indicator TT Backtest Compareruns both engines side by side on any chart and shows you the equity curves,Sortino, drawdown, and per-regime attribution of one against the other.A control you can't trade isn't a control. So this one trades.### What the strategy shell adds (the brain stays stock)1 — REAL ORDERS, ONE ALERTstrategy.entry / strategy.close with machine-readable order comments(open_long, open_short, close_long, close_short), fixed-USD position sizingwith your choice of base currency (USDT / USDC / USD), pyramiding locked to1, and orders processed on bar close. One alert on this strategy carriesevery entry and exit — no juggling four separate alert conditions.2 — ATR RISK BRACKETSOptional ATR-based stop-loss and take-profit (defaults: 14-period ATR,2.0x SL / 3.0x TP), re-issued every bar against the live position's averageprice. The original indicator has no concept of a stop; this shell does.3 — REGIME AWARENESS (DISPLAY-ONLY, BY DESIGN)The same six-state market-regime classifier that runs in TensorTrader'sPython engine and in TT-Autotune (ADX + linear-regression slope + ATR%, withconfirmation-bar and minimum-hold hysteresis) is embedded and shown as anon-chart chip panel: which regime is live and how long it has held. Butevery row reads CTRL — the control arm deliberately trades the same defaultparameters in every regime. That is the whole point: when TT-Autotune swapschampions per regime and this script doesn't, the difference you measure isthe optimization, nothing else.4 — EVERYTHING YOU ALREADY LIKEThe original visuals are intact: bar-prediction labels with gradientcoloring, kernel regression estimate plot, buy/sell arrows, and jdehorty'sown trade-stats table. Table positions are pre-arranged so this script andTT-Autotune can share one chart without overlapping panels.### Automation via TensorTraderThe alert payload this strategy emits is understood natively by theTensorTrader webhook bridge: create a free account attensortrader.agent-swarm.net, install the TensorTrader browser extension,and it will create and manage the TradingView alert for you — wiring thewebhook, keeping it enrolled and heartbeat-fresh, and routing the signalsto paper or live execution on your own exchange keys across the venues theplatform supports. Every venue starts in paper mode; going live is anexplicit opt-in.And if the A/B data convinces you the evolved parameters earn their keep,the same extension arms TT-Autotune with your market's Regime Sync Code —the upgrade path is one click, and the receipts are on the chart first.### Honesty sectionThis strategy trades the published stock defaults — the same defaults thatscored a NEGATIVE median walk-forward Sortino (−0.15, net of 5 bps fees +2 bps slippage) across our 50-symbol × 3-timeframe optimizer sweep. Wepublish it anyway, because that's what a baseline is. If it beats theoptimized arm on your market, you'll see that too — TT Backtest Comparedoesn't take sides. Backtests are not live results; past performance neverguarantees future returns. Trade small, trade paper first.### Credits and licenseOriginal Lorentzian Classification logic, feature engineering, kernelfunctions, and default parameters © jdehorty, used under the Mozilla PublicLicense 2.0 — imported directly via his MLExtensions/2 and KernelFunctions/2libraries. Strategy shell, ATR brackets, alert plumbing, regime chip panel,and A/B instrumentation by TensorTrader.---## Categories and tags (publication notes, not part of the description)TradingView's publish dialog allows up to two categories plus free-form tags.- Primary category: **Trend Analysis** — the Lorentzian k-NN + kernel regression engine is a trend classifier, and it's the category where the jdehorty original lives and its audience browses.- Secondary category: **Statistics** — keeps all three scripts of the series discoverable together and reflects the k-NN / control-arm framing.Suggested tags: `machinelearning`, `lorentzian`, `knn`, `strategy`,`automation`, `webhooks`, `atr`, `riskmanagement`, `regime`, `tensortrader`.Other notes:- Publish as a STRATEGY (it is `strategy()`), so the Strategy Tester tab appears — expected, unlike the Compare indicator.- House Rules: open-source fork of an open-source script must credit the original and describe meaningful changes. The description credits jdehorty explicitly and frames the changes accurately: execution shell added, classifier core unmodified. Emphasizing "the brain is untouched" is both the marketing hook and the compliance statement.- The −0.15 median default Sortino figure is the same one verified 2026-08-07 for the TT-Autotune description (148 runs, admin-646…admin-793 sweep, asof 2026-07-31). Keep the two descriptions in sync if that number is regenerated.- Cross-link the three publications in each description's comments after all are live: Autotune (the optimized arm) ↔ TT-Lorentzian (the control) ↔ TT Backtest Compare (the referee).Release NotesThis Is To Demo The Default Setting Of The ML:LC Script