DEVELOPER HANDOVER PACKAGE MULTIENGINE TREND SYSTEM VERSION: 2.0 AUTHOR: Anthony DATE: May 2026 SECTION 1 — PROJECT SUMMARY This project implements a fully automated, multiengine, multiasset trendfollowing trading system for MetaTrader 5 (MT5). The system consists of: 1. TrendEngine (persymbol engine) 2. PortfolioController (central risk brain) 3. Monitoring module 4. Configuration module 5. Main EA wrapper The system trades multiple instruments simultaneously, enforces portfoliolevel risk rules, and includes volatility filters, dualtimeframe confirmation, micropyramiding, and riskweighted satellites. SECTION 2 — SYSTEM REQUIREMENTS The developer must implement: 1. A modular, objectoriented architecture using MQL5 classes. 2. One TrendEngine instance per symbol. 3. A PortfolioController that manages all engines. 4. A monitoring module for logging and health checks. 5. A configuration module for symbolspecific parameters. 6. A main EA file that initializes all components and routes events. The system must support: • Multiple symbols • Multiple timeframes • Portfoliolevel risk control • Volatilityregime detection • Dualtimeframe confirmation • ATRbased breakout logic • ATRbased stop management • Micropyramiding • Riskweighted satellites • Satellite activation delay • Error handling and autoretry • Logging and monitoring SECTION 3 — ENGINE BLUEPRINT (SUMMARY) The full engine blueprint is provided separately. This section summarizes the required components. TrendEngine must implement: • UpdateIndicators() • ClassifyVolatility() • TryEnter() • OpenTrade() • UpdateStops() • HandlePyramiding() • AddPyramidPosition() • SessionAllowed() • EstimateRForNewTrade() Properties include: symbol tf_exec tf_conf trendFilterLen atrPeriod atrEntryMult atrStopMult volLowThr volMedThr volHighThr volExtremeThr maxRiskPerTrade riskWeight maxPyramidAdds pyramidAddR atr trendFilter volRegime inPosition positionDir entryPrice stopPrice currentR pyramidCount activationDelayPassed SECTION 4 — PORTFOLIO CONTROLLER REQUIREMENTS PortfolioController must: • Enforce 60/40 core/satellite risk split • Enforce max portfolio risk • Enforce exposure caps • Enforce onetradeperinstrument • Manage correlation logic • Manage volatility regimes • Manage riskoff mode • Manage capital scaling • Track highwatermark • Track portfolio drawdown • Track total R at risk • Track total exposure Required methods: InitializeEngines() CanOpenTrade(engine, direction) CanPyramid(engine) Check60_40Split(engine, newR) UpdateRiskState() UpdateRiskScaling() CalcTotalRAtRisk() CalcCoreRAtRisk() CalcSatelliteRAtRisk() ExposureLimitReached(engine) OneTradePerInstrumentViolated(engine) SECTION 5 — DEVELOPER RESPONSIBILITIES The developer must: 1. Implement all classes exactly as specified. 2. Ensure all engines run independently but report to the PortfolioController. 3. Ensure all risk calculations use Rbased logic. 4. Ensure all volatility calculations use ATRpercentage logic. 5. Ensure all pyramiding rules are enforced. 6. Ensure all session filters are enforced. 7. Ensure all error handling follows SafeSendOrder() pattern. 8. Ensure all logging is timestamped and symboltagged. 9. Ensure the EA is stable under VPS conditions. 10. Ensure no blocking operations occur in OnTick or OnTimer. SECTION 6 — CODING STANDARDS The developer must follow: • Objectoriented MQL5 • One class per file • No global variables except constants • All risk calculations must be deterministic • All logs must include: timestamp, symbol, engine name, event • All errors must be logged • All order operations must use SafeSendOrder() • All parameters must be configurable via Config.mqh • No hardcoded magic numbers SECTION 7 — TESTING REQUIREMENTS The developer must perform: 1. Unit tests o TrendEngine entry logic o Stop management o Pyramiding logic o Volatility classification o Portfolio risk checks 2. Integration tests o Multiple engines running simultaneously o PortfolioController enforcing limits o Riskoff mode activation o Capital scaling 3. Execution tests o Spread filter o Slippage filter o Order retry logic o Position mismatch detection 4. Stress tests o High volatility o Rapid price movement o VPS disconnect simulation o API failure simulation SECTION 8 — ACCEPTANCE CRITERIA The system is considered complete when: 1. All engines trade independently and correctly. 2. PortfolioController enforces all risk rules. 3. Volatility regimes are classified correctly. 4. Dualtimeframe confirmation works correctly. 5. Pyramiding works exactly as specified. 6. Stops trail correctly using ATR. 7. Riskoff mode activates and deactivates correctly. 8. Capital scaling adjusts globalRiskMult correctly. 9. All logs are clean, readable, and timestamped. 10. No crashes, freezes, or blocking operations occur. 11. The EA runs continuously for 30 days on a VPS without failure. SECTION 9 — DELIVERY CHECKLIST The developer must deliver: 1. All .mqh and .mq5 source files 2. A compiled .ex5 file 3. A configuration file (Config.mqh) 4. A README explaining: o How to install o How to configure o How to add/remove symbols o How to adjust risk 5. A test log showing: o Entries o Exits o Pyramiding o Riskoff events o Errors o Recovery actions 6. A final confirmation that: o All engines operate correctly o PortfolioController enforces all rules o No memory leaks o No infinite loops o No blocking operations END OF DEVELOPER HANDOVER PACKAGE