Nagisa Unada:
I give you a sample program.
I give you a sample program.
Thanks for the reply - I took your code and tried to add a RectangleLabel using documentation from here: https://www.mql5.com/en/docs/standardlibrary/chart_object_classes/obj_controls/cchartobjectrectlabel
So adding the following:
#include <ChartObjects\ChartObjectsTxtControls.mqh> CChartObjectRectLabel rectlab; int OnInit() { //--- Panel create m_panel.Create(0, "TEST PANEL", 0, panelXX, panelYY, panelWidth, panelHeight); rectlab.Create(0,"rect",0,10,220,200,1); m_panel.Add(rectlab); //--- Run panel m_panel.Run(); return(0); }
The label is drawn independently but when compiling the 'Add' function I get this:

Documentation on MQL5: Standard Library / Graphic Objects / Control Objects / CChartObjectRectLabel
- www.mql5.com
Standard Library / Graphic Objects / Control Objects / CChartObjectRectLabel - Reference on algorithmic/automated trading language for MetaTrader 5

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello guys,
I have created a panel with several controls and labels on (code not shown but working) - for aesthetic reasons I wanted to add some separator lines at various places and I am trying to do this with a rectanglelabel purely for ease of being able to use x,y coord placement.
The 'Add' function call obviously is the wrong call for what I am trying to do which is to 'bind' the rectanglelabel to the panel.
Is anybody able to point me in the right direction to be able to do this please?