EA-1151 · Momentum

Exp_CoeffofLine_true

This EA trades based on the CoeffofLine_true custom indicator, which measures the coefficient of a linear regression line to determine market momentum direction. It opens buy positions when the indicator crosses from negative to positive territory and sell positions when it crosses from positive to negative, with configurable stop loss and take profit levels.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryMomentum
RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsCoeffofLine_true (Linear Regression Coefficient), SMMA
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

This EA uses the CoeffofLine_true indicator as its core strategy signal, which measures the strength and direction of price trends based on the linear regression coefficient. Entry conditions are: buy when the indicator crosses from negative to positive (Value[1]>0 and Value[0]<0 crossover confirmation), and sell when the indicator crosses from positive to negative (Value[1]<0 and Value[0]>0 crossover confirmation). Exit conditions include fixed stop loss and take profit levels, as well as reverse signal exits (long positions close on sell signals, short positions close on buy signals). Position sizing is controlled through the MM parameter, where negative values represent fixed lot sizes and positive values represent deposit percentage-based sizing. Money management relies on external TradeAlgorithms.mqh library functions including BuyPositionOpen and SellPositionOpen. The EA uses an IsNewBar mechanism to ensure signals are calculated only once per bar, preventing duplicate trades, while the SignalBar parameter allows immediate signal response on the current bar when set to zero.

Strengths

  • New bar detection mechanism prevents duplicate trades within the same bar, reducing overtrading risk
  • Independent buy/sell permission switches provide high flexibility for directional strategy testing
  • Fixed stop loss and take profit cap risk exposure, preventing unlimited losses
  • Linear regression coefficient for momentum assessment provides stronger statistical significance than simple MA crossovers

Weaknesses

  • Depends on external custom indicator CoeffofLine_true and TradeAlgorithms.mqh library, lacking portability and self-containment
  • Default stop loss of 1000 points and take profit of 2000 points are excessively large, creating unreasonable risk-reward for most instruments
  • No spread filter means the EA may trigger false signals in high-spread environments leading to losses
  • Lacks multi-timeframe confirmation, single indicator signals are prone to false breakouts
  • MM parameter design is counterintuitive, negative values for fixed lots can easily cause misuse

Possible improvements

  • Add a spread filter to pause opening positions when spread exceeds a threshold, avoiding excessive slippage losses
  • Add multi-timeframe confirmation, only opening positions when the higher timeframe trend aligns, improving signal reliability
  • Redesign the MM parameter using an enum to distinguish between fixed lot and percentage modes, eliminating negative value confusion

Risk assessment

Overall risk: Medium

  • Default 1000-point stop loss is excessively large, potentially causing significant losses in extreme market conditions
  • No spread filter or margin check poses risk of opening positions in high-cost environments
  • Dependency on external library and indicator means trading failure if they fail to load

Evaluation scores

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

Parameters

ParameterDefaultDescription
MM-0.1Trade fraction or fixed lot; negative value = lots
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Max price slippage deviation in points
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow closing long positions
SellPosClosetrueAllow closing short positions
InpInd_TimeframePERIOD_H4Indicator timeframe
SMMAPeriod5Smoothed Moving Average period
SignalBar1Bar index for entry signal

Similar Momentum 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.