Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

Metatrader 5 Libraries | Comment

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();
  }
//+------------------------------------------------------------------+


1111


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.


    48689

    Best MetaTrader Indicators + Profitable Expert Advisors