MML Data Bridge – Common Issues and Solutions – Trading Systems – December 26, 2025

MML Data Bridge – Overview of common issues and solutions
This article covers the most common problems users face when setting up and using MML Data Bridge and provides step-by-step solutions.
1. MML Data Bridge: Structure size mismatch for ‘filename.csv’. The structure is 404 bytes, but the data file contains 528 bytes. This means that the structure is missing 1 field or has an incorrect field type.
Root cause:
3. MML Data Bridge: Cannot open binary file (Error: 5002)
Symptoms:
- The program quits unexpectedly.
- EA initialization failed
- Binary file access error during backtesting or optimization
Root cause:
- Binary file does not exist (CSV has not been converted to binary yet).
- The file is locked by another process or application.
- The file path is incorrect or inaccessible.
- Insufficient file permissions.
way out:
- Make sure the CSV file is processed first. Run the EA once before backtesting to generate a binary file.
- Close all other applications (Excel, text editors, etc.) that may have access to the file.
- Check if the binary file exists in Common\Files.\(EA_name)\ directory
- If the file appears to be locked, restart MetaTrader 5.
- If the binary file is missing, delete the configuration file and let MML Data Bridge recreate it.
4. MML Data Bridge: Binary file ‘%s’ appears to be corrupted or empty. Record size is invalid (%d). Regenerate the binary by updating the CSV file or deleting the binary file.
Root cause:
- The binary file header contains an incorrect record size. The file is corrupted, empty, or created incorrectly.
way out:
- Delete corrupted binary files from Common\Files.\(EA_name)\ directory
- To trigger a regeneration, update your CSV file (make some changes and save it).
- Alternatively, you can delete the binary file and restart EA and it will be regenerated automatically.
- Make sure your CSV file contains valid rows of data before regenerating.
5. Data type detection issue
Symptoms:
- Numbers treated as text
- unrecognized date
- Invalid data type in schema
Root cause:
- If a cell contains characters other than INTS or DOUBLES, the entire column is treated as CHARS.
way out:
- Check for mixed datatypes in same column
- Delete the binary and run it again to create a new schema again.
- Make sure all values in a numeric column are numbers.
- Remove text, symbols, or formatting from numeric columns.
6. DateTime column detection issue
Symptoms:
- The expected date/time column is represented as Char() in the schema.
- Time-based data comparison fails
- The program does not run or produces incorrect results.
- Data appears at the wrong time in backtester
Root cause:
- The DateTime column contains data that is not in ISO 8601 format.
- Mixed data types in date/time columns
- Date/time value is missing time zone information.
- Invalid date/time format causes the schema to be classified as text.
way out:
- Use the appropriate ISO 8601 format (YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm). Example: 2024-07-30T16:00:00Z
- Check time zone information – All date/time values must have a time zone.
- Regenerate the schema by deleting the binary
- Clean date/time data – remove non-standard formats
7. MML Data Bridge: Unable to open configuration file.
Error message:
- MML Data Bridge: Could not open configuration file ‘%s’ (Error: %d).
- MML Data Bridge: Expected location: Common Files\%s
Root cause:
- The configuration file does not exist, the path is incorrect, or you do not have enough read permissions.
way out:
- Make sure you have a configuration file in the Common Files directory.
- Make sure the file path matches your EA name folder structure.
- Make sure the file is not locked by another process
- Make sure the file encoding is ANSI/Text.
- Navigate to the Common Files directory indicated in the error message.
8. MML Data Bridge: (Settings) header is missing in configuration file. Check the configuration file format.
Root cause:
- The configuration file format is incorrect or corrupted. The first line should look like this (setting)
way out:
- The first line is exactly (setting) (case insensitive)
- Check for extra spaces or characters.
- Check if file encoding is ANSI/Text
- Check for appropriate line endings.
9. MML Data Bridge: A new configuration file has been created. Add your input files and run again.
Root cause:
- The configuration file has just been created and we need file entries.
way out:
- Open the configuration file in a text editor
- Add file item: File1 = your_data.csv
- Save configuration file
- Restart EA
10. MML Data Bridge: Invalid file extension. Only .csv and .tsv files are supported.
Root cause:
- The file listed in the configuration has an unsupported file extension.
way out:
- Make sure the file extension is exactly .csv or .tsv (case insensitive).
- Rename files if they have different extensions
- Update the configuration file with the correct file name including the extension.
11. MML Data Bridge: The following files listed in Configuration cannot be found in the Common Files directory.
Root cause:
- The file is most likely misspelled or not in the correct directory.
way out:
- Check the file spelling and ensure that the file name includes the file extension (.csv/.tsv) (spelling is case-insensitive).
- Use a common file directory: C:\Users\(username)\AppData\Roaming\MetaQuotes\Terminal\Common\Files\
- Files must be placed directly in Common\Files\ (not in a subfolder).
- Make sure the file exists before adding it to your configuration.
12. MML Data Bridge: No valid file found in configuration.
Root cause:
- The configuration file contains no valid file entries or all entries are invalid.
way out:
- Add a file entry in the format File1 = your_data.csv.
- Check if the file exists and is readable.
- Make sure the file extension is .csv or .tsv.
- Make sure the file is in the Common Files directory.
13. MML Data Bridge: File ‘filename.csv’ not found in configuration.
Error message:
- MML Data Bridge: File ‘%s’ not found in configuration.
- MML Data Bridge: Make sure the file is in the Common Files directory and listed in the configuration file.
- MML Data Bridge: How to fix: Add ‘FileN = filename.csv’ to the configuration file and restart EA.
- MML Data Bridge: EA is removed due to configuration error.
Root cause:
- Your code requests a file that is not listed in the configuration. This occurs when your EA code calls getRecordBytes_internal() with a file name that does not exist in the configuration file.
way out:
- Check the file location – it should be in the Common Files directory.
- Make sure the file names in the configuration files match exactly (case insensitive).
- Add files to the configuration using the format FileN = filename.csv.
- After updating the configuration, restart EA.
14. MML Data Bridge: Warning – CSV file ‘%s’ contains no rows of data. The file must have at least one row of data after the header.
Root cause:
- CSV files have header rows but no data rows. You can’t create a schema without data.
way out:
- Make sure your CSV file has at least one row of data after the header.
- Make sure the data rows are not empty or contain only white space.
- Verify that the file was saved correctly
- Test the file format by adding a sample data row
15. MML Data Bridge: Line %d of ‘%s’: ISO-8601 format error in ‘%s’. Expected format: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm
Root cause:
- Schema detection failed. The file is missing header rows, data rows, is incorrectly formatted, or has an inconsistent number of columns.
way out:
- Make sure your file has a valid header line containing column names.
- Make sure the file has at least one row of data.
- Make sure all rows have a consistent number of columns.
- Make sure the file encoding is correct (ANSI/Text).
- Make sure to use appropriate delimiters (single comma for CSV, single tab for TSV).
16. MML Data Bridge: Line %d of ‘%s’: ISO-8601 format error in ‘%s’. Expected format: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm
Root cause:
- During CSV export, DateTime values do not match strict ISO-8601 format. Failed to parse the displayed value.
way out:
- Use exact format: YYYY-MM-DDThh:mm:ssZ (UTC) or YYYY-MM-DDThh:mm:ss±hh:mm (with offset)
- Notice the ‘T’ separator between the date and time (either upper or lower case is acceptable).
- Include time zone: ‘Z’ for UTC or ±hh:mm for offset (e.g. -05:00 or +02:00)
- Make sure all numbers are present (no zeros are missing).
- Example: 2024-07-30T16:00:00Z or 2024-07-30T16:00:00-05:00
17. MML Data Bridge: Warning – ‘%s’ has %d columns in %d rows. The expected content is %d. Missing columns are filled with blank values.
Root cause:
- CSV rows have a number of columns that differ from the schema detected during export. Missing columns are filled with blank/default values.
way out:
- Make sure every CSV row has the same number of columns as the header.
- Check your data rows for missing delimiters.
- Ensure CSV file format is consistent throughout
- Add missing columns or remove extra columns to match the header.
18. MML Data Bridge: Schema Mismatch – Column. File ‘%s’: saved schema has %d columns and last line has %d columns.
Root cause:
- The data added to the file does not match the schema generated by the backtest. The new CSV data row has a different number of columns than the stored schema.
way out:
- Maintain consistent formatting with generated schema
- Make sure every CSV row has the same number of columns as the original schema.
- Check the new data row for missing or added delimiters.
- Calculate number of columns in new row and match schema
19. MML Data Bridge: Schema Mismatch – Column. File ‘%s’: stored schema is parsed into %d columns and rows have %d columns.
Root cause:
- Schema metadata corruption or inconsistency. The stored schema definition does not match the actual data rows.
way out:
- Delete binary files and configuration files
- Restart EA to recreate the schema from the CSV.
- Ensure CSV files have a consistent number of opens
- Check for schema corruption in configuration file
20. MML Data Bridge: Schema Mismatch – Data Type. File ‘%s’, column %d requires a DateTime. Received ‘%s’
Root cause:
- Data values in DateTime column do not match ISO-8601 format. Occurs when adding new data in live mode.
way out:
- Use the appropriate ISO 8601 format with the time zone 2025-01-01T08:30:00-05:00.
- Check for format matching: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm
- Include time zone information (required)
- Example: 2024-07-30T16:00:00Z or 2024-07-30T16:00:00-05:00
21. MML Data Bridge: Schema Mismatch – Data Type. File ‘%s’, column %d requires Int. Received ‘%s’
Root cause:
- The data values in an integer column contain non-numeric characters. Occurs when adding new data in live mode.
way out:
- Make sure the value is a valid integer (no decimal points or characters).
- Remove any spaces or formatting characters.
- Check for hidden characters or encoding issues.
- Example: 123 is valid, 123.0 or 123abc is not valid.
22. MML Data Bridge: Schema Mismatch – Data Type. File ‘%s’, column %d requires Double. Received ‘%s’
Root cause:
- Data values in a double column cannot be parsed as numbers. Occurs when adding new data in live mode.
way out:
- Check if the value is a number (integer or decimal).
- Use period (.) as decimal separator
- Remove currency symbol or formatting
- Example: 123.45 is valid, but $123.45 or 123,45 is not valid.
23. MML Data Bridge: Collect data by checking the configuration file for the generated schema and adding it to dataStructs.mqh.
Root cause:
- The schema has been created and we need to add it to our code.
way out:
- Open the configuration file (outline) part time job
- Copy the DataType = … line for each file.
- Add the corresponding structure definition to dataStructs.mqh.
- Make sure the structure field order matches the schema order.
- Restart EA
24. MML Data Bridge: Data change detected for ‘%s’, updating binary and validating schema.
Root cause:
- The CSV file has been modified and the binary will be automatically regenerated.
way out:
- No action is required. This is done automatically.
- Wait for regeneration to complete
- If necessary, check the schema in the configuration file.
25. MML Data Bridge: No existing metadata, initialized defaults
Root cause:
- First run – no metadata yet (normal for a new setup).
way out:
- This is for informational purposes only and not an error.
- EA generates metadata and binaries the first time you run it.
- Make sure your CSV file is structured correctly.
- Wait until reset is complete
26. MML Data Bridge: Added %d files to configuration.
Root cause:
- A new file has been added to the configuration.
way out:
- No action is required. This is for informational purposes only.
- Your file will be processed automatically.
27. MML Data Bridge: User cleaned the binary by removing %d files from the configuration.
Root cause:
- The file has been removed from the configuration and the associated binary files are being cleaned up.
way out:
- No action is required. Cleanup happens automatically.
For all other issues, please refer to the User Settings manual.
MML Data Bridge User Setup Manual – Trading System – Draft – Trader’s Blog
If you need more help, please contact developer @rylanw337@gmail.com.


