More About MT4gui

 

I want to include a box in the top right hand corner of my screen with 6 lines of data which change each time period (i.e. 1M,5M,30M etc).

I have seen some details about the mt4gui but not too much. I have extracted the following code from an example and the 'box' and TimeCurrent are displayed

The references to the font, font size and color seem to be ignored - am I missing something or not using correctly?

Can I use this process to create a multi-line display?

#import "mt4gui.dll"   
   int tbPutObject(int,string,int,int,int,int,string);
   int tbRemoveAll(int);
   int tbSetText(int,string,int,string);
   int tbSetBgColor(int,int);
   int tbSetTextColor(int,int);
#import
#include <libtrade.mqh>
#include <libvisual.mqh>
int l1;
int init()
  {    
      return(0);
  }
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {   int hwnd=WindowHandle(Symbol(),Period());
      tbRemoveAll(hwnd); ObjectsDeleteAll();
      l1=tbPutObject(hwnd,"text",850,100,200,20,TimeCurrent());   //from left, from top, width of box, height of box  
      tbSetBgColor(l1,Green); 
      tbSetTextColor(l1,Yellow);
      tbSetText(l1,"text",24,"Arial");  
      
     
 

You remove all objects, then create a text object.

At the next tick, the start() function is called and removes the object, then creates it again.

Makes no sense.

If you want to keep the object on the chart, you need to create it once (not at each tick)

and only when you don´t want it on the chart anymore, remove it.

 

XXXXXXXXXXXXXX

 

tx for attention 

 

Please,  no Advertising,  it is against Forum rules.

 

 Look here: https://www.mql5.com/en/users/register

It says . . . "4. Posting of advertising messages is forbidden. "

 

RaptorUK, you know we do provide services for free to clients, mt4gui is free product since years, ppl are asking for updates and i update, do you still consider them as ads please?

 
fx1.net:

RaptorUK, you know we do provide services for free to clients, mt4gui is free product since years, ppl are asking for updates and i update, do you still consider them as ads please?

Yes,  I also consider your user ID to be an Advertisement,  but I can't change that.  Free or paid is irrelevant,  the purpose of your post is to promote,  that is an Advertisement.
Reason: