Comment – library MetaTrader 5

Just add the code  #include    settings will appear.

Example of usage with default settings.

No need to declare an instance of the class.

#include <Comm.mqh>
//+------------------------------------------------------------------+
void OnTick()
  
   string str = "PROGRAM_NAME = " + MQLInfoString(MQL_PROGRAM_NAME) + "\n" + (string)TimeCurrent();
   comm.Comm(str);
  
//+------------------------------------------------------------------+

Example of use with the ability to change settings.

#include <Comm.mqh>
//+------------------------------------------------------------------+
void OnTick()
  
   string str = "PROGRAM_NAME = " + MQLInfoString(MQL_PROGRAM_NAME) + "\n" + (string)TimeCurrent();
   comm.Comm(str, _Xpx, _Ypx, _clrText, _FontSize, _clrBack, _Transparency, _Font, _corner);
  
//+------------------------------------------------------------------+

Example of using multiple instances of a comment.

#include <Comm.mqh>
CComm comm1;
CComm comm2;
CComm comm3;
CComm comm4;
//+------------------------------------------------------------------+
void OnTick()
  
   MqlTick tick;
   SymbolInfoTick(_Symbol, tick);
   if(tick.ask != 0 && tick.bid != 0)
     
      string str = StringFormat("ask  = %.5f\nbid  = %.5f\ntime = %s", tick.ask, tick.bid, TimeToString(tick.time, TIME_DATE 
  
//+------------------------------------------------------------------+






Alternative:  Custom Fractals - indicator MetaTrader 5
📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks