Exp_ForexLine
This EA trades based on the custom ForexLine indicator, which uses dual smoothed moving average lines to detect trend direction. It opens buy positions when the indicator signals an uptrend and sell positions when it signals a downtrend, with configurable stop loss and take profit levels. Position management is delegated to the TradeAlgorithms library, supporting multiple money management modes.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
Not backtested yet — this EA could not be converted automatically.
Strategy analysis
The strategy concept is based on trend following using the custom ForexLine indicator, which employs two doubly-smoothed moving average lines to determine market trend direction. Entry conditions are: a buy signal is generated when indicator buffer 1 transitions to 0 and buffer 0 is greater than 0, while a sell signal occurs when buffer 1 equals 2 and buffer 0 is less than 2. Exit conditions include closing buy positions when a downtrend signal appears and closing sell positions when an uptrend signal appears, combined with fixed stop loss (1000 points) and take profit (2000 points) levels for risk management. Position sizing supports five modes including free margin-based, balance-based, loss-adjusted free margin, loss-adjusted balance, and fixed lot size. Money management is controlled via the MM parameter with a default risk ratio of 0.1. The strategy uses an IsNewBar mechanism to ensure signal detection only occurs on new bar formation, preventing duplicate entries, while also providing a SignalBar parameter that allows real-time signal detection on the current bar when set to 0.
Strengths
- Supports 10 smoothing algorithms (SMA/EMA/JJMA/JurX/T3 etc.), offering high flexibility
- Provides 5 money management modes and 4 independent open/close switches for granular risk control
- Uses IsNewBar mechanism to prevent duplicate signals, ensuring robust logic
- Double smoothing reduces false signals and improves signal reliability
- Default H8 timeframe suits medium-to-long-term trend following, avoiding market noise
Weaknesses
- Heavily depends on external custom indicator ForexLine and two Include libraries, making standalone operation difficult
- Default stop loss of 1000 points and take profit of 2000 points are excessively large, posing high risk on smaller timeframes
- Lacks spread filter and maximum position checks, potentially leading to consecutive entries during volatile markets
- Indicator signal logic is opaque, relying solely on buffer values to determine trend direction, making verification difficult
- No trailing stop or dynamic take profit mechanism, unable to lock in floating profits during trending moves
Possible improvements
- Add spread filter and maximum concurrent position limits to reduce risk exposure during extreme market conditions
- Implement trailing stop or dynamic take profit functionality to protect floating profits during trend continuation
Risk assessment
Overall risk: Medium
- Default SL/TP values are very large (1000/2000 points), potentially causing significant single-trade losses if parameters are not properly adjusted
- No spread filter, potentially entering at unfavorable prices during high-spread conditions
- Depends on external custom indicator file; EA fails to initialize if the indicator is missing
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio or lot size |
MMMode | LOT | Position sizing mode: Free margin/Balance/Net margin/Net balance/Fixed lot |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
InpInd_Timeframe | PERIOD_H8 | Indicator calculation period |
MA_Method11 | MODE_LWMA | Smoothing method layer 1 for line 1 |
Length11 | 5 | Smoothing period layer 1 for line 1 |
Phase11 | 15 | Smoothing phase parameter layer 1 for line 1 |
MA_Method12 | MODE_LWMA | Smoothing method layer 2 for line 1 |
Length12 | 10 | Smoothing period layer 2 for line 1 |
Phase12 | 15 | Smoothing phase parameter layer 2 for line 1 |
IPC1 | PRICE_CLOSE | Applied price type for line 1 |
MA_Method21 | MODE_LWMA | Smoothing method layer 1 for line 2 |
Length21 | 20 | Smoothing period layer 1 for line 2 |
Phase21 | 15 | Smoothing phase parameter layer 1 for line 2 |
MA_Method22 | MODE_LWMA | Smoothing method layer 2 for line 2 |
Length22 | 20 | Smoothing period layer 2 for line 2 |
Phase22 | 15 | Smoothing phase parameter layer 2 for line 2 |
IPC2 | PRICE_CLOSE | Applied price type for line 2 |
SignalBar | 1 | Signal detection bar index (0 = current bar) |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.