Skip to product information
Eclipse Pattern Trader EA #041

Eclipse Pattern Trader EA – User Manual
1. Overview
Eclipse Pattern Trader is an automated Expert Advisor (EA) for MetaTrader 5 that trades
based on:
• Harmonic Patterns (Gartley, Bat, Butterfly, Crab)
• Fibonacci Ratios (for validation and take-profit targeting)
• Volume Filter (to confirm stronger setups)
• ATR-based Stop Loss & Trailing Stop (for adaptive risk management)
It automatically detects reversal harmonic patterns, confirms them with price action and volume,
then executes trades with dynamic risk management.
2. Input Parameters
Pattern Detection
• Analysis timeframe (InpTimeframe)
The timeframe used for ZigZag and pattern detection. Default = current chart.
• ZigZag Depth / Deviation / Backstep (InpZigZagDepth, InpZigZagDev,
InpZigZagBack)
Controls swing detection sensitivity.
• Fib Tolerance (InpFibTolerance)
Allowed error margin when matching Fib ratios (default 0.05 = ±5%).
• Lookback Bars (InpLookbackBars)
How many candles to scan for patterns.
• Min Bars Between Swings (InpMinBarsBetweenSwings)
Prevents “too close” swing points.
Volume Filter
• Volume MA Period (InpVolMAPeriod)
The moving average period for volume baseline.
• Volume Boost Factor (InpVolBoost)
Minimum multiple of average volume required to confirm entry (default 1.05).
Risk & Money Management• Use Risk % (InpUseRiskPercent)
If true → lot size is calculated based on % of free margin.
• Risk Percent (InpRiskPercent)
Percent of free margin risked per trade (e.g., 1%).
• Fixed Lot (InpFixedLot)
Used if Use Risk % = false.
• Max Spread (points) (InpMaxSpreadPoints)
Skip trade if spread is too high.
• Slippage (points) (InpSlippagePoints)
Allowed order slippage.
Stop Loss & Take Profit
• ATR Period (InpATRPeriod)
For volatility-based SL/Trailing.
• ATR SL Multiplier (InpATR_SL_Mult)
Stop loss = ATR × multiplier (failsafe).
• Use Fibonacci TP (InpUseFibTP)
If true, TP is placed at Fib projection between D and A leg.
• Fib TP Level (InpFibTPLevel)
Example: 0.618 → TP at 61.8% retracement of AD leg.
• RR Take Profit (InpTP_RR)
Fallback: TP = Risk × Reward ratio (if Fib TP invalid).
Trailing & Break-even
• Use Trailing Stop (InpUseTrailing)
Activates ATR trailing.
• ATR Trail Multiplier (InpATR_Trail_Mult)
Distance = ATR × multiplier.
• Use Break-even (InpUseBreakEven)
Move SL to entry after reaching 1R profit.
• Break-even Offset (InpBE_OffsetPoints)
Extra points added beyond entry price.
Trade Control
• Magic Number (InpMagic)
Unique ID to separate this EA’s trades.• One Trade per Bar (InpOneTradePerBar)
Avoids multiple trades in the same candle.
• Cooldown Bars (InpCoolDownBars)
Wait this many bars after each trade.
Visualization
• Draw Pattern (InpDrawPattern)
If true, EA draws detected harmonic pattern on chart.
• Bullish/Bearish Colors (InpBullColor, InpBearColor)
Customizable pattern colors.
3. Trading Logic
1. EA scans ZigZag swings to detect X-A-B-C-D harmonic structures.
2. Checks if ratios match harmonic templates (Gartley, Bat, Butterfly, Crab).
3. Confirms with:
o Volume filter (above moving average × factor)
o Candle direction at point D
4. If valid → executes a Buy (bullish) or Sell (bearish) order.
5. Risk & SL/TP set dynamically:
o Stop loss: near D point + ATR buffer
o TP: Fibonacci target (preferred) or RR fallback
o Trailing stop & break-even adjust position management.
4. Recommendations
• Timeframes: M15 – H1 for most pairs; H1–H4 for XAUUSD.
• Pairs: Works best on liquid instruments (EURUSD, GBPUSD, XAUUSD).
• Risk: Start with Risk % = 1 or fixed 0.1 lots for testing.
• Optimization: Adjust ZigZag and Volume settings per symbol/timeframe.
• Backtest: Use “Every tick” modeling for accuracy.
Recommended Parameters – Eclipse Pattern Trader EA
EURUSD – M15 (Intraday Swing/Scalping)
• Analysis timeframe: PERIOD_M15• ZigZag Depth: 12
• ZigZag Deviation: 5
• ZigZag Backstep: 3
• Fib Tolerance: 0.05
• Lookback Bars: 800
• Min Bars Between Swings: 5
Volume Filter
• Volume MA Period: 20
• Volume Boost: 1.10 (stricter filter)
Risk Settings
• Use Risk %: true
• Risk Percent: 1.0
• Max Spread: 20 (EURUSD has tight spreads)
• Slippage: 10
Stop/Target
• ATR Period: 14
• ATR SL Multiplier: 2.0
• Use Fibonacci TP: true
• Fib TP Level: 0.618
• RR TP (fallback): 1.5
Trailing / BE
• Use Trailing: true
• ATR Trail Multiplier: 1.2
• Break-even: true
• BE Offset: 5 points
Control
• One Trade per Bar: true
• Cooldown Bars: 5
XAUUSD – H1 (Gold Swing/Trend)
• Analysis timeframe: PERIOD_H1
• ZigZag Depth: 24 (higher to avoid noise)
• ZigZag Deviation: 10• ZigZag Backstep: 5
• Fib Tolerance: 0.05
• Lookback Bars: 1200
• Min Bars Between Swings: 10
Volume Filter
• Volume MA Period: 30
• Volume Boost: 1.05 (slightly looser, since XAU volume is already high)
Risk Settings
• Use Risk %: true
• Risk Percent: 0.5 (Gold is volatile → reduce risk)
• Max Spread: 80 (to tolerate wider XAU spreads)
• Slippage: 30
Stop/Target
• ATR Period: 14
• ATR SL Multiplier: 2.5 (give more room for gold swings)
• Use Fibonacci TP: true
• Fib TP Level: 0.786 (more ambitious targets on Gold)
• RR TP (fallback): 2.0
Trailing / BE
• Use Trailing: true
• ATR Trail Multiplier: 1.5
• Break-even: true
• BE Offset: 20 points
Control
• One Trade per Bar: true
• Cooldown Bars: 10

You may also like