您的位置 首页 外汇EA指标

(十二)Account information 账户信息

  Account information  账户信息   激活账户信息的一组函数。 AccountBalance( ) 账户余额 double AccountBalan…

 

Account information  账户信息
 
激活账户信息的一组函数。
AccountBalance( ) 账户余额
double AccountBalance( )
返回账户余额(账户中相当数量的价格值金钱) .
示例:
Print(“账户余额= “,AccountBalance());
AccountCredit( ) 账户信用点数
double AccountCredit( )
返回账户信用点数.
示例:
Print(“账户点数 “, AccountCredit());
AccountCompany( ) 账户公司名
string AccountCompany( )
返回账户公司名。
示例:
Print(“账户公司名”, AccountCompany());
AccountCurrency( ) 基本 货币
string AccountCurrency( )
返回账户所用的通货名称。
示例:
Print(“账户基本货币”, AccountCurrency());
AccountEquity( ) 账户 资产净值
double AccountEquity( )
对于当前账户返回资产净值。资产净值取决于交易服务器的设置。
示例:
Print(“账户净值 = “,AccountEquity());
AccountFreeMargin( ) 账户免费保证金
double AccountFreeMargin( )
返回当前帐户的免费保证金价格值。
示例:
Print(“账户免费保证金 = “,AccountFreeMargin());
AccountFreeMarginCheck() 账户当前价格自由保证金
double AccountFreeMarginCheck( string symbol, int cmd, double volume)
当前账户的当前价格上在指定开仓的仓位返回自由保证金。 如果免费保证金不够, 将会生成
错误 134(ERR_NOT_ENOUGH_MONEY) 。
参量:
symbol – 交易业务货币对。
cmd – 交易类型。可能是 OP_BUY 或者 OP_SELL。
volume – 份额数。
示例:
if(AccountFreeMarginCheck(Symbol(),OP_BUY,Lots)<=0 || GetLastError()==134) return;
AccountFreeMarginMode( ) 账户免费保证金模式
double AccountFreeMarginMode( )
在当前开仓位置的账户上计算免费保证金的模式。计算方式可能采取以下价格值:
0 – 浮动 profit/loss 不使用
1 – 两个浮动赢利和损失在开仓位置上使用计算自由保证金;
2 – 只有赢利值被使用计算,不考虑当前开仓的亏损;
3 – 只有亏损值被使用计算, 不考虑当前开仓的亏损。
示例:
if(AccountFreeMarginMode()==0)
Print(“浮点盈利/亏损不使用。”);
AccountLeverage( ) 账户杠杆
int AccountLeverage( )
返回当前账户杠杆比率。
示例:
Print(“账户#”,AccountNumber(), ” 杠杆比率”, AccountLeverage());
AccountMargin( ) 账户保证金
double AccountMargin( )
70
返回当前帐户的保证金。
示例:
Print(“账户保证金 “, AccountMargin());
AccountName( ) 账户名称
string AccountName( )
返回当前帐户名称。
示例:
Print(“账户名称”, AccountName());
AccountNumber( ) 账户数字
int AccountNumber( )
返回当前帐户的数字。
示例:
Print(“账户数字”, AccountNumber());
AccountProfit( ) 账户利润
double AccountProfit( )
返回账户利润。
示例:
Print(“账户利润”, AccountProfit());
AccountServer( ) 账户连接服务器
string AccountServer( )
返回连接服务器的名称。
示例:
Print(“服务器名称”, AccountServer());
AccountStopoutLevel( ) 账户停止水平值
int AccountStopoutLevel( )
返回停止水平值。
示例:
Print(“停止水平 = “, AccountStopoutLevel());
AccountStopoutMode( ) 账户停止返回模式
int AccountStopoutMode( )
对于停止水平返回的的运算方式。运算方式值如下:
0 – 计算保证金和净值之间的百分比;
1 – 比较自由保证金水平和绝对值。
示例:
int level=AccountStopoutLevel();
if(AccountStopoutMode()==0)
Print(“停止水平= “,水平, “%”);
else
Print(“停止水平= “, 水平, ” “, AccountCurrency());
Account information  账户信息
 
激活账户信息的一组函数。
AccountBalance( ) 账户余额
double AccountBalance( )
返回账户余额(账户中相当数量的价格值金钱) .
示例:
Print(“账户余额= “,AccountBalance());
AccountCredit( ) 账户信用点数
double AccountCredit( )
返回账户信用点数.
示例:
Print(“账户点数 “, AccountCredit());
AccountCompany( ) 账户公司名
string AccountCompany( )
返回账户公司名。
示例:
Print(“账户公司名”, AccountCompany());
AccountCurrency( ) 基本 货币
string AccountCurrency( )
返回账户所用的通货名称。
示例:
Print(“账户基本货币”, AccountCurrency());
AccountEquity( ) 账户 资产净值
double AccountEquity( )
对于当前账户返回资产净值。资产净值取决于交易服务器的设置。
示例:
Print(“账户净值 = “,AccountEquity());
AccountFreeMargin( ) 账户免费保证金
double AccountFreeMargin( )
返回当前帐户的免费保证金价格值。
示例:
Print(“账户免费保证金 = “,AccountFreeMargin());
AccountFreeMarginCheck() 账户当前价格自由保证金
double AccountFreeMarginCheck( string symbol, int cmd, double volume)
当前账户的当前价格上在指定开仓的仓位返回自由保证金。 如果免费保证金不够, 将会生成
错误 134(ERR_NOT_ENOUGH_MONEY) 。
参量:
symbol – 交易业务货币对。
cmd – 交易类型。可能是 OP_BUY 或者 OP_SELL。
volume – 份额数。
示例:
if(AccountFreeMarginCheck(Symbol(),OP_BUY,Lots)<=0 || GetLastError()==134) return;
AccountFreeMarginMode( ) 账户免费保证金模式
double AccountFreeMarginMode( )
在当前开仓位置的账户上计算免费保证金的模式。计算方式可能采取以下价格值:
0 – 浮动 profit/loss 不使用
1 – 两个浮动赢利和损失在开仓位置上使用计算自由保证金;
2 – 只有赢利值被使用计算,不考虑当前开仓的亏损;
3 – 只有亏损值被使用计算, 不考虑当前开仓的亏损。
示例:
if(AccountFreeMarginMode()==0)
Print(“浮点盈利/亏损不使用。”);
AccountLeverage( ) 账户杠杆
int AccountLeverage( )
返回当前账户杠杆比率。
示例:
Print(“账户#”,AccountNumber(), ” 杠杆比率”, AccountLeverage());
AccountMargin( ) 账户保证金
double AccountMargin( )
70
返回当前帐户的保证金。
示例:
Print(“账户保证金 “, AccountMargin());
AccountName( ) 账户名称
string AccountName( )
返回当前帐户名称。
示例:
Print(“账户名称”, AccountName());
AccountNumber( ) 账户数字
int AccountNumber( )
返回当前帐户的数字。
示例:
Print(“账户数字”, AccountNumber());
AccountProfit( ) 账户利润
double AccountProfit( )
返回账户利润。
示例:
Print(“账户利润”, AccountProfit());
AccountServer( ) 账户连接服务器
string AccountServer( )
返回连接服务器的名称。
示例:
Print(“服务器名称”, AccountServer());
AccountStopoutLevel( ) 账户停止水平值
int AccountStopoutLevel( )
返回停止水平值。
示例:
Print(“停止水平 = “, AccountStopoutLevel());
AccountStopoutMode( ) 账户停止返回模式
int AccountStopoutMode( )
对于停止水平返回的的运算方式。运算方式值如下:
0 – 计算保证金和净值之间的百分比;
1 – 比较自由保证金水平和绝对值。
示例:
int level=AccountStopoutLevel();
if(AccountStopoutMode()==0)
Print(“停止水平= “,水平, “%”);
else
Print(“停止水平= “, 水平, ” “, AccountCurrency());
本文来自网络,不代表迈投财经立场,转载请注明出处:https://www.myfxtop.cn/ea/797.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: myfxtop@hotmail.com

9:30 - 18:00/Mon-Fri
返回顶部