Patterns & edge

Beyond raw P&L, Journal has three layers of pattern discovery: Edge Finder, Patterns, and Trend Alignment. Each takes your trade history as input and tries to surface something actionable.
Edge Finder
Location: /app/journal/edge
Per-symbol statistics computed from your round trips:
- Win rate โ pct of round trips that were profitable
- Expectancy โ average P&L per trade (can be negative)
- Average winner vs loser โ the asymmetry is what matters, not the raw win rate
- Risk-reward โ derived from winner/loser sizes
- Trade count โ ignores symbols with too few trades (< 3) as noise
The Edge Finder groups symbols into four buckets:
- Strong edge โ high win rate, positive expectancy, enough trades to be significant
- Moderate edge โ positive expectancy but with warnings (small sample, high variance)
- Negative edge โ you've lost money on this symbol over enough trades to matter
- Too few trades โ < 3 trades, can't conclude anything

Patterns
Location: /app/journal/patterns
Patterns goes further than symbol-level stats. It groups your trades across multiple dimensions and asks: what setups consistently worked for you, and what setups consistently bled?
The current pattern dimensions:
- Trend alignment โ were you trading with the larger trend, against it, or neutral?
- Volatility regime โ calm, normal, spike?
- RSI zone โ oversold (< 30), neutral (30-70), overbought (> 70)?
- Holding period โ 0-3d, 4-7d, 8-14d, 15-21d, 22-30d, > 30d
- Position size โ small, medium, large as percentage of capital
- Sector โ IT, Banks, Pharma, etc.
- Trade-of-day โ first trade, middle of day, end of day
- Day-of-week โ Monday through Friday
- Post-loss behaviour โ did you revenge-trade after a losing trade?
- Scale-in/out โ did you add to winners, losers, or neither? 11-13. Cross-dimension โ Trend ร Volatility, etc.
For each dimension, the engine computes: win rate, expectancy, total P&L, trade count. High-conviction findings become rules you can backtest.
Rules
Rules formalise the findings from Patterns into backtestable hypotheses. Example:
"On days when RSI(14) > 70 and you're buying (entry = long), your win rate drops from 38% (baseline) to 22%. Avoid buying overbought symbols."
The rule engine turns this into a backtestable filter, runs a mini-backtest on your own history (applying the rule retroactively to see what your P&L would have been), and reports the counterfactual.
If the mini-backtest shows the rule would have saved you money, you can "Publish" it โ which exports it as a DSL strategy filter you can apply to future deployed portfolios.
Trend Alignment
Location: /app/journal/trend
A focused view that splits your trades into "with trend" vs "against trend" based on SMA(200) direction on entry. Three panels:
- With-trend performance โ win rate, expectancy, total P&L for trades taken in the direction of the larger trend
- Against-trend performance โ same metrics for counter-trend trades
- Per-symbol breakdown โ which symbols favour with-trend vs against-trend for you specifically
The insight: most retail traders think they're good at counter-trend trades but the data usually says otherwise. If your with-trend win rate is 50% and against-trend is 30%, you know what to do.
Prerequisites
All three surfaces need:
- Tradebook data (see Tradebook import)
- At least a few months of trading history โ patterns are noisy below ~50 trades
The Patterns engine specifically needs daily candles for each symbol you've traded to compute the dimensions (trend, vol regime, RSI zone at entry). If candles are missing for a symbol, its trades are marked "N/A" and excluded from pattern analysis.
Related
- P&L analysis โ the raw P&L this all builds on
- Benchmark โ performance vs market baselines
- Strategy DSL โ the rule language Patterns exports to