Detected Country () : English
Account Information - codingforex.com

Welcome to CodingForex.Com!

Knowledge portal where you can learn how to create forex indicators and robot.

Click button below to choose level that suite you:

Account Information

Level Active [2017-11-10 11:01:41] - by hillzx
Featured Image

Metatrader has several functions to utilize account information that can be used, complete list and full explanation can be opened at the official link MQL here. These functions include:

 

Function

Action

AccountInfoDouble

Returns a value of double type of the corresponding account property

AccountInfoInteger

Returns a value of integer type (bool, int or long) of the corresponding account property

AccountInfoString

Returns a value string type corresponding account property

AccountBalance

Returns balance value of the current account

AccountCredit

Returns credit value of the current account

AccountCompany

Returns the brokerage company name where the current account was registered

AccountCurrency

Returns currency name of the current account

AccountEquity

Returns equity value of the current account

AccountFreeMargin

Returns free margin value of the current account

AccountFreeMarginCheck

Returns free margin that remains after the specified position has been opened at the current price on the current account

AccountFreeMarginMode

Calculation mode of free margin allowed to open orders on the current account

AccountLeverage

Returns leverage of the current account

AccountMargin

Returns margin value of the current account

AccountName

Returns the current account name

AccountNumber

Returns the current account number

AccountProfit

Returns profit value of the current account

AccountServer

Returns the connected server name

AccountStopoutLevel

Returns the value of the Stop Out level

AccountStopoutMode

Returns the calculation mode for the Stop Out level




The function marked yellow is a frequently used function, so you do not have to memorize all the formulas. Example of using the code:

 

// Lihat jumlah uang
Print("Uang anda : " + AccountBalance() );

// Lihat jumlah ekuiti
Print("Ekuitianda : " + AccountEquity() );

// Lihat nama akun
Print("Nama anda : " + AccountName() );

// Lihat nomor akun
Print("Nomor akun anda : " + AccountNumber() );

// Lihat jumlah profit
Print("Profit anda : " + AccountProfit() );


Good luck, do not forget to share and follow our official facebook and youtube, happy trading!



Previous Article

Featured Image

Data Type Conversion

Next Article

Featured Image

Strings




- Provided by HiLLzSoft Studio -