Garfield baaac18b84 Add comprehensive documentation for AI handoff
- AGENTS.md: Technical context for AI assistants
- QUICKREF.md: Quick reference card
- README.md: Updated with version history and performance
- conversation-history/README.md: Updated session index
- 2026-03-30-weekend-gap-short-signal-fix.md: Session notes
2026-03-30 00:22:17 -04:00
2026-03-21 18:39:48 -04:00
2026-03-21 18:39:48 -04:00
2026-03-21 19:09:24 -04:00
2026-03-21 18:40:22 -04:00
2026-03-21 19:09:24 -04:00
2026-03-21 19:29:49 -04:00
2026-03-21 19:29:49 -04:00
2026-03-21 19:09:24 -04:00

MQL Trading Bots Repository

Collection of MetaTrader 4/5 Expert Advisors and Indicators for automated forex trading.

🎯 Main Strategies

1. MultiSignal Confluence EA (PRIMARY)

Combines Pivot Points + Candlestick Patterns + Harmonic Patterns

Signal Strength:
- 1 signal = 0.75 (NO TRADE)
- 2 signals = 0.90 (TRADE)
- 3 signals = 1.00 (STRONG TRADE)

2. OrdersEA_Smart_Grid EA

Grid trading around daily pivot levels with RSI/ADX filters


📁 File Structure

mql-trading-bots/
├── MultiSignal_Confluence_EA.mq5     # PRIMARY EA - Confluence trading (v1.14)
├── OrdersEA_Smart_Grid.mq5           # Grid trading EA (v3.1)
├── MultiSignal_Confluence.mq5        # Indicator version
├── HarmonicPatternFinderV2_Optimized.mq5
├── CandlestickPatternEA_Fixed.mq5
├── FadePivot2_v4_Fixed.mq5
├── confluence-*.set                   # Settings for Confluence EA (11 pairs)
├── grid-*.set                         # Settings for Grid EA (14 pairs)
└── verify-short-signals.py            # Verification script

📊 Performance

Account Period Return Win Rate Status
104125640 March 2026 ~15-19% 46-87% Active
103477358 February 2026 ~4% - Closed

Starting Balance: $100,000
Current Balance: ~$115,000+
Largest Win: $8,091
Largest Loss: -$805


⚙️ EA Versions

MultiSignal_Confluence_EA.mq5

Version Date Changes
v1.14 2026-03-30 Fixed short signal detection (removed restrictive belowPivot check)
v1.13 2026-03-29 Added daily drawdown protection
v1.12 2026-03-21 Added volatility/ADX filters
v1.11 2026-03-21 Fixed stop loss cross-symbol contamination

OrdersEA_Smart_Grid.mq5

Version Date Changes
v3.1 2026-03-30 Added weekend gap protection
v3.0 2026-03-29 Fixed daily forced closure bug

🚀 Deployment

MT5 Location

~/mt5-docker/config/.wine/drive_c/Program Files/MetaTrader 5/MQL5/Experts/

Deployment Steps

  1. Copy .mq5 files to MT5 MQL5/Experts/
  2. Compile in MetaEditor (F7)
  3. Attach to charts (H1 recommended)
  4. Load corresponding .set file for each pair

MT5 Docker

  • Location: ~/mt5-docker/
  • Config: mt5-docker/config/.wine/drive_c/Program Files/MetaTrader 5/
  • Wine Version: 9.17 (DO NOT upgrade to 10.0+)

🔧 Key Features

Confluence EA Settings

InpMinConfluence = 2       // Min signals to trade
InpMinStrength = 0.90     // Min signal strength
InpUseVolatilityFilter = true   // ATR filter
InpUseADXFilter = true     // ADX filter
InpMaxDailyDrawdown = 3.0 // Daily loss limit %

Grid EA Settings

UseAutoPivots = true       // Auto-calculate daily pivots
InpCloseBeforeWeekend = true  // Close Friday before weekend
InpWeekendCloseHour = 17   // 5 PM broker time
MaxLevels = 10             // Grid levels

⚠️ Known Issues & Solutions

Issue Solution Version
Stop loss cross-symbol contamination Use _Symbol directly instead of CSymbolInfo v1.11
Short signals not firing Removed belowPivot restriction v1.14
Weekend gap risk Added Friday close option v3.1
Daily drawdown Added CheckDailyDrawdown() protection v1.13/v3.0

Conservative (7 charts)

  • USDJPY, EURJPY, EURUSD, AUDUSD, USDCAD (Confluence)
  • EURCHF, EURUSD (Grid)

Aggressive (12 charts)

Add: GBPUSD, NZDUSD, USDCHF (Confluence) + GBPUSD, USDJPY (Grid)

Full Portfolio (15 charts)

Add: GBPJPY, XAUUSD (both EAs)


🔑 Important Notes

  1. Symbol-specific positions - EAs track positions per _Symbol
  2. Magic Number - Confluence: 777777, Grid: 333
  3. Only LONG trades - Confluence EA was biased long (v1.13), fixed in v1.14
  4. Weekend risk - Always enable InpCloseBeforeWeekend=true
  5. Daily DD - Set InpMaxDailyDrawdown=3.0 to limit losses

📂 Conversation History

See conversation-history/ directory for session notes:

  • 2026-03-21-mql-trading-bots.md - Initial verification & migration
  • 2026-03-29-session-save.md - Settings library & bug fixes
  • 2026-03-30-weekend-gap-short-signal-fix.md - Weekend protection & short signal fix


Last Updated: 2026-03-30

Description
No description provided
Readme 502 KiB
Languages
MQL5 85.7%
MQL4 6.1%
Python 5.8%
Shell 2.4%