EA-16245 · Trend Following

Exp_STLMCandle

This EA trades based on signals from the custom STLMCandle indicator, opening buy positions when the indicator signals bullish momentum and sell positions on bearish momentum. It uses a Jurik-style smoothed indicator (JLength/JPhase parameters) to determine trend direction from candle color states. Entry and exit are controlled by separate boolean flags, allowing selective enablement of long/short opening and closing.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH4, D1, H1
IndicatorsSTLMCandle, Jurik Smoothed MA
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.00%0.00%0.00%0—————Not convertible yet

Why this EA never traded: no entry rule survived the conversion.

Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.

Blow-up risk: No blow-up pattern found

None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.

High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →

Strategy analysis

The strategy concept is based on the STLMCandle custom indicator's color state to determine trend direction, where indicator buffer 4 returns color values: 2 for uptrend and 0 for downtrend. Entry conditions: when Clr[1]==2 and Clr[0]<2, a buy signal is triggered; when Clr[1]==0 and Clr[0]>0, a sell signal is triggered, which detects color state transitions as trend reversal confirmations. Exit conditions: opposite trend signals automatically close existing positions, with buy signals closing sell positions and sell signals closing buy positions. Position sizing supports multiple modes through the MMMode parameter, including fixed lot size, percentage of balance, percentage of free margin, and percentage of loss-adjusted margin. Money management uses fixed stop loss and take profit with defaults of 1000 and 2000 points respectively, yielding a risk-reward ratio of 1:2. The strategy only recalculates signals on new bar formation using the CIsNewBar class, avoiding redundant per-tick computation and improving efficiency.

Strengths

  • Clear strategy logic based on trend reversal signals, aligning with trend following principles
  • Multiple position sizing modes offering flexibility for different risk preferences
  • Independent entry and exit signal controls allow selective enablement of buy/sell directions
  • New bar detection mechanism prevents duplicate signals and reduces invalid trades
  • Stop loss to take profit ratio of 1:2 provides a positive expectancy risk-reward design

Weaknesses

  • Depends on the custom STLMCandle indicator whose internal logic is opaque, making signal reliability hard to verify
  • No spread filter mechanism, which may cause unnecessary losses in high-spread environments
  • No maximum position count limit, potentially leading to over-trading in choppy markets
  • Fixed stop loss and take profit do not account for market volatility (ATR), reducing adaptability across different conditions
  • Lacks drawdown control and maximum loss limits, leaving risk uncontrolled in extreme market scenarios

Possible improvements

  • Add ATR-based dynamic stop loss and take profit to automatically adjust distances based on market volatility
  • Implement spread filtering and maximum position count limits to reduce trading frequency under adverse conditions

Risk assessment

Overall risk: Medium

  • No maximum drawdown limit, lacking automatic protection during consecutive losses
  • Custom indicator black-box nature makes it difficult to diagnose and adjust when signals fail
  • No spread filter, stop losses may be severely penetrated in high-slippage environments

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation1.0
Overall2.3

Parameters

ParameterDefaultDescription
MM0.1Capital allocation ratio per trade
MMModeLOTMargin mode: free margin/balance/drawdown free margin/drawdown balance/fixed lot
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum allowed slippage in points
BuyPosOpentrueAllow buy to open
SellPosOpentrueAllow sell to open
BuyPosClosetrueAllow buy position close on reverse signal
SellPosClosetrueAllow sell position close on reverse signal
InpInd_TimeframePERIOD_H4STLMCandleindicatortime period
JLength5Jurik smoothing length parameter
JPhase100Jurik smoothing phase parameter
SignalBar1Signal detection bar index position

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.