Exp_Instantaneous_TrendFilter
This EA trades based on the crossover signals of the Instantaneous TrendFilter indicator, which uses an Ehlers-style alpha smoothing constant. It opens buy positions when the trend filter oscillator crosses above its signal line and sell positions when it crosses below, with configurable stop loss and take profit levels.
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
This EA employs the Instantaneous TrendFilter indicator as its core strategy, which is based on John Ehlers' instantaneous trend filter theory for trend following. Entry conditions are: a buy signal is generated when indicator buffer 1 crosses above buffer 0, and a sell signal is generated when buffer 1 crosses below buffer 0, using a two-bar crossover detection method comparing consecutive bars. Exit conditions include: reverse crossover signals trigger position closure (buy signal closes sell positions, sell signal closes buy positions), along with fixed stop loss at 1000 points and take profit at 2000 points. Position sizing is controlled by the MM parameter, defaulting to 0.1 lots or 0.1% of account funds, supporting both lot mode and margin proportion mode for position calculation. Money management relies on the TradeAlgorithms.mqh library functions, allowing users to separately enable/disable buy/sell opening and closing through BuyPosOpen/SellPosOpen and BuyPosClose/SellPosClose parameters. The strategy uses the SignalBar parameter to control signal confirmation delay, defaulting to 1 to use the previously closed bar's signal, avoiding signal drift issues from unclosed bars.
Strengths
- Uses Ehlers' instantaneous trend filter theory, which has lower lag and better trend identification than simple moving average crossovers
- Provides flexible position sizing options supporting both lot mode and margin proportion mode
- Buy/sell opening and closing can be independently controlled, allowing flexible strategy behavior configuration
- Uses SignalBar=1 to avoid signal drift from unclosed bars, improving signal reliability
- Includes fixed stop loss and take profit, providing basic risk control mechanisms
Weaknesses
- Stop loss and take profit are fixed point values without ATR-based volatility adaptation, leading to inconsistent performance across varying volatility environments
- Lacks spread filtering, which may result in unfavorable entries during high-spread conditions
- No limit on number of open positions, potentially causing over-trading with frequent open/close cycles in choppy markets
- Depends on an external custom indicator file, requiring the indicator file to be present during deployment
- Alpha parameter is fixed with no adaptive adjustment mechanism, requiring manual tuning for different market conditions
Possible improvements
- Introduce ATR-based dynamic stop loss and take profit to automatically adjust SL/TP distances based on market volatility, improving adaptability across different volatility environments
- Add spread filtering and maximum open position limits to reduce the risk of unfavorable entries and over-trading
Risk assessment
Overall risk: Low
- Fixed 1000-point stop loss is relatively large and may lead to significant losses on instruments with smaller tick values
- Lack of spread filter and maximum position limits may cause frequent signal triggers and consecutive losses in choppy markets
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management parameter controlling position size |
MMMode | LOT | Lot calculation mode (fixed lot or margin ratio) |
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_H4 | Indicator calculation timeframe |
SignalBar | 1 | Bar index for signal detection |
Alpha | 0.07 | Alpha smoothing constant for instantaneous trend filter |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.