ebook img

MQL5 Language Reference PDF

2634 Pages·11.64 MB·
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview MQL5 Language Reference

MQL5 Language REFERENCE for the MetaTrader 5 client terminal STUDY MQL5 and SOLVE any tasks: • Create your own technical analysis indicators of any complexity • Use autotrading - automate trading systems to work on various financial markets • Develop your own analytical tools based on mathematical achievements and traditional methods • Write information trading systems for solving a wide range of tasks (trading, monitoring, alerting, etc.) 2 Content Content MQL5 Reference 38 1 Language Basic.s................................................................................................ 39 Syntax ............................................................................................................................40 Comments......................................................................................................................... 41 Identifiers......................................................................................................................... 42 Reserved .W..o..r.d.s.................................................................................................................. 43 Data Types ............................................................................................................................45 Integer Ty.p..e..s.................................................................................................................... 46 Char, Short, I.n..t. .a.n..d. .L..o.n..g. .T.y..p.e..s......................................................................................... 47 Character Co.n..s.t.a..n.t.s....................................................................................................... 50 Datetime Typ.e............................................................................................................... 53 Color Type ................................................................................................................ 54 Bool Type ................................................................................................................ 55 Enumerations................................................................................................................ 56 Real Types......................................................................................................................... 58 String Typ.e........................................................................................................................ 63 Structure.s. a..n.d.. .C..la..s.s.e..s......................................................................................................... 64 Dynamic A.r.r..a.y. .O..b..j.e.c..t.......................................................................................................... 75 Typecasti.n.g....................................................................................................................... 77 Void Type. a..n.d.. .N.U..L..L. .C..o.n.s..t.a..n.t................................................................................................. 83 Object Po.i.n.t.e..r.s.................................................................................................................. 84 Reference... .M..o.d..if..ie..r. .&.. a..n.d.. .K.e..y.w..o..r.d. .t.h..i.s.................................................................................... 85 Operations a.n..d.. E..x..p.r..e.s..s.i.o.n..s. .......................................................................................................87 Expression..s....................................................................................................................... 88 Arithmetic.a..l. O..p..e.r.a..t.i.o..n.s........................................................................................................ 89 Assignmen.t. .O..p..e.r.a..t.i.o.n..s......................................................................................................... 90 Operation.s. .o..f .R..e.l.a.t.i.o..n.......................................................................................................... 91 Boolean Op..e..r.a.t.i.o..n.s.............................................................................................................. 92 Bitwise Op..e.r.a..t.i.o.n..s.............................................................................................................. 94 Other Ope..r.a.t.i.o..n.s................................................................................................................ 97 Preceden.c..e. .R..u.l.e.s............................................................................................................... 101 Operators ............................................................................................................................103 Compoun.d. .O..p..e.r.a..t.o..r........................................................................................................... 105 Expressio..n. .O..p.e..r.a..t.o.r........................................................................................................... 106 Return O.p.e..r.a..t.o.r................................................................................................................ 107 Condition..a.l. O..p..e.r..a.t.o..r. .i.f.-.e.l.s.e.................................................................................................. 108 Condition..a.l. O..p..e.r..a.t.o..r. .?.:....................................................................................................... 109 Switch O.p.e..r.a.t..o.r................................................................................................................ 111 Loop Ope.r..a.t.o..r. .w..h.i.l.e........................................................................................................... 113 Loop Ope.r..a.t.o..r. .f.o..r............................................................................................................. 114 Loop Ope.r..a.t.o..r. .d.o.. .w..h.i.le........................................................................................................ 115 Break Op.e..r.a.t..o.r................................................................................................................. 116 Continue. .O..p.e..r.a.t..o.r............................................................................................................. 117 Object C.r.e..a.t.e.. .O..p.e..r.a.t..o.r. .n..e.w................................................................................................. 118 Object D.e.l.e.t..e. .O..p..e.r.a..t.o.r.. d..e.l.e.t..e.............................................................................................. 119 Functions ............................................................................................................................120 Function. C..a..ll.................................................................................................................... 122 Passing P.a..r.a.m..e..t.e..r.s............................................................................................................ 123 Function. O..v..e.r..lo..a.d..in..g.......................................................................................................... 126 Descripti.o..n. .o.f. .E..x.t.e..r.n..a.l. F..u..n.c.t..io..n.s........................................................................................... 129 Exportin.g. .F.u..n.c..t.i.o.n..s........................................................................................................... 130 Event Ha.n.d..li.n..g. .F.u..n.c..t.i.o.n..s..................................................................................................... 131 Variables ............................................................................................................................139 © 2000-2011, MetaQuotes Software Corp. 3 Content Local Var.i.a..b.l.e.s.................................................................................................................. 142 Formal Pa..r.a.m..e..t.e..r.s............................................................................................................. 144 Static Va.r.i.a..b.l.e.s................................................................................................................. 146 Global Va.r.i.a.b..le..s................................................................................................................. 148 Input Va.r.ia..b.l.e.s.................................................................................................................. 149 Extern V.a.r.i.a..b.l.e.s................................................................................................................ 152 Initializa.t.i.o.n.. o..f. .V.a..r.i.a.b..le..s..................................................................................................... 153 Visibility .S.c..o.p..e. .a..n.d.. L..i.f.e.t.i.m..e.. o..f. .V.a..r.i.a.b..le..s.................................................................................. 155 Creating. a..n.d.. .D.e..le..t.i.n.g.. .O..b.j.e..c.t.s............................................................................................... 157 Preprocess.o..r. ........................................................................................................................160 Macro su.b.s..t.i.t.u.t..io..n. .(.#..d.e..f.in..e.)................................................................................................. 161 Program .P.r..o.p..e.r.t..i.e.s. .(.#.p..r.o..p.e..r.t.y..)............................................................................................ 163 Including. .F.i.le..s. .(.#.i.n..c.l.u.d..e.)...................................................................................................... 167 Importin.g. .F.u..n.c..t.i.o.n..s. . (.#..i.m..p.o..r.t.).............................................................................................. 168 Object-Orie..n..t.e.d.. .P.r..o.g..r.a..m..m..i.n.g.. ..................................................................................................170 Encapsul.a.t.i.o.n.. .a.n..d. .E.x..t.e..n.s.i.b..il.i.t.y. .o..f. T..y.p..e.s................................................................................... 172 Inheritan.c..e...................................................................................................................... 175 Polymorp.h.i.s.m..................................................................................................................... 178 Overload......................................................................................................................... 182 Virtual F.u.n.c..t.i.o.n..s............................................................................................................... 183 2 Standard Cons.t.a..n.t.s.,. .E.n..u..m..e.r..a.t.i.o.n..s. .a.n..d. .S..tr..u.c..t.u.r..e.s..................................................... 186 Chart Const.a..n..ts.. .....................................................................................................................187 Types of .C..h.a..r.t. .E.v..e.n..t.s......................................................................................................... 188 Chart Tim..e.f.r..a.m..e..s.............................................................................................................. 192 Chart Pr.o.p.e..r.t.i.e..s............................................................................................................... 194 Positioni.n.g. .C..o.n..s.t.a..n.t..s......................................................................................................... 198 Chart Re.p.r.e..s.e..n.t.a..t.i.o.n.......................................................................................................... 199 Objects Con..s..t.a.n..t.s. ..................................................................................................................201 Object T.y.p..e.s.................................................................................................................... 202 Object P.r.o.p..e.r..t.i.e.s.............................................................................................................. 204 Methods .o.f. .O..b..j.e.c..t. .B.i.n.d..i.n.g.................................................................................................... 209 Chart Co.r.n..e.r.................................................................................................................... 213 Visibility .o..f. O..b..j.e.c..t.s............................................................................................................ 215 Levels of. E..ll.i.o.t.t.. W...a.v..e.......................................................................................................... 218 Gann Obj.e..c.t.s.................................................................................................................... 219 Web Colo.r.s....................................................................................................................... 221 Wingding.s........................................................................................................................ 223 Indicator C.o.n..s.t.a..n..ts.. ................................................................................................................224 Price Con..s.t.a..n.t.s................................................................................................................. 225 Smoothin.g. .M..e..t.h.o..d.s............................................................................................................. 228 Indicator.s.. L..i.n.e..s................................................................................................................ 229 Drawing .S.t.y..le..s.................................................................................................................. 231 Custom I.n.d..ic..a.t..o.r.. P..r.o.p..e.r..t.i.e.s................................................................................................. 235 Indicator. .T..y.p..e.s................................................................................................................. 238 Data Typ.e. .I.d..e.n..t.i.f.ie..r.s.......................................................................................................... 240 Environmen..t. .S.t.a..te.. ..................................................................................................................241 Client Te.r.m..i.n.a..l .P.r..o.p..e.r.t..ie..s.................................................................................................... 242 Running M..Q..L..5. .P.r..o.g..r.a.m.. .P..r.o.p..e.r..t.i.e.s.......................................................................................... 244 Symbol Pr.o..p.e..r.t.i.e..s.............................................................................................................. 246 Account .P.r.o..p.e..r.t.i.e..s............................................................................................................ 253 Testing S.t.a..t.i.s.t.i.c.s............................................................................................................... 255 Trade Cons.t.a..n.t.s.. ....................................................................................................................259 History D.a..t.a..b.a..s.e.. P..r.o.p..e.r..t.i.e.s................................................................................................. 260 Order Pr.o.p..e.r.t..ie..s............................................................................................................... 261 Position .P.r.o..p.e..r.t.i.e.s............................................................................................................. 265 Deal Prop.e..r.t.i.e..s................................................................................................................. 267 Trade Op.e..r.a.t..io..n. .T..y.p..e.s........................................................................................................ 269 Trade Or.d.e..r.s. .i.n. .D..O..M........................................................................................................... 270 © 2000-2011, MetaQuotes Software Corp. 4 Content Named Con.s.t.a..n.t.s. ....................................................................................................................271 Predefine..d. .M..a.c..r.o..s.u.b..s.t.i.t.u..t.i.o.n..s.............................................................................................. 272 Mathema.t.i.c.a..l .C..o.n..s.t.a..n.t..s...................................................................................................... 274 Numerica.l. .T.y..p.e.. C..o..n.s.t..a.n..t.s.................................................................................................... 276 Uninitaliz.a..t.i.o.n.. .R.e..a.s.o..n. .C..o.d..e.s................................................................................................. 279 Checking. .O..b.j.e..c.t.. .P.o.i.n..t.e.r...................................................................................................... 281 Other Co.n..s.t.a..n.t.s................................................................................................................ 282 Data Struct.u.r..e.s.. .....................................................................................................................285 Structur.e. .o.f. .t.h..e. .D..a.t.e.. .T.y..p.e................................................................................................... 286 Structur.e. .o.f. .I.n.p..u..t. P..a.r..a.m..e..t.e.r..s.............................................................................................. 287 History D.a..t.a.. S..t.r.u..c.t.u..r.e........................................................................................................ 288 DOM Stru.c..t.u..r.e.................................................................................................................. 289 Trade Re.q.u..e.s.t.. S..t.r.u..c.t.u..r.e...................................................................................................... 290 Structur.e. .o.f. .R.e..q.u..e.s..t. .C.h..e.c..k. .R..e.s.u..lt..s........................................................................................ 294 Structur.e. .o.f. .a. .T..r.a.d..e. .R..e.q..u.e..s.t. .R.e..s.u..lt........................................................................................ 295 Structur.e. .f.o.r. .C..u.r..r.e.n..t. .P.r..ic..e.s................................................................................................. 298 Codes of Er.r.o..r.s.. a..n.d.. .W...a.r..n.i.n..g.s.. ..................................................................................................299 Trade Se.r.v.e..r. .R.e..t.u.r..n. .C..o.d..e.s................................................................................................... 300 Compiler. W...a.r.n..i.n.g..s............................................................................................................. 302 Compilati.o..n. .E.r..r.o.r..s............................................................................................................. 305 Runtime .E.r.r.o..r.s.................................................................................................................. 314 Input/Outpu..t. .C.o..n..s.t.a..n..t.s. ...........................................................................................................321 File Open.i.n.g.. .F.l.a.g..s.............................................................................................................. 322 In-File Po.s.i.t.i.o..n.................................................................................................................. 324 Use of a .C.o..d.e..p.a..g.e.............................................................................................................. 325 MessageB..o.x...................................................................................................................... 326 3 MQL5 program.s................................................................................................ 328 Program Ru.n..n..in..g. ....................................................................................................................329 Client Term.i.n..a.l. .E.v..e.n..t.s.. ............................................................................................................334 Resources ............................................................................................................................337 Call of Impo.r.t..e.d.. .F.u..n..c.t..io..n..s. .......................................................................................................344 Runtime Err..o.r..s. ......................................................................................................................346 4 Predefined Va.r.i.a.b..le..s......................................................................................... 347 _Digits ............................................................................................................................348 _Point ............................................................................................................................349 _LastError ............................................................................................................................350 _Period ............................................................................................................................351 _StopFlag ............................................................................................................................352 _Symbol ............................................................................................................................353 _UninitReas.o..n.. .......................................................................................................................354 5 Common Func.t.io..n..s........................................................................................... 355 Alert ............................................................................................................................356 CheckPoint.e..r. ........................................................................................................................357 Comment ............................................................................................................................359 DebugBrea.k. ..........................................................................................................................360 ExpertRem.o.v..e. .......................................................................................................................361 GetPointer ............................................................................................................................363 GetTickCou..n.t. ........................................................................................................................367 MessageBox.. ..........................................................................................................................368 PeriodSeco.n..d..s. ......................................................................................................................369 PlaySound ............................................................................................................................370 Print ............................................................................................................................371 PrintFormat. ...........................................................................................................................372 ResetLastEr.r.o..r. .......................................................................................................................377 SetUserErro..r. .........................................................................................................................378 SendFTP ............................................................................................................................379 SendMail ............................................................................................................................380 © 2000-2011, MetaQuotes Software Corp. 5 Content Sleep ............................................................................................................................381 TerminalClo..s.e.. .......................................................................................................................382 TesterStatis..ti.c..s. ......................................................................................................................384 TesterWith.d.r..a.w...a.l. ..................................................................................................................385 ZeroMemor.y.. .........................................................................................................................386 6 Array Function..s............................................................................................... 387 ArrayBsear.c..h.. .......................................................................................................................388 ArrayCopy ............................................................................................................................390 ArrayFree ............................................................................................................................391 ArrayGetAs.S..e.r..i.e.s.. ..................................................................................................................392 ArrayInitial.i.z.e.. .......................................................................................................................393 ArrayIsDyn.a.m...ic.. .....................................................................................................................394 ArrayIsSeri.e.s.. ........................................................................................................................395 ArrayMaxim..u..m.. ......................................................................................................................397 ArrayMinim.u..m.. .......................................................................................................................398 ArrayRange.. ..........................................................................................................................399 ArrayResiz.e. ..........................................................................................................................400 ArraySetAs.S.e..r.i.e..s. ...................................................................................................................401 ArraySize ............................................................................................................................404 ArraySort ............................................................................................................................405 7 Conversion Fu.n.c..t.i.o.n..s........................................................................................ 406 CharToStrin..g. .........................................................................................................................408 CharArrayT.o..S..t.r.i.n..g. .................................................................................................................409 ColorToStri.n..g. ........................................................................................................................410 DoubleToSt.r.i.n..g. ......................................................................................................................411 EnumToStri.n..g. ........................................................................................................................412 IntegerToS.t.r.i.n.g.. .....................................................................................................................414 ShortToStri.n..g. ........................................................................................................................415 ShortArray.T.o..S..t.r.i.n.g.. ................................................................................................................416 TimeToStrin..g. .........................................................................................................................417 NormalizeD.o.u..b..l.e. ....................................................................................................................418 StringToCh.a.r.A..r..r.a.y.. .................................................................................................................419 StringToCol.o..r. ........................................................................................................................420 StringToDou..b..l.e. ......................................................................................................................421 StringToInt.e.g..e.r.. .....................................................................................................................422 StringToSho..r.t.A..r..r.a.y.. ................................................................................................................423 StringToTim..e. .........................................................................................................................424 StringForma..t. .........................................................................................................................425 8 Math Function.s................................................................................................ 426 MathAbs ............................................................................................................................427 MathArccos.. ..........................................................................................................................428 MathArcsin. ...........................................................................................................................429 MathArctan. ...........................................................................................................................430 MathCeil ............................................................................................................................431 MathCos ............................................................................................................................432 MathExp ............................................................................................................................433 MathFloor ............................................................................................................................434 MathLog ............................................................................................................................435 MathLog10 ............................................................................................................................436 MathMax ............................................................................................................................437 MathMin ............................................................................................................................438 MathMod ............................................................................................................................439 MathPow ............................................................................................................................440 MathRand ............................................................................................................................441 MathRound. ...........................................................................................................................442 MathSin ............................................................................................................................443 MathSqrt ............................................................................................................................444 © 2000-2011, MetaQuotes Software Corp. 6 Content MathSrand ............................................................................................................................445 MathTan ............................................................................................................................446 MathIsValid.N.u..m...b.e..r. .................................................................................................................447 9 String Functio.n.s............................................................................................... 448 StringAdd ............................................................................................................................449 StringBuffe.r.L..e.n.. .....................................................................................................................451 StringComp.a.r..e. .......................................................................................................................452 StringConca..t.e..n..a.t.e.. .................................................................................................................454 StringFill ............................................................................................................................455 StringFind ............................................................................................................................456 StringGetCh..a.r.a..c.t.e..r.. ................................................................................................................457 StringInit ............................................................................................................................458 StringLen ............................................................................................................................459 StringRepla.c..e. ........................................................................................................................460 StringSetCh.a..r.a.c..t.e..r. .................................................................................................................461 StringSubst.r. ..........................................................................................................................463 StringToLow...e.r.. ......................................................................................................................464 StringToUp.p.e..r. .......................................................................................................................465 StringTrimL.e..f.t. .......................................................................................................................466 StringTrimR.i.g.h..t. ......................................................................................................................467 10 Date and Time................................................................................................. 468 TimeCurren..t. .........................................................................................................................469 TimeTradeS..e.r..v.e..r. ...................................................................................................................470 TimeLocal ............................................................................................................................471 TimeGMT ............................................................................................................................472 TimeDayligh..t.S..a.v.i.n..g.s.. ...............................................................................................................473 TimeGMTOf.f.s.e..t. ......................................................................................................................474 TimeToStru.c..t. ........................................................................................................................475 StructToTim..e.. ........................................................................................................................476 11 Account Inform..a..t.i.o.n.......................................................................................... 477 AccountInf.o..D..o.u..b..l.e. ................................................................................................................478 AccountInf.o..I.n.t.e..g.e..r.. ...............................................................................................................479 AccountInf.o..S.t.r..in..g. ..................................................................................................................481 12 Checkup ................................................................................................. 482 GetLastErro.r. ..........................................................................................................................483 IsStopped ............................................................................................................................484 UninitializeR..e..a.s..o.n.. ..................................................................................................................485 TerminalInf.o..I.n.t.e..g.e..r.. ...............................................................................................................486 TerminalInf.o..S.t.r..in..g. ..................................................................................................................487 MQL5InfoIn.t.e.g..e.r.. ....................................................................................................................488 MQL5InfoSt.r.in..g.. ......................................................................................................................489 Symbol ............................................................................................................................490 Period ............................................................................................................................491 Digits ............................................................................................................................492 Point ............................................................................................................................493 13 Market Info ................................................................................................. 494 SymbolsTot.a..l. ........................................................................................................................495 SymbolNam.e.. .........................................................................................................................496 SymbolSele.c..t. ........................................................................................................................497 SymbolIsSy.n.c..h..r.o..n..i.z.e..d. ............................................................................................................498 SymbolInfo.D.o..u..b..le.. ..................................................................................................................499 SymbolInfo.I.n.t.e..g.e..r.. .................................................................................................................501 SymbolInfo.S.t.r..in..g. ....................................................................................................................503 SymbolInfo.T.i.c..k.. .....................................................................................................................504 SymbolInfo.S.e..s.s..io..n..Q..u..o.t.e.. .........................................................................................................505 SymbolInfo.S.e..s.s..io..n..T.r..a.d..e.. .........................................................................................................506 © 2000-2011, MetaQuotes Software Corp. 7 Content MarketBook..A..d..d. .....................................................................................................................507 MarketBook..R..e.l.e..a..s.e. ................................................................................................................508 MarketBook..G..e.t.. .....................................................................................................................509 14 Timeseries and.. .I.n.d..i.c.a.t.o..r.s. .A.c..c.e..s.s.......................................................................... 510 Indexing Di.r.e..c.t..io..n.. .in.. .A..r.r.a..y.s..,. .B.u..f.f.e..r.s. .a..n.d.. .T.i.m..e..s.e..r.i.e..s. ....................................................................514 Organizing .D.a..t.a.. A..c..c..e.s..s. ...........................................................................................................517 SeriesInfoIn..t.e.g..e..r. ...................................................................................................................526 Bars ............................................................................................................................528 BarsCalcula.t.e..d.. ......................................................................................................................530 IndicatorCr.e..a.t.e.. .....................................................................................................................532 IndicatorRe.l.e..a.s..e. ....................................................................................................................534 CopyBuffer. ...........................................................................................................................536 CopyRates ............................................................................................................................540 CopyTime ............................................................................................................................543 CopyOpen ............................................................................................................................546 CopyHigh ............................................................................................................................549 CopyLow ............................................................................................................................553 CopyClose ............................................................................................................................556 CopyTickV.o.l.u..m..e.. ...................................................................................................................559 CopyRealVo..l.u..m..e.. ...................................................................................................................563 CopySprea.d. ..........................................................................................................................566 15 Chart Operatio..n.s.............................................................................................. 570 ChartApply.T..e.m...p.l.a..t.e. ...............................................................................................................572 ChartWindo..w..F..i.n.d.. ..................................................................................................................575 ChartOpen ............................................................................................................................577 ChartFirst ............................................................................................................................578 ChartNext ............................................................................................................................579 ChartClose ............................................................................................................................580 ChartSymbo..l. .........................................................................................................................581 ChartPeriod.. ..........................................................................................................................582 ChartRedra.w.. .........................................................................................................................583 ChartSetDo.u.b..l.e.. .....................................................................................................................584 ChartSetInt.e.g..e..r. .....................................................................................................................585 ChartSetStr.i.n..g. .......................................................................................................................586 ChartGetDo.u..b..le.. .....................................................................................................................587 ChartGetInt.e..g.e..r. .....................................................................................................................589 ChartGetStr.i.n..g. .......................................................................................................................591 ChartNaviga..te.. ........................................................................................................................593 ChartID ............................................................................................................................596 ChartIndica.t.o..r.A..d..d.. .................................................................................................................597 ChartIndica.t.o..r.D..e..l.e.t.e.. ..............................................................................................................598 ChartIndica.t.o..r.N..a.m...e. ................................................................................................................599 ChartIndica.t.o..r.s..T.o..t.a..l ...............................................................................................................600 ChartWindo..w..O..n..D..r.o..p..p.e..d.. ........................................................................................................601 ChartPriceO..n..D.r..o.p..p..e..d. .............................................................................................................602 ChartTimeO..n.D..r.o..p..p..e.d.. .............................................................................................................603 ChartXOnD.r.o.p..p..e..d. ..................................................................................................................604 ChartYOnD.r.o.p..p..e..d. ..................................................................................................................605 ChartSetSym...b..o.l.P.e..r..io..d.. ............................................................................................................606 ChartScree.n..S.h..o..t. ...................................................................................................................607 16 Trade Functio.n.s............................................................................................... 608 OrderCalcM..a.r.g..i.n. ....................................................................................................................610 OrderCalcP.r.o..f.i.t. .....................................................................................................................611 OrderChec.k. ..........................................................................................................................612 OrderSend ............................................................................................................................613 PositionsTo.t.a..l ........................................................................................................................618 PositionGet.S.y..m..b..o..l. .................................................................................................................619 © 2000-2011, MetaQuotes Software Corp. 8 Content PositionSele..c..t. .......................................................................................................................620 PositionGet.D.o..u..b..le.. ..................................................................................................................621 PositionGet.I.n.t.e..g.e..r. ..................................................................................................................622 PositionGet.S.t.r..in..g. ....................................................................................................................623 OrdersTota.l. ..........................................................................................................................624 OrderGetTi.c.k..e..t. .....................................................................................................................625 OrderSelec.t. ..........................................................................................................................627 OrderGetDo..u..b.l.e.. ....................................................................................................................628 OrderGetIn.t.e.g..e..r. ....................................................................................................................629 OrderGetSt.r.i.n..g. ......................................................................................................................630 HistorySele.c..t. ........................................................................................................................631 HistorySele.c..t.B..y.P..o..s.i.t.i.o.n.. ..........................................................................................................633 HistoryOrde..r..S.e..l.e.c..t. ................................................................................................................634 HistoryOrde..r..s.T.o..t.a..l. ................................................................................................................635 HistoryOrde..r..G.e..t.T..ic..k..e..t. ...........................................................................................................636 HistoryOrde..r..G.e..t.D..o.u..b..l.e. ...........................................................................................................638 HistoryOrde..r..G.e..t.I.n.t..e.g..e.r.. ..........................................................................................................639 HistoryOrde..r..G.e..t.S..tr..i.n.g.. ............................................................................................................640 HistoryDea.lS..e.l.e..c..t. ..................................................................................................................641 HistoryDea.ls.T..o..t.a.l. ...................................................................................................................642 HistoryDea.lG..e..t.T.i.c..k..e.t.. .............................................................................................................643 HistoryDea.lG..e..t.D..o.u..b..le.. .............................................................................................................646 HistoryDea.lG..e..t.I.n.t.e..g.e..r.. ............................................................................................................647 HistoryDea.lG..e..t.S.t.r..in..g. ...............................................................................................................648 17 Global Variabl.e.s. .o..f .t.h..e. .T..e.r.m...in..a.l........................................................................... 649 GlobalVaria.b..l.e.C..h..e.c..k.. ..............................................................................................................650 GlobalVaria.b..l.e.T..i.m..e.. ................................................................................................................651 GlobalVaria.b..l.e.D..e..l. ..................................................................................................................652 GlobalVaria.b..l.e.G..e..t. ..................................................................................................................653 GlobalVaria.b..l.e.N..a.m...e. ................................................................................................................654 GlobalVaria.b..l.e.S..e.t.. ..................................................................................................................655 GlobalVaria.b..l.e.s..F.l.u.s..h. ...............................................................................................................656 GlobalVaria.b..l.e.T..e..m..p.. ...............................................................................................................657 GlobalVaria.b..l.e.S..e.t..O..n.C..o..n..d.i.t.i.o.n.. ..................................................................................................658 GlobalVaria.b..l.e.s..D.e..l.e.t.e..A..l.l. .........................................................................................................659 GlobalVaria.b..l.e.s..T.o..t.a..l ...............................................................................................................660 18 File Functions................................................................................................. 661 FileFindFirs.t. ..........................................................................................................................664 FileFindNex.t. ..........................................................................................................................666 FileFindClos..e. .........................................................................................................................667 FileIsExist ............................................................................................................................668 FileOpen ............................................................................................................................669 FileClose ............................................................................................................................671 FileCopy ............................................................................................................................672 FileDelete ............................................................................................................................673 FileMove ............................................................................................................................674 FileFlush ............................................................................................................................675 FileIsEnding. ...........................................................................................................................676 FileIsLineEn..d.i.n..g. .....................................................................................................................677 FileReadAr.r.a.y.. .......................................................................................................................678 FileReadBo.o.l. .........................................................................................................................679 FileReadDa.t.e.t.i.m..e.. ...................................................................................................................680 FileReadDo.u.b..l.e.. .....................................................................................................................681 FileReadFlo.a..t. ........................................................................................................................682 FileReadInt.e.g..e..r. .....................................................................................................................683 FileReadLon..g.. ........................................................................................................................684 FileReadNu.m..b..e.r.. ....................................................................................................................685 FileReadStr.i.n..g. .......................................................................................................................686 © 2000-2011, MetaQuotes Software Corp. 9 Content FileReadStr.u..c.t. .......................................................................................................................687 FileSeek ............................................................................................................................688 FileSize ............................................................................................................................689 FileTell ............................................................................................................................690 FileWrite ............................................................................................................................691 FileWriteAr.r.a..y.. ......................................................................................................................692 FileWriteDo.u..b..l.e. .....................................................................................................................693 FileWriteFlo..a..t. .......................................................................................................................694 FileWriteIn.t.e.g..e.r.. ....................................................................................................................695 FileWriteLo.n..g. ........................................................................................................................696 FileWriteSt.r.in..g.. ......................................................................................................................697 FileWriteSt.r.u..c.t. ......................................................................................................................698 FolderCrea.t.e. .........................................................................................................................699 FolderDelet..e. .........................................................................................................................700 FolderClean.. ..........................................................................................................................701 19 Custom Indica.t.o.r.s............................................................................................. 702 Connection.. b..e..t.w..e..e..n.. I.n..d.i.c..a..to..r. .P..r.o..p..e.r..ti.e..s. .a..n.d.. .F.u..n..c.t..io..n..s. ..............................................................706 Indicator St.y..l.e.s.. .in.. .E.x..a..m..p.l.e..s. .....................................................................................................708 DRAW_NO..N..E..................................................................................................................... 715 DRAW_LI.N..E...................................................................................................................... 718 DRAW_SE.C..T.I.O..N.................................................................................................................. 722 DRAW_HI.S.T..O..G..R.A..M.............................................................................................................. 726 DRAW_HI.S.T..O..G..R.A..M..2............................................................................................................ 730 DRAW_AR.R..O..W.................................................................................................................... 734 DRAW_ZI.G..Z.A..G................................................................................................................... 739 DRAW_FI.L.L..I.N..G.................................................................................................................. 744 DRAW_BA.R..S...................................................................................................................... 749 DRAW_CA..N.D..L..E.S................................................................................................................. 755 DRAW_CO..L..O..R._..L.I.N..E............................................................................................................ 761 DRAW_CO..L..O..R._..S.E..C.T..I.O..N....................................................................................................... 766 DRAW_CO..L..O..R._..H.I..S.T.O..G..R.A..M.................................................................................................... 772 DRAW_CO..L..O..R._..H.I..S.T.O..G..R.A..M..2.................................................................................................. 777 DRAW_CO..L..O..R._..A.R..R.O..W.......................................................................................................... 782 DRAW_CO..L..O..R._..Z.I.G..Z.A..G......................................................................................................... 788 DRAW_CO..L..O..R._..B.A..R.S............................................................................................................ 793 DRAW_CO..L..O..R._..C.A..N..D.L..E.S....................................................................................................... 800 SetIndexBu.f.f.e..r. ......................................................................................................................807 IndicatorSe.t.D..o..u..b.l.e.. ................................................................................................................810 IndicatorSe.t.I.n..t.e.g..e..r. ................................................................................................................811 IndicatorSe.t.S..t.r.i.n.g.. ..................................................................................................................812 PlotIndexSe..t.D..o.u..b..l.e. ................................................................................................................813 PlotIndexSe..t.I.n.t.e..g.e..r.. ...............................................................................................................814 PlotIndexSe..t.S.t.r..in..g. ..................................................................................................................818 PlotIndexGe..t.I.n.t..e.g..e.r.. ...............................................................................................................819 20 Object Functio..n.s.............................................................................................. 822 ObjectCrea.t.e.. ........................................................................................................................824 ObjectNam.e. ..........................................................................................................................826 ObjectDele.t.e.. ........................................................................................................................827 ObjectsDel.e.t.e..A..l.l ....................................................................................................................828 ObjectFind. ...........................................................................................................................829 ObjectGetT.i.m..e..B..y.V..a..l.u..e. ...........................................................................................................830 ObjectGetV.a..l.u.e..B..y..T.i.m...e. ...........................................................................................................831 ObjectMove.. ..........................................................................................................................832 ObjectsTot.a.l. .........................................................................................................................833 ObjectSetD.o..u..b.l.e.. ...................................................................................................................834 ObjectSetIn..t.e.g..e..r. ...................................................................................................................837 ObjectSetS.t.r.i.n.g.. .....................................................................................................................838 ObjectGetD.o..u..b..le.. ...................................................................................................................840 © 2000-2011, MetaQuotes Software Corp. 10 Content ObjectGetIn..t.e..g.e..r. ...................................................................................................................841 ObjectGetS.t.r.i.n..g. .....................................................................................................................842 21 Technical Indi.c.a..t.o.r.s.......................................................................................... 844 iAC ............................................................................................................................847 iAD ............................................................................................................................848 iADX ............................................................................................................................849 iADXWilder. ...........................................................................................................................850 iAlligator ............................................................................................................................851 iAMA ............................................................................................................................853 iAO ............................................................................................................................854 iATR ............................................................................................................................855 iBearsPowe.r.. .........................................................................................................................856 iBands ............................................................................................................................857 iBullsPower.. ..........................................................................................................................858 iCCI ............................................................................................................................859 iChaikin ............................................................................................................................860 iCustom ............................................................................................................................861 iDEMA ............................................................................................................................864 iDeMarker ............................................................................................................................865 iEnvelopes ............................................................................................................................866 iForce ............................................................................................................................867 iFractals ............................................................................................................................868 iFrAMA ............................................................................................................................869 iGator ............................................................................................................................870 iIchimoku ............................................................................................................................872 iBWMFI ............................................................................................................................873 iMomentum. ...........................................................................................................................874 iMFI ............................................................................................................................875 iMA ............................................................................................................................876 iOsMA ............................................................................................................................877 iMACD ............................................................................................................................878 iOBV ............................................................................................................................879 iSAR ............................................................................................................................880 iRSI ............................................................................................................................881 iRVI ............................................................................................................................882 iStdDev ............................................................................................................................883 iStochastic ............................................................................................................................884 iTEMA ............................................................................................................................885 iTriX ............................................................................................................................886 iWPR ............................................................................................................................887 iVIDyA ............................................................................................................................888 iVolumes ............................................................................................................................889 22 Working with E..v.e..n.t.s.......................................................................................... 890 EventSetTim..e..r. .......................................................................................................................891 EventKillTim..e..r. .......................................................................................................................892 EventChart.C.u..s.t.o..m.. ..................................................................................................................893 23 Standard Libra..r.y.............................................................................................. 898 Basic Class .C.O...b.j.e..c..t. ................................................................................................................899 Prev ......................................................................................................................... 900 Prev ......................................................................................................................... 901 Next ......................................................................................................................... 902 Next ......................................................................................................................... 903 Compare......................................................................................................................... 904 Save ......................................................................................................................... 906 Load ......................................................................................................................... 908 Type ......................................................................................................................... 910 Classes of d.a..t.a. .......................................................................................................................911 © 2000-2011, MetaQuotes Software Corp.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.