chekh/MQTTFive — reverse-engineered prompt
Reverse engineered prompt
Build me a pure MQL5 MQTT 5.0 client library for MetaTrader 5 that I can drop into the Include folder and use without any DLLs.
I want an easy API where an EA or script can connect to an MQTT broker over TCP or TLS, subscribe to topics, publish messages, receive messages through a callback, and disconnect cleanly. It should handle normal MQTT stuff for me like keepalive, QoS 0, 1, and 2, retries, inflight messages, connect properties, will messages, topic aliases, receive limits, subscription options, UTF8 text, and binary payloads.
Please include a few working examples, one that publishes bid and ask prices as JSON, one that listens for trade signals, and one EA that publishes account status and open positions. Add simple docs for installation in MetaTrader 5, a getting started guide, and an API reference. Keep it practical and easy to copy into a trading project. Look up the current MQTT 5.0 and MQL5 socket docs if needed.
Want more depth? Deep Reverse