Account

From Boolean Trader
Jump to: navigation, search

Description

Account Function

The Account function provides crucial information like balance, equity, available margin and more. This function can be called directly from the BT menu.

Syntax



Inputs

eaid
The EA ID of your Expert Advisor.

Outputs

This function will return the following outputs in a 2 x 23 square:

LOGIN
Account number

TRADE_MODE
Account trade mode

LEVERAGE
Account leverage

LIMIT_ORDERS
Maximum allowed number of open positions and active pending orders (in total), if the value is 0 then the number is unlimited

MARGIN_SO_MODE
Mode for setting the minimal allowed margin

TRADE_ALLOWED
Allowed trade for the current account. It may return FALSE in the following cases:

  • There is no connection to the trade server
  • Trading account switched to read-only mode (sent to the archive)
  • Trading on the account is disabled at the trade server side
  • Connection to a trading account has been performed in investor mode

TRADE_EXPERT
Allowed trade for the current Expert Advisor. It may return FALSE in the following cases:

  • TRADE_ALLOWED is FALSE
  • The permissions to perform automated trading are unchecked (you can check these permissions in MT4 → Options → Expert Advisors → Allow automated trading)

BALANCE
Account balance in the deposit currency

CREDIT
Account credit in the deposit currency

PROFIT
Current profit of an account in the deposit currency

EQUITY
Account equity in the deposit currency

MARGIN
Account margin used in the deposit currency

MARGIN_FREE
Free margin of an account in the deposit currency

MARGIN_LEVEL
Account margin level in percents

MARGIN_SO_CALL
Margin call level. Depending on the set ACCOUNT_MARGIN_SO_MODE is expressed in percents or in the deposit currency

MARGIN_SO_SO
Margin stop out level. Depending on the set ACCOUNT_MARGIN_SO_MODE is expressed in percents or in the deposit currency

NAME
Client name

SERVER
Trade server name

CURRENCY
Account currency

COMPANY
Name of a company that serves the account

Example Calculations

eaid RESULT
"tester" It will return all the account information for the tester EA.