EA-14384 · Trend Following

Exp_KalmanFilterCandle

This EA trades based on the KalmanFilterCandle custom indicator, opening buy positions when the indicator signals an uptrend (color value transitions to 2) and sell positions when it signals a downtrend (color value transitions to 0). It uses a Kalman filter to smooth price action into candlestick-like signals and executes trades with configurable stop-loss and take-profit levels on each new bar.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsKalmanFilterCandle
Author—

Backtest results (H1, about 1 year)

Not backtested yet — this EA could not be converted automatically.

Strategy analysis

The core strategy relies on a Kalman Filter to smooth price data and generate candlestick-like trend direction signals. Entry conditions: when the indicator's buffer 4 color value transitions from non-2 to 2, a buy signal is triggered; when it transitions from non-0 to 0, a sell signal is triggered. Exit conditions are twofold: fixed stop-loss (1000 points) and take-profit (2000 points) levels, plus trend-reversal-based closing when the signal flips direction. Position sizing supports two modes: fixed lot size or risk-based percentage of account margin (controlled by MM and MMMode parameters), implemented via the TradeAlgorithms.mqh library. Money management uses MM default of 0.1, paired with LOT or RISK mode to determine order volume. The strategy operates on H4 timeframe by default and uses SignalBar=1 (the previous closed bar) for signal confirmation, avoiding false signals from unclosed bars. The EA provides four boolean switches to independently control buy open, sell open, buy close, and sell close actions, enabling flexible signal execution control.

Strengths

  • Uses Kalman Filter for price smoothing, which reduces lag compared to simple moving averages while effectively filtering noise
  • Employs SignalBar=1 to confirm signals from closed bars, avoiding false signals from unclosed bars
  • Provides four independent buy/sell switches for flexible control over opening and closing positions separately
  • Uses IsNewBar mechanism to ensure signal calculation happens only once per bar, avoiding tick-level redundant computation
  • Complete stop-loss and take-profit configuration with a default 2:1 reward-to-risk ratio favorable for long-term positive expectancy

Weaknesses

  • Depends on external custom indicator KalmanFilterCandle and TradeAlgorithms.mqh library; EA cannot run without these files
  • No position check mechanism; may open duplicate positions in the same direction when already holding a position
  • No spread filter; stop-loss and take-profit can be easily triggered in high-spread environments
  • Stop-loss of 1000 points and take-profit of 2000 points are large values that may not suit all instruments and timeframes
  • No drawdown control or maximum position limit; risk exposure is uncontrolled during extreme market conditions

Possible improvements

  • Add position check logic to avoid duplicate openings in the same direction, preventing over-concentration of positions
  • Add spread filter and time filter (e.g., avoiding news periods) to improve entry quality
  • Change stop-loss and take-profit to ATR-based dynamic calculation to adapt to volatility characteristics of different instruments

Risk assessment

Overall risk: Medium

  • No position check; may open duplicate same-direction positions leading to excessive leverage
  • Fixed-point stop-loss and take-profit don't adapt to all instruments' volatility; may be too wide for low-volatility or too narrow for high-volatility instruments
  • Depends on external indicator file; EA silently fails with only a log print when the file is missing

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness2.0
Innovation4.0
Documentation1.0
Overall2.5

Parameters

ParameterDefaultDescription
MM0.1Money management parameter (lot or ratio)
MMModeLOTPosition sizing mode (free margin/balance/net free margin/net balance/fixed lot)
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum allowed slippage in points
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow closing long positions
SellPosClosetrueAllow closing short positions
InpInd_TimeframePERIOD_H4Indicator calculation timeframe
SignalBar1Bar index for signal retrieval
K1.0Kalman filter smoothing coefficient; higher = faster response

Similar Trend Following EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.