Bug in ChartObject.mqh, no Hidden function in MQL5, NO bug in MQL4

 

the ChartObject.mqh of mql4 has a Hidden function for hiding the object and the code like MY_OBJECT.Hidden(true); compiles fine

here is what ChartObject looks like in mql4

   bool              Selected(void) const;
   bool              Selected(const bool new_sel) const;
   bool              Selectable(void) const;
   bool              Selectable(const bool new_sel) const;
   bool              Hidden(void) const;
   bool              Hidden(const bool new_sel) const;
   string            Description(void) const;
   bool              Description(const string new_text) const;

in Mql5, the hidden function is missing and the code using this class and this hiden function does not even compile


   bool              Fill(void) const;
   bool              Fill(const bool new_fill) const;
   long              Z_Order(void) const;
   bool              Z_Order(const long value) const;
   bool              Selected(void) const;
   bool              Selected(const bool new_sel) const;
   bool              Selectable(void) const;
   bool              Selectable(const bool new_sel) const;
   string            Description(void) const;
   bool              Description(const string new_text) const;
'Hidden' - undeclared identifier        XXXXXX.mq5       
'true' - some operator expected XXXXX.mq5        
 

here is function for HIdden, from

CChartObject


//+------------------------------------------------------------------+
//| Get the "hidden" flag                                            |
//+------------------------------------------------------------------+
bool CChartObject::Hidden(void) const
  {
//--- check
   if(m_chart_id==-1)
      return(false);
//--- result
   return((bool)ObjectGetInteger(m_chart_id,m_name,OBJPROP_HIDDEN));
  }
//+------------------------------------------------------------------+
//| Set flag the "hidden" flag                                       |
//+------------------------------------------------------------------+
bool CChartObject::Hidden(const bool new_hidden) const
  {
//--- check
   if(m_chart_id==-1)
      return(false);
//--- result
   return(ObjectSetInteger(m_chart_id,m_name,OBJPROP_HIDDEN,new_hidden));
  }


Those 2 are missing in MQL5

 
Have you reported this library bug through the appropriate channels, or this forum is it? I'm still a bit confused about how MetaQuotes operate in these matters TBH...
 
Dima Diall #: Have you reported this library bug through the appropriate channels, or this forum is it? I'm still a bit confused about how MetaQuotes operate in these matters TBH...

Yes, several users have reported it on the forum over the years, but no changes have been made.

PS! My previous post was deleted because I elaborated. I will leave it up to you to infer what was left out this time.

 

Use Timeframes method!


 
Jose Roque Do Carmo Junior #: Use Timeframes method!

That has nothing to do with a Graphical Object's "hidden" property (i.e. OBJPROP_HIDDEN). That is something completely different and has to do with the visibility at different time-frames (i.e. OBJPROP_TIMEFRAMES).

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Properties
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Properties
  • www.mql5.com
Object Properties - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5