MQL4Reference(MQL4参考)1MQL4Reference(MQL4参考)MQL4Reference(MQL4参考)121、Basics(基本原则)121-1、Syntax(语法)121-1-1、Comments(注释)131-1-2、Identifiers(标示符)131-1-3、Reservedwords(保留字)131-2、Datatypes(数据类型)141-2-1、Typecasting(类型扔)141-2-2、Integerconstants(整数)141-2-3、Literalconstants(文字)151-2-4、Booleanconstants(布尔)151-2-5、Floating-pointnumberconstants(double)(浮点number)151-2-6、Stringconstants(排成)161-2-7、Colorconstants(颜色)161-2-8、Datetimeconstants(注明日期)161-3、Operations&Expressions(操作&表达)171-3-1、Expressions(表达式)171-3-2、Arithmeticaloperations(算术操作符)171-3-3、Assignmentoperation(分配操作符)181-3-4、Operationsofrelation(关系操作符)181-3-5、Booleanoperations(布尔操作符)181-3-6、Bitwiseoperations()191-3-7、Otheroperations(其他操作)191-3-8、Precedencerules(优先规则)201-4、Operators(操作员)211-4-1、Compoundoperator(复合操作)211-4-2、Expressionoperator(表达式操作)211-4-3、Breakoperator(打破操作)221-4-4、Continueoperator(继续操作)221-4-5、Returnoperator(返回操作)221-4-6、Conditionaloperatorif-else(条件操作如果--否则)231-4-7、Switchoperator(开关操作)241-4-8、Cycleoperatorwhile(周期操作当时)241-4-9、Cycleoperatorfor(周期操作对于)251-5、Functions(函数)251-5-1、Functioncall(函数之间的联系)261-5-2、Specialfunctions(特殊函数)271-6、Variables(变量)27双精度数字-带有浮点双精度数字。271-6-1、Localvariables(局部变量)281-6-2、Formalparameters(正式参数)28MQL4Reference(MQL4参考)2MQL4Reference(MQL4参考)1-6-3、Staticvariables(静态变量)291-6-4、Globalvariables(全局变量)291-6-5、Definingexternvariables(定义extern变量)301-6-6、Initializationofvariables(初始化变量)301-6-7、Externalfunctionsdefinition(外部函数(功能)定义)301-7、Preprocessor(预处理)311-7-1、Constantdeclaration(宣告)311-7-2、Controllingcompilation(控制编辑)311-7-3、Includingoffiles(包括文件)321-7-4、Importingoffunctions(输入功能)332、Standardconstants(标准)342-1、Seriesarrays342-2、Timeframes342-3、Tradeoperations352-4、Priceconstants352-5、MarketInfo352-6、Drawingstyles362-7、Arrowcodes372-8、Wingdings382-9、Webcolors382-10、Indicatorlines392-11、IchimokuKinkoHyo402-12、MovingAveragemethods402-13、MessageBox402-14、Objecttypes422-15、Objectproperties432-16、Objectvisibility442-17、Uninitializereasoncodes442-18、Specialconstants452-19、Errorcodes453、Predefinedvariables483-1、Ask483-2、Bars493-3、Bid49MQL4Reference(MQL4参考)3MQL4Reference(MQL4参考)3-4、Close493-5、Digits503-6、High503-7、Low513-8、Open513-9、Point523-10、Time523-11、Volume534、ProgramRun544-1、ProgramRun544-2、Importedfunctionscall544-3、Runtimeerrors555、Accountinformation645-1、AccountBalance645-2、AccountCredit645-3、AccountCompany645-4、AccountCurrency645-5、AccountEquity655-6、AccountFreeMargin655-7、AccountFreeMarginCheck655-8、AccountFreeMarginMode655-9、AccountLeverage665-10、AccountMargin665-11、AccountName665-12、AccountNumber665-13、AccountProfit665-14、AccountServer665-15、AccountStopoutLevel675-16、AccountStopoutMode676、Arrayfunctions676-1、ArrayBsearch676-2、ArrayCopy68MQL4Reference(MQL4参考)4MQL4Reference(MQL4参考)6-3、ArrayCopyRates686-4、ArrayCopySeries696-5、ArrayDimension706-6、ArrayGetAsSeries706-7、ArrayInitialize716-8、ArrayIsSeries716-9、ArrayMaximum716-10、ArrayMinimum726-11、ArrayRange726-12、ArrayResize726-13、ArraySetAsSeries726-14、ArraySize736-15、ArraySort737、Checkup747-1、GetLastError747-2、IsConnected747-3、IsDemo747-4、IsDllsAllowed757-5、IsExpertEnabled757-6、IsLibrariesAllowed757-7、IsOptimization767-8、IsStopped767-9、IsTesting767-10、IsTradeAllowed767-11、IsTradeContextBusy777-12、IsVisualMode777-13、UninitializeReason778、Clientterminal778-1、TerminalCompany788-2、TerminalName788-3、TerminalPath789、Commonfunctions78MQL4Reference(MQL4参考)5MQL4Reference(MQL4参考)9-1、Alert789-2、Comment799-3、GetTickCount799-4、MarketInfo799-5、MessageBox809-6、PlaySound809-7、Print809-8、SendFTP819-9、SendMail819-10、Sleep8110、Conversionfunctions8210-1、CharToStr8210-2、DoubleToStr8210-3、NormalizeDouble8210-4、StrToDouble8310-5、StrToInteger8310-6、StrToTime8310-7、TimeToStr8311、Customindicators8411-1、IndicatorBuffers8411-2、IndicatorCounted8511-3、IndicatorDigits8511-4、IndicatorShortName8611-5、SetIndexArrow8711-6、SetIndexBuffer8711-7、SetIndexDrawBegin8811-8、SetIndexEmptyValue8811-9、SetIndexLabel8911-10、SetIndexShift9011-11、SetIndexStyle9111-12、SetLevelStyle9111-13、SetLevelValue92MQL4Reference(MQL4参考)6MQL4Reference(MQL4参考)12、Date&Timefunctions9212-1、Day9212-2、DayOfWeek9212-3、DayOfYear9212-4、Hour9312-5、Minute9312-6、Month9312-7、Seconds9312-8、TimeCurrent9312-9、TimeDay9412-10、TimeDayOfWeek9412-11、TimeDayOfYear9412-12、TimeHour9412-13、TimeLocal9512-14、TimeMinute9512-15、TimeMonth9512-16、TimeSeconds9512-17、TimeYear9512-18、Year9613、Filefunctions9613-1、FileClose9613-2、FileDelete9613-3、FileFlush9713-4、FileIsEnding9713-5、FileIsLineEnding9813-6、FileOpen9813-7、FileOpenHistory9913-8、FileReadArray9913-9、FileReadDouble10013-10、FileReadInteger10013-11、FileReadNumber10013-12、FileReadString101MQL4Reference(MQL4参考)7MQL4Reference(MQL4参考)13-13、FileSeek10113-14、FileSize10213-15、FileTell10213-16、FileWrite10313-17、FileWriteArray10313-18、FileWriteDouble10413-19、FileWriteInteger10413-20、FileWriteString10514、Globalvariables10514-1、GlobalVariableCheck10614-2、GlobalVariableDel10614-3、GlobalVariableGet10614-4、GlobalVariableName10614-5、GlobalVariableSet10714-6、GlobalVariableSetOnCondition10714-7、GlobalVariablesDeleteAll10814-8、GlobalVariabl