HistoryDealsTotal

내역에 포함된 거래 수를 반환합니다. HistoryDealsTotal() 호출 전에, 먼저 HistorySelect() 또는 HistorySelectByPosition() 함수를 사용하여 거래 및 주문 내역을 수신해야 합니다.

int  HistoryDealsTotal();

반환값

int 유형의 값.

참고

주문, 포지션을 혼동하지 마십시오. 각 거래는 주문 실행의 결과이고 각 포지션은 하나 이상의 거래의 요약 결과입니다.

예:

//+------------------------------------------------------------------+
//| 스크립트 프로그램 시작 함수                                          |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- 계정의 모든 기존 내역을 요청
   if(!HistorySelect(0TimeCurrent()))
     {
      Print("HistorySelect() failed. Error "GetLastError());
      return;
     }
 
//--- 리스트에서 거래 수를 가져와 저널에 표시합니다.
   int total=HistoryDealsTotal();
   Print("Number of historical deals on the account: "total);
   /*
  결과:
   Number of historical deals on the account339
   */
  }

참고 항목

HistorySelect(), HistoryDealGetTicket(), Deal Properties