How can an Expert Advisor programatically determine if the account is "standard", "mini", or "micro"?

 

This info would help calculate the value of a pip as follows:

For a standard account, 1 standard lot = 100,000 trade size and pip value is .0001 X 100,000 = 10 US Dollar.

For a mini account, 1 mini lot = 10,000 trade size and pip value is .0001 X 10,000 = 1 US Dollar.

For a micro account, 1 micro lot = 1,000 trade size and pip value is .0001 X 1,000 = .10 US Dollar.

Thanks in advance. May

 

Check out MarketInfo

Look for the MODE_MINLOT option

Returns 0.01 for a micro, 0.1 for a mini, 1.0 for a standard

I guess a nano would be 0.001?

-BB-

 

You also need to look at MarketInfo(Symbol(), MODE_LOTSIZE).

MIN_LOT gives the smallest fraction of that for which you can open a position

Reason: