This article shows how to push MT5 trade events to external tools in real time without blocking the EA. Trade confirmations are captured in OnTradeTransaction(), serialized to JSON, and queued immediately so the terminal never stalls during network problems.
Instead of WebRequest(), it calls WinINet (wininet.dll) via #import, avoiding URL whitelisting and reusing a single InternetOpen session handle for the EA lifetime. HTTP POST is executed from OnTimer() every 500 ms, keeping trade capture and delivery fully decoupled.
A fixed-size FIFO queue with peek-before-dequeue enables safe retries and controlled loss handling under overflow. Logging is designed around outage states: one failure message, per-trade enqueue notices during downtime, and a single recovery summary when HTTP 200 resumes.
👉 Read | AppStore | @mql5dev
Instead of WebRequest(), it calls WinINet (wininet.dll) via #import, avoiding URL whitelisting and reusing a single InternetOpen session handle for the EA lifetime. HTTP POST is executed from OnTimer() every 500 ms, keeping trade capture and delivery fully decoupled.
A fixed-size FIFO queue with peek-before-dequeue enables safe retries and controlled loss handling under overflow. Logging is designed around outage states: one failure message, per-trade enqueue notices during downtime, and a single recovery summary when HTTP 200 resumes.
👉 Read | AppStore | @mql5dev
❤20👍5👌3