Streaming MetaTrader 5 Quotes to .NET with WCF
Summary
This article describes a bridge for exporting MetaTrader 5 ticks to .NET applications. It defines a tick data structure and WCF service contracts for subscribing to updates, retrieving active symbols, and receiving tick and symbol-change callbacks. The server uses named pipes for local communication, while the article notes that TCP binding is an option when quotes must travel over a network.
The implementation uses a shared service instance, multiple-call concurrency, and callback channels to distribute ticks to clients. Reported tests compare service-based transfer with a direct DLL approach, and the author describes an experiment that raised throughput further using a thread pool. That faster approach proved unstable under heavy testing because memory use grew and MetaTrader eventually crashed. Results depend on the test setup and should not be treated as a general production benchmark; the article also leaves some implementation details out of the presented excerpts.
Key ideas
- WCF callbacks can deliver ticks and symbol-list change notifications to subscribed clients.
- Named pipes suit local communication, while TCP binding is presented for network distribution.
- A shared service instance can maintain the active symbol list and client callbacks.
- The reported thread-pool speedup came with memory growth and instability under heavy testing.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.