Exp_TSI_MACD
This EA trades based on crossover signals from the custom TSI_MACD indicator, which combines True Strength Index smoothing with MACD-style signal line logic. It opens buy positions when the indicator line crosses above the signal line and sell positions on the opposite crossover, with configurable position sizing, stop loss, and take profit. Trade entry and exit are controlled by separate boolean flags, allowing flexible signal filtering.
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 | +8.58% | +7.42% | 1.95% | 112 | 51.80% | 1.80 | 4.40 | 5 | +$7.66 | Reliable |
| GBPUSD | +5.82% | +5.03% | 3.93% | 113 | 53.60% | 0.94 | 1.48 | 4 | +$5.46 | Reliable |
| USDJPY | -7.76% | -6.78% | 8.80% | 115 | 46.50% | -1.57 | -0.88 | 5 | −$6.87 | Reliable |
| XAUUSD | -92.64% | -88.42% | 96.75% | 106 | 41.50% | -1.36 | -0.96 | 6 | −$87.40 | Account stopped out |
Profitable on 2 of 4 markets with reliable results.
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.
Against the other Momentum EAs with a reliable result on the same market: EURUSD: better than 97% of 68 · GBPUSD: better than 92% of 66 · USDJPY: better than 4% of 68 · XAUUSD: better than 28% of 75
Month by month
| Market | Months with a gain | Best month | Worst month |
|---|---|---|---|
| EURUSD | 69% | +2.70% 2026-03 | -0.96% 2025-11 |
| GBPUSD | 54% | +2.48% 2026-04 | -1.24% 2026-03 |
| USDJPY | 38% | +0.94% 2026-03 | -2.88% 2026-09 |
| XAUUSD | 31% | +105.46% 2026-07 | -91.32% 2026-08 |
From the backtest equity curve, sampled about every two days; only reliable results.
Blow-up risk: High
- Hit a stop-out in our backtest (equity below 10%) on XAUUSD
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 core is a momentum crossover system based on the TSI_MACD indicator. TSI (True Strength Index) is a double-smoothed momentum indicator that reduces noise by applying two rounds of smoothing to price momentum, then generates trading signals using MACD-style signal line crossovers. Entry conditions: a buy position opens when the indicator line Ind crosses above the signal line Sign, and a sell position opens when Ind crosses below Sign, with crossover detection implemented by comparing Ind and Sign values across two consecutive bars. Exit conditions include: reverse crossover signals trigger position closing (long positions close when Ind crosses below Sign, short positions close when Ind crosses above Sign), along with fixed StopLoss and TakeProfit levels. Position sizing supports multiple margin modes: percentage of free margin, percentage of balance, percentage of net-loss free margin, percentage of net-loss balance, and fixed lot mode. The money management parameter MM controls the position ratio, defaulting to 0.1 (10%). The strategy uses the IsNewBar mechanism to ensure signal calculation occurs only once per bar, preventing duplicate entries.
Strengths
- Uses TSI double-smoothed momentum indicator, producing less noisy and more stable signals compared to raw MACD
- Entry and exit signals are independently controlled, allowing flexible enable/disable of buy/sell open and close operations
- Implements IsNewBar mechanism to prevent redundant signal calculation and duplicate entries within the same bar
- Supports 10 different smoothing algorithms, offering strong strategy customizability
- Includes a Recount mechanism to handle cases when indicator data is not yet ready, enhancing robustness
Weaknesses
- StopLoss of 1000 points and TakeProfit of 2000 points are excessively large, potentially causing high risk or low capital efficiency on non-large timeframe or low-volatility instruments
- Lacks spread filter and volatility filter, making it prone to false signals in high-spread or low-volatility environments
- No mutual exclusion check between long and short positions, potentially holding both simultaneously and wasting margin on hedging
- Depends on custom external indicator TSI_MACD and external include files, creating deployment complexity and poor portability
- SignalBar=1 uses completed bar signals, but the crossover detection logic compares bars [1] and [0], so actual signal delay may be larger than expected
Possible improvements
- Add spread filter and ATR-adaptive stop loss/take profit to dynamically adjust risk parameters based on market volatility
- Add position direction check to prevent simultaneously holding long and short positions, or at least provide a configurable hedging mode toggle
- Add indicator data validity checks and improved error retry mechanisms to enhance fault tolerance when indicator loading fails
Risk assessment
Overall risk: Medium
- Fixed-point stop loss/take profit is not ATR-adaptive, resulting in inconsistent risk exposure across different volatility environments
- No spread filter means high-spread instruments may incur actual losses greater than expected due to slippage
- Long and short positions can be held simultaneously forming implicit hedging, consuming double margin without necessarily intending to hedge
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio parameter |
MMMode | LOT | Lot sizing mode (free margin/balance/post-loss free margin/post-loss balance/fixed lot) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Max slippage tolerance 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_H4 | Indicator calculation timeframe |
XMA_Method | MODE_EMA | Smoothing algorithm type (SMA/EMA/SMMA/LWMA/JJMA/JurX/ParMA/T3/VIDYA/AMA) |
XFast | 8 | Fast smoothing period |
XSlow | 21 | Slow smoothing period |
MomPeriod | 1 | Momentum period |
XLength1 | 5 | First-level smoothing period |
XLength2 | 8 | Second-level smoothing period |
XLength3 | 5 | Signal line smoothing period |
XPhase | 15 | Smoothing phase parameter (for JJMA/VIDYA/AMA) |
IPC | PRICE_CLOSE | Applied price type |
SignalBar | 1 | Signal bar index (0=current, 1=last completed bar) |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.