Download MetaTrader 5

Maybe GetData() should return int?

To add comments, please log in or register
Loong
1303
Loong  

Because CopyBuffer() return int.

But I don't know how to deal  the checking.

Indicator.mqh 

bool CIndicator::GetData(int start_pos,int count,int buffer_num,double& buffer[])
bool CIndicator::GetData(datetime start_time,int count,int buffer_num,double& buffer[])

bool CIndicator::GetData(datetime start_time,datetime stop_time,int buffer_num,double& buffer[])
  {
//--- checking
   if(m_handle<0)                return(false);
   if(buffer_num>=m_num_buffers) return(false);
//---
   return(CopyBuffer(m_handle,buffer_num,start_time,stop_time,buffer));
  }
Ilyas
1204
Ilyas  

Thanks you for the message, we will correct

To add comments, please log in or register