MML Data Bridge - Common Issues and Resolves Overview
This document addresses the most common issues users encounter when setting up and using MML Data Bridge, along with step-by-step solutions
- Purchase the bridge here: https://www.mql5.com/en/market/product/152143?source=Site+Market+Product+Page#
- User Set Up Manual: https://www.mql5.com/en/blogs/post/766374
- Required files: https://www.mql5.com/en/blogs/post/766519
- Code Structure and MQL5 Programing Challenges: https://www.mql5.com/en/blogs/post/766520
- Your data struct doesn't match the schema detected in your data file
- Most commonly caused by incorrect delimiter usage in your CSV/TSV files
- Binaries might have been exported incorrectly
Prevention:
- Use schema generated by MML Data Bridge
Solution:
- Always use exactly ONE delimiter btween fields
- Don't use multiple tabs or commas for padding, white spacing is OK!
- Test with small files first
- Check your data file format - ensure single delimiters only
- Verify your struct definition matches the detected schema
- Regenerate schema by deleting corresponding binary file
- Check config file for the correct field count and types
- Data appears at wrong times in backtester
- Timezone offsets not handled correctly
- MML Data Bridge uses UTC (GMT) time internally. All timestamps in binary files are stored in UTC and time comparisons against tester time happen in UTC automatically
Solution:
- Using a T separator (not space) is mandatory
- Required time zone must have 'Z' or ±hh:mm
- There must be exactly 20 or 25 characters (no milliseconds)
- Use proper ISO 8601 format with timezone: 2025-01-01T08:30:00-05:00
- Avoid local time formats without timezone info
- Test with known timezone data first
- Include time zone offset in all DateTime values
- 2023-10-20T00:00:00Z
- 2023-10-20T00:00:00+00:00
- 2023-10-20T00:00:00-05:00
3. MML Data Bridge: Cannot open binary file (Error: 5002)
- Program quits unexpectedly
- EA fails to initialize
- Binary file access errors during backtesting or optimization
- Binary file doesn't exist (CSV hasn't been converted to binary yet)
- File is locked by another process or application
- File path is incorrect or inaccessible
- Insufficient file permissions
- Ensure CSV files are processed first - run EA once to generate binary files before backtesting
- Close any other applications that might be accessing the files (Excel, text editors, etc.)
- Verify binary files exist in Common\Files\[EA_Name]\ directory
- Restart MetaTrader 5 if files appear locked
- If binary file is missing, delete config file and let MML Data Bridge regenerate it
- Binary file header contains invalid record size. File is corrupted, empty, or was created incorrectly
- Delete the corrupted binary file from Common\Files\[EA_Name]\ directory
- Update the CSV file (make a small change and save) to trigger regeneration
- Or delete the binary file and restart EA - it will regenerate automatically
- Verify CSV file has valid data rows before regeneration
- Numbers treated as text
- Dates not recognized
- Incorrect data types in schema
- If a cell contains characters other than INTS or DOUBLES, the whole column will be treated as CHARS
- Check for mixed data types in same column
- Delete binaries and rerun to regenerate a new schema
- Ensure all values in a numeric column are numbers
- Remove any text, symbols, or formatting from numeric columns
- Expected datetime column shows up as Char[] in schema
- Time-based data comparison fails
- Program won't run or produces incorrect results
- Data appears at wrong times in back tester
- DateTime column contains non-ISO 8601 format data
- Mixed data types in datetime column
- Missing timezone information in datetime values
- Invalid datetime format causing schema to classify as text
- Use proper ISO 8601 format - YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm. Example: 2024-07-30T16:00:00Z
- Ensure timezone information - all datetime values must have timezone
- Regenerate schema by deleting binary
- Clean datetime data - remove any non-standard formats
7. MML Data Bridge: Cannot open configuration file
Error Messages:
- MML Data Bridge: Cannot open configuration file '%s' (Error: %d)
- MML Data Bridge: Expected location: Common Files\%s
- Configuration file is missing, has incorrect path, or lacks read permissions
- Verify config file exists in Common Files directory
- Check file path matches EA name folder structure
- Verify file is not locked by another process
- Check file encoding is ANSI/text
- Navigate to the Common Files directory shown in the error message
8. MML Data Bridge: Configuration file missing [Settings] header. Please check your config file format
Root Cause:
- Config file format is invalid or corrupted. The first line must be [Settings]
- Ensure first line is exactly [Settings] (case-insensitive)
- Check for extra spaces or characters
- Verify file encoding is ANSI/text
- Ensure proper line endings
9. MML Data Bridge: Created new config file. Please add input files and rerun
Root Cause:
- Config file was just created and needs file entries
- Open config file in text editor
- Add file entries: File1 = your_data.csv
- Save config file
- Restart EA
10. MML Data Bridge: File has invalid extension. Only .csv and .tsv files are supported
Root Cause:
- File listed in config has an unsupported file extension
- Ensure file extension is exactly .csv or .tsv (case-insensitive)
- Rename file if it has a different extension
- Update config file with correct filename including extension
11. MML Data Bridge: The following file(s) listed in configuration were not found in the Common Files directory
Root Cause:
- File is most likely misspelled or not in the correct directory
- Check file spelling and make sure to include file extension (.csv/.tsv) in the filename (spelling is not case sensitive)
- Use common files directory: C:\Users\[YourUsername]\AppData\Roaming\MetaQuotes\Terminal\Common\Files\
- Files should be placed directly in Common\Files\ (not in subfolders)
- Verify file exists before adding to config
12. MML Data Bridge: No valid files found in configuration
Root Cause:
- Config file has no valid file entries or all entries are invalid
- Add file entries in format: File1 = your_data.csv
- Ensure files exist and are readable
- Verify file extensions are .csv or .tsv
- Check files are in Common Files directory
- MML Data Bridge: File '%s' not found in configuration
- MML Data Bridge: Please ensure file(s) are in the Common Files directory and listed in your config file
- MML Data Bridge: To fix: Add 'FileN = filename.csv' to your config file and restart EA
- MML Data Bridge: EA will be removed due to configuration error
- Code requests a file not listed in the configuration. This occurs when your EA code calls getRecordBytes_internal() with a filename that isn't in the config file
- Check file location - must be in Common Files directory
- Verify filename in config file matches exactly (case-insensitive)
- Add file to config using format: FileN = filename.csv
- Restart EA after updating config
14. MML Data Bridge: Warning - CSV file '%s' contains no data rows. File must have at least one data row after the header
Root Cause:
- CSV file has a header row but no data rows. Schema cannot be generated without data
- Ensure CSV file has at least one data row after the header
- Check that data rows are not empty or whitespace-only
- Verify file was saved correctly
- Add sample data rows to test the file format
15. MML Data Bridge: ISO-8601 format error in '%s' at row %d: '%s'. Expected format: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm
Root Cause:
- Schema detection failed. File has no header row, no data rows, invalid format, or inconsistent column counts
- Ensure file has a valid header row with column names
- Verify file has at least one data row
- Check that all rows have consistent column counts
- Verify file encoding is correct (ANSI/text)
- Ensure proper delimiter usage (single comma for CSV, single tab for TSV)
16. MML Data Bridge: ISO-8601 format error in '%s' at row %d: '%s'. Expected format: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm
Root Cause:
- DateTime value doesn't match strict ISO-8601 format during CSV export. The value shown failed to parse
- Use exact format: YYYY-MM-DDThh:mm:ssZ (UTC) or YYYY-MM-DDThh:mm:ss±hh:mm (with offset)
- Ensure 'T' separator between date and time (uppercase or lowercase both accepted)
- Include timezone: 'Z' for UTC or ±hh:mm for offset (e.g., -05:00 or +02:00)
- Verify all digits are present (no missing zeros)
- Example: 2024-07-30T16:00:00Z or 2024-07-30T16:00:00-05:00
17. MML Data Bridge: Warning - Row %d in '%s' has %d columns, expected %d. Missing columns will be padded with empty values
Root Cause:
- CSV row has different column count than detected schema during export. Missing columns will be filled with empty/default values
- Ensure all CSV rows have the same number of columns as the header
- Check for missing delimiters in data rows
- Verify CSV file format is consistent throughout
- Add missing columns or remove extra columns to match header
18. MML Data Bridge: Schema Mismatch - Column. File '%s': Saved schema has %d cols, last line has %d cols
Root Cause:
- Data appended to a file does not match the schema generated from back tests. New CSV data row has different column count than saved schema.
- Maintain consistent format as generated schema
- Ensure all CSV rows have same number of columns as the original schema
- Check for missing or extra delimiters in the new data row
- Count columns in the new row and match to schema
- Schema metadata corruption or mismatch. The stored schema definition doesn't match the actual data row.
- Delete binary file and config file
- Restart EA to regenerate schema from CSV
- Verify CSV file has consistent column count
- Check for schema corruption in config file
20. MML Data Bridge: Schema Mismatch - Datatype. File '%s', Column %d expects DateTime; got '%s'
Root Cause:
- Data value in DateTime column doesn't match ISO-8601 format. This occurs when appending new data in live mode
- Use proper ISO 8601 format with timezone: 2025-01-01T08:30:00-05:00
- Ensure format matches: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm
- Include timezone information (required)
- Example: 2024-07-30T16:00:00Z or 2024-07-30T16:00:00-05:00
21. MML Data Bridge: Schema Mismatch - Datatype. File '%s', Column %d expects Int; got '%s'
Root Cause:
- Data value in Integer column contains non-numeric characters. This occurs when appending new data in live mode
- Ensure value is a valid integer (no decimals, no letters)
- Remove any whitespace or formatting characters
- Check for hidden characters or encoding issues
- Example: 123 is valid, 123.0 or 123abc are invalid
22. MML Data Bridge: Schema Mismatch - Datatype. File '%s', Column %d expects Double; got '%s'
Root Cause:
- Data value in Double column cannot be parsed as a number. This occurs when appending new data in live mode
- Ensure value is numeric (integer or decimal)
- Use period (.) as decimal separator
- Remove currency symbols or formatting
- Example: 123.45 is valid, $123.45 or 123,45 are invalid
23. MML Data Bridge: Check config file for generated schemas and add to dataStructs.mqh to ingest data
Root Cause:
- Schema has been generated and needs to be added to your code
- Open config file and locate [Schema] section
- Copy the DataType = ... line for each file
- Add corresponding struct definition to dataStructs.mqh
- Ensure struct field order matches schema order
- Restart EA
- CSV file was modified, and binary is being regenerated automatically
- No action needed - this is automatic
- Wait for regeneration to complete
- Verify schema in config file if needed
- First run - no metadata exists yet (normal for new setup)
- This is informational, not an error
- EA will generate metadata and binaries on first run
- Ensure CSV files are properly configured
- Wait for initialization to complete
- New files were added to the configuration.
- No action needed - this is informational
- Files will be processed automatically
- Files were removed from config and associated binary files are being cleaned up.
- No action needed - cleanup is automatic
For more help, please contact the developer @rylanw337@gmail.com


