Stocks News

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:

  1. Make sure the CSV file is processed first. Run the EA once before backtesting to generate a binary file.
  2. Close all other applications (Excel, text editors, etc.) that may have access to the file.
  3. Check if the binary file exists in Common\Files.\(EA_name)\ directory
  4. If the file appears to be locked, restart MetaTrader 5.
  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:

  1. Check for mixed datatypes in same column
  2. Delete the binary and run it again to create a new schema again.
  3. Make sure all values ​​in a numeric column are numbers.
  4. 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:

  1. 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
  2. Check time zone information – All date/time values ​​must have a time zone.
  3. Regenerate the schema by deleting the binary
  4. 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:

  1. Make sure you have a configuration file in the Common Files directory.
  2. Make sure the file path matches your EA name folder structure.
  3. Make sure the file is not locked by another process
  4. Make sure the file encoding is ANSI/Text.
  5. 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:

  1. The first line is exactly (setting) (case insensitive)
  2. Check for extra spaces or characters.
  3. Check if file encoding is ANSI/Text
  4. 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:

  1. Open the configuration file in a text editor
  2. Add file item: File1 = your_data.csv
  3. Save configuration file
  4. 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:

  1. Make sure the file extension is exactly .csv or .tsv (case insensitive).
  2. Rename files if they have different extensions
  3. 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:

  1. Check the file spelling and ensure that the file name includes the file extension (.csv/.tsv) (spelling is case-insensitive).
  2. Use a common file directory: C:\Users\(username)\AppData\Roaming\MetaQuotes\Terminal\Common\Files\
  3. Files must be placed directly in Common\Files\ (not in a subfolder).
  4. 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:

  1. Add a file entry in the format File1 = your_data.csv.
  2. Check if the file exists and is readable.
  3. Make sure the file extension is .csv or .tsv.
  4. 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:

  1. Check the file location – it should be in the Common Files directory.
  2. Make sure the file names in the configuration files match exactly (case insensitive).
  3. Add files to the configuration using the format FileN = filename.csv.
  4. 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:

  1. Make sure your CSV file has at least one row of data after the header.
  2. Make sure the data rows are not empty or contain only white space.
  3. Verify that the file was saved correctly
  4. 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:

  1. Make sure your file has a valid header line containing column names.
  2. Make sure the file has at least one row of data.
  3. Make sure all rows have a consistent number of columns.
  4. Make sure the file encoding is correct (ANSI/Text).
  5. 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:

  1. Use exact format: YYYY-MM-DDThh:mm:ssZ (UTC) or YYYY-MM-DDThh:mm:ss±hh:mm (with offset)
  2. Notice the ‘T’ separator between the date and time (either upper or lower case is acceptable).
  3. Include time zone: ‘Z’ for UTC or ±hh:mm for offset (e.g. -05:00 or +02:00)
  4. Make sure all numbers are present (no zeros are missing).
  5. 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:

  1. Make sure every CSV row has the same number of columns as the header.
  2. Check your data rows for missing delimiters.
  3. Ensure CSV file format is consistent throughout
  4. 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:

  1. Maintain consistent formatting with generated schema
  2. Make sure every CSV row has the same number of columns as the original schema.
  3. Check the new data row for missing or added delimiters.
  4. 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:

  1. Delete binary files and configuration files
  2. Restart EA to recreate the schema from the CSV.
  3. Ensure CSV files have a consistent number of opens
  4. 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:

  1. Use the appropriate ISO 8601 format with the time zone 2025-01-01T08:30:00-05:00.
  2. Check for format matching: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm
  3. Include time zone information (required)
  4. 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:

  1. Make sure the value is a valid integer (no decimal points or characters).
  2. Remove any spaces or formatting characters.
  3. Check for hidden characters or encoding issues.
  4. 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:

  1. Check if the value is a number (integer or decimal).
  2. Use period (.) as decimal separator
  3. Remove currency symbol or formatting
  4. 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:

  1. Open the configuration file (outline) part time job
  2. Copy the DataType = … line for each file.
  3. Add the corresponding structure definition to dataStructs.mqh.
  4. Make sure the structure field order matches the schema order.
  5. 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:

  1. No action is required. This is done automatically.
  2. Wait for regeneration to complete
  3. 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:

  1. This is for informational purposes only and not an error.
  2. EA generates metadata and binaries the first time you run it.
  3. Make sure your CSV file is structured correctly.
  4. 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:

  1. No action is required. This is for informational purposes only.
  2. 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:

  1. 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.

Related Articles

Back to top button