Detect standard versus mini account?

 
Hello,

If a broker offers the same leverage on a standard or mini account, is it possible to detect in code if the account is standard or mini? Obviously, AccountLeverage() will not work in this case.

I am going to try doing some calculations using AccountFreeMarginCheck() but I'm wondering if there is something better.

Thanks,

-Christian
 
Obviously, AccountLeverage() will not work in this case.
What exactly the difference between mini and standard accounts if not AccountLeverage(), MarketInfo(Symbol(), MODE_LOTSIZE) and different symbol signature then?
 
Actually some brokers use different account number ranges for demo, mini and standard accounts.

You can ask your broker if they distinguish the accounts like that.
 
MarketInfo(Symbol(), MODE_LOTSIZE) was my missing component. Thank you very much!

This is what I had done:

	string cAccountType;
	
	double startMarginBal, endMarginBal, testLotSize, marginDiff, dollarsPerLot;
	testLotSize=0.01;
	startMarginBal=AccountFreeMargin();
	endMarginBal=AccountFreeMarginCheck(Symbol(),OP_BUY,testLotSize);
	
	marginDiff=startMarginBal-endMarginBal;
	
	dollarsPerLot=(marginDiff*AccountLeverage())/100;
	
	if(dollarsPerLot==10) cAccountType="STANDARD";
	if(dollarsPerLot==1) cAccountType="MINI";
	if(dollarsPerLot==0.01) cAccountType="SUPERMINI";
	
	return(cAccountType);



MarketInfo much easier. Thanks!

-Christian

Reason: