BFG · Variance Lab · Raptor 2 (P2E)

Raptor · backtested 2026-10-01 · all gates pass

Raptor 2: Flip the Action

The second inverse experiment. One variable changed: the detector's returned action is inverted after the pattern check. Everything else is P2C, untouched.

Built Reviewed clean Backtested 2026-10-01 RAPTOR All 5 gates pass

Full report

The complete backtest report and investment assessment for Raptor 2: naming guide, full numbers table, the five gates, the action-flip insight, honest limitations, the investability checklist, and the cleanup guide. Published on this site as the official record.

Read the full Raptor 2 report8 sections · the official record

The exact change

In OnTick, the raw D1 bias is computed exactly as P2C computes it and fed unchanged into the detector. Only the detector's returned action is inverted before CreateSetup. Zero stays zero.

int rawBias = BiasDirection();
int baseSig = DetectPattern(rates, atr, rsiBuf[0], zoneBuf[0], rawBias);
int sig = -baseSig;

Base +1 BUY becomes -1 SELL, base -1 SELL becomes +1 BUY. The on-chart label shows Bias(PERIOD_D1) raw: UP | ACTION INVERTED so the inversion can never be misread.

Verification · 2026-09-30

Single-variable confirmed. Token-by-token diff against P2C: the action inversion is the only behavior change. Everything else is identical.

Source review: no issues found. In-house token diff plus an independent external MQL5 review (2026-09-30) found zero syntax problems across all 1,019 lines. Not a MetaEditor compile, that still needs F7 on a real terminal. Full independent report (PDF).

Status: compiled and backtested 2026-10-01. Verdict: RAPTOR, 5 of 5 gates on extended history.

What it does

Hypothesis

The detector is right about timing but wrong about direction. P2C faded pullbacks in the direction of the daily bias and lost. P2E takes the same moment and trades the other way, betting the pullback extends into a full reversal.

Unchanged from P2C

Raw D1 bias, pattern geometry, bar-shape and RSI filters, pullback zone, ATR stops, 1.5R / 3.0R targets, 75% partial, runner, breakeven +0.1R, scale-in, 1% risk, 12-bar pending expiry, 21:00 cutoff, 3% daily loss halt, max setups, both trading gates off. The existing BUY/SELL setup construction handles the mirrored SL/TP automatically. If P2E wins where P2C lost, it is purely the action flip.

Identity and safety

File
Blackfish_EA_P2E.mq5
Base
P2C (Blackfish_EA_P2C.mq5). P2B abandoned.
Magic number
20260931
Trading gates
InpLiveTrading = false, InpAllowOrders = false (defaults)
Demo only
No live trading. No real money.

Experiment status

Built2026-09-30
Source reviewClean
Compiled (F7)2026-10-01
Backtested2026-10-01
Forward demoPending
VerdictRAPTOR · Promoted

Gates · 5 of 5 PASS

Net profit > $0PASS · +$922.19
Profit factor > 1.00PASS · 1.10
Expectancy > 0RPASS · +6.49
Total R > 0PASS · +9.2R
Trades ≥ 100PASS · 142

First variant to clear every gate. Backtest only, demo account, no live capital. Next: frozen-parameter out-of-sample, then forward demo.

Backtest results · extended history · 2026-10-01

EURUSD H1, 2023-10-01 to 2026-09-22, every tick based on real ticks, 18,460 bars, 99% history quality. Tester gates InpLiveTrading=true, InpAllowOrders=true.

Total trades
142
Win rate
29.58%
Profit factor
1.10
Net
+$922.19 (+9.22%)
Expected payoff
+6.49
Max drawdown
18.87%
Gross profit / loss
+$10,399.87 / -$9,477.68

Verdict: RAPTOR. The first run (2025-01-01 to 2026-09-22) gave 78 trades, PF 1.15, net +7.35%, passing 4 of 5 gates but short of the 100-trade minimum. Extending history back to 2023-10-01 brought 142 trades and cleared all five gates. The edge held across the longer window.

Download

Complete .mq5 source. Compile in MetaEditor before attaching to any chart.

Blackfish_EA_P2E.mq532 KB · built 2026-09-30

Restricted

BFG

Type the password to enter.