Account information

We get information about the current trading account. Description of trading account parameters.

Account

An object with the parameters of a trader's current trading account

Properties:

Account.AccountId int Unique account identifier
Account.TradePermission short

Flag whether trading on this account is allowed

0 - false
1 - true

Account.Leverage Int Amount of leverage
Account.MaxOrdersCount int Maximum number of orders for this account
Account.SumDeals double Total amount of funds for all transactions in account currency
Account.IsDemo short

Flag whether the account is demo

0 - false
1 - true

Account.Balance double Amount of incoming funds and profit on open positions in account currency
Account.Equity double Funds on the account (in account currency)
Account.FreeEquity double Free funds on the account (in account currency)
Account.Profit double Profit on all positions and deals (in account currency
Account.Margin double

Funds required to secure open positions.

In account currency.

Account.MinLot double Minimum lot volume

 

Example:

//----------------------------------------------
// record account information to a file
//----------------------------------------------
string line="";
line = "Account: " + DateTime.Now.ToString("dd.MM.yyyy HH:mm:ss:fff") + Environment.NewLine +
 " AcccountId = " + Account.AccountId.ToString() + Environment.NewLine +
 " TradePemisssion = " + Account.TradePermission.ToString() + Environment.NewLine +
 " Leverage = " + Account.Leverage.ToString() + Environment.NewLine +
 " MaxOrdersCount = " + Account.MaxOrdersCount.ToString() + Environment.NewLine +
 " SumDeals = " + Account.SumDeals.ToString() + Environment.NewLine +
 " IsDemo = " + Account.IsDemo.ToString() + Environment.NewLine +
 " Balance = " + Account.Balance.ToString() + Environment.NewLine +
 " Equity = " + Account.Equity.ToString() + Environment.NewLine +
 " FreeEquity = " + Account.FreeEquity.ToString() + Environment.NewLine +
 " Profit = " + Account.Profit.ToString() + Environment.NewLine +
 " Margin = " + Account.Margin.ToString() + Environment.NewLine +
 " MinLot = " + Account.MinLot.ToString() + Environment.NewLine;
 
 using (StreamWriter sw = new StreamWriter(mOnStartLog, true))
 sw.WriteLine(line);