Documentation Index
Fetch the complete documentation index at: https://mintlify.com/codebytemirza/XAUUSD_TRADING_ASISTENT_AI/llms.txt
Use this file to discover all available pages before exploring further.
MetaTrader 5 Issues
Connection Failed
Symptoms:- Bot fails to start
- Error message: “Failed to initialize MT5”
- No market data displayed
Ensure MetaTrader 5 is Running
Ensure MetaTrader 5 is Running
- Open MetaTrader 5 desktop application
- Log in to your account
- Ensure you see live price feeds
- Keep MT5 running while using the bot
Check Account Login Status
Check Account Login Status
- In MT5, go to Tools → Options → Server
- Verify you’re connected to the server (green icon in bottom right)
- If disconnected, re-enter your credentials
- Check your internet connection
Verify MT5 Python Package Installation
Verify MT5 Python Package Installation
Platform Compatibility
Platform Compatibility
- Windows: Full support
- Linux: Limited support (requires Wine)
- macOS: Limited support (requires Wine or virtual machine)
Symbol Not Found
Symptoms:- Error: “XAUUSD symbol not found”
- No price data for gold
-
Check Symbol Availability:
- In MT5, right-click Market Watch
- Select “Symbols”
- Search for XAUUSD or Gold
- Ensure it’s visible in Market Watch
-
Verify Symbol Name:
- Some brokers use different naming:
XAUUSD,GOLD,XAUUSD.m - Check your broker’s symbol naming convention
- Update the symbol name in
XAUSD_AI.pyif needed
- Some brokers use different naming:
Data Retrieval Issues
Symptoms:- Incomplete historical data
- Missing timeframe data
- Empty dataframes
Increase Data History
Increase Data History
- In MT5, go to Tools → Options → Charts
- Set “Max bars in chart” to at least 10,000
- Set “Max bars in history” to at least 100,000
- Restart MT5
Wait for Data Synchronization
Wait for Data Synchronization
- MT5 needs time to download historical data
- Wait 5-10 minutes for complete synchronization
- Check the status bar for download progress
API Key Issues
Invalid Groq API Key
Symptoms:- Error: “Invalid API key”
- Authentication failed
- AI analysis not working
Verify API Key Format
Verify API Key Format
- Check
.streamlit/secrets.tomlfile exists - Ensure format is correct:
- No extra spaces or quotes
- Key should start with
gsk_
Generate New API Key
Generate New API Key
- Visit Groq Console
- Navigate to API Keys section
- Revoke old key (if compromised)
- Create new API key
- Update
.streamlit/secrets.toml - Restart the Streamlit app
Check API Quota
Check API Quota
- Free tier has rate limits
- Monitor usage in Groq Console
- Consider upgrading if hitting limits
- Wait for quota reset (usually hourly/daily)
API Connection Timeout
Symptoms:- Request timeout errors
- Slow response from AI
- Connection refused
- Check internet connection
- Verify firewall isn’t blocking Groq API
- Try using a VPN if blocked in your region
- Increase timeout settings in the code
Dependency Issues
Package Installation Failures
Symptoms:pip installerrors- Module not found errors
- Version conflicts
Use Virtual Environment
Use Virtual Environment
Update pip and setuptools
Update pip and setuptools
Install Individual Packages
Install Individual Packages
requirements.txt fails, install packages individually:Python Version Issues
Python Version Issues
- Download latest Python from python.org
- Install and update PATH
- Recreate virtual environment with new version
Import Errors
Symptoms:ModuleNotFoundErrorImportError- Missing dependencies
Streamlit Dashboard Issues
Dashboard Won’t Start
Symptoms:streamlit run app.pyfails- Port already in use
- Application crashes on startup
Check if Port is Already in Use
Check if Port is Already in Use
Clear Streamlit Cache
Clear Streamlit Cache
Check File Paths
Check File Paths
Dashboard Shows Errors
Symptoms:- Red error messages in dashboard
- Features not working
- No data displayed
-
Check Browser Console:
- Press F12 in browser
- Look for JavaScript errors
- Try different browser
-
Refresh the Page:
- Click “Rerun” in Streamlit
- Hard refresh: Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (Mac)
-
Check Logs:
- Look at terminal where Streamlit is running
- Check for error messages
- Debug based on error output
Performance Issues
Slow Analysis
Symptoms:- Analysis takes too long
- Dashboard freezes
- Timeout errors
Reduce Timeframe Analysis
Reduce Timeframe Analysis
- Focus on fewer timeframes initially
- Comment out some timeframes in
XAUSD_AI.py - Start with H4, H1, M30 for faster analysis
Optimize Historical Data Range
Optimize Historical Data Range
- Reduce the number of bars fetched
- Use smaller lookback periods
- Balance between data sufficiency and speed
System Resources
System Resources
- Close unnecessary applications
- Ensure adequate RAM (4GB+ recommended)
- Check CPU usage
- Consider upgrading hardware for intensive analysis
High Memory Usage
Solutions:- Clear Python cache regularly
- Restart the Streamlit app periodically
- Limit auto-refresh frequency
- Use smaller data batches
Data Accuracy Issues
Inconsistent Signals
This is Normal If:- Markets are volatile or choppy
- Different timeframes show conflicting signals
- Major news events are occurring
- Signals change drastically within seconds
- Data appears corrupted or unusual
- Indicators show impossible values
- Verify MT5 data feed is stable
- Check for broker server issues
- Compare with MT5’s built-in indicators
- Ensure sufficient historical data
Spread Warnings
Symptoms:- High spread alerts
- “Spread too wide” messages
- During market open/close
- Major news releases
- Low liquidity periods
- Some broker’s typical spreads
Getting Additional Help
Enable Debug Mode
Enable Debug Mode
Collect System Information
Collect System Information
- Python version:
python --version - Package versions:
pip list - Operating system
- MT5 version
- Error messages (complete text)
- Steps to reproduce
Community Support
Community Support
- Check GitHub Issues for similar problems
- Search existing solutions
- Create detailed issue reports
- Provide code samples and error logs