📚 FxMathQuant User Manual
AI-Powered Trading Strategy Generator
🚀 Getting Started
What is FxMathQuant?
FxMathQuant is an AI-powered trading strategy generator that uses genetic algorithms to discover profitable
trading strategies from your historical price data.
System Requirements
- Web Browser: Chrome, Firefox, Safari, or Edge (latest version)
- MetaTrader: MT4 or MT5 (for data export)
- License Key: Required for access
🔑 License Activation
Step 1: Obtain License Key
Purchase a license from:
Step 2: Activate License
- Open the application at: https://web.fxmathquant.com/login.html
- Enter your license key in the format:
XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
- Click "Activate License"
- Wait for validation (requires internet connection)
- You'll be redirected to the main application
Session Duration: Your session remains active until you logout or clear browser data. There
is no automatic logout.
📊 Exporting Data from MT4/MT5
Download Data Provider EA
Download the EA from the application:
- MT4:
FxMathQuant_DataExporter_MT4.ex4
- MT5:
FxMathQuant_DataExporter_MT5.ex5
Export Historical Data
- Open a chart (e.g., XAUUSD H1)
- Drag the EA onto the chart
- Configure settings:
- Bars to Export: 10,000 (recommended)
- Remove Suffix: true
- Export Folder: FxMathQuant
- Click "Export to CSV" button
- Wait for completion message
- Find your file:
MQL4/Files/FxMathQuant/XAUUSD_H1.csv
Recommended Data
| Timeframe |
Bars |
Use Case |
| M15 |
10,000 |
Scalping strategies |
| H1 |
10,000 |
Intraday trading |
| H4 |
5,000 |
Swing trading |
| D1 |
3,000 |
Position trading |
📤 Uploading Data
- Click "Browse" or drag-and-drop your CSV file
- Select the file exported from MT4/MT5
- Wait for parsing (10,000 bars ≈ 2-3 seconds)
- Confirmation: "Data loaded successfully: X bars"
⚙️ Configuring Strategy Generation
Genetic Algorithm Settings
| Parameter |
Default |
Range |
Description |
| Population Size |
100 |
50-500 |
Number of strategies per generation |
| Generations |
50 |
10-200 |
Number of evolution cycles |
| Mutation Rate |
0.1 |
0.01-0.5 |
Probability of random changes |
| Crossover Rate |
0.7 |
0.3-0.9 |
Probability of combining strategies |
🔬 Walk-Forward Analysis
Walk-forward analysis validates strategies on out-of-sample data to detect overfitting and ensure real-world
performance.
What is Overfitting? A strategy that performs well on historical data but fails in live
trading due to being too closely fitted to past price patterns.
How It Works
- Data Splitting: Historical data is divided into training and testing periods
- Training Period: Strategy is optimized on this data (e.g., 70% of bars)
- Testing Period: Strategy is validated on unseen data (e.g., 30% of bars)
- Performance Comparison: Metrics are compared between training and testing
- Robustness Score: A score (0-100) indicates how well the strategy generalizes
Configuration
- Enable Walk-Forward Validation: Check this box to activate the feature
- Training Period: Adjust the slider (50-90%, default: 70%)
- Higher ratio = More data for training, less for validation
- Lower ratio = Less training data, more for validation
- Recommended: 70% for most cases
Understanding the Badges
Each strategy card displays a walk-forward badge showing its robustness:
| Badge |
Score Range |
Meaning |
Recommendation |
| ✓ ROBUST (Green) |
60-100 |
Strategy passed validation |
Safe to use for live trading |
| ⚠ OVERFITTED (Orange) |
0-59 |
Strategy failed validation |
Avoid - likely curve-fitted |
Robustness Score Interpretation
- 80-100: Excellent - Minimal degradation, high confidence
- 60-79: Good - Acceptable degradation, suitable for trading
- 40-59: Moderate - Concerning degradation, needs review
- 0-39: Poor - High overfitting risk, avoid
What Gets Measured
The robustness score is calculated based on degradation in:
- Profit Factor: How much profit factor drops in testing vs. training
- Win Rate: Percentage point decrease in win rate
- Max Drawdown: Increase in maximum drawdown
- Trade Count: Sufficient trades in testing period
Important: A strategy with excellent training performance but poor testing performance is
likely overfitted and should be avoided.
Best Practices
- Use at least 1,000 bars of data (minimum 300 for testing)
- Keep training ratio at 70% for balanced results
- Only trade strategies with robustness score ≥ 60
- Prefer strategies with scores above 80 for higher confidence
- If all strategies fail, try different data or settings
Impact on Strategy Generation
When walk-forward is enabled:
- Failed strategies: Receive 50% fitness penalty (less likely to be selected)
- Robust strategies: Receive up to 50% fitness bonus (prioritized)
- Result: GA naturally evolves toward robust, non-overfitted strategies
🎯 Generating Strategies
- Review your settings
- Click "Start Generation"
- Monitor progress (current generation, strategies found, best fitness)
- Wait for completion (30 seconds to 5 minutes)
📈 Viewing Results
Each strategy shows:
- Profit Factor: Ratio of gross profit to gross loss
- Win Rate: Percentage of winning trades
- Total Trades: Number of trades executed
- Net Profit: Total profit in currency
- Max Drawdown: Largest equity drop
Click "View Details" to see:
- Performance Metrics
- BUY/SELL Rules
- Equity Curve Chart
- Hourly Performance
- Complete Trade Statement
💾 Downloading Strategies
Available Formats
- MetaTrader 4 (.mq4) - For MT4 platform
- MetaTrader 5 (.mq5) - For MT5 platform
- cTrader (.cs) - For cTrader platform
- TradingView (Pine Script) - For TradingView
- HTML Report - Comprehensive performance report
- JSON Data - Raw strategy data
🐛 Troubleshooting
CSV Upload Issues
Error: "CSV must contain: time, open, high, low, close columns"
Solution: Ensure CSV has required columns. Column names can be lowercase or capitalized.
License Issues
Error: "Invalid license key"
Solution: Check key format (32 characters with dashes). Copy-paste from email.
Generation Issues
No strategies found
Solution: Relax criteria (lower Min Profit Factor, Win Rate). Increase population size and
generations.
📞 Contact Support
⚠️ Disclaimer: Past performance does not guarantee future results. Always test strategies
on demo account first. Use proper risk management.
© 2025 FxMath Solution. All rights reserved.