EA-2438 · Trend Following

Exp_JBrainTrend1Stop

This EA trades based on the JBrainTrend1Stop custom indicator, opening buy positions when the indicator signals an uptrend and sell positions when it signals a downtrend. It uses ATR and Stochastic oscillator inputs combined with JMA smoothing to determine trend direction and stop levels. Position sizing is configurable via money management modes, and trades are managed with configurable stop loss and take profit levels.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsJBrainTrend1Stop, ATR, Stochastic Oscillator, JMA
AuthorCopyright © 2014, Nikolay Kositsin

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

This EA uses the JBrainTrend1Stop indicator as its core strategy engine, which combines ATR (Average True Range) and Stochastic oscillator to determine trend direction. Entry conditions: a buy position opens when the uptrend buffer has a value and the downtrend buffer's previous value was non-zero; a sell position opens when the downtrend buffer has a value and the uptrend buffer's previous value was non-zero. Exit conditions are triggered by opposing trend signals that close existing positions, supplemented by configurable stop loss and take profit levels for risk control. Position sizing supports five modes: based on free margin, balance, loss-adjusted free margin, loss-adjusted balance, and fixed lot size. The strategy only evaluates signals on new bar detection, preventing redundant trades within the same bar. The default stop loss is set to 1000 points and take profit to 2000 points, yielding a 1:2 risk-reward ratio which is reasonable.

Strengths

  • Clear strategy logic based on trend following principles, using ATR and Stochastic combination for trend direction detection
  • Flexible money management with five different position sizing modes
  • New bar detection mechanism prevents redundant trade entries within the same bar
  • Reasonable stop loss to take profit ratio (1:2), providing a balanced risk-reward profile
  • Independent control over buy/sell opening and closing directions offers high flexibility

Weaknesses

  • Heavy reliance on the custom JBrainTrend1Stop indicator whose internal logic is opaque, creating black-box risk
  • Default SL of 1000 points and TP of 2000 points are large values that may not suit all instruments and volatility environments
  • No spread filter mechanism, potentially leading to unfavorable entries in high-spread conditions
  • Signals are based on closed bars (SignalBar=1), causing delayed entry
  • No trailing stop functionality to lock in floating profits as the trade moves favorably

Possible improvements

  • Add a spread filter to avoid trading when the spread exceeds a threshold, preventing unfavorable entries
  • Implement a trailing stop feature to lock in more profits as the trend continues in favor
  • Improve error handling and add retry logic for JBrainTrend1Stop indicator loading failures

Risk assessment

Overall risk: Medium

  • Reliance on a black-box custom indicator whose internal logic cannot be audited for unexpected behavior
  • The default 1000-point stop loss is large and may expose unnecessary risk on low-volatility instruments
  • No check for existing positions in the same direction, potentially leading to duplicate entries

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation2.0
Documentation1.0
Overall2.3

Parameters

ParameterDefaultDescription
MM0.1Money management percentage or fixed lot size
MMModeLOTMoney management mode (free margin/balance/free margin after loss/balance after loss/fixed lot)
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum allowed slippage
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow closing long positions
SellPosClosetrueAllow closing short positions
InpInd_TimeframePERIOD_H4Indicator calculation timeframe
ATR_Period7ATR period parameter
STO_Period9Stochastic oscillator period parameter
MA_MethodMODE_SMAMoving average method
STO_PriceSTO_LOWHIGHStochastic oscillator price type
Stop_dPeriod3Stop loss bar period parameter
Length_7JMA smoothing length parameter
Phase_100JMA phase parameter
SignalBar1Signal bar index

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.