EA-11254 · Trend Following

Exp_SlopeDirectionLine

This EA trades based on the SlopeDirectionLine custom indicator, opening buy positions when the indicator signals an uptrend (value=2) and sell positions when it signals a downtrend (value=0). It uses a double-smoothing approach with configurable smoothing methods and manages both entry and exit signals independently with separate toggle switches.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsSlopeDirectionLine, LWMA, SMA
AuthorCopyright © 2012, 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

The core strategy is a trend-following system based on the SlopeDirectionLine indicator. Entry conditions: a buy position opens when indicator buffer 1 value changes from non-2 to 2 (uptrend onset), and a sell position opens when it changes from non-0 to 0 (downtrend onset), signaling trend direction changes. Exit conditions: existing sell positions close when an uptrend signal appears, and existing buy positions close when a downtrend signal appears, implementing automatic position closure on trend reversal. Position sizing supports multiple margin modes (MMMode) including free margin-based, balance-based, loss-adjusted free margin, loss-adjusted balance, and fixed lot size. Money management is controlled by the MM parameter with a default of 0.1, representing the risk fraction per trade. The indicator itself employs a dual-smoothing algorithm where the first layer applies primary smoothing to price data (e.g., LWMA) and the second layer further smooths the result (e.g., SMA), producing a smoother trend determination line.

Strengths

  • Dual-smoothing algorithm reduces false signals and provides more stable trend determination
  • Independent control of entry and exit signals offers high flexibility
  • Multiple money management modes accommodate different trading styles
  • New bar detection mechanism prevents repeated trading on the same bar
  • Multiple notification options (push, email, alert, sound) for signal awareness

Weaknesses

  • Depends on the custom SlopeDirectionLine indicator, requiring correct loading and availability
  • Default StopLoss of 1000 points and TakeProfit of 2000 points are very large and may not suit all instruments
  • No scaling in/out logic, making position management relatively simplistic
  • No spread filter included, potentially leading to unfavorable fills in wide-spread environments
  • Indicator value judgment relies only on discrete values 0 and 2, lacking handling of intermediate states

Possible improvements

  • Add spread filter and trading session filter to avoid unfavorable trading conditions
  • Implement trailing stop functionality to better protect profits during trending moves

Risk assessment

Overall risk: Medium

  • Default StopLoss of 1000 points is large and may result in significant per-trade losses
  • No spread filter means severe slippage possible in low-liquidity markets
  • Dependency on external indicator file means EA fails if the indicator cannot load

Evaluation scores

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

Parameters

ParameterDefaultDescription
MM0.1Money allocation ratio
MMModeLOTPosition size calculation mode
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum slippage deviation
BuyPosOpentrueAllow buy position opening
SellPosOpentrueAllow sell position opening
BuyPosClosetrueAllow buy position closing
SellPosClosetrueAllow sell position closing
InpInd_TimeframePERIOD_H4Indicator timeframe
MA_Method1MODE_LWMAFirst-level smoothing method
Length112First-level smoothing period
Phase115Phase parameter for 1st smoothing level
MA_Method2MODE_SMA2nd level smoothing method
Phase215Phase parameter for 2nd smoothing level
IPCPRICE_CLOSEApplied price type
On_PushfalseEnable push notifications
On_EmailfalseEnable email notifications
On_AlerttrueEnable alert notifications
On_Play_SoundfalseEnable sound notifications
NameFileSoundexpert.wavSound file name
CommentSirNameSlopeDirectionLine: Order comment prefix
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.