EA-14046 · Trend Following

Exp_LSMA_Angle

This EA trades based on the LSMA (Least Squares Moving Average) Angle indicator, opening buy positions when the angle crosses upward above threshold and sell positions when it crosses downward. It uses a custom indicator handle to read angle values (0-4 scale) and generates signals on new bar formation, with configurable money management and separate open/close controls for long and short positions.

Open the interactive view (equity curve, symbol switch)

Key facts

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

Backtest results (H1, about 1 year)

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

Strategy analysis

The core concept of this strategy is based on the slope angle of the Least Squares Moving Average (LSMA) to determine trend direction and strength. Entry conditions: a buy position is opened when the indicator value crosses up to 4 (uptrend confirmed), and a sell position is opened when the indicator value crosses down to 0 (downtrend confirmed). Exit conditions: long positions are closed when the indicator value drops below 2, and short positions are closed when the indicator value rises above 1. Position sizing relies on the TradeAlgorithms.mqh library's BuyPositionOpen/SellPositionOpen functions, supporting multiple money management modes including free margin, balance, loss-adjusted balance/margin, and fixed lot. Money management is controlled by the MM parameter for risk ratio and MMMode for calculation mode, with a 1000-point stop loss, 2000-point take profit, yielding a 1:2 risk-reward ratio.

Strengths

  • Uses LSMA angle for trend detection, reducing lag compared to simple MA crossovers
  • Independent buy/sell open/close switches provide flexible market adaptation
  • Supports multiple money management modes catering to different risk preferences

Weaknesses

  • Depends on external custom indicator LSMA_Angle; EA fails if indicator is missing
  • 1000-point stop loss is very wide, potentially causing large losses on volatile instruments
  • Lacks spread filter and trading session filter, may open positions under unfavorable conditions

Possible improvements

  • Add spread filter and trading session filter to avoid trading during high spread and low liquidity periods
  • Replace fixed stop loss/take profit with ATR-based dynamic calculation for better market adaptation

Risk assessment

Overall risk: Medium

  • Fixed 1000-point stop loss does not adapt to instrument volatility, potentially too wide or too narrow
  • No spread filter mechanism, may execute at high slippage during low liquidity

Evaluation scores

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

Parameters

ParameterDefaultDescription
MM0.1Money management parameter controlling position size
MMModeLOTLot calculation mode (fixed lot or margin ratio)
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_H1Indicator calculation timeframe
LSMAPeriod25LSMA calculation period
AngleTreshold15Angle threshold
StartLSMAShift4LSMA starting bar shift
EndLSMAShift0LSMA end shift bar count
SignalBar1Bar index for signal detection

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.