Discussing the article: "Apache Arrow Flight from MQL5: A Native gRPC Client for Columnar Data Transport"

Check out the new article: Apache Arrow Flight from MQL5: A Native gRPC Client for Columnar Data Transport.

This article implements a native Apache Arrow Flight client in pure MQL5: FlatBuffers-based Arrow IPC encoding/decoding, a raw HTTP/2 client with HPACK, and a thin gRPC/Flight framing layer, no external libraries. We detail the protocol stack, message formats, and the DoPut/DoGet/ListFlights calls, and verify interoperability against a live pyarrow server with round-trip checks and fault injection. You get a schema-carrying, columnar path out of MetaTrader 5 that is smaller than CSV and ready for Python/Arrow workflows.

Every MQL5 article that moves data off the terminal eventually hits the same wall: there is no native way to speak a binary wire protocol. You can write a CSV to Common Files and have Python watch the folder. Or you can open a raw socket and use a text format the other side understands. Both work. But neither matches a modern data pipeline: CSV and ad-hoc text sockets do not carry a schema, they are not columnar, and parsing cost grows with row count. This article closes that gap for MQL5.

Apache Arrow Flight is Arrow's own RPC framework: gRPC underneath, Arrow's columnar IPC format for the payload. With pyarrow, a Flight endpoint can be implemented in about thirty lines of code. Any compliant client gets fast, schema-carrying access, and pyarrow can read a decoded message zero-copy. (The gRPC/HTTP/2 transport itself still copies bytes through sockets and framing, like any other RPC). The catch, for us, is that "anything that speaks the protocol" has never included MQL5, because MQL5 has no HTTP/2 library, no gRPC stub generator, and no Arrow bindings.

This article builds all three on top of an MQL5 socket: a FlatBuffers encoder/decoder for Arrow IPC, an HTTP/2 client with its own HPACK header compression, and a gRPC framing layer. They are wired into a CFlightClient class that implements DoPut, DoGet and ListFlights against a real pyarrow Flight server. Two programs use it: a one-shot benchmark that pushes real bar history through round trips and checks every value comes back exactly as sent — a bit-exact comparison of the decoded values, not of the raw encoded bytes — and an EA that streams closed bars and account deals to the server continuously, with reconnect and back-off built in. All numbers in this article, including the fault-injection and dropped-connection behaviour, come from runs of this exact code on a real MetaQuotes-Demo account.

Author: Adewumi Babatunde Gbadebo