● Phase 2 · Sprint A in testing & refinement (not signed off)
Automated PhotonTrading Execution Engine
Engineered specifically for Deriv Synthetic Indices (Step Index & Volatility Series).
Translates 60 modules of institutional Photon SMC logic into an emotionless, high-frequency MetaTrader 5 Expert Advisor.
Status update - 2026-09-16:
Sprint A is implemented and compiling clean (0 errors / 0 warnings) - but NOT signed off: swing engine, order blocks (20% invalidation, persistent/non-repainting), fair value gaps, risk manager, EA v0 (hard server SL/TP + mandatory PreTradeCheck) and on-chart indicators. Currently under manual + visual testing, refinement and compliance review. Next (after sign-off): Sprint B - market structure (BOS/MSS/CHoCH), liquidity, inducement, premium/discount and the confluence stack.
Development progress
100%
Phase 1 - Research
Testing
Sprint A - Primitives (in review)
0%
Sprint B - Structure & Liquidity
0%
Sprint C - Entry Models
0%
Sprint D - ML & Build
24 Days
Total Build Schedule
400+
Extracted SMC Rules
13 / 7
Confluences / Hard disqualifiers
< 400ms
Target Order Latency
Execution Pipeline Breakdown
1. Structural Market Mapping (HTF)
01
Higher timeframe structural analysis continuously tracks market context on H4/H1:
Counter-trend without HTF pullback phase, No CHoCH, Wide Spread, Low ML Score.
Card 3; Machine Learning & ONNX Integration
Python → MQL5
Architecture: Gradient Boosted Trees (LightGBM/XGBoost) trained in Python.
Native Execution: Exported to .onnx model file and embedded natively inside MetaTrader 5 using OnnxRun().
Conformal Prediction: Calibrated confidence intervals ensure trades trigger only during statistically valid market regimes.
Card 4; Risk & Position Management
Capital Protection
Server-Side Hard Stop Loss: Posted immediately on order execution. No hidden SLs.
Dynamic Lot Sizing: Automatically computed based on 0.5% - 2.0% risk per trade.
Scale-Out Rules: 50% partial profit close at 2R; SL moved to Break-Even; remaining 50% trailed to opposing S/D zone.
10 Technical Refinement Resolutions
The ten refinements below are finalised and locked. Each card shows the topic, the relevant course reference, and the agreed resolution now being implemented.
Status: all ten refinements are finalised and locked (2026-09-14). Key resolution on #2: order block invalidation is set at 20% of zone height. This page is a read-only record.
1. Adopt NID Naming Standard
Background
The term was originally documented as ND (No Inducement), alongside LI and PBID.
Course reference
Photon 3.0 PTP POI Inducement - Theory [04:04] uses NID. The 3.0F foundation module uses neither term, so there is no third opinion.
Final decision (locked)
Adopt NID; Photon's official acronym.
Why: Matches what every Photon trader says, what the course slides show, and what the videos use. Trivial find-and-replace across docs and code.
Effort: Trivial
Locked
2. Order Block Invalidation (% of Zone Height)
Background
Our Phase 1 COrderBlock draft used 50% wick penetration of OB height for invalidation; a common implementation default carried over from FX-style bots.
Course reference
Photon 3.0 PTP LQ-EM Walkthrough [09:07]: "A zone is considered failed the moment price trades 0.1 pips through it."
Final decision (locked 2026-09-14)
Invalidate when price breaks 20% of the zone height past the far edge (tunable 15-30%). No pips (meaningless on Step/Vol), no 50% wick. SL may be RR-adjusted separately.
Why: A slight move beyond the POI marks the zone as failed. On the chart this is roughly 15-30% of the zone height; 20% is the locked default.
Effort: ~0.5 day (sprint A)
Locked
3. 50% Base Equilibrium + 25%/33% Extreme Bands
Background
Our Phase 1 notes defined Premium as 50-100% and Discount as 0-50%; a single 50% EQ line, no bands.
Course reference
Photon 4.0 + LQ-EM Backtest DAY 2 NY [02:38] uses 25%/33% extreme bands on top of the 50% line. The 3.0F Premium & Discount Pricing confirms 50% as the canonical base and adds that price need not always reach it.
Final decision (locked)
Keep 50% as the base filter; add extreme bands that score higher (+2 vs +1). EQ stays neutral (0, not a disqualifier).
Why: Preserves the textbook Fib definition while rewarding the sharper 4.0 entries. Soft filter throughout; never a hard rejection.
Effort: ~0.5 day (sprint B)
Locked
4. Mandatory BOS / Flip Cause for Order Blocks
Background
Our Phase 1 notes checked body ratio only; any last-opposite-candle with a big enough body qualified as an OB.
Course reference
Photon 4.0 S_D Zone Creation [34:02, 35:53]: a zone is high-probability only if it caused a BOS or a flip.
Final decision (locked)
Adopt 4.0 as a hard filter; OBs without a structural break or flip effect are rejected outright.
Why: Body ratio alone admits too many weak zones. The BOS/flip requirement is explicit and repeated across 4.0 lessons; it's the single biggest precision upgrade in the list.
Effort: ~1 day (sprint A)
Locked
5. Demote Liquidity Sweep to Bonus Factor
Background
Our Phase 1 notes treated a sweep as mandatory before entry; no sweep, no trade.
Course reference
Photon 4.0 Liquidity Concepts [23:10]: "We do not predict when liquidity will be tapped; we react to price action." Structure outranks liquidity.
Final decision (locked)
Demote sweep to a bonus (+2). Valid without a sweep, stronger with one.
Why: Mandatory-sweep was over-restrictive and caused missed valid trades. The bot can't predict sweeps anyway; it can only react, exactly as 4.0 teaches.
Effort: ~0.25 day (sprint B)
Locked
6. Inside Bar Candidate Origin Support
Background
Our Phase 1 notes had no inside-bar handling; inside bars were invisible to the detectors.
Course reference
Photon 4.0 S_D Zone Creation [23:56] + 3.0F Fractal Structure [28:25]: an inside bar is a lower-timeframe range; its breakout direction decides demand vs supply.
Final decision (locked)
Add InsideBar to the OB origin enum. Register as a candidate zone; next-candle breakout resolves direction.
Why: Inside bars are common on M1/M5 synthetic charts. Ignoring them throws away valid setups.
Photon 4.0 defines 5 levels: Range / Pivot / SingleCandle / InsideBar / FractalWick (S_D Zone Creation [15:33]).
Final decision (locked)
Unify to 4.0's 5 levels, default SingleCandle. Your Body method maps onto it.
Why: One hierarchy covers both courses. FractalWick (smallest) gives the sharpest entries for LQ-EM2; Range (largest) is the safe fallback.
Effort: ~0.5 day (sprint C)
Locked
8. Liquidity-Confirmed OB Verification
Background
Our Phase 1 notes had no liquidity-sweep check at OB creation; any valid-shape candle qualified.
Course reference
Photon 4.0 The Art of Trading [08:24]: a zone is further validated if it swept liquidity upon creation (the sweep-zone concept).
Final decision (locked)
Add a LiquidityConfirmed flag: true if the move away swept a structural H/L within 50 bars. Scores +1.
Why: Swept-on-creation zones carry institutional footprints; measurably higher probability in backtests.
Effort: ~0.5 day (sprint A)
Locked
9. Pre-Execution Safety Check Routine
Background
Our Phase 1 notes treated TP/SL as inputs with no enforcement; a misconfigured EA could open blind trades.
Course reference
Photon 4.0 Trade Management [00:32]: "You must know exactly how and where you will exit a position before executing the trade."
Final decision (locked)
Add CStrategyEngine::PreTradeCheck(); refuses orders when SL, TP mode, partial config, or time filter is unset.
Why: Cheap insurance against the most embarrassing live-demo failure mode: a trade with no stop.
Effort: ~0.25 day (sprint C)
Locked
10. HTF Pullback / LTF Counter-Trend Alignment
Background
Our 4.0 cross-link notes said counter-trend is only viable with solid LTF confirmations; framed as exceptional.
Course reference
Photon 3.0F MTF Market Structure [08:17]: when HTF is in a pullback phase, the LTF is expected to switch trend counter to HTF to facilitate that pullback.
Final decision (locked)
Adopt 3.0F: counter-trend is expected during HTF pullbacks (Phase C), disabled during pro-trend runs except explicit RE setups. Smaller targets (3R) for counter-trend.
Why: 3.0F is the canonical MTF source. Framing counter-trend as normal-in-pullback (not exceptional) matches how the strategy actually trades.
Effort: ~0.5 day (sprint B)
Locked
24-Day Execution Schedule (Sep 10 - Oct 3)
Accelerated execution plan with zero calendar padding. Phase 3 demo overlaps Phase 2 sprint end.
Phase 1: R&D & Spec Lock
Sep 10-12 ✓
Phase 2 - Sprint A: Structure Engine
Sep 13-16
Phase 2 - Sprint B: Liquidity & P/D
Sep 17-20
Phase 2 - Sprint C: Entry Models v2
Sep 21-24
Phase 2 - Sprint D: ML ONNX & MT5
Sep 25-28
Phase 3: 3-Day Live Demo
Sep 29-Oct 1
Phase 4: Final Handover
Oct 2-3
Rule Library; Full Extracted Ruleset
Every rule below was extracted verbatim from the Photon 3.0 / 3.0F / 4.0 videos
(timestamps point back into the matching videos).
Optional deep-dive reference.
Use search + the concept/batch filters to narrow down.
Confluence Stack; 13 Factors + 7 Hard disqualifiers (full detail)
13 Additive Factors (pass ≥ 10)
Scoring
1. HTF bias aligned (+2); trade with the H4/D1 trend.
2. POI in discount/premium (+2); longs discount, shorts premium.
3. POI quality LI+PBID (+3); both inducements present.
4. POI quality LI or PBID (+2); one side present.
5. POI quality NID (+1); needs 3+ other factors.
6. LTF CHoCH (+2); wick break trigger present.
7. Sweep near POI (+2); within MaxPoiDistanceFromSweep.
8. Strong H/L or EQLs swept (+1); not just any level.
9. Internal aligned with swing (+1); Phase A/B.
10. Clean reaction (+1); no overlap candles in POI.
11. In operating window (+1); default off for 24/7 synthetics.
12. Spread in limit (+1); dynamic per-symbol cap.
13. ML probability (+0…3); GBT confidence scaled.
7 Hard disqualifiers (instant reject)
Disqualifier
X1. Counter-trend outside HTF pullback phase.
X2. NID POI without 3+ other factors.
X3. No CHoCH and price not at an area of value.
X4. No sweep and price not at an area of value.
X5. Spread above dynamic limit.
X6. Outside operating window (when enabled).
X7. ML probability below threshold.
All rules
Glossary of Terms
Every Photon SMC term in one place, grouped by topic.
Structure
Term
Stands for
Means
Diagram
Swing
-
The dominant HTF trend. Large moves. Break = BOS (candle body close beyond swing H/L).
3 types of structure diagram
Internal
-
The trend inside the current swing pullback. Medium moves. Break = iBOS.
Same diagram as above
Fractal
-
The micro-trend inside an internal move. Small moves. Break = CHoCH (wick break).
Same diagram as above
Small-internal (II)
Internal-internal
Fourth layer below internal. Break = II BOS. Only in advanced lessons.
-
BOS
Break of Structure
Candle body close beyond swing H/L in trend direction. Continuation signal.
01_…jpeg
iBOS
Internal BOS
Same, on internal H/L. Confirms the swing pullback is real.
Same diagram as above
CHoCH
Change of Character
First opposite-direction break after a pullback. Wick break of fractal H/L. Pullback starting/ending. Aggressive, needs confluence.