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 레벨은 통화 용어로 지정됩니다");
}
}
|