Libraries: CComment Class - page 2

 
Hello,

i use the  Free download of the 'CComment Class' library by 'avoitenko' for MetaTrader 5 in the MQL5 Code Base, 2015.10.12 to display in a easy way some infos.

I have two problems with it.

1) The Panel is not in the very first front of the chart, some lines lay above - why it is so and is there a way to change it in a way to have the comment panel everytime in front?



2) As you can see in my sample code, some text should have different colors, but the fontcolor is always the same and i dont know what i do wrong?
//For Commentsettings
#define COLOR_BACK      clrBlack
#define COLOR_BORDER    clrDimGray
#define COLOR_CAPTION   clrDodgerBlue
#define COLOR_TEXT      clrRed
#define COLOR_WIN       clrLimeGreen
#define COLOR_LOSS      clrOrangeRed

//OnInit() i do
 //panel Setting
   int y=30;
   if(ChartGetInteger(0,CHART_SHOW_ONE_CLICK))
      y=120;
   //--- panel name
   srand(GetTickCount());
   string name="panel_"+IntegerToString(rand());
   comment.Create(name,20,y);
   //--- panel style
   comment.SetAutoColors(InpAutoColors);
   comment.SetColor(clrBlue,clrYellow,255);
   comment.SetFont("Lucida Console",13,false,1.7);
   //---
   //comment.SetText(0,StringFormat("Expert: %s v.%s","MYNAME","My_version"),COLOR_CAPTION);
   comment.SetText(0,"ANALYZER - Report (max poss. profit/loss)",COLOR_CAPTION);
   comment.SetText(1,"wait for datas....",clrWhite);
     
   comment.SetText(21,"coming soon...",clrWhite);
   comment.SetText(22,"Profitfaktor: XY - Tendenz +/-",clrWhite);
   comment.SetText(23,"Qualität Entryignal: XY VS wie nah am Tief/Hoch/Wendepunkt",clrWhite);
   comment.SetText(24,"Qualität Exitsignal: XY VS max-possible",clrWhite);
   comment.SetText(25,"Sonstiges: Formationen, Candles, Unterstützungslinien, Pivotpunkte...",clrWhite);
   comment.Show();


//ontick i do for example this to change/update line 17
string test1="my content";
comment_class_update(17,test1+" Text...",COLOR_TEXT);

//The text will updated but not in the given color - in this case it should be red ...



Arpit T #:
m_name=NULL;       m_font_name="Lucida Console";       m_font_size=14;       m_font_bold=false;       m_font_interval=1.7;       m_border_color=clrNONE;       m_back_color=clrBlack;       m_back_alpha=255; // look at this       m_graph_mode=true;       m_auto_colors=false;       m_chart_back_color=(color)ChartGetInteger(0,CHART_COLOR_BACKGROUND); // look at this       m_auto_back_color=clrBlack;       m_auto_border_color=clrNONE;       //---       ChartSetInteger(0,CHART_EVENT_MOUSE_MOVE,true);

Hi,

this is my part, seem ok?

void  CComment(void)
     {
      m_name=NULL;
      m_font_name="Lucida Console";
      m_font_size=14;
      m_font_bold=false;
      m_font_interval=1.7;
      m_border_color=clrAzure;
      m_back_color=clrBlack;
      m_back_alpha=255;
      m_graph_mode=true;
      m_auto_colors=false;
      m_chart_back_color=(color)ChartGetInteger(0,CHART_COLOR_BACKGROUND);
      m_auto_back_color=clrLightYellow;
      m_auto_border_color=clrYellow;
      //---
      ChartSetInteger(0,CHART_EVENT_MOUSE_MOVE,true);
      
      
      
     };

The author dosn not support this class any longer, that the reason why i use the forum. May there is a kind a some class i can use, but i cannot find any one...?

[Deleted]  

Analyse the class functions like 

  void  CComment(void)
     {
      m_name=NULL;
      m_font_name="Lucida Console";
      m_font_size=14;
      m_font_bold=false;
      m_font_interval=1.7;
      m_border_color=clrNONE;
      m_back_color=clrBlack;
      m_back_alpha=255; // look at this
      m_graph_mode=true;
      m_auto_colors=false;
      m_chart_back_color=(color)ChartGetInteger(0,CHART_COLOR_BACKGROUND); // look at this
      m_auto_back_color=clrBlack;
      m_auto_border_color=clrNONE;
      //---
      ChartSetInteger(0,CHART_EVENT_MOUSE_MOVE,true);
     };

If you post that issue in "Comment Class" codebase page then it would get author attention and you may get more better answers.



ReLor2 #:

Hi,

this is my part, seem ok?

The author dosn not support this class any longer, that the reason why i use the forum. May there is a kind a some class i can use, but i cannot find any one...?

please read this article, its much better than CComment class.

https://www.mql5.com/en/articles/13179

Making a dashboard to display data in indicators and EAs
Making a dashboard to display data in indicators and EAs
  • www.mql5.com
In this article, we will create a dashboard class to be used in indicators and EAs. This is an introductory article in a small series of articles with templates for including and using standard indicators in Expert Advisors. I will start by creating a panel similar to the MetaTrader 5 data window.
 
Excelent and very light. Thank you!