📋 Table of Contents
🗂️ Navigation Guide
- 1. 🔧 Installation & Setup
- 2. 🚀 First Launch
- 3. ⚙️ Configuration Panel
- 4. 🤖 AI Assistant
- 5. 🧠 Trading Logic Engine
- 6. 🛡️ Risk Management
- 7. 📊 Live Charting
- 8. 👁️ Position Monitoring
- 9. 🎯 Recommended Presets
- 10. 💡 Best Practices
- 11. 🔬 Advanced Features
- 12. ❓ Frequently Asked Questions
- 13. 🛠️ Troubleshooting
🔧 Installation & Setup
📋 System Requirements
🖥️ Minimum Requirements
- Windows 10/11 (64-bit)
- 4GB RAM
- 1GB free disk space
- Internet connection
- MetaTrader 5 installed
⚡ Recommended Specs
- Windows 11 (latest)
- 8GB+ RAM
- SSD storage
- Stable broadband
- MT5 with live/demo account
📦 Installation Steps
Download & Extract
Extract the MT5_Liqbot_AI.zip file to your preferred directory (e.g., C:\Trading\MT5_Liqbot_AI\)
Install Dependencies
The bot includes a requirements installer. Run install_requirements.bat
as administrator.
Setup MetaTrader 5
Ensure MT5 is installed and configured with your broker. Enable Algorithm Trading in Tools → Options → Expert Advisors.
🚀 First Launch
🎬 Starting the Application
Double-click MT5_Liqbot_AI.exe or run the Python script:
🖼️ Interface Overview
The interface consists of 6 draggable panels:
📊 Parameters Panel
Core settings and controls
📈 Live Chart
Real-time price visualization
🧠 Trading Logic
Decision-making transparency
🤖 AI Assistant
GPT-4 powered help
📝 Logs
Activity monitoring
💼 Closed Trades
Performance tracking
⚙️ Configuration Panel
🔐 MT5 Connection Settings
Parameter | Description | Example | Notes |
---|---|---|---|
MT5 Login | Your MT5 account number | 123456789 | Found in MT5 Navigator |
MT5 Password | Your account password | •••••••• | Masked for security |
MT5 Server | Broker server name | ICMarketsEU-Demo | Exact server name required |
📈 Trading Parameters
🎯 Position Sizing
Setting | Default | Range | Purpose |
---|---|---|---|
Size min (Lot) | 0.1 | 0.01-100 | Minimum position size |
Size max (Lot) | 0.5 | 0.01-100 | Maximum position size |
Lot step | 0.1 | 0.01-1.0 | Auto-MM increment |
🛡️ Risk Parameters
Setting | Default | Unit | Purpose |
---|---|---|---|
Take Profit | 2000 | Points | Profit target |
Stop Loss | 2000 | Points | Risk limit |
Daily Loss Limit | 100 | USD | Auto-stop loss |
Daily Profit Limit | 200 | USD | Auto-stop profit |
⚙️ Advanced Settings
Cooldown Period
Default: 120 seconds
Minimum time between trades to prevent over-trading. Recommended: 60-300 seconds depending on strategy.
TimeFrame Selection
Options: M1, M5, M15, H1, H4, D1
Analysis timeframe for price impact and volatility cyclicity detection. M1 for scalping, H1+ for swing trading.
Max Positions per Side
Default: 1
Maximum number of positions in same direction. Increase for scaling strategies, keep at 1 for single entry.
✅ Configuration Checkboxes
💰 Auto Money Management
When enabled: Lot size automatically adjusts based on performance
- Increases lot after profitable trades
- Decreases lot after losing trades
- Bounded by min/max lot settings
- Helps compound profits while reducing risk
🚫 No Hedging Protection
When enabled: Prevents conflicting positions
- Blocks SELL signals when LONG positions exist
- Blocks BUY signals when SHORT positions exist
- Allows scaling (multiple same-direction positions)
- Reduces portfolio risk and complexity
🤖 AI Assistant
🧠 GPT-4 Integration
The MT5 Liqbot AI features the first-ever integrated GPT-4 assistant specifically designed for trading analysis and support.
🔧 Setup Requirements
pip install -U g4f[all]
💬 How to Use the AI Assistant
📝 Direct Questions
Type any trading-related question in the chat input and press Enter or click SEND.
⚡ Quick Buttons
Use predefined quick questions for instant analysis and recommendations.
🎯 Quick Question Examples
📊 Market Analysis
- "What's your analysis of current market conditions?"
- "Is this a good time to trade EURUSD?"
- "What's the volatility outlook for today?"
💡 Strategy Advice
- "What trading strategy for ranging markets?"
- "Should I adjust my TP/SL ratios?"
- "How to optimize my lot sizes?"
⚠️ Risk Assessment
- "How's my current risk exposure?"
- "Should I enable hedging protection?"
- "What's my optimal daily limit?"
🔍 AI Context Awareness
Real-time Data Access
The AI assistant has access to:
- Your current trading parameters
- Live P&L information
- Active positions and their status
- Bot configuration settings
- Recent trading activity
🧠 Trading Logic Engine
⚡ Price Impact Analysis
The bot uses advanced price impact algorithms to identify optimal entry points based on market microstructure analysis.
🔬 Detection Methodology
📈 Trend Detection
Identifies strong directional movements using:
- Multi-timeframe momentum analysis
- Price impact scoring algorithms
- Volatility-adjusted trend strength
📊 Range Identification
Detects consolidation phases using:
- Volatility cyclicity patterns
- Support/resistance level analysis
- Mean reversion probability scoring
🎯 Signal Generation Process
Market Mode Analysis
Bot analyzes current market conditions and classifies as TREND or RANGE mode based on volatility cyclicity.
Direction Selection
TREND Mode: Follows momentum using multiple confirmation signals
RANGE Mode: Applies mean reversion strategy at key levels
Risk Validation
Multiple safety checks before execution:
- No-hedging compliance verification
- Daily limit validation
- Position size confirmation
- Market hours verification
- Cooldown period enforcement
📊 Logic Transparency
🛡️ Risk Management
🎯 Multi-Layer Protection System
💰 Position-Level Risk
- Take Profit: Automatic profit taking at target
- Stop Loss: Maximum loss per position
- Position Sizing: Dynamic lot size management
- Max Positions: Limits simultaneous trades
📅 Account-Level Risk
- Daily Loss Limit: Auto-stop on loss threshold
- Daily Profit Limit: Profit protection mode
- No-Hedging: Prevents conflicting positions
- Cooldown: Prevents over-trading
🔍 No-Hedging Diagnostic Tool
Real-time Portfolio Analysis
Click "DIAGNOSE NO HEDGING" to get detailed portfolio analysis:
⚡ Emergency Controls
🛑 STOP BOT
Immediately halts all trading activity while preserving open positions.
💼 FLAT (CLOSE ALL)
Emergency closure of all open positions at market price.
🔍 DIAGNOSE
Real-time analysis of hedging status and portfolio composition.
📊 Live Charting
📈 Real-time Visualization
The integrated charting system provides live price feeds directly from your MT5 account with sophisticated technical overlays.
🎨 Chart Features
📊 Price Display
- Real-time candlestick/line charts
- Customizable timeframes
- Auto-scaling price axis
- Professional color scheme
📈 Technical Indicators
- Price impact visualization
- Volatility cyclicity overlays
- Market mode indicators
- Entry/exit point markers
🎯 Market Mode Display
Status Bar Information
Real-time display of:
- Market Mode: TREND or RANGE classification
- Current Signal: Latest trading direction
- Dynamic Lot Size: Current position sizing
- Daily P&L: Session performance
🔧 Chart Customization
👁️ Position Monitoring
📝 Activity Logs
🎨 Color-Coded Log System
Log Type | Color | Purpose | Example |
---|---|---|---|
General Info | White | Standard information | Bot started, connections |
Success | Green | Successful operations | Trade executed, profit target hit |
Warning | Orange | Important notices | Approaching daily limit |
Error | Red | Problems or failures | Connection lost, trade failed |
System | Cyan | System operations | Cooldown periods, diagnostics |
💼 Trade History Tracking
Closed Trades Panel
Comprehensive record of all completed trades:
Each entry shows:
- Symbol and trade direction
- Closing price and position size
- Profit/Loss amount
- Closure reason (TP/SL, Manual, etc.)
🧠 Trading Logic Monitoring
Decision Transparency
Real-time insight into every trading decision:
Detailed categorization helps you understand:
- Why trades are executed or blocked
- Risk management decisions
- Market analysis process
- Performance optimization opportunities
🎯 Recommended Presets
⚡ Scalping Configuration
🏃♂️ High-Frequency Trading Setup
Parameter | Value | Reasoning |
---|---|---|
TimeFrame | M1 | Maximum sensitivity to price movements |
Take Profit | 500-1000 points | Quick profit captures |
Stop Loss | 500-1000 points | Tight risk control |
Lot Size | 0.01-0.05 | Lower risk per trade |
Cooldown | 60-120 seconds | Allow multiple entries |
Max Positions | 2-3 | Enable scaling |
Daily Limit | $50-100 | Conservative risk |
📊 Swing Trading Configuration
📈 Medium-Term Position Setup
Parameter | Value | Reasoning |
---|---|---|
TimeFrame | H1 or H4 | Reduced noise, clearer trends |
Take Profit | 3000-5000 points | Capture major moves |
Stop Loss | 2000-3000 points | Allow for volatility |
Lot Size | 0.10-0.50 | Higher profit potential |
Cooldown | 300-600 seconds | Prevent over-trading |
Max Positions | 1 | Single clean entries |
Daily Limit | $200-500 | Higher risk tolerance |
🛡️ Conservative Configuration
🏦 Risk-Averse Setup
Parameter | Value | Reasoning |
---|---|---|
TimeFrame | M15 or M30 | Balanced approach |
Take Profit | 1500-2500 points | Moderate targets |
Stop Loss | 1000-1500 points | Strict risk control |
Lot Size | 0.01-0.10 | Minimal risk exposure |
Cooldown | 180-300 seconds | Thoughtful entries |
Max Positions | 1 | Single position focus |
Daily Limit | $25-75 | Capital preservation |
No Hedging | ✅ Enabled | Avoid conflicts |
Auto MM | ❌ Disabled | Fixed sizing |
🚀 Aggressive Configuration
⚡ High-Risk/High-Reward Setup
Parameter | Value | Reasoning |
---|---|---|
TimeFrame | M1 or M5 | High-frequency opportunities |
Take Profit | 2000-4000 points | Significant profit targets |
Stop Loss | 1500-2500 points | Acceptable risk levels |
Lot Size | 0.20-1.00 | Maximum profit potential |
Cooldown | 30-90 seconds | Rapid-fire entries |
Max Positions | 3-5 | Heavy scaling |
Daily Limit | $500-1000 | High-stakes trading |
Auto MM | ✅ Enabled | Compound growth |
💡 Best Practices
🚀 Getting Started Right
📊 Demo Testing Phase
- Always start with demo account
- Test for minimum 1-2 weeks
- Try different preset configurations
- Monitor all market conditions
- Understand every log message
- Practice using AI assistant
⚙️ Configuration Strategy
- Start with conservative settings
- Gradually increase risk as you gain confidence
- Match timeframe to your availability
- Set realistic daily limits
- Enable No-Hedging for simplicity
- Use Auto-MM only after testing
📈 Optimization Guidelines
Performance Analysis
Regular review and optimization:
- Weekly Reviews: Analyze closed trades and adjust parameters
- Market Adaptation: Different settings for trending vs ranging markets
- Volatility Adjustment: Increase TP/SL during high volatility periods
- Time-Based Optimization: Different configurations for different sessions
🛡️ Risk Management Excellence
💰 Position Sizing
- Never risk more than 2% per trade
- Start with minimum lot sizes
- Gradually increase with success
📅 Daily Limits
- Set conservative daily loss limits
- Use profit limits to preserve gains
- Review and adjust weekly
⏰ Time Management
- Avoid news events initially
- Trade during liquid hours
- Monitor first few trades closely
🤖 AI Assistant Mastery
🎯 Maximizing AI Value
📝 Effective Questions
- Be specific about your situation
- Include relevant context
- Ask follow-up questions
- Request examples when needed
📊 Regular Consultations
- Daily performance reviews
- Strategy adjustment discussions
- Market condition analysis
- Risk assessment requests
⚠️ Common Mistakes to Avoid
- Jumping to live trading without demo testing
- Using aggressive settings as a beginner
- Ignoring daily loss limits
- Not understanding log messages
- Disabling safety features prematurely
- Over-optimizing based on short-term results
🔬 Advanced Features
🎮 Interface Customization
🖼️ Draggable Panel System
Every panel in the interface can be moved and resized:
📱 Moving Panels
- Click and drag the header bar
- Panels snap to window boundaries
- Arrange for your monitor setup
- Settings persist between sessions
📏 Resizing Panels
- Drag the resize grip (◢) in bottom-right
- Minimum sizes are enforced
- Content adapts to new dimensions
- Optimal viewing for different needs
🔍 Diagnostic Tools
No-Hedging Diagnostic
Advanced portfolio analysis tool:
This tool helps you:
- Understand current portfolio composition
- Identify hedging conflicts
- Predict future signal behavior
- Debug unexpected blocking situations
🔄 Auto-Reconnection System
Connection Management
Robust connection handling:
- Auto-Retry: Up to 3 connection attempts
- Graceful Degradation: Pauses trading during disconnection
- Status Monitoring: Real-time connection status updates
- Recovery Protocol: Seamless resumption after reconnection
📊 Performance Analytics
📈 Trading Statistics
Built-in performance tracking:
- Decision count per session
- Signal generation rate
- Block frequency analysis
- Win/loss ratio calculation
🧠 Logic Insights
Detailed decision analysis:
- Color-coded decision categories
- Timestamp precision to milliseconds
- Real-time efficiency metrics
- Comprehensive audit trail
❓ Frequently Asked Questions
🔧 Installation & Setup
❓ "The bot won't start - Python error"
Solution: Ensure all dependencies are installed. Run install_requirements.bat
as administrator, or manually install with:
❓ "G4F Not Installed" message appears
Solution: Install the G4F library for AI assistant functionality:
Restart the application after installation.
❓ "MT5 connection failed" error
Solutions:
- Verify MT5 is running and logged in
- Check login credentials are correct
- Ensure server name matches exactly
- Enable Algorithm Trading in MT5 settings
- Try demo account first
📊 Trading Behavior
❓ "Bot generates signals but no trades execute"
Common causes:
- No-hedging protection blocking trades
- Daily loss/profit limit reached
- Maximum positions limit hit
- Cooldown period still active
- Insufficient margin for trade size
Use the "DIAGNOSE NO HEDGING" button for detailed analysis.
❓ "What's the difference between TREND and RANGE mode?"
TREND Mode: Follows momentum using price impact analysis
RANGE Mode: Applies mean reversion at volatility cycle extremes
The bot automatically switches based on market conditions.
❓ "Auto Money Management not working as expected"
How it works:
- Increases lot size after profitable trades
- Decreases lot size after losing trades
- Bounded by your min/max lot settings
- Only adjusts when enabled in settings
🤖 AI Assistant
❓ "AI assistant gives generic responses"
Improve responses by:
- Being more specific in your questions
- Including relevant trading context
- Asking about your specific situation
- Using follow-up questions for clarification
❓ "Can the AI assistant place trades?"
No. The AI assistant is purely advisory. It cannot:
- Execute trades directly
- Modify your settings
- Access your account
- Make financial decisions for you
It only provides analysis and recommendations based on your data.
⚙️ Configuration
❓ "What lot size should I use?"
Recommendations:
- Beginners: 0.01-0.05 lots
- Small accounts (<$1000): 0.01-0.10 lots
- Medium accounts ($1000-10000): 0.10-0.50 lots
- Large accounts (>$10000): 0.50+ lots
Never risk more than 2% of account per trade.
❓ "Best timeframe for different strategies?"
Strategy | Timeframe | TP/SL (points) | Cooldown |
---|---|---|---|
Scalping | M1 | 500-1000 | 60-120s |
Day Trading | M5-M15 | 1500-3000 | 180-300s |
Swing Trading | H1-H4 | 3000-5000 | 300-600s |
🛡️ Risk & Safety
❓ "How do daily limits work?"
Automatic Protection:
- Loss Limit: Bot stops and closes all positions when reached
- Profit Limit: Bot stops and preserves gains when reached
- Reset: Limits reset at midnight local time
- Override: Manual restart required after limit hit
❓ "Is it safe to leave the bot running overnight?"
Generally yes, but consider:
- Market volatility during your absence
- News events that might affect your pairs
- Internet connection stability
- Proper daily limits set
- Conservative settings for unattended operation
🛠️ Troubleshooting
🔧 Common Issues & Solutions
🚫 Connection Problems
❌ "MT5 INIT FAIL" errors
Step-by-step fix:
- Close MT5 completely
- Restart MT5 and login manually
- Verify account is active and trading is enabled
- Check server name in Account Information
- Restart the bot
⚠️ "Reconnection failed" messages
Solutions:
- Check internet connectivity
- Verify broker server status
- Try different server if available
- Contact broker support
📊 Trading Issues
🚫 "No trade signal" constantly
Possible causes:
- Market in consolidation phase
- Timeframe too high for current volatility
- Price impact thresholds not met
- No-hedging blocking all directions
Try: Lower timeframe, different pair, or wait for higher volatility.
❌ "TRADE FAILED" errors
Check log for specific error codes:
Error Code | Meaning | Solution |
---|---|---|
INSUFFICIENT_MARGIN | Not enough money | Reduce lot size or add funds |
MARKET_CLOSED | Trading hours ended | Wait for market open |
SYMBOL_ERROR | Instrument not found | Check symbol name spelling |
TRADE_DISABLED | Algorithm trading off | Enable in MT5 settings |
🔍 Diagnostic Steps
🛠️ Systematic Problem Solving
Check Bot Status
- Verify "START BOT" shows bot is running
- Check connection status in logs
- Confirm daily limits not reached
- Review trading logic panel for recent activity
Verify MT5 Setup
- MT5 is running and logged in
- Algorithm trading is enabled
- Account has sufficient margin
- Symbol is available and tradeable
Run Diagnostics
- Use "DIAGNOSE NO HEDGING" button
- Check AI assistant for insights
- Review recent log entries
- Test with demo account if unsure
📞 Getting Help
Support Channels
- AI Assistant: Ask specific questions about your situation
- Email Support: metaquantuniverse@gmail.com with screenshots
- Log Files: Include relevant log excerpts with support requests
- Configuration: Share your settings when asking for help