|
目录 MQL4 Reference. 1 MQL4命令手册... 1 Basics基础... 11 Syntax语法... 11 Comments注释... 11 Identifiers标识符... 11 Reserved words保留字... 11 Data types数据类型... 12 Type casting类型转换... 12 Integer constants整数常量... 13 Literal constants字面常量... 13 Boolean constants布尔常量... 14 Floating-point number constants (double)浮点数常量(双精度) 14 String constants字符串常量... 14 Color constants颜色常数... 14 Datetime constants日期时间常数... 15 Operations & Expressions操作表达式... 15 Expressions表达式... 16 Arithmetical operations算术运算... 16 Assignment operation赋值操作... 16 Operations of relation操作关系... 17 Boolean operations布尔运算... 17 Bitwise operations位运算... 17 Other operations其他运算... 18 Precedence rules优先规则... 18 Operators操作符... 19 Compound operator复合操作符... 20 Expression operator表达式操作符... 20 Break operator终止操作符... 20 Continue operator继续操作符... 20 Return operator返回操作符... 21 Conditional operator if-else条件操作符... 21 Switch operator跳转操作符... 22 Cycle operator while循环操作符while. 23 Cycle operator for循环操作符for. 23 Functions函数... 24 Function call函数调用... 24 Special functions特殊函数... 25 Variables变量... 25 Local variables局部变量... 26 Formal parameters形式变量... 26 Static variables静态变量... 27 Global variables全局变量... 28 Defining extern variables外部定义变量... 28 Initialization of variables初始化变量... 28 External functions definition外部函数的定义... 29 Preprocessor预处理... 29 Constant declaration常量声明... 30 Controlling compilation编译控制... 30 Including of files包含文件... 31 Importing of functions导入功能... 31 Standard constants标准常数... 33 Series arrays系列数组... 33 Timeframes图表周期时间... 33 Trade operations交易操作... 34 Price constants价格常数... 34 MarketInfo市场信息识别符... 34 Drawing styles画线风格... 35 Arrow codes预定义箭头... 36 Wingdings宋体... 37 Web colors颜色常数... 38 Indicator lines指标线... 39 Ichimoku Kinko Hyo. 39 Moving Average methods移动平均方法... 39 MessageBox信息箱... 40 Object types对象类型... 41 Object properties对象属性... 42 Object visibility. 43 Uninitialize reason codes撤销初始化原因代码... 44 Special constants特别常数... 44 Error codes错误代码... 44 Predefined variables预定义变量... 48 Ask最新卖价... 48 Bars柱数... 48 Bid最新买价... 48 Close[]收盘价... 49 Digits汇率小数位... 49 High[]最高价... 49 Low[]最低价... 50 Open[]开盘价... 51 Point点值... 51 Time[]开盘时间... 51 Volume[]成交量... 52 Program Run程序运行... 54 Program Run程序运行... 54 Imported functions call输入函数调用... 55 Runtime errors运行错误... 55 Account information账户信息... 66 AccountBalance( )账户余额... 66 AccountCredit( )账户信用点数... 66 AccountCompany( )账户公司名... 66 AccountCurrency( )基本货币... 66 AccountEquity( )账户资产净值... 66 AccountFreeMargin( )账户免费保证金... 67 AccountFreeMarginCheck()账户当前价格自由保证金... 67 AccountFreeMarginMode( )账户免费保证金模式... 67 AccountLeverage( )账户杠杆... 67 AccountMargin( )账户保证金... 68 AccountName( )账户名称... 68 AccountNumber( )账户数字... 68 AccountProfit( )账户利润... 68 AccountServer( )账户连接服务器... 68 AccountStopoutLevel( )账户停止水平值... 68 AccountStopoutMode( )账户停止返回模式... 69 Array functions数组函数... 70 ArrayBsearch()数组搜索... 70 ArrayCopy()数组复制... 70 ArrayCopyRates()数组复制走势... 71 ArrayCopySeries()数组复制系列走势... 72 ArrayDimension()返回数组维数... 73 ArrayGetAsSeries()返回数组序列... 73 ArrayInitialize()数组初始化... 73 ArrayIsSeries()判断数组连续... 73 ArrayMaximum()数组最大值定位... 74 ArrayMinimum()数组最小值定位... 74 ArrayRange()返回数组指定维数数量... 74 ArrayResize()改变数组维数... 75 ArraySetAsSeries()设定系列数组... 75 ArraySize()返回数组项目数... 75 ArraySort()数组排序... 76 Checkup检查... 77 GetLastError( )返回最后错误... 77 IsConnected( )返回联机状态... 77 IsDemo( )返回模拟账户... 77 IsDllsAllowed( )返回dll允许调用... 78 IsExpertEnabled( )返回智能交易开启状态... 78 IsLibrariesAllowed( )返回数据库函数调用... 78 IsOptimization( )返回策略测试中优化模式... 79 IsStopped( )返回终止业务... 79 IsTesting( )返回测试模式状态... 79 IsTradeAllowed( )返回允许智能交易... 79 IsTradeContextBusy( )返回其他智能交易忙... 79 IsVisualMode( )返回智能交易“图片模式”... 80 UninitializeReason( )返回智能交易初始化原因... 80 Client terminal客户端信息... 81 TerminalCompany( )返回客户端所属公司... 81 TerminalName( )返回客户端名称... 81 TerminalPath( )返回客户端文件路径... 81 Common functions常规命令函数... 82 Alert弹出警告窗口... 82 Comment显示信息在走势图左上角... 82 GetTickCount获取时间标记... 82 MarketInfo在市场观察窗口返回不同数据保证金列表... 83 MessageBox创建信息窗口... 83 PlaySound播放声音... 83 Print窗口中显示文本... 84 SendFTP设置FTP. 84 SendMail设置Email 85 Sleep指定的时间间隔内暂停交易业务... 85 Conversion functions格式转换函数... 86 CharToStr字符转换成字符串... 86 DoubleToStr双精度浮点转换成字符串... 86 NormalizeDouble给出环绕浮点值的精确度... 86 StrToDouble字符串型转换成双精度浮点型... 87 StrToInteger字符串型转换成整型... 87 StrToTime字符串型转换成时间型... 87 TimeToStr时间类型转换为 "yyyy.mm.dd hh:mi"格式... 87 Custom indicators自定义指标... 89 IndicatorBuffers. 89 IndicatorCounted. 90 IndicatorDigits. 90 IndicatorShortName. 91 SetIndexArrow.. 92 SetIndexBuffer. 92 SetIndexDrawBegin. 93 SetIndexEmptyValue. 93 SetIndexLabel 94 SetIndexShift 95 SetIndexStyle. 96 SetLevelStyle. 96 SetLevelValue. 97 Date & Time functions日期时间函数... 98 Day. 98 DayOfWeek. 98 DayOfYear. 98 Hour. 98 Minute. 99 Month. 99 Seconds. 99 TimeCurrent 99 TimeDay. 99 TimeDayOfWeek. 100 TimeDayOfYear. 100 TimeHour. 100 TimeLocal 100 TimeMinute. 101 TimeMonth. 101 TimeSeconds. 101 TimeYear. 101 Year. 101 File functions文件函数... 103 FileClose关闭文件... 103 FileDelete删除文件... 103 FileFlush将缓存中的数据刷新到磁盘上去... 104 FileIsEnding文件结尾... 104 FileIsLineEnding. 104 FileOpen打开文件... 105 FileOpenHistory历史目录中打开文件... 105 FileReadArray将二进制文件读取到数组中... 106 FileReadDouble从文件中读取浮点型数据... 106 FileReadInteger从当前二进制文件读取整形型数据... 107 FileReadNumber. 107 FileReadString从当前文件位置读取字串符... 108 FileSeek文件指针移动... 108 FileSize文件大小... 109 FileTell文件指针的当前位置... 109 FileWrite写入文件... 109 FileWriteArray一个二进制文件写入数组... 110 FileWriteDouble一个二进制文件以浮动小数点写入双重值... 111 FileWriteInteger一个二进制文件写入整数值... 111 FileWriteString当前文件位置函数写入一个二进制文件字串符 112 Global variables全局变量... 113 GlobalVariableCheck. 113 GlobalVariableDel 113 GlobalVariableGet 113 GlobalVariableName. 114 GlobalVariableSet 114 GlobalVariableSetOnCondition. 114 GlobalVariablesDeleteAll 115 GlobalVariablesTotal 115 Math & Trig数学和三角函数... 117 MathAbs. 117 MathArccos. 117 MathArcsin. 117 MathArctan. 118 MathCeil 118 MathCos. 118 MathExp. 119 MathFloor. 119 MathLog. 119 MathMax. 120 MathMin. 120 MathMod. 120 MathPow.. 121 MathRand. 121 MathRound. 121 MathSin. 121 MathSqrt 122 MathSrand. 122 MathTan. 123 Object functions目标函数... 124 ObjectCreate建立目标... 124 ObjectDelete删除目标... 125 ObjectDescription目标描述... 125 ObjectFind查找目标... 125 ObjectGet目标属性... 126 ObjectGetFiboDescription斐波纳契描述... 126 ObjectGetShiftByValue. 126 ObjectGetValueByShift 127 ObjectMove移动目标... 127 ObjectName目标名... 127 ObjectsDeleteAll删除所有目标... 128 ObjectSet改变目标属性... 128 ObjectSetFiboDescription改变目标斐波纳契指标... 129 ObjectSetText改变目标说明... 129 ObjectsTotal返回目标总量... 129 ObjectType返回目标类型... 130 String functions字符串函数... 131 StringConcatenate字符串连接... 131 StringFind字符串搜索... 131 StringGetChar字符串指定位置代码... 131 StringLen字符串长度... 132 StringSetChar. 132 StringSubstr提取子字符串... 132 StringTrimLeft. 133 StringTrimRight. 133 Technical indicators技术指标... 134 iAC比尔.威廉斯的加速器或减速箱振荡器... 134 iAD离散指标... 134 iAlligator比尔・威廉斯的鳄鱼指标... 134 iADX移动定向索引... 135 iATR平均真实范围... 135 iAO比尔.威廉斯的振荡器... 136 iBearsPower熊功率指标... 136 iBands保力加通道技术指标... 136 iBandsOnArray保力加通道指标... 137 iBullsPower牛市指标... 137 iCCI商品通道索引指标... 137 iCCIOnArray商品通道索引指标... 138 iCustom指定的客户指标... 138 iDeMarker. 138 iEnvelopes包络指标... 139 iEnvelopesOnArray包络指标... 139 iForce强力索引指标... 139 iFractals分形索引指标... 140 iGator随机震荡指标... 140 iIchimoku. 141 iBWMFI比尔.威廉斯市场斐波纳契指标... 141 iMomentum动量索引指标... 141 iMomentumOnArray. 142 iMFI资金流量索引指标... 142 iMA移动平均指标... 142 iMAOnArray. 143 iOsMA移动振动平均震荡器指标... 143 iMACD移动平均数汇总/分离指标... 143 iOBV能量潮指标... 144 iSAR抛物线状止损和反转指标... 144 iRSI相对强弱索引指标... 144 iRSIOnArray. 145 iRVI相对活力索引指标... 145 iStdDev标准偏差指标... 145 iStdDevOnArray. 146 iStochastic随机震荡指标... 146 iWPR威廉指标... 147 Timeseries access时间序列图表数据... 148 iBars柱的数量... 148 iBarShift开始时间的柱... 148 iClose. 148 iHigh. 149 iHighest. 149 iLow.. 150 iLowest. 150 iOpen. 150 iTime. 151 iVolume. 151 Trading functions交易函数... 152 Execution errors. 152 OrderClose. 154 OrderCloseBy. 155 OrderClosePrice. 155 OrderCloseTime. 155 OrderComment. 156 OrderCommission. 156 OrderDelete. 156 OrderExpiration. 156 OrderLots. 157 OrderMagicNumber. 157 OrderModify. 157 OrderOpenPrice. 158 OrderOpenTime. 158 OrderPrint. 159 OrderProfit. 159 OrderSelect. 159 OrderSend. 160 OrdersHistoryTotal 161 OrderStopLoss. 161 OrdersTotal 161 OrderSwap. 162 OrderSymbol 162 OrderTakeProfit. 162 OrderTicket. 163 OrderType. 163 Window functions窗口函数... 164 HideTestIndicators隐藏指标... 164 Period使用周期... 164 RefreshRates刷新预定义变量和系列数组的数据... 164 Symbol当前货币对... 165 WindowBarsPerChart可见柱总数... 165 WindowExpertName智能交易系统名称... 166 WindowFind返回名称... 166 WindowFirstVisibleBar第一个可见柱... 166 WindowHandle. 166 WindowIsVisible图表在子窗口中可见... 167 WindowOnDropped. 167 WindowPriceMax. 167 WindowPriceMin. 168 WindowPriceOnDropped. 168 WindowRedraw.. 169 WindowScreenShot. 169 WindowTimeOnDropped. 170 WindowsTotal指标窗口数... 170 WindowXOnDropped. 170 WindowYOnDropped. 170 Obsolete functions过时的函数... 171 |
外汇电子书