AccountInfoInteger

해당 계정 속성의 값을 반환.

long  AccountInfoInteger(
   ENUM_ACCOUNT_INFO_INTEGER  property_id      // 속성의 식별자
   );

매개변수

property_id

[in] 속성 식별자. 값은 ENUM_ACCOUNT_INFO_INTEGER 값 중 하나일 수 있습니다.

값 반환

long 유형의 값.

주의

속성은 반드시 bool, int 또는 long 유형이어야 합니다.

예를 들어:

void OnStart()
  {
//--- AccountInfoInteger() 기능에서 사용할 수 있는 모든 정보 표시
   printf("ACCOUNT_LOGIN =  %d",AccountInfoInteger(ACCOUNT_LOGIN));
   printf("ACCOUNT_LEVERAGE =  %d",AccountInfoInteger(ACCOUNT_LEVERAGE));
   bool thisAccountTradeAllowed=AccountInfoInteger(ACCOUNT_TRADE_ALLOWED);
   bool EATradeAllowed=AccountInfoInteger(ACCOUNT_TRADE_EXPERT);
   ENUM_ACCOUNT_TRADE_MODE tradeMode=(ENUM_ACCOUNT_TRADE_MODE)AccountInfoInteger(ACCOUNT_TRADE_MODE);
   ENUM_ACCOUNT_STOPOUT_MODE stopOutMode=(ENUM_ACCOUNT_STOPOUT_MODE)AccountInfoInteger(ACCOUNT_MARGIN_SO_MODE);
 
//--- 거래 작업을 수행할 수 있는 가능성에 대한 정보 제공
   if(thisAccountTradeAllowed)
      print("이 계정에 대한 거래가 허용됨");
   else
      Print("이 계정에 대한 거래는 금지됨!");
 
//--- 엑스퍼트 어드바이저가 이 계정을 거래할 수 있는지 확인
   if(EATradeAllowed)
      Print("이 계정에는 엑스퍼트 어드바이저에 의한 거래가 허용됨");
   else
      Print("이 계정에는 엑스퍼트 어드바이저 거래가 금지됨");
 
//--- 계정 유형 확인
   switch(tradeMode)
     {
      case(ACCOUNT_TRADE_MODE_DEMO):
         Print("데모 계정임");
         break;
      case(ACCOUNT_TRADE_MODE_CONTEST):
         Print("경쟁 계정입니다");
         break;
      default:Print("실제 계정입니다!");
     }
 
//--- StopOut 레벨 설정 모드 확인
   switch(stopOutMode)
     {
      case(ACCOUNT_STOPOUT_MODE_PERCENT):
         Print("StopOut 레벨은 지정된 백분율입니다");
         break;
      default:Print("StopOut 레벨은 통화 용어로 지정됩니다");
     }
  }

추가 참조

계정 정보