Candle Sense AI Trader – User Guide
1. Overview
The Candle Sense AI Trader is an automated trading system (Expert Advisor) for MetaTrader
5.
It combines Price Action patterns, Candlestick recognition, and On-Balance Volume (OBV)
to confirm trade signals.
Key features:
• Detects Engulfing, Pin Bar, Morning Star, and Evening Star patterns.
• Confirms with OBV direction and OBV moving average filter.
• Flexible risk-based position sizing.
• Supports ATR-based or candle-based Stop Loss & Take Profit.
• Optional Trailing Stop.
• Spread filter and trade cooldown to avoid over-trading.
2. Inputs & Parameters
General
• EA Name: Label shown in trade comments.
• Magic Number: Unique ID to separate trades from other EAs.
• Allow Long / Short: Enable or disable buy/sell signals.
• Max Spread Points: Maximum allowed spread (in points).
• Cooldown Bars: Minimum bars to wait before opening a new trade.
Risk & Exits
• Risk Per Trade (%): % of account balance risked per trade.
• Use ATR Stops:
o true → Stop Loss & Take Profit calculated from ATR.
o false → Use candle highs/lows for SL and ATR-multiplied TP.
• ATR Timeframe / Period: ATR settings.• ATR SL Mult / ATR TP Mult: Multipliers for SL and TP when using ATR.
• Use Trailing Stop: Enable/disable trailing.
• Trail ATR Mult: Distance based on ATR for trailing stop.
• Min Stop Points: Minimum broker stop level safeguard.
OBV Filter
• OBV Timeframe: Timeframe for OBV indicator.
• OBV MA Period: Period for moving average on OBV.
• OBV Slope Lookback: Number of bars OBV must rise/fall to confirm trend.
Pattern Mode
• Engulfing + Pin → Detects Engulfing + Pin Bars.
• Engulfing Only → Engulfing patterns only.
• Pin Only → Pin Bars only.
• Star Set → Morning Star & Evening Star.
3. How It Works
1. On each new bar, EA checks if:
o Spread is within limit.
o Cooldown requirement is satisfied.
o No existing open trade with the same Magic Number.
2. Detects candlestick patterns.
3. Confirms signal with OBV filter (OBV above MA & rising for buys, below MA & falling
for sells).
4. Calculates Stop Loss / Take Profit.
5. Computes lot size based on risk %.
6. Places trade if conditions are met.
7. Manages open trades with Trailing Stop if enabled.4. Recommended Settings
• Timeframe: H1 or M30 (works with candlestick patterns).
• Pairs: Major pairs (EURUSD, GBPUSD, USDJPY) and Gold (XAUUSD).
• ATR Settings: 14 period, SL Mult = 1.5, TP Mult = 2.0.
• Risk: 1–2% per trade.
• OBV: MA Period = 21, Slope Lookback = 2.
• Pattern Mode: Start with Engulfing + Pin for more signals.
5. Example Parameters – XAUUSD H1
General
• Magic Number: 80234567 (use a unique number if running multiple EAs)
• Allow Long: true
• Allow Short: true
• Max Spread Points: 60 (Gold often has wider spread than EURUSD)
• Cooldown Bars: 3 (fewer bars to catch more swings on H1)
Risk & Exits
• Risk Per Trade (%): 1.5
• Use ATR Stops: true
• ATR Timeframe: PERIOD_CURRENT (H1)
• ATR Period: 14
• ATR SL Mult: 2.0 (Gold is more volatile → wider SL)
• ATR TP Mult: 3.0 (aim for higher reward, ~1:1.5 RR)
• Use Trailing Stop: true
• Trail ATR Mult: 1.2
• Min Stop Points: 250 (safeguard for XAUUSD broker rules)
OBV Filter
• OBV Timeframe: PERIOD_H4 (using higher timeframe gives more reliable OBV trend
on gold)
• OBV MA Period: 34
• OBV Slope Lookback: 3 (stricter slope confirmation for volatile moves)
Pattern Mode• Pattern Mode: PATT_STAR_SET (Morning/Evening Star → strong reversal signals on
Gold H1)
Strategy Notes for XAUUSD H1
• Gold is volatile, so wider ATR multipliers reduce premature stop-outs.
• OBV filter on H4 timeframe aligns trades with stronger market flows.
• Trailing Stop with ATR x1.2 helps lock in profits during large swings.
• Recommended to keep risk moderate (1.5%) because of Gold’s fast moves.
• Pattern Mode: Start with Engulfing + Pin for more signals.
6. Usage Tips
• Best used on accounts with low spread brokers.
• Avoid running multiple EAs on the same symbol with the same Magic Number.
• For trend-following, combine with higher-timeframe filters.
• Backtest with different PatternMode and OBV settings to adapt to each symbol.
• Monitor performance on demo before live trading.