Refresh

필요한 모든 데이터를 업데이트합니다.

virtual bool  Refresh()

반환 값

추가 틱 처리가 필요하면 true, 그렇지 않으면 false.

참고

이를 통해 틱 처리의 필요성을 결정할 수 있습니다. 필요한 경우 모든 견적, 시계열 및 지표 데이터를 업데이트하고 true를 반환합니다.

Implementation

//+------------------------------------------------------------------+
//| 처리할 데이터 갱신                                   |
//| INPUT:  no.                                                      |
//| OUTPUT: 성공적이면 true, 그렇지 않으면 false.                     |
//| 비고: no.                                                      |
//+------------------------------------------------------------------+
bool CExpert::Refresh()
  {
   MqlDateTime time;
//--- 요율 갱신
   if(!m_symbol.RefreshRates()) return(false);
//--- 처리 필요성 확인
   TimeToStruct(m_symbol.Time(),time);
   if(m_period_flags!=WRONG_VALUE && m_period_flags!=0)
      if((m_period_flags & TimeframesFlags(time))==0) return(false);
   m_last_tick_time=time;
//--- 지표 갱신
   m_indicators.Refresh();
//--- ok
   return(true);
  }