Download MetaTrader 5

How do i make a gray square on my chart using ChartObjects Classes via my own Mqh.

To add comments, please log in or register
MeatandPotatoes
4
MeatandPotatoes  

I can make objects on my chart but only calling then from the mq5 file

I want to make a file called Panel_Layout.mqh Positioning all my Panels then call it from my mq5 file.

#include <Beans\PanelLayout.mqh>

PanelLayout Frank;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- create timer
   Frank();
   
   ChartRedraw();
   //---
   return(0);
  }

my mqh file

#include <ChartObjects\ChartObjectExtControls.mqh>
CChartObjectProgressBar Ole;

class PanelLayout
{
public:
 PanelLayout();
 ~PanelLayout();
 
private:
void Draw_Panel();

};



void PanelLayout::Draw_Panel()
{
   Ole.Create(0, "progressBar1", 0, 10, 10, 200, 40);
   Ole.SetColor(YellowGreen);
   Ole.SetMin(0);
   Ole.SetMax(100);
   Ole.SetValue(5);

}
To add comments, please log in or register