Example:
#include <Comm.mqh> int _x = 0, _y = 10, _z = 100; //+------------------------------------------------------------------+ int OnInit(void) { EventSetMillisecondTimer(30); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ void OnTimer() { Comm(StringFormat("x=%d\ny=%d\nz=%d", _x, _y, _z),clrYellow,50); _x++; _y += 10; _z += 100; } //+------------------------------------------------------------------+ void OnDeinit(const int reason) { EventKillTimer(); DeinitComm(); } //+------------------------------------------------------------------+

Several examples are provided inside the Comm.mqh file
update 24.01.2025 v1.08
update 03.02.2025 v1.09
It became necessary to output information from the service. I decided to output it to the first chart in the terminal. I added the ability to specify chart ID in the comment.
update 31.05.2025 v1.10 made some small changes so that the new compiler would not swear.