2赞

357评论

14收藏

MQL4 Reference MQL4命令手册(完整版)

 

评论|共 357 个

EA狙击手

发表于 2013-7-19 23:39:42 | 显示全部楼层

OrderExpiration
ERR_NO_ORDER_SELECTED (4105)
OrderLots
ERR_NO_ORDER_SELECTED (4105)
OrderMagicNumber
ERR_NO_ORDER_SELECTED (4105)
OrderOpenPrice
ERR_NO_ORDER_SELECTED (4105)
OrderOpenTime
ERR_NO_ORDER_SELECTED (4105)
OrderPrint
ERR_NO_ORDER_SELECTED (4105)
OrderProfit
ERR_NO_ORDER_SELECTED (4105)
OrderStopLoss
ERR_NO_ORDER_SELECTED (4105)
OrderSwap
ERR_NO_ORDER_SELECTED (4105)
OrderSymbol
ERR_NO_ORDER_SELECTED (4105)
OrderTakeProfit
ERR_NO_ORDER_SELECTED (4105)
OrderTicket
ERR_NO_ORDER_SELECTED (4105)
OrderType
ERR_NO_ORDER_SELECTED (4105)
PlaySound
ERR_WRONG_FILE_NAME (4101)
SendFTP
ERR_FUNC_NOT_ALLOWED_IN_TESTING (4059), ERR_CUSTOM_INDICATOR_ERROR (4055), ERR_STRING_PARAMETER_EXPECTED (4062)
SendMail
ERR_FUNC_NOT_ALLOWED_IN_TESTING (4059), ERR_STRING_PARAMETER_EXPECTED (4062), ERR_FUNCTION_NOT_CONFIRMED (4060), ERR_SEND_MAIL_ERROR (4061)
SetIndexArrow
ERR_INVALID_FUNCTION_PARAMVALUE (4051)
SetIndexBuffer
ERR_INVALID_FUNCTION_PARAMVALUE (4051), ERR_INCORRECT_SERIESARRAY_USING (4054), ERR_INCOMPATIBLE_ARRAYS (4056)
SetIndexDrawBegin
ERR_INVALID_FUNCTION_PARAMVALUE (4051)
SetIndexEmptyValue
ERR_INVALID_FUNCTION_PARAMVALUE (4051)
SetIndexLabel
ERR_INVALID_FUNCTION_PARAMVALUE (4051), ERR_STRING_PARAMETER_EXPECTED (4062)
SetIndexShift
ERR_INVALID_FUNCTION_PARAMVALUE (4051)
SetIndexStyle
ERR_INVALID_FUNCTION_PARAMVALUE (4051)
SetLevelValue
ERR_INVALID_FUNCTION_PARAMVALUE (4051)
Sleep
ERR_CUSTOM_INDICATOR_ERROR (4055)
StringFind
ERR_STRING_PARAMETER_EXPECTED (4062)
StringGetChar
ERR_STRING_PARAMETER_EXPECTED (4062), ERR_NOT_INITIALIZED_STRING (4008), ERR_ARRAY_INDEX_OUT_OF_RANGE (4002)
StringLen
ERR_STRING_PARAMETER_EXPECTED (4062)
StringSetChar
ERR_STRING_PARAMETER_EXPECTED (4062), ERR_INVALID_FUNCTION_PARAMVALUE (4051), ERR_NOT_INITIALIZED_STRING (4008), ERR_TOO_LONG_STRING (4011), ERR_ARRAY_INDEX_OUT_OF_RANGE (4002)
StringSubstr
ERR_STRING_PARAMETER_EXPECTED (4062), ERR_TOO_LONG_STRING (4011)
StringTrimLeft
ERR_STRING_PARAMETER_EXPECTED (4062)
StringTrimRight
ERR_STRING_PARAMETER_EXPECTED (4062)
WindowIsVisible
ERR_FUNC_NOT_ALLOWED_IN_TESTING (4059)
WindowFind
ERR_FUNC_NOT_ALLOWED_IN_TESTING (4059), ERR_STRING_PARAMETER_EXPECTED (4062), ERR_NOT_INITIALIZED_STRING (4008)
WindowHandle
ERR_FUNC_NOT_ALLOWED_IN_TESTING (4059), ERR_STRING_PARAMETER_EXPECTED (4062), ERR_NOT_INITIALIZED_STRING (4008)
WindowScreenShot
ERR_WRONG_FILE_NAME (4101), ERR_INVALID_FUNCTION_PARAMVALUE (4051)

EA狙击手

发表于 2013-7-19 23:39:55 | 显示全部楼层

其他函数在last_error 可变物价格值下不会改变。
AccountBalance, AccountCompany, AccountCredit, AccountCurrency, AccountEquity, AccountFreeMargin, AccountLeverage, AccountMargin, AccountName, AccountNumber, AccountProfit, AccountServer, Alert, CharToStr, Comment, Day, DayOfWeek, DayOfYear, DoubleToStr, GetTickCount, HideTestIndicators, Hour, IndicatorCounted, IsConnected, IsDemo, IsDllsAllowed, IsExpertEnabled, IsLibrariesAllowed, IsOptimization, IsStopped, IsTesting, IsTradeAllowed, IsTradeContextBusy, IsVisualMode, MathAbs, MathArctan, MathCeil, MathCos, MathExp, MathFloor, MathLog, MathMax, MathMin, MathPow, MathRand, MathRound, MathSin, MathSrand, MathTan, Minute, Month, NormalizeDouble, ObjectsDeleteAll, ObjectsTotal, OrderSelect, OrdersHistoryTotal, Period, Print, RefreshRates, Seconds, SetLevelStyle, StringConcatenate, StrToTime, StrToDouble, Symbol, TerminalCompany, TerminalName, TerminalPath, TimeCurrent, TimeDay, TimeDayOfWeek, TimeDayOfYear, TimeHour, TimeLocal, TimeMinute, TimeMonth, TimeSeconds, TimeToStr, TimeYear, UninitializeReason, WindowBarsPerChart, WindowFirstVisibleBar, WindowPriceOnDropped, WindowRedraw, WindowTimeOnDropped, WindowsTotal, WindowOnDropped, WindowXOnDropped, WindowYOnDropped, Year


EA狙击手

发表于 2013-7-19 23:40:16 | 显示全部楼层

Account information账户信息
激活账户信息的一组函数。
AccountBalance( )账户余额
double AccountBalance( )
返回账户余额(账户中相当数量的价格值金钱) .
示例:
Print("账户余额= ",AccountBalance());
AccountCredit( )账户信用点数
double AccountCredit( )
返回账户信用点数.
示例:
Print("账户点数 ", AccountCredit());
AccountCompany( )账户公司名
string AccountCompany( )
返回账户公司名。
示例:
Print("账户公司名", AccountCompany());

EA狙击手

发表于 2013-7-19 23:40:26 | 显示全部楼层

AccountCurrency( )基本货币
string AccountCurrency( )
返回账户所用的通货名称。
示例:
Print("账户基本货币", AccountCurrency());

EA狙击手

发表于 2013-7-19 23:40:36 | 显示全部楼层

AccountEquity( )账户资产净值
double AccountEquity( )
对于当前账户返回资产净值。资产净值取决于交易服务器的设置。
示例:
Print("账户净值 = ",AccountEquity());
AccountFreeMargin( )账户免费保证金
double AccountFreeMargin( )
返回当前帐户的免费保证金价格值。
示例:
Print("账户免费保证金 = ",AccountFreeMargin());

EA狙击手

发表于 2013-7-19 23:40:44 | 显示全部楼层

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;

EA狙击手

发表于 2013-7-19 23:40:53 | 显示全部楼层

AccountFreeMarginMode( )账户免费保证金模式
double AccountFreeMarginMode( )
在当前开仓位置的账户上计算免费保证金的模式。计算方式可能采取以下价格值:
0 - 浮动profit/loss 不使用
1 - 两个浮动赢利和损失在开仓位置上使用计算自由保证金;
2 - 只有赢利值被使用计算,不考虑当前开仓的亏损;
3 - 只有亏损值被使用计算, 不考虑当前开仓的亏损。
示例:
if(AccountFreeMarginMode()==0)
   Print("浮点盈利/亏损不使用。");

EA狙击手

发表于 2013-7-19 23:41:01 | 显示全部楼层

AccountLeverage( )账户杠杆
int AccountLeverage( )
返回当前账户杠杆比率。
示例:
Print("账户#",AccountNumber(), " 杠杆比率", AccountLeverage());

EA狙击手

发表于 2013-7-19 23:41:11 | 显示全部楼层

AccountMargin( )账户保证金
double AccountMargin( )
返回当前帐户的保证金。
示例:
Print("账户保证金 ", AccountMargin());
AccountName( )账户名称
string AccountName( )
返回当前帐户名称。
示例:
Print("账户名称", AccountName());
AccountNumber( )账户数字
int AccountNumber( )
返回当前帐户的数字。
示例:
Print("账户数字", AccountNumber());

EA狙击手

发表于 2013-7-19 23:41:21 | 显示全部楼层

AccountProfit( )账户利润
double AccountProfit( )
返回账户利润。
示例:
Print("账户利润", AccountProfit());

您需要登录后才可以回帖 登录 | 注册 微信登录

EA之家评论守则