Exp_TrendlessAG_Hist
This EA trades based on the TrendlessAG_Hist custom indicator, which applies double smoothing to a detrended price oscillator. It opens buy positions when the histogram rises and sell positions when it falls, with configurable signal bar and smoothing parameters.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.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
The strategy concept is based on the TrendlessAG_Hist indicator, a double-smoothed detrended oscillator that first removes price trend via smoothing, then normalizes by percentage and applies a second smoothing layer to generate signals. Entry conditions: buy when the histogram rises above its previous value (Value[0]>Value[1] and Value[1]<Value[2]), and sell when the histogram falls below its previous value (Value[0]<Value[1] and Value[1]>Value[2]). Exit conditions are triggered by reverse signals — closing sell positions on buy signals and closing buy positions on sell signals, with fixed StopLoss and TakeProfit in points. Position sizing uses a margin-based percentage calculation controlled by the MM parameter, supporting both fixed lot and margin ratio modes via MMMode. Money management is basic, lacking maximum position limits, equity protection, or drawdown controls, relying solely on the MM fraction and fixed SL/TP for risk containment.
Strengths
- Double smoothing design effectively reduces false signals — first detrending layer then JMA smoothing enhances signal stability
- Supports multiple smoothing algorithms and price types with flexible parameters adaptable to different market conditions
- Independent buy/sell switches allow flexible configuration for long-only or short-only trading
- New bar detection mechanism prevents repeated trading on the same bar
Weaknesses
- Critical bug: OnInit returns INIT_FAILED at line 95, making the EA completely non-functional — it will never start trading
- Lacks spread filter and maximum position controls, potentially entering unfavorable trades in high-spread conditions
- No drawdown protection or account equity check, risk is uncontrolled during consecutive losses
- Depends on custom indicator TrendlessAG_Hist and external include files, making deployment complex and portability poor
Possible improvements
- Fix the critical bug: change INIT_FAILED to INIT_SUCCEEDED at the end of OnInit so the EA can actually start running
- Add spread filter, maximum position limits, and account drawdown protection mechanisms
- Implement trailing stop and break-even functionality to improve risk management on profitable trades
- Embed indicator calculation within the EA to reduce external dependencies and improve portability
Risk assessment
Overall risk: Medium
- OnInit returns INIT_FAILED making the EA completely non-functional — a critical code defect
- Lack of spread filter may cause unfavorable entries during low liquidity periods
- Fixed SL/TP doesn't account for market volatility changes, may cause frequent stop-outs in high volatility
- No maximum drawdown protection or position count limits
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management percentage of margin/balance |
MMMode | LOT | Lot calculation mode: free margin/balance/minus loss |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage in points |
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_H12 | Indicator calculation timeframe |
XMA_Method1 | MODE_EMA | First-level smoothing method |
XLength1 | 7 | First-level smoothing period |
XPhase1 | 15 | First-level smoothing phase parameter |
IPC | PRICE_CLOSE | Indicator applied price type |
PointsCount | 600 | Data points for percentage normalization |
In100 | 90 | Normalization percentage threshold |
XMA_Method2 | MODE_JJMA | Second-level smoothing method |
XLength2 | 5 | Second-level smoothing period |
XPhase2 | 100 | Second-level smoothing phase parameter |
SignalBar | 1 | Signal bar index |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.