MML Information Bridge Person Set Up Guide
The aim of this program is to ship machine studying predictions straight into the MetaTrader 5 buying and selling platform. MML Bridge is a developer-focused device that gives a easy API for ingesting machine studying predictions (or any exterior information) into MT5 for backtesting, optimization, and reside buying and selling. It’s designed to combine seamlessly into current workflows with out introducing efficiency overhead or impacting growth velocity. This system will be arrange in simply eight steps.
Buy MML Information Bridge right here: https://www.mql5.com/en/market/product/152143?supply=Web site+Market+Product+Web page#
Features overview
void initializeBridge(“eaName”)
- Initializes the information bridge system by studying the configuration file, getting ready binary information information, and establishing the interior registry for information retrieval. Should be known as as soon as throughout Professional Advisor initialization (usually in OnInit()).
- Accepts a string to call directories and configuration information
void shutDownBridge()
- Correctly shuts down the information bridge system and cleans up sources. Must be known as throughout Professional Advisor deinitialization (usually in OnDeinit()).
bool returnData<T>(const string csvFileName, T &out)
- Templated operate to retrieve the most recent information document from a specified CSV/TSV file and maps it right into a supplied struct. Works in each reside buying and selling (returns most up-to-date document) and backtesting modes (returns subsequent document based mostly on present time). Routinely validates struct dimension matches the information schema throughout reside buying and selling.
- Accepts the filename of the CSV/TSV file to learn from (should match a reputation of a file listed within the configuration) and reference to a struct of kind T the place the information might be populated
string CharArrayToStr(const char &arr[])
- Converts a personality array (from struct char fields) to a string for show or string operations. Used to extract textual content information from struct fields which might be saved as fixed-width character arrays.
- Accepts a reference to a personality array as an arguments
- Returns a string – the transformed string worth from the character array
❖ 1. Transfer the executable code “MMLDataBridge.exe” into the library listing in MT5.

❖ 2. Transfer MMLUtility.mqh and dataStructs.mqh into MT5’s embody listing.
❖ 3. Transfer information to be ingested into MT5’s widespread information listing.
C:UsersuserNameAppDataRoamingMetaQuotesTerminalCommonFiles>
❖ 4. Initialize the MML Information Bridge
Create an EA you want to bridge exterior CSV/TSV information with and add #embody <MMLUtility.mqh> and <dataStructs.mqh>
Subsequent name initializeBridge(“EA Bridge Title”) contained in the OnInit() operate and shutDownBridge() inside OnDeinit operate.
#property copyright "Copyright 2025, MML Information Bridge " #property hyperlink "https://www.mql5.com/en/market/product/152143/controlpanel#!tab=description" #property model "1.00" #embody <Commerce/Commerce.mqh> #embody <MMLUtility.mqh> #embody <dataStructs.mqh> int OnInit() { initializeBridge("ES_final"); return INIT_SUCCEEDED; } void OnDeinit(const int cause) { shutDownBridge(); } void OnTick() { }
❖ 4.1. Calling initializeBridge(“EA Bridge Title”) inside OnInit creates a listing that acts as a bridge and creates a config.ini file to enter information to be ingested into the platform.

❖ 4.2. Working this system for the primary time provides the next messages within the professional console. These messages point out the config file has been created efficiently and we are able to now enter information.
➢ MML Bridge: Config file not discovered — creating new config file: ES_finalES_final.ini
➢ MML Information Bridge: Created new config file. Please add enter information and rerun.
❖ 5. Open the config.ini file, and enter information to be ingested into the EA. Acceptable information consists of CSV/TSV information.
[Settings] File1 = direction_timegpt_eurusd4h.csv File2 = hlc_predictions.csv File3 = news_predictions.tsv [Schema]
❖ 5. 1. As soon as inputs are added to the config.ini file, the subsequent program run will scan all information within the information and generate a knowledge kind schema. This schema verifies information kind consistency in order that information could also be ingested into the platform.
Observe that some IDEs or textual content editors will robotically refresh whereas others could require the file to be closed and reopened.
[Settings] File1 = direction_timegpt_eurusd4h.csv File2 = hlc_predictions.csv File3 = news_predictions.tsv [Schema] File1 = direction_timegpt_eurusd DataType = DateTime, Int File2 = hlc_predictions.csv DataType = DateTime, Char, Char, Double, Double, Double, Double, Double, Double File3 = news_predictions.tsv DataType = DateTime, Char, Char, Char, Int, Int, Int
❖ 6. Utilizing the schema generated, declare objects inside dataStructs.mqh
#ifndef dataStructs #outline dataStructs #outline CHAR_FIELD_WIDTH 128 struct DIRECTION { datetime time; int sign; }; struct HLC { datetime time; char foreign money[CHAR_FIELD_WIDTH]; char timeframe[CHAR_FIELD_WIDTH]; double predicted_high; double confidence_high; double predicted_low; double confidence_low; double predicted_close; double confidence_close; }; struct NEWS { datetime time; char occasion[CHAR_FIELD_WIDTH]; char impression[CHAR_FIELD_WIDTH]; char foreign money[CHAR_FIELD_WIDTH]; int precise; int forecast; int earlier; }; #endif
❖ 7. Declare an occasion of every object above the OnTick() operate. And name returnData(“fileName”, construction) to return information
DIRECTION course; HLC hlc; NEWS information; void OnTick() { if (returnData<DIRECTION>("direction_timegpt_eurusd4h.csv", course)) PrintDirectionData(course); ProcessTradingLogic(course); if (returnData<HLC>("hlc_predictions.csv", hlc)) PrintHLCData(hlc); ProcessHLCData(hlc); if (returnData<NEWS>("news_predictions.tsv", information)) PrintNewsData(information); ProcessNewsData(information); }
❖ 8. Develop, commerce and take a look at your machine studying predictions

