TuyulUncensored
This EA uses ZigZag indicator swing points combined with fast/slow EMA crossover to identify trend direction, then places pending limit orders at the 57% Fibonacci retracement level of the last ZigZag swing. It manages orders by deleting unfilled pending orders after a configurable number of bars, and includes day-of-week trading filters.
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.97% | +0.84% | 1.71% | 1 | 0.00% | — | — | — | — | Too few trades |
| GBPUSD | +0.83% | +0.72% | 2.06% | 1 | 0.00% | — | — | — | — | Too few trades |
| USDJPY | +0.72% | +0.63% | 2.07% | 1 | 0.00% | — | — | — | — | Too few trades |
| XAUUSD | +0.28% | +0.23% | 49.46% | 1 | 0.00% | — | — | — | — | Too few trades |
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 combines ZigZag swing points with EMA trend direction to enter at Fibonacci retracement levels. When the fast EMA is above the slow EMA and a new ZigZag high forms, a Buy Limit order is placed at the 57% Fibonacci retracement of the swing; conversely, when the fast EMA is below the slow EMA and a new ZigZag low forms, a Sell Limit order is placed at the 57% retracement. Stop loss is set at the ZigZag extreme (buy SL at the swing low, sell SL at the swing high), and take profit is calculated as the SL distance multiplied by the TPFromSLMultiplier. Position sizing uses a fixed lot size (InitialLot) with no scaling or pyramiding logic. Money management checks free margin via OrderCalcMargin before placing orders and validates lot size against broker minimum, maximum, and step constraints. Unfilled pending orders are automatically deleted after WaitNewSignalZigZagBarCount bars, resetting the system for the next signal.
Strengths
- Clear strategy logic combining trend identification (EMA crossover) with key retracement entry (57% Fibonacci), designed for favorable risk-reward ratio
- Complete stop loss and take profit logic with SL at ZigZag extremes providing technical justification, and TP calculated via multiplier for positive expectancy
- Implements pending order timeout deletion mechanism to avoid stale signals, along with trading day filters and margin checks
- Uses limit orders instead of market orders for better entry prices, aligning with trend retracement trading philosophy
Weaknesses
- GetLastZigZagPoints function has contradictory logic: the first half searches from index 5 and sets lastZigZagHigh/Low, but the second half iterates from index 0 and overwrites those results, rendering the first half completely useless
- Only allows one position at a time (PositionSelect check) and does not distinguish between EA instances, causing interference when running on multiple symbols
- BreakoutDistancePips parameter is declared but never used (dead code); variable naming mixes Indonesian and English, reducing readability
- No spread filter, slippage protection, or volatility check — unfavorable fills may occur in high-volatility or wide-spread environments
- OnTick uses TimeCurrent()==lastCheck to limit execution to once per second, but new bar detection should use Bars or iBars rather than timestamp comparison
Possible improvements
- Fix GetLastZigZagPoints function: remove redundant iteration logic, clearly separate retrieval of the most recent and previous ZigZag points, ensure prevZigZagHigh/Low are correctly updated
- Add spread filter and volatility check (e.g., ATR) to avoid entries during wide spreads or extreme volatility; replace the current timestamp-based check with a proper IsNewBar function
- Remove unused BreakoutDistancePips parameter, unify variable naming to English, add support for multiple EA instances via MagicNumber+Symbol combination filtering
- Add trailing stop or moving take-profit functionality to protect floating profits, and implement drawdown limits and daily loss caps as money management safeguards
Risk assessment
Overall risk: Medium
- GetLastZigZagPoints has a logic flaw that may cause incorrect ZigZag point identification, leading to orders placed at wrong levels
- No spread filter — limit orders may fill at unfavorable prices in wide-spread environments
- Single position limit using PositionSelect(_Symbol) without MagicNumber filtering may conflict with other EAs
- Fixed lot sizing with no dynamic adjustment, no maximum drawdown or consecutive loss protection mechanisms
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MagicNumber | 9291 | Order magic number to identify this EA's orders |
InitialLot | 0.03 | Initial order lot size |
TPFromSLMultiplier | 1.2 | TP to SL distance multiplier ratio |
ZigZagDepth | 12 | ZigZag indicator depth parameter |
ZigZagDeviation | 5 | ZigZag indicator deviation parameter |
ZigZagBackstep | 3 | ZigZag indicator backstep parameter |
ZigZagReadBarCount | 100 | Number of bars to read ZigZag indicator |
WaitNewSignalZigZagBarCount | 12 | Bar count before deleting unfilled pending orders |
BreakoutDistancePips | 10 | Breakout distance in pips (declared but unused) |
FastEMA | 9 | Fast EMA period |
FastEMAMethod | MODE_EMA | fastEMAcalculation method |
FastEMAPrice | PRICE_CLOSE | Fast EMA applied price |
SlowEMA | 21 | Slow EMA period |
SlowEMAMethod | MODE_EMA | slowEMAcalculation method |
SlowEMAPrice | PRICE_CLOSE | Slow EMA applied price |
AllowMonday | true | Whether to allow trading on Monday |
AllowTuesday | true | Whether to allow trading on Tuesday |
AllowWednesday | true | Whether to allow trading on Wednesday |
AllowThursday | true | Whether to allow trading on Thursday |
AllowFriday | true | Whether to allow trading on Friday |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.