r/algorithmictrading • u/18nebula • Aug 11 '25
Backtest Update: Multi Model Meta Classifier EA 73% Accuracy (pconf>78%)
Hey r/algorithmictrading!
Since my last EA post, I’ve been grinding countless hours and folded in feedback from that thread and elsewhere on Reddit. I reworked the model gating, fixed time/session issues, cleaned up SL/partial logic, and tightened the hedge rules (detailed updates below).
For the first time, I’m confident the code and the metrics are accurate end-to-end, but I’m looking for genuine feedback before I flip the switch. I’ll be testing on a demo account this week and, if everything checks out, plan to go live next week. Happy to share more diagnostics if helpful (confusions, per-trade MAE/MFE, hour-of-day breakdowns).
Thank you in advance for any pointers (questions below) or “you’re doing it wrong” notes, super appreciated!

Model Strategy
Stacked learner: multi-horizon base models (1–10 horizons) → weighted ensemble → multi-model stacked LSTM meta classifier (logistic + tree models), with isotonic calibration.
- Multiple short-horizon models from different families are combined via an ensemble, and those pooled signals feed a stacked meta classifier that makes the final long/short/skip decision; probabilities are calibrated so the confidence is meaningful.
- Decision gates: meta confidence ≥ 0.78; probability gap gate (abs & relative); volatility-adjusted decision thresholds; optional sudden-move override.
- Cadence & hours: Signals are computed on a 2-minute base timeframe and executed only during a curated UTC trading window to avoid dead zones (low volume+high volatility).
Model Performance OOS (screenshot below)
- Confusion matrix {−1, +1}):
[[3152, 755], [1000, 5847]]→ TN=3152, FP=755, FN=1000, TP=5847 (N=11,680). Per-class metrics
- −1 (shorts): precision 0.759, recall 0.734, F1 0.746, support 4,293.
- +1 (longs): precision 0.886, recall 0.792, F1 0.836, support 7,387.
Averages
- Micro: precision 0.837, recall 0.771, F1 0.802.
- Macro: precision 0.822, recall 0.763, F1 0.791.
- Weighted: precision 0.839, recall 0.771, F1 0.803.
Decision cutoffs (post-calibration)
- Class thresholds: predict +1 if p(+1) ≥ 0.632; predict −1 if p(−1) ≥ 0.632.
Tie-gates (must also pass):
- Min Prob Spread (ABS) = 0.6 → require |p(+1) − p(−1)| ≥ 0.6 (i.e., at least a 60-pp separation).
- Min Prob Spread (REL) = 0.77 → require |p(+1) − p(−1)| / max(p(+1), p(−1)) ≥ 0.770 (prevents taking trades when both sides are high but too close—e.g., 0.90 vs 0.82 fails REL even if ABS is decent).
- Final pick rule: if both sides clear their class thresholds, choose the side with the larger normalized margin above its threshold; if either gate fails, skip the bar.
Execution
- Pair / TF: AUDUSD, signals on 2-min, executed on ticks.
- Period: 2025-07-01 → 2025-08-02. Start balance $3,200. Leverage 50:1.
- Costs: 1.4 pips round-turn (commission+slippage).
- Lot size: 0.38 (scaled based on 1000% average margin).
- Order rules: TP 3.2 pips, partial at +1.6 pips (15% main / 50% hedge), SL 3.5 pips, downsize when loss ≥ 2.65 pips.
- Hedging: open a mirror slice (multiplier 0.35) if adverse move from anchor ≥ 1.8 pips and opposite side prob ≥ 0.75; per-parent cap + cooldown.
- Risk: margin check pre-entry; proportional margin release on partials; forced close at the end of the test window (I still close before weekends live).
Backtest Summary (screenshot below)
- Equity: $3.2k → $6.2k (≈ +$3.0k), smooth stair-step curve with plateaus.
- Win rate ≈ 73%, payoff 1.3–1.4, >1,100 net pips over the month; max DD stays low single-digits; daily Sharpe is high (short window caveat).
- Signals fired: +1: 382, −1: 436; hedges opened: 39 (light use, mainly during adverse micro-trends).
What Changed Since Last Post
- Added meta confidence floor and absolute/relative probability tie-gate to skip weak signals.
- ATR-aware thresholds plus a sudden-move override to catch momentum without overfitting.
- Fixed session filter (UTC hour now taken from bar timestamp) and aligned multi-TF features.
- Rewrote partial-close / SL math to apply only to remaining size; proportional margin release.
- Smarter hedging: parent-scoped cap, cooldown, anchor-based trigger, opposite-side confidence check.
- Metrics & KPIs fixed + validated: rebuilt the summary pipeline and reconciled PnL, net/avg pips, win rate, payoff, Sharpe (daily/period), max DD, margin level. Cross-checked per-trade cash accounting vs. the equity curve and spot-audited random trades/rows. I’m confident the metrics and summary KPIs are now correct and accurate.
Questions for the Community
- Tail control: Would you cap per-trade loss via dynamic SL (ATR-based) or keep small fixed pips with downsizing? Any better way to knock the occasional tail to 2–3% without dulling the edge?
- Gating: My abs/rel probability gates + meta confidence floor improved precision but reduce activity. Any principled way you tune these (e.g., cost-sensitive grid on PR space)?
- Hedges: Is the anchor-based, cooldown-limited hedge sensible, or would you prefer volatility-scaled triggers or time-boxed hedges?
- Fills: Any best practices you use to sanity-check tick-fill logic for bias (e.g., bid/ask selection on direction, partial-fill price sampling)?
- Robustness: Besides WFO and nested CV already in the training stack, what’s your favorite leak test for multi-TF feature builders?



2
u/faot231184 Aug 11 '25
I’m impressed by your system, but I’m curious: how do you handle the inevitable issues that come with real-time market data? In a live feed, it’s common to get malformed candles, inconsistent timestamps, out-of-order bars, latency spikes, and other irregularities that you don’t see in backtests. Do you filter, rebuild, or discard that data before it reaches the model? In my experience, these edge cases can cause even the most sophisticated systems to break down if they’re not addressed at the data ingestion layer.
2
u/AltezaHumilde Aug 12 '25
bro, you tested the bot 1 month....
1
u/shot_end_0111 Aug 11 '25
Multiple short horizon models mean ? A strategy in multiple short horizon(same) different tree based models ?? The strategy signals are given by tree signal or a strategy is meta leveled with tree models ? Also how can second level lstm meta classifier can work ?? It's vague
2
u/soyrogersanches Aug 11 '25
Amazing, following, interested to implement
3
u/[deleted] Aug 23 '25
[removed] — view removed comment