MML Data Bridge - Common Issues and Resolves

26 December 2025, 21:57
Rylan Wallace
0
4

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



1. MML Data Bridge: Struct size mismatch for 'filename.csv' Your struct is 404 bytes, but data file contains 528 bytes This means your struct is missing 1 field(s) or has incorrect field types

Root Cause:
  • 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:

  1. Always use exactly ONE delimiter btween fields
  2. Don't use multiple tabs or commas for padding, white spacing is OK!
  3. Test with small files first
  4. Check your data file format - ensure single delimiters only
  5. Verify your struct definition matches the detected schema
  6. Regenerate schema by deleting corresponding binary file
  7. Check config file for the correct field count and types

2. Time zone Conversion Problems

Symptoms:
  • Data appears at wrong times in backtester
  • Timezone offsets not handled correctly
Root Cause:

  • 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:

  1. Using a T separator (not space) is mandatory
  2. Required time zone must have 'Z' or ±hh:mm
  3. There must be exactly 20 or 25 characters (no milliseconds)
  4. Use proper ISO 8601 format with timezone: 2025-01-01T08:30:00-05:00
  5. Avoid local time formats without timezone info
  6. Test with known timezone data first
  7. Include time zone offset in all DateTime values
Examples that work: 
  • 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)


Symptoms:
  • Program quits unexpectedly
  • EA fails to initialize
  • Binary file access errors during backtesting or optimization
Root Cause:
  • 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
Solution:
  1. Ensure CSV files are processed first - run EA once to generate binary files before backtesting
  2. Close any other applications that might be accessing the files (Excel, text editors, etc.)
  3. Verify binary files exist in Common\Files\[EA_Name]\ directory
  4. Restart MetaTrader 5 if files appear locked
  5. If binary file is missing, delete config file and let MML Data Bridge regenerate it


4. MML Data Bridge: Binary file '%s' appears corrupted or empty. Record size is invalid (%d). Please regenerate binary by updating CSV file or deleting the binary file

Root Cause:
  • Binary file header contains invalid record size. File is corrupted, empty, or was created incorrectly
Solution:
  • 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

5. Data Type Detection Issues

Symptoms:
  • Numbers treated as text
  • Dates not recognized
  • Incorrect data types in schema
Root Cause:
  • If a cell contains characters other than INTS or DOUBLES, the whole column will be treated as CHARS
Solution:
  1. Check for mixed data types in same column
  2. Delete binaries and rerun to regenerate a new schema
  3. Ensure all values in a numeric column are numbers
  4. Remove any text, symbols, or formatting from numeric columns

6. DateTime Column Detection Issues

Symptoms:
  • 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
Root Cause:
  • 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
Solution:
  1. Use proper ISO 8601 format - YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm. Example: 2024-07-30T16:00:00Z
  2. Ensure timezone information - all datetime values must have timezone
  3. Regenerate schema by deleting binary
  4. 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
Root Cause:

  • Configuration file is missing, has incorrect path, or lacks read permissions

Solution:
  1. Verify config file exists in Common Files directory
  2. Check file path matches EA name folder structure
  3. Verify file is not locked by another process
  4. Check file encoding is ANSI/text
  5. 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]

Solution:
  1. Ensure first line is exactly [Settings] (case-insensitive)
  2. Check for extra spaces or characters
  3. Verify file encoding is ANSI/text
  4. 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

Solution:
  1. Open config file in text editor
  2. Add file entries: File1 = your_data.csv
  3. Save config file
  4. 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

Solution:
  1. Ensure file extension is exactly .csv or .tsv (case-insensitive)
  2. Rename file if it has a different extension
  3. 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

Solution:
  1. Check file spelling and make sure to include file extension (.csv/.tsv) in the filename (spelling is not case sensitive)
  2. Use common files directory: C:\Users\[YourUsername]\AppData\Roaming\MetaQuotes\Terminal\Common\Files\
  3. Files should be placed directly in Common\Files\ (not in subfolders)
  4. 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
Solution:
  1. Add file entries in format: File1 = your_data.csv
  2. Ensure files exist and are readable
  3. Verify file extensions are .csv or .tsv
  4. Check files are in 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: 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
Root Cause:

  • 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

Solution:
  1. Check file location - must be in Common Files directory
  2. Verify filename in config file matches exactly (case-insensitive)
  3. Add file to config using format: FileN = filename.csv
  4. 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
Solution:
  1. Ensure CSV file has at least one data row after the header
  2. Check that data rows are not empty or whitespace-only
  3. Verify file was saved correctly
  4. 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

Solution:
  1. Ensure file has a valid header row with column names
  2. Verify file has at least one data row
  3. Check that all rows have consistent column counts
  4. Verify file encoding is correct (ANSI/text)
  5. 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

Solution:
  1. Use exact format: YYYY-MM-DDThh:mm:ssZ (UTC) or YYYY-MM-DDThh:mm:ss±hh:mm (with offset)
  2. Ensure 'T' separator between date and time (uppercase or lowercase both accepted)
  3. Include timezone: 'Z' for UTC or ±hh:mm for offset (e.g., -05:00 or +02:00)
  4. Verify all digits are present (no missing zeros)
  5. 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
Solution:
  1. Ensure all CSV rows have the same number of columns as the header
  2. Check for missing delimiters in data rows
  3. Verify CSV file format is consistent throughout
  4. 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.

Solution:
  1. Maintain consistent format as generated schema
  2. Ensure all CSV rows have same number of columns as the original schema
  3. Check for missing or extra delimiters in the new data row
  4. Count columns in the new row and match to schema

19. MML Data Bridge: Schema Mismatch - Column. File '%s': Stored schema parses to %d cols, row has %d cols

Root Cause:

  • Schema metadata corruption or mismatch. The stored schema definition doesn't match the actual data row.

Solution:
  1. Delete binary file and config file
  2. Restart EA to regenerate schema from CSV
  3. Verify CSV file has consistent column count
  4. 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
Solution:
  1. Use proper ISO 8601 format with timezone: 2025-01-01T08:30:00-05:00
  2. Ensure format matches: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DDThh:mm:ss±hh:mm
  3. Include timezone information (required)
  4. 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

Solution:
  1. Ensure value is a valid integer (no decimals, no letters)
  2. Remove any whitespace or formatting characters
  3. Check for hidden characters or encoding issues
  4. 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

Solution:
  1. Ensure value is numeric (integer or decimal)
  2. Use period (.) as decimal separator
  3. Remove currency symbols or formatting
  4. 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

Solution:
  1. Open config file and locate [Schema] section
  2. Copy the DataType = ... line for each file
  3. Add corresponding struct definition to dataStructs.mqh
  4. Ensure struct field order matches schema order
  5. Restart EA

24. MML Data Bridge: Change in data detected for '%s', updating binary and verifying schema

Root Cause:

  • CSV file was modified, and binary is being regenerated automatically

Solution:
  1. No action needed - this is automatic
  2. Wait for regeneration to complete
  3. Verify schema in config file if needed

25. MML Data Bridge: No existing metadata, initialized defaults

Root Cause:

  • First run - no metadata exists yet (normal for new setup)

Solution:
  1. This is informational, not an error
  2. EA will generate metadata and binaries on first run
  3. Ensure CSV files are properly configured
  4. Wait for initialization to complete

26. MML Data Bridge: Added %d file(s) to config

Root Cause:

  • New files were added to the configuration.

Solution:
  1. No action needed - this is informational
  2. Files will be processed automatically

27. MML Data Bridge: User removed %d file(s) from config, cleaning up binary

Root Cause:

  • Files were removed from config and associated binary files are being cleaned up.

Solution:

  1. No action needed - cleanup is automatic


For all other issues visit the user set up manual

MML Data Bridge User Set Up Manual - Trading Systems - Draft - Traders' Blogs

For more help, please contact the developer @rylanw337@gmail.com