EA-14009 · Trend Following

Exp_LinearRegSlope_V1

This EA trades based on the Linear Regression Slope indicator, opening buy positions when the slope crosses above the signal line and sell positions when it crosses below. It uses customizable smoothing methods and price types, with configurable stop-loss, take-profit, and money management parameters. The strategy is a systematic trend-following system that enters in the direction of the linear regression slope crossover.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Rating★★☆☆☆
TypeTrading EA
TimeframesH4, D1, H1
IndicatorsLinear Regression Slope, Custom Smoothing (SMA/EMA/SMMA/LWMA/JJMA/JurX/ParMA/T3/VIDYA/AMA)
Author—

Backtest results (H1, about 1 year)

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

Strategy analysis

Strategy concept: This EA uses the Linear Regression Slope indicator to determine market trend direction, with positive slope indicating an uptrend and negative slope indicating a downtrend. Entry conditions: A buy signal is triggered when the upper line (UpValue) was above the lower line (DnValue) on the previous bar and a crossover occurs on the current bar (UpValue[0]<=DnValue[0]); a sell signal is triggered when the lower line was above and a reverse crossover occurs. Exit conditions: A buy signal simultaneously closes sell positions, and a sell signal simultaneously closes buy positions; additionally, there are independent stop-loss and take-profit mechanisms. Position sizing: The MoneyManagement (MM) parameter controls lot size, with negative values indicating risk percentage mode, supporting both fixed lots and proportional sizing. Money management: Implemented via the MM parameter, default -0.1 means using risk percentage to calculate position size, with default stop-loss and take-profit of 1000 and 2000 points respectively. Signals are calculated on each new bar using the SignalBar parameter for signal delay, and a Recount mechanism ensures data reliability when CopyBuffer fails.

Strengths

  • Uses linear regression slope indicator with a statistical foundation, more scientific than simple moving averages
  • Supports 10 smoothing algorithms and 11 price types, offering high flexibility
  • Has conflicting signal handling mechanism (cancels all signals when buy and sell signals appear simultaneously)
  • Built-in new bar detection mechanism prevents repeated trading on the same bar
  • Supports independent buy/sell open and close switches for flexible control

Weaknesses

  • Default stop-loss of 1000 points and take-profit of 2000 points are excessively large, posing high risk on non-H4 timeframes
  • No spread filter, which may generate false signals during high-spread conditions
  • Lacks existing position check, potentially opening duplicate positions
  • Depends on external custom indicator LinearRegSlope_V1, increasing deployment complexity
  • No maximum position or maximum drawdown limit mechanism

Possible improvements

  • Add a spread filter mechanism to avoid entering during excessively wide spreads
  • Add position existence check logic to prevent duplicate openings in the same direction
  • Add maximum drawdown protection and maximum position count limits

Risk assessment

Overall risk: Medium

  • Large default stop-loss/take-profit values may cause significant losses on smaller timeframes
  • No spread filter means slippage during high-volatility periods may exceed expectations
  • Lack of position check may lead to duplicate openings increasing risk exposure

Evaluation scores

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

Parameters

ParameterDefaultDescription
MM-0.1Money management ratio or 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
SlMethodMODE_SMASmoothing algorithm type
SlLength12Smoothing period length
SlPhase15Smoothing phase parameter
IPCPRICE_CLOSEApplied price type
TriggerShift1Trigger shift offset
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.