Refresh() with GetData() and CopyBuffer()

 

According to https://www.mql5.com/en/docs/standardlibrary/technicalindicators/cindicators/cindicator/cindicatorrefresh, it is recommended to always call Refresh() when retrieving data with GetData(). However, looking at the standard lib code (e.g., ExpertBase.mqh),it does not follow this pattern:

//+------------------------------------------------------------------+
//| Access to data of the Open timeseries.                           |
//+------------------------------------------------------------------+
double CExpertBase::Open(int ind) const
  {
//--- check pointer
   if(m_open==NULL)
      return(EMPTY_VALUE);
//--- return the result
   return(m_open.GetData(ind));
  }


First Question:  Does this mean, that I should I call m_open.Refresh() before calling signal.Open(0), e.g.:

// correct way?
m_open.Refresh();
signal.Open(0)


Second Question:  Am I right in saying that using CopyBuffer() eliminates the need to call Refresh()? If so, would the CopyBuffer() method be faster than the GetData() method?