支持中心 帮助文档 联系我们
📱 微信: 18391752892 | 💬 QQ: 3313198376 | ✈️ Telegram | 📧 fishfx123@gmail.com
EURUSD 1.0856 +0.12% GBPUSD 1.2678 +0.08% USDJPY 149.23 -0.15% XAUUSD 2034.56 +0.34% EURUSD 1.0856 +0.12% GBPUSD 1.2678 +0.08% USDJPY 149.23 -0.15% XAUUSD 2034.56 +0.34%

EKF Portfolio EA

👤 作者: Olalekan Damilola Aturaka

4.5 分

¥0.00

📌 版本: v1.3
📥 下载: 0
⭐ 评分: 4.5

📝 产品详情

EKF Portfolio EA

作者Olalekan Damilola Aturaka
版本v1.3
更新4 版本 1
激活数136716
EKF Portfolio Trader — MT5 Marketplace
EKF PORTFOLIO TRADER
EKF Portfolio Trader

Extended Kalman Filter · Multi-Symbol · MetaTrader 5

⚡ VERSION 1.03

Overview

EKF Portfolio Trader is an institutional-grade automated trading system for MetaTrader 5 that applies the Extended Kalman Filter (EKF) a recursive Bayesian estimation algorithm, to dynamically track and predict price-state trajectories across an entire portfolio of instruments simultaneously.

Unlike conventional indicator-based EAs, this system treats price as a hidden state variable corrupted by measurement noise. The EKF continuously refines its estimate of the true underlying trend using prediction and update steps, producing statistically optimal, noise-filtered signals with quantified uncertainty (covariance). Trades are only entered when the filter's confidence meets a defined threshold, eliminating impulsive entries on random market noise.

It incorporates multi-symbol portfolio management, dynamic position sizing, real-time risk controls, and full MT5 compatibility, ready to deploy on forex, metals, indices, or any supported CFD instrument.

Key Features

?
EKF Signal Engine
Recursive state estimation with a 3-component model (price, velocity, acceleration). Tracks the true trend with covariance-bounded confidence, adapting in real time to changing volatility.
?️
Portfolio Mode
Manages multiple symbols from a single EA instance. Independent filter states per instrument with unified risk allocation and correlation filtering across the book.
?
Z-Score Entry Gate
Trade signals are gated by the filter's normalized innovation z-score. Only statistically significant deviations from the predicted state trigger an entry.
?️
Layered Risk Controls
Dynamic lot sizing, daily loss circuit-breaker, max concurrent positions, pre-order margin verification via OrderCalcMargin, and free margin checks before every order.
?
Adaptive Noise Tuning
Process noise (Q) and measurement noise (R) matrices are fully exposed as inputs, letting you tune the filter between fast trend-following and smooth mean-reversion behavior.
?
Full MT5 Compatibility
Strategy Tester ready with custom OnTester() criterion. Auto-detects symbol fill modes and supports both hedging and netting account types.

How It Works

1
Predict On each new bar, the EKF projects the prior state estimate (price, velocity, acceleration) forward through the process model, inflating the covariance matrix according to Q.
2
Update The new price observation is compared against the prediction. The Kalman Gain balances trust between the model and the observation based on their relative uncertainties, then corrects the state estimate.
3
Signal Generation The normalized innovation z-score is calculated. If it exceeds the configured threshold and passes the trend, volume, and correlation filters, a directional signal is confirmed.
4
Safe Execution Before any order is sent, the EA verifies account balance, free margin, and uses OrderCalcMargin to confirm sufficient funds. Only then is the order dispatched with ATR-based SL/TP levels.

Input Parameters

? Portfolio Configuration
Parameter Default Description
InpSymbols EURUSD,GBPUSD,
XAUUSD,USDCHF,
AUDUSD
Comma-separated list of symbols to trade simultaneously. Up to 10 symbols supported.
InpTimeframe M30 Analysis timeframe used for bar processing and all indicator calculations.
InpMaxSymbols 10 Hard cap on the number of symbols the EA will manage concurrently.
? EKF Model Parameters
Parameter Default Description
InpPhi 0.85 State transition decay factor applied to velocity and acceleration components. Range 0.7–0.95. Lower values mean faster decay to zero.
InpProcessNoise1 0.0001 Process noise variance for the price state (Q₁₁). Higher = filter tracks price changes faster but is noisier.
InpProcessNoise2 0.00001 Process noise variance for the velocity state (Q₂₂).
InpProcessNoise3 0.000001 Process noise variance for the acceleration state (Q₃₃).
InpMeasurementNoise 0.001 Observation noise variance (R). Higher = smoother filter output, slower response to price changes.
? Entry Signal Configuration
Parameter Default Description
InpEntryZThreshold 1.5 Minimum normalised innovation z-score required to trigger a trade. Range 1.0–3.0. Higher = fewer but higher-conviction entries.
InpMinBarsBetweenTrades 10 Minimum number of bars that must pass after a trade before the EA will enter again on the same symbol.
InpUseVolumeFilter true Enable volume confirmation. Signals are rejected unless current bar volume exceeds the rolling average by the multiplier below.
InpMinVolumeMultiplier 1.2 Current bar volume must be at least this multiple of the 19-bar average to pass the volume filter.
?️ Risk Management
Parameter Default Description
InpRiskPercent 1.5% Account equity risked per trade as a percentage of balance. Lot size is calculated dynamically from this value.
InpMaxDailyRisk 5.0% Maximum cumulative daily loss as a percentage of balance. Trading halts for the rest of the day when this is reached.
InpMaxDailyTrades 20 Maximum number of new trades allowed per calendar day across all symbols.
InpMaxOpenPositions 5 Maximum number of concurrent open positions managed by this EA at any one time.
InpMaxCorrelation 0.7 Prevents opening positions on highly correlated symbol pairs in the same direction, limiting portfolio concentration risk.
? Stop Loss & Take Profit
Parameter Default Description
InpATRPeriod 14 ATR period used to calculate volatility-adaptive stop and target levels.
InpSLMultiplier 2.5× Stop-loss distance = ATR × this multiplier.
InpTP1Multiplier 2.0× First take-profit level = ATR × this multiplier.
InpTP2Multiplier 3.5× Second take-profit level = ATR × this multiplier (used as primary TP in execution).
InpTP3Multiplier 5.0× Third (extended) take-profit level = ATR × this multiplier.
InpUseTrailingStop true Enable ATR-based trailing stop to lock in profits as the trade moves in favour.
InpTrailingMultiplier 1.5× Trailing stop distance = ATR × this multiplier.
? Additional Filters
Parameter Default Description
InpUseTrendFilter true Enable EMA trend alignment filter. Signals are only taken in the direction of the prevailing EMA trend.
InpEMAFast 20 Fast EMA period for trend direction detection.
InpEMASlow 50 Slow EMA period for trend direction detection.
InpMinADX 20.0 Minimum ADX value required to consider a trend valid. Signals are skipped in ranging/choppy markets below this level.
InpADXPeriod 14 Period for the ADX trend strength calculation.
? Trading Hours
Parameter Default Description
InpUseTimeFilter true Restrict trading to a defined session window using broker server time.
InpStartHour 8 Hour at which the EA begins accepting trade signals (broker time, 0–23).
InpEndHour 20 Hour at which the EA stops accepting new trade signals (broker time, 0–23).
⚙️ System Settings
Parameter Default Description
InpMagicNumber 987654 Unique identifier stamped on all orders. Change this if running multiple instances on the same account.
InpTradeComment EKF_Portfolio Comment string attached to all trade orders for identification in the terminal history.
InpDebugMode false Enable verbose logging to the MT5 Experts log. Useful for diagnostics; disable in live trading.

⚠ Version Notice: Past performance in backtesting does not guarantee future results. Trading leveraged instruments carries significant risk of loss. Only trade with capital you can afford to lose.
EKF · PORTFOLIO TRADER · v1.03
MetaTrader 5 · MQL5 Marketplace · New Release

安全须知

本产品仅通过 MQL5.com 官方渠道获取。其他渠道版本可能缺少完整功能和技术支持。

EA 配置

交易品种XAUUSD
时间框架H1 (推荐)
推荐经纪商IC Markets, IC Trading
最低存款$300 / 0.01手

📸 截图预览