Every trade you ever close gets logged to your browser's localStorage under the key bpleone_learn_v1. The schema is dead simple:
{
id: 't_1778..._abc',
ts: 1778788000000, // open time
closedTs: 1778799600000, // close time
symbol: 'NVDA',
setup: 'macd-cross', // or 'bull-flag', 'cup-handle', etc.
sector: 'Semiconductors',
bias: 'bull', // or 'bear'
vixRegime: 'low', // captured at OPEN time
score: 78, // the raw score when entered
entry: 138.27,
stop: 133.80,
exit: 143.50, // filled at this price
pnl: 521.00,
R: 1.17, // โ THE key metric: pnl / |entry โ stop|
result: 'win', // 'win' if R โฅ 0
holdDays: 1.3,
closeReason: 'target' // 'target', 'stop', 'manual', 'trail'
}
Where trades come from:
Each setup type accumulates a list of R-multiples from your closed trades. The base weight is then:
weight = clamp(1 + avgR ร 0.3, 0.5, 1.6)
Three real worked examples:
+0.60Rโ0.30Rโ0.80RClamped to [0.5, 1.6] so the system can amplify or dampen without flipping direction. A bad setup is faded, not made bullish; a good setup is boosted, not made infinite.
Triggered by: Learn.closeTrade(id, exit, reason) โ automatically calls Learn.rebalanceWeights() after every close.
Base weights tell you "macd-cross is good for me." Conditional weights tell you "macd-cross is good for me in Tech on Tuesdays in low-VIX regimes." The same math, partitioned:
// 4 dimensions tracked simultaneously
ctx = {
sector: 'Semiconductors',
dow: 'Tue', // Mon/Tue/Wed/Thu/Fri
hold: '1โ3d', // Intraday / 1-3d / 4-9d / 10-29d / 30d+
bias: 'bull',
regime: 'low' // low/normal/elevated/panic (VIX bucket)
}
// Per (setup ร dim ร bucket) with n โฅ 3:
adj = clamp(1 + expectancy ร 0.18, 0.7, 1.35)
Conditional adjustments are gentler (0.18 vs base 0.30) and tighter-clamped โ they refine the base, they don't flip it.
Triggered by: Learn.rebalanceConditional() โ runs alongside rebalanceWeights after every close.
When a new setup appears (a momentum scan, an unusual call sweep, an AI Scout idea), the raw heuristic score gets multiplied by base ร conditional:
// Live code from learn.js
function adjustedScoreCtx(rawScore, type, ctx) {
const base = state.weights[type] || 1.0;
let mult = base;
for (const dim in ctx) {
const adj = state.conditional[type]?.[dim]?.[ctx[dim]]?.adj;
if (adj) mult *= adj;
}
return clamp(0, 100, Math.round(rawScore ร mult));
}
Worked example โ a fresh macd-cross signal on NVDA today:
raw = 72 (MACD bullish + 50DMA reclaim + 1.84ร volume)
base = 1.18ร (macd-cross has +0.6R avg in your history)
sector = 1.16ร (Tech has been favored for this setup)
dow = 0.93ร (Friday slightly worse)
regime = 1.06ร (low-VIX regimes have edge for you)
hold = 1.04ร (1-3d holds are your sweet spot)
โโโโโโโโโโโโโโโโโ
final = 72 ร 1.18 ร 1.16 ร 0.93 ร 1.06 ร 1.04
= 95 (clamped to 100)
You see this score on: Plays of the Day, Live Signals, Trade of the Day, Ticker Focus, AI Scout (Claude sees the learned weights and uses them in its reasoning), and Trade Plan Generator.
You can call it from the browser console anytime:
Learn.explain('macd-cross', {
sector: 'Tech',
dow: 'Thu',
regime: 'low'
});
// โ array of human-readable reasons + impact
The brain only gets smart if you feed it. Here's the 4-week shakedown to get the weights tuned to your edge:
What to journal carefully: setup type (use the dropdown โ don't make up new ones), sector, entry, stop (this defines R!), exit, and close reason. The R-multiple is the entire engine โ if you don't log the stop accurately, the system can't learn.
Everything is in your browser's localStorage. We don't have a backend, we don't see your trades, we don't track you. Your edge is yours.
localStorage keys used by the learn engine: bpleone_learn_v1 โ trades + signals + weights + conditional bpleone_journal โ manual journal entries bpleone_paper_v1 โ paper-trade positions & fills bpleone_mindset_v1 โ daily check-ins (sleep, tilt, etc.) bpleone_watchlists โ your saved symbol lists bpleone_alerts โ your custom alerts
Backup: Settings โ Export / Reset โ "Download Backup" โ JSON file you can save anywhere.
Restore: Same page โ "Import Backup".
Reset: Same page โ Danger Zone โ reset journal, learn, watchlists individually.
The bpleone "brain" is not a neural network. It's an expectancy-tracking heuristic with conditional bucketing. Here's what that means for you:
Learn.explain() and you see the multipliers.If you want true ML (gradient boosting, ensemble models, walk-forward analysis), that's a roadmap item. For now this engine is honest, fast, and personalized โ which beats most retail "AI" products that just rebrand RSI as "neural pattern detection."
Open paper-trade.html, take 3 setups, close them out. Then come back and check the learn dashboard. You'll see your weights move.