🚀 QUICK START GUIDE
🤖 Full AI Mode Setup
- Complete installation
- Get API keys (see API Setup)
- Configure APIs in EA settings
- Set trading parameters
- Enable desired AI models
- Start trading with AI consensus
- ⚠️ REQUIRES LIVE TRADING - AI fetches real-time data from APIs
💻 INSTALLATION
Step 1: MetaTrader 5 Setup
Download & Install MT5
- Download from MetaTrader 5 official website
- Install and create account with your broker
Enable WebRequest URLs
- Go to Tools → Options → Expert Advisors
- Check "Allow WebRequest for listed URLs"
- Add these URLs:
https://generativelanguage.googleapis.com
Allow Live Trading
- Check "Allow live trading"
Step 2: EA Installation
Copy EA File
- Copy AI_Impetus.ex5 to: MT5_Data_Folder/MQL5/Experts/
Restart MT5
- Close and restart MetaTrader 5
- EA should appear in Navigator → Expert Advisors
Attach to Chart
- Drag EA onto any chart (EURUSD recommended)
- Configure settings (see Configuration)
- Click "OK" to start
🔑 API KEYS SETUP
1. Claude API (Anthropic) - RECOMMENDED
Getting API Key:
- Visit console.anthropic.com
- Sign up or log in
- Go to "API Keys" section
- Click "Create Key"
- Copy the key (starts with sk-ant-)
Configuration:
- API Key: sk-ant-api03-xxxxx
- Model: Claude 3 Haiku (fastest/cheapest) or Claude 4 Sonnet (best quality)
- Cost: ~$0.001-0.01 per query
2. OpenAI API
Getting API Key:
- Visit platform.openai.com
- Sign up and verify account
- Go to "API Keys" section
- Click "Create new secret key"
- Copy the key (starts with sk-)
Configuration:
- API Key: sk-xxxxx
- Model: GPT-3.5 Turbo (cheapest) or GPT-4o (best)
- Cost: ~$0.002-0.03 per query
3. Grok API (X.AI)
Getting API Key:
- Visit x.ai
- Sign up for API access
- Get API key from dashboard
- Copy key
Configuration:
- API Key: Your X.AI API key
- Model: Grok-3-Mini-Fast (fastest)
- Cost: ~$0.001-0.01 per query
4. DeepSeek API
Getting API Key:
- Visit platform.deepseek.com
- Register account
- Go to API section
- Generate API key
Configuration:
- API Key: Your DeepSeek key
- Model: DeepSeek Chat
- Cost: Very low (~$0.0001 per query)
5. Mistral AI API
Getting API Key:
- Visit console.mistral.ai
- Create account
- Get API key from dashboard
Configuration:
- API Key: Your Mistral key
- Model: Mistral Tiny (cheapest)
- Cost: ~$0.001 per query
6. Groq API (for Llama)
Getting API Key:
- Visit console.groq.com
- Sign up for free account
- Get API key
Configuration:
- API Key: Your Groq key
- Provider: Groq
- Model: Llama 3.1 8B (fast & free)
- Cost: FREE with rate limits
7. Google Gemini API
Getting API Key:
- Visit aistudio.google.com
- Sign in with Google account
- Go to "Get API key"
- Create new key
Configuration:
- API Key: Your Google API key
- Model: Gemini 1.5 Flash (fast)
- Cost: Free tier available
8. Kimi K2 API (NEW)
Getting API Key:
- Visit platform.moonshot.ai
- Create account and verify
- Generate API key
Configuration:
- API Key: Your Kimi API key
- Model: Kimi K2-0711-Preview (latest)
- Cost: ~$0.001 per query
9. OpenRouter API (NEW)
Getting API Key:
- Visit openrouter.ai
- Sign up for account
- Get API key from dashboard
Configuration:
- API Key: Your OpenRouter key
- Model: Multiple options available
- Cost: Varies per model
⚙️ EA CONFIGURATION
API Keys Section
InpClaudeAPI = "sk-ant-api03-xxxxx" // Claude API Key
InpOpenAIAPI = "sk-xxxxx" // OpenAI API Key
InpGrokAPI = "your-grok-key" // Grok API Key
InpDeepSeekAPI = "your-deepseek-key" // DeepSeek API Key
InpMistralAPI = "your-mistral-key" // Mistral API Key
InpGroqAPI = "your-groq-key" // Groq API Key (for Llama)
InpTogetherAPI = "your-together-key" // Together AI Key
InpGeminiAPI = "your-gemini-key" // Google Gemini API Key
InpKimiAPI = "your-kimi-key" // Kimi K2 API Key (NEW)
InpOpenRouterAPI = "your-openrouter-key" // OpenRouter API Key (NEW)
AI Activation
InpUseClaude = true // Enable Claude
InpUseOpenAI = true // Enable OpenAI
InpUseGrok = true // Enable Grok
InpUseDeepSeek = false // Enable DeepSeek (optional)
InpUseMistral = false // Enable Mistral (optional)
InpUseLlama = false // Enable Llama (optional)
InpUseGemini = false // Enable Gemini (optional)
InpUseKimi = false // Enable Kimi K2 (NEW)
InpUseOpenRouter = false // Enable OpenRouter (NEW)
Alternative Pairs System (NEW)
InpUseAlternativePairs = true // Enable alternative pair selection InpMaxAlternativePairs = 3 // Max positions per alternative pair
Time Filters (NEW)
InpUseTimeFilter = true // Enable time-based filtering
InpTradingStartHour = 8 // Trading start hour (GMT)
InpTradingEndHour = 18 // Trading end hour (GMT)
InpTradingMonday = true // Trade on Monday
InpTradingTuesday = true // Trade on Tuesday
InpTradingWednesday = true // Trade on Wednesday
InpTradingThursday = true // Trade on Thursday
InpTradingFriday = true // Trade on Friday
InpTradingSaturday = false // Trade on Saturday
InpTradingSunday = false // Trade on Sunday
News Filter (NEW)
InpUseNewsFilter = true // Enable news-based filtering
InpNewsAvoidMinutes = 30 // Minutes to avoid before/after news
InpNewsImportance = "HIGH" // News importance (HIGH/MEDIUM/LOW)
Recommended Starter Configuration
// Enable 3 main AIs for cost efficiency
InpUseClaude = true // Primary AI
InpUseOpenAI = true // Secondary AI
InpUseGrok = true // Third AI Others = false
// Consensus settings
InpMinAIConsensus = 2 // Require 2 out of 3 AIs to agree
// Basic trading
InpLotSize = 0.01 // Start small
InpMaxSpread = 30 // Points
InpQueryInterval = 900 // 15 minutes
📊 TRADING PARAMETERS
Core Trading Settings
Parameter | Default | Description |
---|---|---|
InpMinAIConsensus | 2 | Minimum AIs that must agree (2-9) |
InpLotSize | 0.01 | Base lot size for trades |
InpMagicNumber | 123456 | Unique identifier for EA trades |
InpMaxSpread | 30 | Maximum spread in points |
InpQueryInterval | 1800 | Seconds between AI queries (30 min) |
InpMaxOpenSymbols | 8 | Maximum currency pairs to trade |
Enhanced Grid System Settings
Parameter | Default | Description |
---|---|---|
InpUseGrid | true | Enable grid trading |
InpGridMode | Progressive | Fixed/Progressive/Martingale |
InpGridDistance | 60 | Pips between grid levels |
InpMaxGridLevels | 10 | Maximum grid levels |
InpGridTPMode | Dollar | Dollar or Pips mode (NEW) |
InpGridCommonTPDollar | 2 | Take profit target in dollars |
InpGridCommonTPPips | 150 | Take profit target in pips (NEW) |
Grid Modes Explained
Fixed Lot: Same lot size for all grid levels
- Level 0: 0.01 lots
- Level 1: 0.01 lots
- Level 2: 0.01 lots
Progressive (Additive): Increasing lot sizes
- Level 0: 0.01 lots
- Level 1: 0.02 lots
- Level 2: 0.03 lots
Martingale (Multiplicative): Exponential increase
- Level 0: 0.01 lots
- Level 1: 0.02 lots
- Level 2: 0.04 lots
🛡️ RISK MANAGEMENT
Safety Parameters
Parameter | Default | Description |
---|---|---|
InpMaxLotSizePerPosition | 0.15 | Maximum lot size per single trade |
InpMaxTotalLotSize | 0.5 | Maximum total lots per symbol |
InpMaxDrawdownPercent | 20.0 | Maximum account drawdown % |
InpMaxDailyLoss | 50.0 | Daily loss limit in account currency |
InpEnableAccountProtection | true | Enable all safety features |
Take Profit / Stop Loss
Manual Mode:
InpUseVolatilityAdjustment = false InpManualTPPips = 30 // Fixed TP in pips InpManualSLPips = 20 // Fixed SL in pips
Volatility Mode (Recommended):
InpUseVolatilityAdjustment = true InpATRPeriod = 14 // ATR calculation period InpVolatilityTPMultiplier = 2.0 // TP = ATR × 2.0 InpVolatilitySLMultiplier = 1.5 // SL = ATR × 1.5 InpMinVolatilityTP = 20.0 // Minimum TP in pips InpMaxVolatilityTP = 100.0 // Maximum TP in pips
Account Size Recommendations
Account Size | Lot Size | Grid Levels | Daily Loss Limit |
---|---|---|---|
$100-500 | 0.01 | Max 5 | $10-25 |
$500-2000 | 0.01-0.02 | Max 6 | $25-50 |
$2000-5000 | 0.02-0.05 | Max 7 | $50-100 |
$5000+ | 0.05-0.1 | Max 8 | $100-200 |
📈 MONITORING & DASHBOARD
Live Dashboard Features
Column 1 - Trading Status:
- Current mode (AI/Technical/Protected)
- Active AI count (up to 9 AIs)
- Current trading symbol and direction
- Open symbols count
- Time/News filter status (NEW)
- Alternative pairs status (NEW)
- Next query countdown
- Safety limits status
- Grid status and statistics
- Account balance and equity
Column 2 - AI Status:
- Consensus count
- Individual AI statuses (9 AIs total)
- Success/Error indicators
- Last predictions
Grid Information
- Grid mode (FIXED/PROG+/MART×)
- Current positions count
- Maximum grid level reached
- Grid profit/loss
- Grid target mode (Dollar/Pips) (NEW)
- Rescue mode status
Key Status Indicators
Color | Meaning |
---|---|
🟢 Green | Successful/Active |
🔴 Red | Error/Loss/Protected |
🟠 Orange | Warning/Caution |
⚪ Gray | Inactive/Neutral |
🟡 Yellow | Information/Fallback Mode |
🔧 TROUBLESHOOTING
Common Issues & Solutions
1. "API Error" Messages
- ✅ Check API key is correct
- ✅ Verify WebRequest URLs are enabled (including new ones)
- ✅ Check internet connection
- ✅ Ensure API has credit/balance
2. "No Trading Activity"
- ✅ Verify AI consensus settings (reduce if needed)
- ✅ Check spread limits
- ✅ Ensure sufficient account balance
- ✅ Check time/news filters (NEW)
- ✅ Verify alternative pairs settings (NEW)
3. "Time Filter Blocking" (NEW)
- ✅ Check GMT trading hours settings
- ✅ Verify trading days configuration
- ✅ Adjust time filter parameters if needed
4. "News Filter Active" (NEW)
- ✅ High-impact news event detected
- ✅ Wait for news avoidance period to pass
- ✅ Adjust news importance settings if needed
5. "Grid Not Working"
- ✅ Enable grid system in settings
- ✅ Check grid parameters
- ✅ Verify lot size settings
- ✅ Check grid TP mode (Dollar/Pips) (NEW)
- ✅ Check account protection limits
6. "Account Protection Active"
- ✅ Check drawdown percentage
- ✅ Review daily loss limits
- ✅ Verify account balance
- ✅ Adjust safety parameters if needed
7. "AI Mode Not Working in Backtester"
- ⚠️ AI mode requires live internet connection
- ✅ Use Technical Mode for backtesting
- ✅ AI mode only works in live/demo with internet
- ✅ Switch to Technical Mode for strategy testing
Error Codes
Error | Solution |
---|---|
400 | Invalid API request - check API key |
401 | Unauthorized - verify API key |
429 | Rate limit exceeded - wait or upgrade plan |
500 | Server error - try again later |
Network/Timeout | Check internet connection |
Performance Optimization
For Better Results:
- Use ECN/STP broker accounts
- Enable all safety features
- Start with small lot sizes
- Monitor during high-volatility periods
- Keep API balances topped up
- Configure time filters for your timezone (NEW)
- Use news filters during important events (NEW)
Cost Optimization:
- Use cheaper AI models (Claude Haiku, GPT-3.5)
- Increase query intervals
- Reduce number of active AIs
- Use free models when available (Groq/Llama)
❓ FREQUENTLY ASKED QUESTIONS
General Questions
Q: Can I run this EA without API keys? A: Yes! The EA includes Technical Mode that uses built-in indicators, but AI mode is recommended for best performance.
Q: Can I backtest the full AI mode? A: No, the AI mode requires live internet connection to fetch real-time data from AI APIs.
Q: How much do API calls cost? A: Very minimal - typically $1-5 per month depending on trading frequency and models used.
Q: What's the minimum account size? A: $1000 minimum, but $5000+ recommended for better risk management.
Q: Does it work on demo accounts? A: Yes, fully compatible with demo accounts. AI mode works on demo if you have API keys.
New Features Questions
Q: What are alternative pairs? (NEW) A: When your primary symbol already has positions, the system automatically switches to alternative pairs to diversify risk.
Q: How do time filters work? (NEW)
A: You can set specific hours and days when the EA is allowed to trade, based on GMT timezone.
Q: What is the news filter? (NEW) A: The system avoids trading during important economic news events to reduce volatility risk.
Q: Can I use both Dollar and Pips for grid TP? (NEW) A: Yes, you can choose either Dollar amount or Pips for your grid take profit target.
Setup Questions
Q: WebRequest not working? A: Ensure all API URLs (including new ones for Kimi and OpenRouter) are added to MT5 WebRequest whitelist.
Q: Can I modify the currency pairs? A: Yes, edit the InpCurrencyPairs parameter with your preferred pairs.
🎯 QUICK SETUP CHECKLIST
Basic Setup (5 minutes) - FOR BACKTESTING & DEMO
- [ ] Install EA in MT5
- [ ] Enable WebRequest URLs (all 10 URLs)
- [ ] Set lot size to 0.01
- [ ] Attach to EURUSD chart
Full AI Setup (30 minutes) - FOR LIVE TRADING ONLY
- [ ] Get Claude API key (primary)
- [ ] Get OpenAI API key (secondary)
- [ ] Get third AI key (Grok/Kimi/OpenRouter)
- [ ] Configure API keys in EA
- [ ] Set consensus to 2-3 depending on API count
- [ ] Configure time filters if needed (NEW)
- [ ] Configure news filters if needed (NEW)
- [ ] Set up alternative pairs if desired (NEW)
- [ ] Test with small lot size
- [ ] Monitor dashboard
- [ ] ✅ Full AI trading active!
📞 SUPPORT & RESOURCES
Live Signal: MQL5 Signal #2319393
MQL5 Profile: Contact via MQL5 messaging
⚠️ DISCLAIMER
🚨 TRADING RISK WARNING
Trading foreign exchange involves substantial risk and may not be suitable for all investors. You should carefully consider your financial situation before using this software.
KEY RISKS:
- Past performance does not guarantee future results
- You may lose some or all of your invested capital
- AI predictions are not guaranteed to be accurate
- Market conditions can change rapidly and unpredictably
- Automated trading systems can malfunction
🤖 AI TECHNOLOGY DISCLAIMER
This software uses artificial intelligence models from third-party providers. Please note:
- AI responses are not financial advice
- AI models can produce incorrect results
- API costs are separate and charged by AI providers
- AI services may be temporarily unavailable
- No guarantee of AI model accuracy
💰 FINANCIAL DISCLAIMER
NO GUARANTEE OF PROFITS:
- This software does not guarantee profits
- Results may vary significantly between users
- Only trade with money you can afford to lose
BACKTESTING LIMITATION:
- Full AI functions cannot be backtested due to live API requirements
- Demo testing recommended before live trading
🔧 TECHNICAL DISCLAIMER
SOFTWARE DEPENDENCIES:
- Requires stable internet connection for AI APIs
- Dependent on third-party AI service availability
- WebRequest must be properly configured in MT5
- Valid API keys required for functionality
📊 VERSION-SPECIFIC DISCLAIMERS
- New features may require adjustment period
- Time and news filters are based on available data
- Alternative pairs system depends on market conditions
- Grid TP modes should be tested on demo first
🛡️ LIABILITY LIMITATION
The author and developer:
- Disclaim all warranties, express or implied
- Are not liable for any trading losses
- Are not responsible for missed opportunities
- Provide software for educational purposes
✅ USER ACKNOWLEDGMENT
By using this software, you acknowledge that:
- You have read and understood all risks
- You will not hold the author liable for results
- You understand this is not financial advice
- You accept full responsibility for trading decisions
💡 RECOMMENDATION: Start with demo trading, use small position sizes, and never risk more than you can afford to lose.