MQL4 Reference Account Information AccountNumber
Returns the current account number.
int AccountNumber();
Returned value
The current account number.
Example:
Print("Account number ", AccountNumber());