This article builds a four-layer MQL5 tracer that works without gRPC or protobufs: OTLP/HTTP JSON via WebRequest, SHA-256–backed ID generation, a nanosecond-formatted clock, and a ratio sampler. Finished spans go to a bounded queue and flush in batches with exponential backoff. A W3C traceparent header links the EA's spans to a Python service for end-to-end visibility.
Most MQL5 monitoring stops at logs and the Strategy Tester report. That is fine for a single Expert Advisor sitting on one chart, but the moment a signal depends on something outside the terminal — a Python model, a risk service, a data feed — a log file on its own cannot show you where the time was spent or why a decision was made. You end up correlating timestamps by hand between two or three log files, which gets old fast once anything goes wrong at 3 a.m. on a live account.
This article builds a native OpenTelemetry (OTLP) tracer for MQL5: a clock, identifier generation, and an exporter. It then wires the tracer into an EMA-cross Expert Advisor that calls a small Python scoring service. Each bar cycle becomes a distributed trace. The EA's decision steps and the Python service's processing share the same trace ID, so Jaeger renders them as a single timeline.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Check out the new article: Distributed Tracing for Expert Advisors: A Native OpenTelemetry (OTLP) Exporter in MQL5.
Most MQL5 monitoring stops at logs and the Strategy Tester report. That is fine for a single Expert Advisor sitting on one chart, but the moment a signal depends on something outside the terminal — a Python model, a risk service, a data feed — a log file on its own cannot show you where the time was spent or why a decision was made. You end up correlating timestamps by hand between two or three log files, which gets old fast once anything goes wrong at 3 a.m. on a live account.
This article builds a native OpenTelemetry (OTLP) tracer for MQL5: a clock, identifier generation, and an exporter. It then wires the tracer into an EMA-cross Expert Advisor that calls a small Python scoring service. Each bar cycle becomes a distributed trace. The EA's decision steps and the Python service's processing share the same trace ID, so Jaeger renders them as a single timeline.
Author: Adesewa Tolulope Gbadebo