0% found this document useful (0 votes)
86 views

MQL 5

HDL5 Language for etaTrader 5 clIent termInal tasks. Create your own analytIcal tools based on mathematIcal achIevements and tradItIonal methods. Automate tradIng systems to work on varIous fInancIal markets.

Uploaded by

jjones99040348
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views

MQL 5

HDL5 Language for etaTrader 5 clIent termInal tasks. Create your own analytIcal tools based on mathematIcal achIevements and tradItIonal methods. Automate tradIng systems to work on varIous fInancIal markets.

Uploaded by

jjones99040348
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2112

hDL5 Language PEFEPENCE

for the |etaTrader 5 clIent termInal


STU0Y hDL5 and
SDLVE any tasks:
Create your own technIcal analysIs IndIcators
of any complexIty
Use autotradIng · automate tradIng systems
to work on varIous fInancIal markets
0evelop 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.)

Coaepxanne 2
© 2000·2010, |eta0uotes Software Corp.
Content
hDL5 Peference
32
................................................................................................. 33 1 Language ßasIcs
............................................................................................................................34 Syntax
......................................................................................................................... J5 Comments
......................................................................................................................... J6 Ì dentIfIers
......................................................................................................................... J7 Feserved Words
............................................................................................................................3º 0ata Types
......................................................................................................................... 40 Ì nteger Types
................................................................................................................ 41 Char, Short, Ì nt and Long Types
................................................................................................................ 44 Character Constants
................................................................................................................ 47 0atetIme Type
................................................................................................................ 48 Color Type
................................................................................................................ 49 8ool Type
................................................................................................................ 50 EnumeratIons
......................................................................................................................... 52 Feal Types
......................................................................................................................... 57 StrIng Type
......................................................................................................................... 59 Structures and Classes
......................................................................................................................... 64 0ynamIc Array Dbject
......................................................................................................................... 66 TypecastIng
......................................................................................................................... 72 7oId Type and NULL Constant
......................................................................................................................... 7J Dbject PoInters
......................................................................................................................... 74 Feference. |odIfIer E and Keyword thIs
............................................................................................................................76 DperatIons and ExpressIons
......................................................................................................................... 77 ExpressIons
......................................................................................................................... 78 ArIthmetIcal DperatIons
......................................................................................................................... 79 AssIgnment DperatIons
......................................................................................................................... 80 DperatIons of FelatIon
......................................................................................................................... 81 8oolean DperatIons
......................................................................................................................... 8J 8ItwIse DperatIons
......................................................................................................................... 86 Dther DperatIons
......................................................................................................................... 90 Precedence Fules
............................................................................................................................º2 Dperators
......................................................................................................................... 94 Compound Dperator
......................................................................................................................... 95 ExpressIon Dperator
......................................................................................................................... 96 Feturn Dperator
......................................................................................................................... 97 CondItIonal Dperator If·else
......................................................................................................................... 98 CondItIonal Dperator ::
......................................................................................................................... 99 SwItch Dperator
......................................................................................................................... 101 Loop Dperator whIle
......................................................................................................................... 102 Loop Dperator for
......................................................................................................................... 10J Loop Dperator do whIle
......................................................................................................................... 104 8reak Dperator
......................................................................................................................... 105 ContInue Dperator
......................................................................................................................... 106 Dbject Create Dperator new
......................................................................................................................... 107 Dbject 0elete Dperator delete
............................................................................................................................108 FunctIons
......................................................................................................................... 110 FunctIon Call
......................................................................................................................... 111 PassIng Parameters
......................................................................................................................... 114 FunctIon DverloadIng
......................................................................................................................... 117 0escrIptIon of External FunctIons
......................................................................................................................... 118 ExportIng FunctIons
......................................................................................................................... 119 Event HandlIng FunctIons
............................................................................................................................127 VarIabIes
Coaepxanne 3
© 2000·2010, |eta0uotes Software Corp.
......................................................................................................................... 1J0 Local 7arIables
......................................................................................................................... 1J2 Formal Parameters
......................................................................................................................... 1J4 StatIc 7arIables
......................................................................................................................... 1J6 Clobal 7arIables
......................................................................................................................... 1J7 Ì nput 7arIables
......................................................................................................................... 140 Extern 7arIables
......................................................................................................................... 141 Ì nItIalIzatIon of 7arIables
......................................................................................................................... 14J 7IsIbIlIty Scope and LIfetIme of 7arIables
......................................................................................................................... 145 CreatIng and 0eletIng Dbjects
............................................................................................................................148 Preprocessor
......................................................................................................................... 149 0eclaratIon of Constants
......................................................................................................................... 150 Program PropertIes
......................................................................................................................... 154 Ì ncludIng FIles
......................................................................................................................... 155 Ì mportIng FunctIons
............................................................................................................................157 Dbject-DrIented ProgrammIng
......................................................................................................................... 159 EncapsulatIon and ExtensIbIlIty of Types
......................................................................................................................... 162 Ì nherItance
......................................................................................................................... 165 PolymorphIsm
......................................................................................................................... 167 Dverload
......................................................................................................................... 168 7Irtual FunctIons
................................................................................................. 171 2 Standard Constants, EnumeratIons and Structures
............................................................................................................................172 Chart Constants
......................................................................................................................... 17J Types of Chart Events
......................................................................................................................... 177 Chart TImeframes
......................................................................................................................... 179 Chart PropertIes
......................................................................................................................... 18J PosItIonIng Constants
......................................................................................................................... 184 Chart FepresentatIon
............................................................................................................................186 Dbjects Constants
......................................................................................................................... 187 Dbject Types
......................................................................................................................... 189 Dbject PropertIes
......................................................................................................................... 19J |ethods of Dbject 8IndIng
......................................................................................................................... 197 Chart Corner
......................................................................................................................... 199 7IsIbIlIty of Dbjects
......................................................................................................................... 202 Levels of EllIott Wave
......................................................................................................................... 20J Cann Dbjects
......................................................................................................................... 205 Web Colors
......................................................................................................................... 207 WIngdIngs
............................................................................................................................208 IndIcator Constants
......................................................................................................................... 209 PrIce Constants
......................................................................................................................... 212 SmoothIng |ethods
......................................................................................................................... 21J Ì ndIcators LInes
......................................................................................................................... 215 0rawIng Styles
......................................................................................................................... 219 Custom Ì ndIcator PropertIes
......................................................................................................................... 222 Ì ndIcator Types
......................................................................................................................... 224 0ata Type Ì dentIfIers
............................................................................................................................225 EnvIronment State
......................................................................................................................... 226 ClIent TermInal PropertIes
......................................................................................................................... 228 FunnIng |0L5 Program PropertIes
......................................................................................................................... 2J0 Symbol PropertIes
......................................................................................................................... 2J7 Account PropertIes
............................................................................................................................23º Trade Constants
......................................................................................................................... 240 HIstory 0atabase PropertIes
......................................................................................................................... 241 Drder PropertIes
......................................................................................................................... 245 PosItIon PropertIes
......................................................................................................................... 247 0eal PropertIes
......................................................................................................................... 249 Trade DperatIon Types
......................................................................................................................... 250 Trade Drders In 0D|
............................................................................................................................251 Named Constants
Coaepxanne 4
© 2000·2010, |eta0uotes Software Corp.
......................................................................................................................... 252 PredefIned |acrosubstItutIons
......................................................................................................................... 254 |athematIcal Constants
......................................................................................................................... 256 NumerIcal Type Constants
......................................................................................................................... 259 UnInItalIzatIon Feason Codes
......................................................................................................................... 261 CheckIng Dbject PoInter
......................................................................................................................... 262 Dther Constants
............................................................................................................................265 0ata Structures
......................................................................................................................... 266 Structure of the 0ate Type
......................................................................................................................... 267 Structure of Ì nput Parameters
......................................................................................................................... 268 HIstory 0ata Structure
......................................................................................................................... 269 0D| Structure
......................................................................................................................... 270 Trade Fequest Structure
......................................................................................................................... 274 Structure of Fequest Check Fesults
......................................................................................................................... 275 Structure of a Trade Fequest Fesult
......................................................................................................................... 278 Structure for Current PrIces
............................................................................................................................27º Codes of Errors and WarnIngs
......................................................................................................................... 280 Trade Server Feturn Codes
......................................................................................................................... 282 CompIler WarnIngs
......................................................................................................................... 284 CompIlatIon Errors
......................................................................................................................... 292 FuntIme Errors
............................................................................................................................2ºº InputlDutput Constants
......................................................................................................................... J00 FIle DpenIng Flags
......................................................................................................................... J02 Ì n·FIle PosItIon
......................................................................................................................... J0J Use of a Codepage
......................................................................................................................... J04 |essage8ox
................................................................................................. 306 3 hDL5 programs
............................................................................................................................307 Program PunnIng
............................................................................................................................312 CIIent TermInaI Events
............................................................................................................................315 CaII of Imported FunctIons
............................................................................................................................317 PuntIme Errors
................................................................................................. 318 4 PredefIned VarIabIes
............................................................................................................................31º _0IgIts
............................................................................................................................320 _PoInt
............................................................................................................................321 _LastError
............................................................................................................................322 _PerIod
............................................................................................................................323 _StopFIag
............................................................................................................................324 _SymboI
............................................................................................................................325 _UnInItPeason
................................................................................................. 326 5 Common FunctIons
............................................................................................................................327 AIert
............................................................................................................................328 CheckPoInter
............................................................................................................................330 Comment
............................................................................................................................331 0ebugßreak
............................................................................................................................332 ExpertPemove
............................................................................................................................334 CetPoInter
............................................................................................................................338 CetTIckCount
............................................................................................................................33º hessageßox
............................................................................................................................340 PerIodSeconds
............................................................................................................................341 PIaySound
............................................................................................................................342 PrInt
............................................................................................................................343 PrIntFormat
............................................................................................................................348 PesetLastError
............................................................................................................................34º SetUserError
............................................................................................................................350 SendFTP
............................................................................................................................351 SendhaII
............................................................................................................................352 SIeep
............................................................................................................................353 TermInaICIose
Coaepxanne 5
© 2000·2010, |eta0uotes Software Corp.
............................................................................................................................355 TesterWIthdrawaI
............................................................................................................................356 Zerohemory
................................................................................................. 357 6 Array FunctIons
............................................................................................................................358 Arrayßsearch
............................................................................................................................360 ArrayCopy
............................................................................................................................361 ArrayFree
............................................................................................................................362 ArrayCetAsSerIes
............................................................................................................................363 ArrayInItIaIIze
............................................................................................................................364 ArrayIs0ynamIc
............................................................................................................................365 ArrayIsSerIes
............................................................................................................................367 ArrayhaxImum
............................................................................................................................368 ArrayhInImum
............................................................................................................................36º ArrayPange
............................................................................................................................370 ArrayPesIze
............................................................................................................................371 ArraySetAsSerIes
............................................................................................................................374 ArraySIze
............................................................................................................................375 ArraySort
................................................................................................. 376 7 ConversIon FunctIons
............................................................................................................................378 CharToStrIng
............................................................................................................................37º CharArrayToStrIng
............................................................................................................................380 CoIorToStrIng
............................................................................................................................381 0oubIeToStrIng
............................................................................................................................382 IntegerToStrIng
............................................................................................................................383 ShortToStrIng
............................................................................................................................384 ShortArrayToStrIng
............................................................................................................................385 TImeToStrIng
............................................................................................................................386 NormaIIze0oubIe
............................................................................................................................387 StrIngToCharArray
............................................................................................................................388 StrIngToCoIor
............................................................................................................................38º StrIngTo0oubIe
............................................................................................................................3º0 StrIngToInteger
............................................................................................................................3º1 StrIngToShortArray
............................................................................................................................3º2 StrIngToTIme
............................................................................................................................3º3 StrIngFormat
................................................................................................. 3º4 8 hath FunctIons
............................................................................................................................3º5 hathAbs
............................................................................................................................3º6 hathArccos
............................................................................................................................3º7 hathArcsIn
............................................................................................................................3º8 hathArctan
............................................................................................................................3ºº hathCeII
............................................................................................................................400 hathCos
............................................................................................................................401 hathExp
............................................................................................................................402 hathFIoor
............................................................................................................................403 hathLog
............................................................................................................................404 hathLog10
............................................................................................................................405 hathhax
............................................................................................................................406 hathhIn
............................................................................................................................407 hathhod
............................................................................................................................408 hathPow
............................................................................................................................40º hathPand
............................................................................................................................410 hathPound
............................................................................................................................411 hathSIn
............................................................................................................................412 hathSqrt
............................................................................................................................413 hathSrand
............................................................................................................................414 hathTan
............................................................................................................................415 hathIsVaIIdNumber
................................................................................................. 416 9 StrIng FunctIons
Coaepxanne 6
© 2000·2010, |eta0uotes Software Corp.
............................................................................................................................417 StrIngAdd
............................................................................................................................41º StrIngßufferLen
............................................................................................................................420 StrIngConcatenate
............................................................................................................................421 StrIngFIII
............................................................................................................................422 StrIngFInd
............................................................................................................................423 StrIngCetCharacter
............................................................................................................................424 StrIngInIt
............................................................................................................................425 StrIngLen
............................................................................................................................426 StrIngSetCharacter
............................................................................................................................428 StrIngSubstr
............................................................................................................................42º StrIngToLower
............................................................................................................................430 StrIngToUpper
............................................................................................................................431 StrIngTrImLeft
............................................................................................................................432 StrIngTrImPIght
................................................................................................. 433 10 0ate and TIme
............................................................................................................................434 TImeCurrent
............................................................................................................................435 TImeTradeServer
............................................................................................................................436 TImeLocaI
............................................................................................................................437 TImeChT
............................................................................................................................438 TIme0ayIIghtSavIngs
............................................................................................................................43º TImeChTDffset
............................................................................................................................440 TImeToStruct
............................................................................................................................441 StructToTIme
................................................................................................. 442 11 Account InformatIon
............................................................................................................................443 AccountInfo0oubIe
............................................................................................................................444 AccountInfoInteger
............................................................................................................................446 AccountInfoStrIng
................................................................................................. 447 12 Checkup
............................................................................................................................448 CetLastError
............................................................................................................................44º IsStopped
............................................................................................................................450 UnInItIaIIzePeason
............................................................................................................................451 TermInaIInfoInteger
............................................................................................................................452 TermInaIInfoStrIng
............................................................................................................................453 hDL5InfoInteger
............................................................................................................................454 hDL5InfoStrIng
............................................................................................................................455 SymboI
............................................................................................................................456 PerIod
............................................................................................................................457 0IgIts
............................................................................................................................458 PoInt
................................................................................................. 45º 13 harket Info
............................................................................................................................460 SymboIsTotaI
............................................................................................................................461 SymboIName
............................................................................................................................462 SymboISeIect
............................................................................................................................463 SymboIIsSynchronIzed
............................................................................................................................464 SymboIInfo0oubIe
............................................................................................................................466 SymboIInfoInteger
............................................................................................................................468 SymboIInfoStrIng
............................................................................................................................46º SymboIInfoTIck
............................................................................................................................470 SymboIInfoSessIonDuote
............................................................................................................................471 SymboIInfoSessIonTrade
............................................................................................................................472 harketßookAdd
............................................................................................................................473 harketßookPeIease
............................................................................................................................474 harketßookCet
................................................................................................. 475 14 TImeserIes and IndIcators Access
............................................................................................................................47º IndexIng 0IrectIon In Arrays, ßuffers and TImeserIes
............................................................................................................................482 DrganIzIng 0ata Access
Coaepxanne 7
© 2000·2010, |eta0uotes Software Corp.
............................................................................................................................4º1 SerIesInfoInteger
............................................................................................................................4º3 ßars
............................................................................................................................4º5 ßarsCaIcuIated
............................................................................................................................4º7 IndIcatorCreate
............................................................................................................................4ºº IndIcatorPeIease
............................................................................................................................501 Copyßuffer
............................................................................................................................506 CopyPates
............................................................................................................................50º CopyTIme
............................................................................................................................512 CopyDpen
............................................................................................................................515 CopyHIgh
............................................................................................................................51º CopyLow
............................................................................................................................522 CopyCIose
............................................................................................................................525 CopyTIckVoIume
............................................................................................................................52º CopyPeaIVoIume
............................................................................................................................532 CopySpread
................................................................................................. 536 15 Chart DperatIons
............................................................................................................................538 ChartAppIyTempIate
............................................................................................................................540 ChartWIndowFInd
............................................................................................................................542 ChartDpen
............................................................................................................................543 ChartFIrst
............................................................................................................................544 ChartNext
............................................................................................................................545 ChartCIose
............................................................................................................................546 ChartSymboI
............................................................................................................................547 ChartPerIod
............................................................................................................................548 ChartPedraw
............................................................................................................................54º ChartSet0oubIe
............................................................................................................................550 ChartSetInteger
............................................................................................................................551 ChartSetStrIng
............................................................................................................................552 ChartCet0oubIe
............................................................................................................................554 ChartCetInteger
............................................................................................................................556 ChartCetStrIng
............................................................................................................................558 ChartNavIgate
............................................................................................................................55º ChartI0
............................................................................................................................560 ChartIndIcatorAdd
............................................................................................................................561 ChartWIndowDn0ropped
............................................................................................................................562 ChartPrIceDn0ropped
............................................................................................................................563 ChartTImeDn0ropped
............................................................................................................................564 ChartXDn0ropped
............................................................................................................................565 ChartYDn0ropped
............................................................................................................................566 ChartSetSymboIPerIod
............................................................................................................................567 ChartScreenShot
................................................................................................. 568 16 Trade FunctIons
............................................................................................................................570 DrderCaIchargIn
............................................................................................................................571 DrderCaIcProfIt
............................................................................................................................572 DrderCheck
............................................................................................................................573 DrderSend
............................................................................................................................578 PosItIonsTotaI
............................................................................................................................57º PosItIonCetSymboI
............................................................................................................................580 PosItIonSeIect
............................................................................................................................581 PosItIonCet0oubIe
............................................................................................................................582 PosItIonCetInteger
............................................................................................................................583 PosItIonCetStrIng
............................................................................................................................584 DrdersTotaI
............................................................................................................................585 DrderCetTIcket
............................................................................................................................587 DrderSeIect
............................................................................................................................588 DrderCet0oubIe
............................................................................................................................58º DrderCetInteger
............................................................................................................................5º0 DrderCetStrIng
Coaepxanne 8
© 2000·2010, |eta0uotes Software Corp.
............................................................................................................................5º1 HIstorySeIect
............................................................................................................................5º3 HIstorySeIectßyPosItIon
............................................................................................................................5º4 HIstoryDrderSeIect
............................................................................................................................5º5 HIstoryDrdersTotaI
............................................................................................................................5º6 HIstoryDrderCetTIcket
............................................................................................................................5ºº HIstoryDrderCet0oubIe
............................................................................................................................600 HIstoryDrderCetInteger
............................................................................................................................601 HIstoryDrderCetStrIng
............................................................................................................................602 HIstory0eaISeIect
............................................................................................................................603 HIstory0eaIsTotaI
............................................................................................................................604 HIstory0eaICetTIcket
............................................................................................................................607 HIstory0eaICet0oubIe
............................................................................................................................608 HIstory0eaICetInteger
............................................................................................................................60º HIstory0eaICetStrIng
................................................................................................. 610 17 CIobaI VarIabIes of the TermInaI
............................................................................................................................611 CIobaIVarIabIeCheck
............................................................................................................................612 CIobaIVarIabIeTIme
............................................................................................................................613 CIobaIVarIabIe0eI
............................................................................................................................614 CIobaIVarIabIeCet
............................................................................................................................615 CIobaIVarIabIeName
............................................................................................................................616 CIobaIVarIabIeSet
............................................................................................................................617 CIobaIVarIabIesFIush
............................................................................................................................618 CIobaIVarIabIeTemp
............................................................................................................................61º CIobaIVarIabIeSetDnCondItIon
............................................................................................................................620 CIobaIVarIabIes0eIeteAII
............................................................................................................................621 CIobaIVarIabIesTotaI
................................................................................................. 622 18 FIIe FunctIons
............................................................................................................................625 FIIeFIndFIrst
............................................................................................................................626 FIIeFIndNext
............................................................................................................................627 FIIeFIndCIose
............................................................................................................................628 FIIeIsExIst
............................................................................................................................62º FIIeDpen
............................................................................................................................631 FIIeCIose
............................................................................................................................632 FIIeCopy
............................................................................................................................633 FIIe0eIete
............................................................................................................................634 FIIehove
............................................................................................................................635 FIIeFIush
............................................................................................................................636 FIIeIsEndIng
............................................................................................................................637 FIIeIsLIneEndIng
............................................................................................................................638 FIIePeadArray
............................................................................................................................63º FIIePeadßooI
............................................................................................................................640 FIIePead0atetIme
............................................................................................................................641 FIIePead0oubIe
............................................................................................................................642 FIIePeadFIoat
............................................................................................................................643 FIIePeadInteger
............................................................................................................................644 FIIePeadLong
............................................................................................................................645 FIIePeadNumber
............................................................................................................................646 FIIePeadStrIng
............................................................................................................................647 FIIePeadStruct
............................................................................................................................648 FIIeSeek
............................................................................................................................64º FIIeSIze
............................................................................................................................650 FIIeTeII
............................................................................................................................651 FIIeWrIte
............................................................................................................................652 FIIeWrIteArray
............................................................................................................................653 FIIeWrIte0oubIe
............................................................................................................................654 FIIeWrIteFIoat
............................................................................................................................655 FIIeWrIteInteger
............................................................................................................................656 FIIeWrIteLong
Coaepxanne 9
© 2000·2010, |eta0uotes Software Corp.
............................................................................................................................657 FIIeWrIteStrIng
............................................................................................................................658 FIIeWrIteStruct
............................................................................................................................65º FoIderCreate
............................................................................................................................660 FoIder0eIete
............................................................................................................................661 FoIderCIean
................................................................................................. 662 19 Custom IndIcators
............................................................................................................................666 ConnectIon between IndIcator PropertIes and FunctIons
............................................................................................................................668 SetIndexßuffer
............................................................................................................................671 IndIcatorSet0oubIe
............................................................................................................................672 IndIcatorSetInteger
............................................................................................................................673 IndIcatorSetStrIng
............................................................................................................................674 PIotIndexSet0oubIe
............................................................................................................................675 PIotIndexSetInteger
............................................................................................................................67º PIotIndexSetStrIng
............................................................................................................................680 PIotIndexCetInteger
................................................................................................. 683 20 Dbject FunctIons
............................................................................................................................685 DbjectCreate
............................................................................................................................687 DbjectName
............................................................................................................................688 Dbject0eIete
............................................................................................................................68º Dbjects0eIeteAII
............................................................................................................................6º0 DbjectFInd
............................................................................................................................6º1 DbjectCetTImeßyVaIue
............................................................................................................................6º2 DbjectCetVaIueßyTIme
............................................................................................................................6º3 Dbjecthove
............................................................................................................................6º4 DbjectsTotaI
............................................................................................................................6º5 DbjectSet0oubIe
............................................................................................................................6º8 DbjectSetInteger
............................................................................................................................6ºº DbjectSetStrIng
............................................................................................................................701 DbjectCet0oubIe
............................................................................................................................702 DbjectCetInteger
............................................................................................................................703 DbjectCetStrIng
................................................................................................. 705 21 TechnIcaI IndIcators
............................................................................................................................708 IAC
............................................................................................................................70º IA0
............................................................................................................................710 IA0X
............................................................................................................................711 IA0XWIIder
............................................................................................................................712 IAIIIgator
............................................................................................................................714 IAhA
............................................................................................................................715 IAD
............................................................................................................................716 IATP
............................................................................................................................717 IßearsPower
............................................................................................................................718 Ißands
............................................................................................................................71º IßuIIsPower
............................................................................................................................720 ICCI
............................................................................................................................721 IChaIkIn
............................................................................................................................722 ICustom
............................................................................................................................725 I0EhA
............................................................................................................................726 I0eharker
............................................................................................................................727 IEnveIopes
............................................................................................................................728 IForce
............................................................................................................................72º IFractaIs
............................................................................................................................730 IFrAhA
............................................................................................................................731 ICator
............................................................................................................................733 IIchImoku
............................................................................................................................734 IßWhFI
............................................................................................................................735 Ihomentum
............................................................................................................................736 IhFI
Coaepxanne 10
© 2000·2010, |eta0uotes Software Corp.
............................................................................................................................737 IhA
............................................................................................................................738 IDshA
............................................................................................................................73º IhAC0
............................................................................................................................740 IDßV
............................................................................................................................741 ISAP
............................................................................................................................742 IPSI
............................................................................................................................743 IPVI
............................................................................................................................744 IStd0ev
............................................................................................................................745 IStochastIc
............................................................................................................................746 ITEhA
............................................................................................................................747 ITrIX
............................................................................................................................748 IWPP
............................................................................................................................74º IVI0yA
............................................................................................................................750 IVoIumes
................................................................................................. 751 22 WorkIng wIth events
............................................................................................................................752 EventSetTImer
............................................................................................................................753 EventKIIITImer
............................................................................................................................754 EventChartCustom
................................................................................................. 75º 23 Standard LIbrary
............................................................................................................................760 ßasIc CIass CDbject
......................................................................................................................... 761 Prev
......................................................................................................................... 762 Prev
......................................................................................................................... 76J Next
......................................................................................................................... 764 Next
......................................................................................................................... 765 Compare
......................................................................................................................... 767 Save
......................................................................................................................... 769 Load
......................................................................................................................... 771 Type
............................................................................................................................772 CIasses of data
......................................................................................................................... 77J CArray
................................................................................................................ 775 Step
................................................................................................................ 776 Step
................................................................................................................ 777 Total
................................................................................................................ 778 AvaIlable
................................................................................................................ 779 |ax
................................................................................................................ 780 Ì sSorted
................................................................................................................ 781 Sort|ode
................................................................................................................ 782 Clear
................................................................................................................ 78J Sort
................................................................................................................ 784 Save
................................................................................................................ 785 Load
......................................................................................................................... 786 CArrayChar
................................................................................................................ 788 Feserve
................................................................................................................ 789 FesIze
................................................................................................................ 790 Shutdown
................................................................................................................ 791 Add
................................................................................................................ 792 AddArray
................................................................................................................ 79J AddArray
................................................................................................................ 795 Ì nsert
................................................................................................................ 796 Ì nsertArray
................................................................................................................ 797 Ì nsertArray
................................................................................................................ 799 AssIgnArray
................................................................................................................ 800 AssIgnArray
................................................................................................................ 802 Update
................................................................................................................ 80J ShIft
................................................................................................................ 804 0elete
................................................................................................................ 805 0eleteFange
................................................................................................................ 806 At
Coaepxanne 11
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 808 CompareArray
................................................................................................................ 809 CompareArray
................................................................................................................ 810 Ì nsertSort
................................................................................................................ 811 Search
................................................................................................................ 812 SearchCreat
................................................................................................................ 81J SearchLess
................................................................................................................ 814 SearchCreatDrEqual
................................................................................................................ 815 SearchLessDrEqual
................................................................................................................ 816 SearchFIrst
................................................................................................................ 817 SearchLast
................................................................................................................ 818 Save
................................................................................................................ 819 Load
................................................................................................................ 821 Type
......................................................................................................................... 822 CArrayShort
................................................................................................................ 824 Feserve
................................................................................................................ 825 FesIze
................................................................................................................ 826 Shutdown
................................................................................................................ 827 Add
................................................................................................................ 828 AddArray
................................................................................................................ 829 AddArray
................................................................................................................ 8J1 Ì nsert
................................................................................................................ 8J2 Ì nsertArray
................................................................................................................ 8JJ Ì nsertArray
................................................................................................................ 8J5 AssIgnArray
................................................................................................................ 8J6 AssIgnArray
................................................................................................................ 8J8 Update
................................................................................................................ 8J9 ShIft
................................................................................................................ 840 0elete
................................................................................................................ 841 0eleteFange
................................................................................................................ 842 At
................................................................................................................ 844 CompareArray
................................................................................................................ 845 CompareArray
................................................................................................................ 846 Ì nsertSort
................................................................................................................ 847 Search
................................................................................................................ 848 SearchCreat
................................................................................................................ 849 SearchLess
................................................................................................................ 850 SearchCreatDrEqual
................................................................................................................ 851 SearchLessDrEqual
................................................................................................................ 852 SearchFIrst
................................................................................................................ 85J SearchLast
................................................................................................................ 854 Save
................................................................................................................ 856 Load
................................................................................................................ 858 Type
......................................................................................................................... 859 CArrayÌ nt
................................................................................................................ 861 Feserve
................................................................................................................ 862 FesIze
................................................................................................................ 86J Shutdown
................................................................................................................ 864 Add
................................................................................................................ 865 AddArray
................................................................................................................ 866 AddArray
................................................................................................................ 868 Ì nsert
................................................................................................................ 869 Ì nsertArray
................................................................................................................ 870 Ì nsertArray
................................................................................................................ 872 AssIgnArray
................................................................................................................ 87J AssIgnArray
................................................................................................................ 875 Update
................................................................................................................ 876 ShIft
................................................................................................................ 877 0elete
Coaepxanne 12
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 878 0eleteFange
................................................................................................................ 879 At
................................................................................................................ 881 CompareArray
................................................................................................................ 882 CompareArray
................................................................................................................ 88J Ì nsertSort
................................................................................................................ 884 Search
................................................................................................................ 885 SearchCreat
................................................................................................................ 886 SearchLess
................................................................................................................ 887 SearchCreatDrEqual
................................................................................................................ 888 SearchLessDrEqual
................................................................................................................ 889 SearchFIrst
................................................................................................................ 890 SearchLast
................................................................................................................ 891 Save
................................................................................................................ 89J Load
................................................................................................................ 895 Type
......................................................................................................................... 896 CArrayLong
................................................................................................................ 898 Feserve
................................................................................................................ 899 FesIze
................................................................................................................ 900 Shutdown
................................................................................................................ 901 Add
................................................................................................................ 902 AddArray
................................................................................................................ 90J AddArray
................................................................................................................ 905 Ì nsert
................................................................................................................ 906 Ì nsertArray
................................................................................................................ 907 Ì nsertArray
................................................................................................................ 909 AssIgnArray
................................................................................................................ 910 AssIgnArray
................................................................................................................ 912 Update
................................................................................................................ 91J ShIft
................................................................................................................ 914 0elete
................................................................................................................ 915 0eleteFange
................................................................................................................ 916 At
................................................................................................................ 918 CompareArray
................................................................................................................ 919 CompareArray
................................................................................................................ 920 Ì nsertSort
................................................................................................................ 921 Search
................................................................................................................ 922 SearchCreat
................................................................................................................ 92J SearchLess
................................................................................................................ 924 SearchCreatDrEqual
................................................................................................................ 925 SearchLessDrEqual
................................................................................................................ 926 SearchFIrst
................................................................................................................ 927 SearchLast
................................................................................................................ 928 Save
................................................................................................................ 9J0 Load
................................................................................................................ 9J2 Type
......................................................................................................................... 9JJ CArrayFloat
................................................................................................................ 9J5 0elta
................................................................................................................ 9J6 Feserve
................................................................................................................ 9J7 FesIze
................................................................................................................ 9J8 Shutdown
................................................................................................................ 9J9 Add
................................................................................................................ 940 AddArray
................................................................................................................ 941 AddArray
................................................................................................................ 94J Ì nsert
................................................................................................................ 944 Ì nsertArray
................................................................................................................ 945 Ì nsertArray
................................................................................................................ 947 AssIgnArray
................................................................................................................ 948 AssIgnArray
Coaepxanne 13
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 950 Update
................................................................................................................ 951 ShIft
................................................................................................................ 952 0elete
................................................................................................................ 95J 0eleteFange
................................................................................................................ 954 At
................................................................................................................ 956 CompareArray
................................................................................................................ 957 CompareArray
................................................................................................................ 958 Ì nsertSort
................................................................................................................ 959 Search
................................................................................................................ 960 SearchCreat
................................................................................................................ 961 SearchLess
................................................................................................................ 962 SearchCreatDrEqual
................................................................................................................ 96J SearchLessDrEqual
................................................................................................................ 964 SearchFIrst
................................................................................................................ 965 SearchLast
................................................................................................................ 966 Save
................................................................................................................ 968 Load
................................................................................................................ 970 Type
......................................................................................................................... 971 CArray0ouble
................................................................................................................ 97J 0elta
................................................................................................................ 974 Feserve
................................................................................................................ 975 FesIze
................................................................................................................ 976 Shutdown
................................................................................................................ 977 Add
................................................................................................................ 978 AddArray
................................................................................................................ 979 AddArray
................................................................................................................ 981 Ì nsert
................................................................................................................ 982 Ì nsertArray
................................................................................................................ 98J Ì nsertArray
................................................................................................................ 985 AssIgnArray
................................................................................................................ 986 AssIgnArray
................................................................................................................ 988 Update
................................................................................................................ 989 ShIft
................................................................................................................ 990 0elete
................................................................................................................ 991 0eleteFange
................................................................................................................ 992 At
................................................................................................................ 994 CompareArray
................................................................................................................ 995 CompareArray
................................................................................................................ 996 Ì nsertSort
................................................................................................................ 997 Search
................................................................................................................ 998 SearchCreat
................................................................................................................ 999 SearchLess
................................................................................................................ 1000 SearchCreatDrEqual
................................................................................................................ 1001 SearchLessDrEqual
................................................................................................................ 1002 SearchFIrst
................................................................................................................ 100J SearchLast
................................................................................................................ 1004 Save
................................................................................................................ 1006 Load
................................................................................................................ 1008 Type
......................................................................................................................... 1009 CArrayStrIng
................................................................................................................ 1011 Feserve
................................................................................................................ 1012 FesIze
................................................................................................................ 101J Shutdown
................................................................................................................ 1014 Add
................................................................................................................ 1015 AddArray
................................................................................................................ 1016 AddArray
................................................................................................................ 1018 Ì nsert
................................................................................................................ 1019 Ì nsertArray
Coaepxanne 14
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 1020 Ì nsertArray
................................................................................................................ 1022 AssIgnArray
................................................................................................................ 102J AssIgnArray
................................................................................................................ 1025 Update
................................................................................................................ 1026 ShIft
................................................................................................................ 1027 0elete
................................................................................................................ 1028 0eleteFange
................................................................................................................ 1029 At
................................................................................................................ 10J1 CompareArray
................................................................................................................ 10J2 CompareArray
................................................................................................................ 10JJ Ì nsertSort
................................................................................................................ 10J4 Search
................................................................................................................ 10J5 SearchCreat
................................................................................................................ 10J6 SearchLess
................................................................................................................ 10J7 SearchCreatDrEqual
................................................................................................................ 10J8 SearchLessDrEqual
................................................................................................................ 10J9 SearchFIrst
................................................................................................................ 1040 SearchLast
................................................................................................................ 1041 Save
................................................................................................................ 104J Load
................................................................................................................ 1045 Type
......................................................................................................................... 1046 CArrayDbj
................................................................................................................ 1051 Free|ode
................................................................................................................ 1052 Free|ode
................................................................................................................ 1054 Feserve
................................................................................................................ 1055 FesIze
................................................................................................................ 1057 Clear
................................................................................................................ 1058 Shutdown
................................................................................................................ 1059 CreateElement
................................................................................................................ 1061 Add
................................................................................................................ 1062 AddArray
................................................................................................................ 1065 Ì nsert
................................................................................................................ 1067 Ì nsertArray
................................................................................................................ 1069 AssIgnArray
................................................................................................................ 1071 Update
................................................................................................................ 1072 ShIft
................................................................................................................ 107J 0etach
................................................................................................................ 1074 0elete
................................................................................................................ 1075 0eleteFange
................................................................................................................ 1076 At
................................................................................................................ 1077 CompareArray
................................................................................................................ 1078 Ì nsertSort
................................................................................................................ 1079 Search
................................................................................................................ 1080 SearchCreat
................................................................................................................ 1081 SearchLess
................................................................................................................ 1082 SearchCreatDrEqual
................................................................................................................ 108J SearchLessDrEqual
................................................................................................................ 1084 SearchFIrst
................................................................................................................ 1085 SearchLast
................................................................................................................ 1086 Save
................................................................................................................ 1087 Load
................................................................................................................ 1089 Type
......................................................................................................................... 1090 CLIst
................................................................................................................ 1092 Free|ode
................................................................................................................ 109J Free|ode
................................................................................................................ 1095 Total
................................................................................................................ 1096 Ì sSorted
................................................................................................................ 1097 Sort|ode
Coaepxanne 15
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 1098 CreateElement
................................................................................................................ 1099 Add
................................................................................................................ 1100 Ì nsert
................................................................................................................ 1102 0etachCurrent
................................................................................................................ 110J 0eleteCurrent
................................................................................................................ 1104 0elete
................................................................................................................ 1105 Clear
................................................................................................................ 1106 Ì ndexDf
................................................................................................................ 1107 CetNodeAtÌ ndex
................................................................................................................ 1108 CetFIrstNode
................................................................................................................ 1109 CetPrevNode
................................................................................................................ 1110 CetCurrentNode
................................................................................................................ 1111 CetNextNode
................................................................................................................ 1112 CetLastNode
................................................................................................................ 111J Sort
................................................................................................................ 1114 |oveToÌ ndex
................................................................................................................ 1115 Exchange
................................................................................................................ 1116 CompareLIst
................................................................................................................ 1117 Search
................................................................................................................ 1118 Save
................................................................................................................ 1120 Load
................................................................................................................ 1122 Type
......................................................................................................................... 112J CTreeNode
................................................................................................................ 1128 Dwner
................................................................................................................ 1129 Left
................................................................................................................ 11J0 FIght
................................................................................................................ 11J1 8alance
................................................................................................................ 11J2 8alanceL
................................................................................................................ 11JJ 8alanceF
................................................................................................................ 11J4 CreateSample
................................................................................................................ 11J5 Fefresh8alance
................................................................................................................ 11J6 CetNext
................................................................................................................ 11J7 SaveNode
................................................................................................................ 11J8 LoadNode
................................................................................................................ 11J9 Type
......................................................................................................................... 1140 CTree
................................................................................................................ 1145 Foot
................................................................................................................ 1146 CreateElement
................................................................................................................ 1147 Ì nsert
................................................................................................................ 1148 0etach
................................................................................................................ 1149 0elete
................................................................................................................ 1150 Clear
................................................................................................................ 1151 FInd
................................................................................................................ 1152 Save
................................................................................................................ 115J Load
................................................................................................................ 1154 Type
............................................................................................................................1155 CIasses for CraphIc Dbjects
......................................................................................................................... 1156 CChartDbject
................................................................................................................ 1159 ChartÌ d
................................................................................................................ 1160 WIndow
................................................................................................................ 1161 Name
................................................................................................................ 1162 NumPoInts
................................................................................................................ 116J Attach
................................................................................................................ 1164 SetPoInt
................................................................................................................ 1165 0elete
................................................................................................................ 1166 0etach
................................................................................................................ 1167 ShIftDbject
................................................................................................................ 1168 ShIftPoInt
Coaepxanne 16
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 1169 TIme
................................................................................................................ 1171 PrIce
................................................................................................................ 117J Color
................................................................................................................ 1174 Style
................................................................................................................ 1175 WIdth
................................................................................................................ 1176 8ackground
................................................................................................................ 1177 Selected
................................................................................................................ 1178 Selectable
................................................................................................................ 1179 0escrIptIon
................................................................................................................ 1180 TImeframes
................................................................................................................ 1181 CreateTIme
................................................................................................................ 1182 LevelsCount
................................................................................................................ 118J LevelColor
................................................................................................................ 1185 LevelStyle
................................................................................................................ 1187 LevelWIdth
................................................................................................................ 1189 Level7alue
................................................................................................................ 1191 Level0escrIptIon
................................................................................................................ 119J CetÌ nteger
................................................................................................................ 1195 SetÌ nteger
................................................................................................................ 1197 Cet0ouble
................................................................................................................ 1199 Set0ouble
................................................................................................................ 1201 CetStrIng
................................................................................................................ 120J SetStrIng
................................................................................................................ 1205 Save
................................................................................................................ 1206 Load
................................................................................................................ 1207 Type
......................................................................................................................... 1208 Dbjects LInes
................................................................................................................ 1209 CChartDbject7LIne
........................................................................................................... 1210 Create
........................................................................................................... 1211 Type
................................................................................................................ 1212 CChartDbjectHLIne
........................................................................................................... 121J Create
........................................................................................................... 1214 Type
................................................................................................................ 1215 CChartDbjectTrend
........................................................................................................... 1216 Create
........................................................................................................... 1217 FayLeft
........................................................................................................... 1218 FayFIght
........................................................................................................... 1219 Save
........................................................................................................... 1220 Load
........................................................................................................... 1221 Type
................................................................................................................ 1222 CChartDbjectTrend8yAngle
........................................................................................................... 122J Create
........................................................................................................... 1224 Angle
........................................................................................................... 1225 Type
................................................................................................................ 1226 CChartDbjectCycles
........................................................................................................... 1227 Create
........................................................................................................... 1228 Type
......................................................................................................................... 1229 Dbjects Channels
................................................................................................................ 12J0 CChartDbjectChannel
........................................................................................................... 12J1 Create
........................................................................................................... 12J2 Type
................................................................................................................ 12JJ CChartDbjectFegressIon
........................................................................................................... 12J4 Create
........................................................................................................... 12J5 Type
................................................................................................................ 12J6 CChartDbjectStd0evChannel
........................................................................................................... 12J7 Create
........................................................................................................... 12J8 0evIatIons
........................................................................................................... 12J9 Save
Coaepxanne 17
© 2000·2010, |eta0uotes Software Corp.
........................................................................................................... 1240 Load
........................................................................................................... 1241 Type
................................................................................................................ 1242 CChartDbjectPItchfork
........................................................................................................... 124J Create
........................................................................................................... 1244 Type
......................................................................................................................... 1245 Cann Tools
................................................................................................................ 1246 CChartDbjectCannLIne
........................................................................................................... 1247 Create
........................................................................................................... 1248 PIpsPer8ar
........................................................................................................... 1249 Save
........................................................................................................... 1250 Load
........................................................................................................... 1251 Type
................................................................................................................ 1252 CChartDbjectCannFan
........................................................................................................... 125J Create
........................................................................................................... 1254 PIpsPer8ar
........................................................................................................... 1255 0owntrend
........................................................................................................... 1256 Save
........................................................................................................... 1257 Load
........................................................................................................... 1258 Type
................................................................................................................ 1259 CChartDbjectCannCrId
........................................................................................................... 1260 Create
........................................................................................................... 1261 PIpsPer8ar
........................................................................................................... 1262 0owntrend
........................................................................................................... 126J Save
........................................................................................................... 1264 Load
........................................................................................................... 1265 Type
......................................................................................................................... 1266 FIbonaccI Tools
................................................................................................................ 1267 CChartDbjectFIbo
........................................................................................................... 1268 Create
........................................................................................................... 1269 Type
................................................................................................................ 1270 CChartDbjectFIboTImes
........................................................................................................... 1271 Create
........................................................................................................... 1272 Type
................................................................................................................ 127J CChartDbjectFIboFan
........................................................................................................... 1274 Create
........................................................................................................... 1275 Type
................................................................................................................ 1276 CChartDbjectFIboArc
........................................................................................................... 1277 Create
........................................................................................................... 1278 Scale
........................................................................................................... 1279 EllIpse
........................................................................................................... 1280 Save
........................................................................................................... 1281 Load
........................................................................................................... 1282 Type
................................................................................................................ 128J CChartDbjectFIboChannel
........................................................................................................... 1284 Create
........................................................................................................... 1285 Type
................................................................................................................ 1286 CChartDbjectFIboExpansIon
........................................................................................................... 1287 Create
........................................................................................................... 1288 Type
......................................................................................................................... 1289 EllIott Tools
................................................................................................................ 1290 CChartDbjectEllIottWaveJ
........................................................................................................... 1291 Create
........................................................................................................... 1292 0egree
........................................................................................................... 129J LInes
........................................................................................................... 1294 Save
........................................................................................................... 1295 Load
........................................................................................................... 1296 Type
................................................................................................................ 1297 CChartDbjectEllIottWave5
Coaepxanne 18
© 2000·2010, |eta0uotes Software Corp.
........................................................................................................... 1298 Create
........................................................................................................... 1J00 Type
......................................................................................................................... 1J01 Dbjects Shapes
................................................................................................................ 1J02 CChartDbjectFectangle
........................................................................................................... 1J0J Create
........................................................................................................... 1J04 Type
................................................................................................................ 1J05 CChartDbjectTrIangle
........................................................................................................... 1J06 Create
........................................................................................................... 1J07 Type
................................................................................................................ 1J08 CChartDbjectEllIpse
........................................................................................................... 1J09 Create
........................................................................................................... 1J10 Type
......................................................................................................................... 1J11 Dbjects Arrows
................................................................................................................ 1J12 CChartDbjectArrow
........................................................................................................... 1J1J Create
........................................................................................................... 1J15 ArrowCode
........................................................................................................... 1J17 Anchor
........................................................................................................... 1J19 Save
........................................................................................................... 1J20 Load
........................................................................................................... 1J21 Type
................................................................................................................ 1J22 Arrows wIth fIxed code
........................................................................................................... 1J24 Create
........................................................................................................... 1J26 ArrowCode
........................................................................................................... 1J27 Type
......................................................................................................................... 1J28 Dbjects Controls
................................................................................................................ 1J29 CChartDbjectText
........................................................................................................... 1JJ0 Create
........................................................................................................... 1JJ1 Angle
........................................................................................................... 1JJ2 Font
........................................................................................................... 1JJJ FontSIze
........................................................................................................... 1JJ4 Anchor
........................................................................................................... 1JJ5 Save
........................................................................................................... 1JJ6 Load
........................................................................................................... 1JJ7 Type
................................................................................................................ 1JJ8 CChartDbjectLabel
........................................................................................................... 1JJ9 Create
........................................................................................................... 1J40 X_0Istance
........................................................................................................... 1J41 Y_0Istance
........................................................................................................... 1J42 X_SIze
........................................................................................................... 1J4J Y_SIze
........................................................................................................... 1J44 Corner
........................................................................................................... 1J45 TIme
........................................................................................................... 1J46 PrIce
........................................................................................................... 1J47 Save
........................................................................................................... 1J48 Load
........................................................................................................... 1J49 Type
................................................................................................................ 1J50 CChartDbjectEdIt
........................................................................................................... 1J51 Create
........................................................................................................... 1J52 X_SIze
........................................................................................................... 1J5J Y_SIze
........................................................................................................... 1J54 8ackColor
........................................................................................................... 1J55 Angle
........................................................................................................... 1J56 Save
........................................................................................................... 1J57 Load
........................................................................................................... 1J58 Type
................................................................................................................ 1J59 CChartDbject8utton
........................................................................................................... 1J60 State
........................................................................................................... 1J61 Save
Coaepxanne 19
© 2000·2010, |eta0uotes Software Corp.
........................................................................................................... 1J62 Load
........................................................................................................... 1J6J Type
................................................................................................................ 1J64 CChartDbjectSubChart
........................................................................................................... 1J66 Create
........................................................................................................... 1J67 X_0Istance
........................................................................................................... 1J68 Y_0Istance
........................................................................................................... 1J69 Corner
........................................................................................................... 1J70 X_SIze
........................................................................................................... 1J71 Y_SIze
........................................................................................................... 1J72 Symbol
........................................................................................................... 1J7J PerIod
........................................................................................................... 1J74 Scale
........................................................................................................... 1J75 0ateScale
........................................................................................................... 1J76 PrIceScale
........................................................................................................... 1J77 TIme
........................................................................................................... 1J78 PrIce
........................................................................................................... 1J79 Save
........................................................................................................... 1J80 Load
........................................................................................................... 1J81 Type
................................................................................................................ 1J82 CChartDbject8Itmap
........................................................................................................... 1J8J Create
........................................................................................................... 1J84 8mpFIle
........................................................................................................... 1J85 Save
........................................................................................................... 1J86 Load
........................................................................................................... 1J87 Type
................................................................................................................ 1J88 CChartDbject8mpLabel
........................................................................................................... 1J90 Create
........................................................................................................... 1J91 X_0Istance
........................................................................................................... 1J92 Y_0Istance
........................................................................................................... 1J9J Corner
........................................................................................................... 1J94 X_SIze
........................................................................................................... 1J95 Y_SIze
........................................................................................................... 1J96 8mpFIleDn
........................................................................................................... 1J97 8mpFIleDff
........................................................................................................... 1J98 State
........................................................................................................... 1J99 TIme
........................................................................................................... 1400 PrIce
........................................................................................................... 1401 Save
........................................................................................................... 1402 Load
........................................................................................................... 140J Type
............................................................................................................................1404 CIass for workIng wIth chart
......................................................................................................................... 1408 ChartÌ 0
......................................................................................................................... 1409 |ode
......................................................................................................................... 1410 Foreground
......................................................................................................................... 1411 ShIft
......................................................................................................................... 1412 ShIftSIze
......................................................................................................................... 141J AutoScroll
......................................................................................................................... 1414 Scale
......................................................................................................................... 1415 ScaleFIx
......................................................................................................................... 1416 ScaleFIx_11
......................................................................................................................... 1417 FIxed|ax
......................................................................................................................... 1418 FIxed|In
......................................................................................................................... 1419 PoIntsPer8ar
......................................................................................................................... 1420 ScalePP8
......................................................................................................................... 1421 ShowDHLC
......................................................................................................................... 1422 ShowLIne8Id
......................................................................................................................... 142J ShowLIneAsk
......................................................................................................................... 1424 ShowLastLIne
Coaepxanne 20
© 2000·2010, |eta0uotes Software Corp.
......................................................................................................................... 1425 ShowPerIodSep
......................................................................................................................... 1426 ShowCrId
......................................................................................................................... 1427 Show7olumes
......................................................................................................................... 1428 ShowDbject0escr
......................................................................................................................... 1429 Color8ackground
......................................................................................................................... 14J0 ColorForeground
......................................................................................................................... 14J1 ColorCrId
......................................................................................................................... 14J2 Color8arUp
......................................................................................................................... 14JJ Color8ar0own
......................................................................................................................... 14J4 ColorCandle8ull
......................................................................................................................... 14J5 ColorCandle8ear
......................................................................................................................... 14J6 ColorChartLIne
......................................................................................................................... 14J7 Color7olumes
......................................................................................................................... 14J8 ColorLIne8Id
......................................................................................................................... 14J9 ColorLIneAsk
......................................................................................................................... 1440 ColorLIneLast
......................................................................................................................... 1441 ColorStopLevels
......................................................................................................................... 1442 7IsIble8ars
......................................................................................................................... 144J WIndowsTotal
......................................................................................................................... 1444 WIndowÌ s7IsIble
......................................................................................................................... 1445 WIndowHandle
......................................................................................................................... 1446 FIrst7IsIble8ar
......................................................................................................................... 1447 WIdthÌ n8ars
......................................................................................................................... 1448 WIdthÌ nPIxels
......................................................................................................................... 1449 HeIghtÌ nPIxels
......................................................................................................................... 1450 PrIce|In
......................................................................................................................... 1451 PrIce|ax
......................................................................................................................... 1452 Attach
......................................................................................................................... 145J FIrstChart
......................................................................................................................... 1454 NextChart
......................................................................................................................... 1455 Dpen
......................................................................................................................... 1456 0etach
......................................................................................................................... 1457 Close
......................................................................................................................... 1458 NavIgate
......................................................................................................................... 1459 Symbol
......................................................................................................................... 1460 PerIod
......................................................................................................................... 1461 Fedraw
......................................................................................................................... 1462 CetÌ nteger
......................................................................................................................... 146J SetÌ nteger
......................................................................................................................... 1464 Cet0ouble
......................................................................................................................... 1465 Set0ouble
......................................................................................................................... 1466 CetStrIng
......................................................................................................................... 1467 SetStrIng
......................................................................................................................... 1468 SetSymbolPerIod
......................................................................................................................... 1469 ApplyTemplate
......................................................................................................................... 1470 ScreenShot
......................................................................................................................... 1471 WIndowDn0ropped
......................................................................................................................... 1472 PrIceDn0ropped
......................................................................................................................... 147J TImeDn0ropped
......................................................................................................................... 1474 XDn0ropped
......................................................................................................................... 1475 YDn0ropped
......................................................................................................................... 1476 Save
......................................................................................................................... 1477 Load
......................................................................................................................... 1478 Type
............................................................................................................................147º CIasses for fIIe operatIons
......................................................................................................................... 1480 CFIle
................................................................................................................ 1482 Handle
................................................................................................................ 148J FIlename
Coaepxanne 21
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 1484 Flags
................................................................................................................ 1485 SetUnIcode
................................................................................................................ 1486 SetCommon
................................................................................................................ 1487 Dpen
................................................................................................................ 1488 Close
................................................................................................................ 1489 0elete
................................................................................................................ 1490 Ì sExIst
................................................................................................................ 1491 Copy
................................................................................................................ 1492 |ove
................................................................................................................ 149J SIze
................................................................................................................ 1494 Tell
................................................................................................................ 1495 Seek
................................................................................................................ 1496 Flush
................................................................................................................ 1497 Ì sEndIng
................................................................................................................ 1498 Ì sLIneEndIng
................................................................................................................ 1499 FolderCreate
................................................................................................................ 1500 Folder0elete
................................................................................................................ 1501 FolderClean
................................................................................................................ 1502 FIleFIndFIrst
................................................................................................................ 150J FIleFIndNext
................................................................................................................ 1504 FIleFIndClose
......................................................................................................................... 1505 CFIle8In
................................................................................................................ 1507 Dpen
................................................................................................................ 1508 WrIteChar
................................................................................................................ 1509 WrIteShort
................................................................................................................ 1510 WrIteÌ nteger
................................................................................................................ 1511 WrIteLong
................................................................................................................ 1512 WrIteFloat
................................................................................................................ 151J WrIte0ouble
................................................................................................................ 1514 WrIteStrIng
................................................................................................................ 1515 WrIteCharArray
................................................................................................................ 1516 WrIteShortArray
................................................................................................................ 1517 WrIteÌ ntegerArray
................................................................................................................ 1518 WrIteLongArray
................................................................................................................ 1519 WrIteFloatArray
................................................................................................................ 1520 WrIte0oubleArray
................................................................................................................ 1521 WrIteDbject
................................................................................................................ 1522 FeadChar
................................................................................................................ 152J FeadShort
................................................................................................................ 1524 FeadÌ nteger
................................................................................................................ 1525 FeadLong
................................................................................................................ 1526 FeadFloat
................................................................................................................ 1527 Fead0ouble
................................................................................................................ 1528 FeadStrIng
................................................................................................................ 1529 FeadCharArray
................................................................................................................ 15J0 FeadShortArray
................................................................................................................ 15J1 FeadÌ ntegerArray
................................................................................................................ 15J2 FeadLongArray
................................................................................................................ 15JJ FeadFloatArray
................................................................................................................ 15J4 Fead0oubleArray
................................................................................................................ 15J5 FeadDbject
......................................................................................................................... 15J6 CFIleTxt
................................................................................................................ 15J7 Dpen
................................................................................................................ 15J8 WrIteStrIng
................................................................................................................ 15J9 FeadStrIng
............................................................................................................................1540 CIass for StrIng operatIons
......................................................................................................................... 1541 CStrIng
................................................................................................................ 154J Str
Coaepxanne 22
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 1544 Len
................................................................................................................ 1545 Copy
................................................................................................................ 1546 FIll
................................................................................................................ 1547 AssIgn
................................................................................................................ 1548 Append
................................................................................................................ 1549 Ì nsert
................................................................................................................ 1550 Compare
................................................................................................................ 1551 CompareNoCase
................................................................................................................ 1552 Left
................................................................................................................ 155J FIght
................................................................................................................ 1554 |Id
................................................................................................................ 1555 TrIm
................................................................................................................ 1556 TrImLeft
................................................................................................................ 1557 TrImFIght
................................................................................................................ 1558 Clear
................................................................................................................ 1559 ToUpper
................................................................................................................ 1560 ToLower
................................................................................................................ 1561 Feverse
................................................................................................................ 1562 FInd
................................................................................................................ 156J FIndFev
................................................................................................................ 1564 Femove
................................................................................................................ 1565 Feplace
............................................................................................................................1566 CIasses for workIng wIth IndIcators
......................................................................................................................... 1567 CÌ ndIcator 8ase Class
................................................................................................................ 1570 Handle
................................................................................................................ 1571 Name
................................................................................................................ 1572 Status
................................................................................................................ 157J Num8uffers
................................................................................................................ 1574 TImeframe
................................................................................................................ 1575 Symbol
................................................................................................................ 1576 PerIod
................................................................................................................ 1577 CurrentNeed
................................................................................................................ 1578 Create
................................................................................................................ 1579 8uffSIze
................................................................................................................ 1580 Cet0ata
................................................................................................................ 1582 |InImum
................................................................................................................ 158J |In7alue
................................................................................................................ 1584 |axImum
................................................................................................................ 1585 |ax7alue
................................................................................................................ 1586 Fefresh
................................................................................................................ 1587 PerIodStr
................................................................................................................ 1588 |ethodStr
................................................................................................................ 1589 PrIceStr
................................................................................................................ 1590 7olumeStr
......................................................................................................................... 1591 CÌ ndIcator8uffer AuxIlIary Class
................................................................................................................ 1592 SIze
................................................................................................................ 159J Dffset
................................................................................................................ 1594 Name
................................................................................................................ 1595 At
................................................................................................................ 1596 |InImum
................................................................................................................ 1597 |axImum
................................................................................................................ 1598 Fefresh
................................................................................................................ 1599 Fefresh_0_only
......................................................................................................................... 1600 Trend Ì ndIcators
................................................................................................................ 1601 CIA0X
........................................................................................................... 1602 |aPerIod
........................................................................................................... 160J Create
........................................................................................................... 1604 |aIn
Coaepxanne 23
© 2000·2010, |eta0uotes Software Corp.
........................................................................................................... 1605 Plus
........................................................................................................... 1606 |Inus
........................................................................................................... 1607 Type
................................................................................................................ 1608 CIA0XWIlder
........................................................................................................... 1609 |aPerIod
........................................................................................................... 1610 Create
........................................................................................................... 1611 |aIn
........................................................................................................... 1612 Plus
........................................................................................................... 161J |Inus
........................................................................................................... 1614 Type
................................................................................................................ 1615 CI8ands
........................................................................................................... 1616 |aPerIod
........................................................................................................... 1617 |aShIft
........................................................................................................... 1618 0evIatIon
........................................................................................................... 1619 ApplIed
........................................................................................................... 1620 Create
........................................................................................................... 1621 8ase
........................................................................................................... 1622 Upper
........................................................................................................... 162J Lower
........................................................................................................... 1624 Type
................................................................................................................ 1625 CIEnvelopes
........................................................................................................... 1626 |aPerIod
........................................................................................................... 1627 |aShIft
........................................................................................................... 1628 |a|ethod
........................................................................................................... 1629 0evIatIon
........................................................................................................... 16J0 ApplIed
........................................................................................................... 16J1 Create
........................................................................................................... 16J2 Upper
........................................................................................................... 16JJ Lower
........................................................................................................... 16J4 Type
................................................................................................................ 16J5 CIÌ chImoku
........................................................................................................... 16J6 TenkanSenPerIod
........................................................................................................... 16J7 KIjunSenPerIod
........................................................................................................... 16J8 SenkouSpan8PerIod
........................................................................................................... 16J9 Create
........................................................................................................... 1640 TenkanSen
........................................................................................................... 1641 KIjunSen
........................................................................................................... 1642 SenkouSpanA
........................................................................................................... 164J SenkouSpan8
........................................................................................................... 1644 ChInkouSpan
........................................................................................................... 1645 Type
................................................................................................................ 1646 CI|A
........................................................................................................... 1647 |aPerIod
........................................................................................................... 1648 |aShIft
........................................................................................................... 1649 |a|ethod
........................................................................................................... 1650 ApplIed
........................................................................................................... 1651 Create
........................................................................................................... 1652 |aIn
........................................................................................................... 165J Type
................................................................................................................ 1654 CISAF
........................................................................................................... 1655 SarStep
........................................................................................................... 1656 |axImum
........................................................................................................... 1657 Create
........................................................................................................... 1658 |aIn
........................................................................................................... 1659 Type
................................................................................................................ 1660 CIStd0ev
........................................................................................................... 1661 |aPerIod
........................................................................................................... 1662 |aShIft
Coaepxanne 24
© 2000·2010, |eta0uotes Software Corp.
........................................................................................................... 166J |a|ethod
........................................................................................................... 1664 ApplIed
........................................................................................................... 1665 Create
........................................................................................................... 1666 |aIn
........................................................................................................... 1667 Type
................................................................................................................ 1668 CI0E|A
........................................................................................................... 1669 |aPerIod
........................................................................................................... 1670 Ì ndShIft
........................................................................................................... 1671 ApplIed
........................................................................................................... 1672 Create
........................................................................................................... 167J |aIn
........................................................................................................... 1674 Type
................................................................................................................ 1675 CITE|A
........................................................................................................... 1676 |aPerIod
........................................................................................................... 1677 Ì ndShIft
........................................................................................................... 1678 ApplIed
........................................................................................................... 1679 Create
........................................................................................................... 1680 |aIn
........................................................................................................... 1681 Type
................................................................................................................ 1682 CIFrA|A
........................................................................................................... 168J |aPerIod
........................................................................................................... 1684 Ì ndShIft
........................................................................................................... 1685 ApplIed
........................................................................................................... 1686 Create
........................................................................................................... 1687 |aIn
........................................................................................................... 1688 Type
................................................................................................................ 1689 CIA|A
........................................................................................................... 1690 |aPerIod
........................................................................................................... 1691 FastEmaPerIod
........................................................................................................... 1692 SlowEmaPerIod
........................................................................................................... 169J Ì ndShIft
........................................................................................................... 1694 ApplIed
........................................................................................................... 1695 Create
........................................................................................................... 1696 |aIn
........................................................................................................... 1697 Type
................................................................................................................ 1698 CI7Ì 0yA
........................................................................................................... 1699 CmoPerIod
........................................................................................................... 1700 EmaPerIod
........................................................................................................... 1701 Ì ndShIft
........................................................................................................... 1702 ApplIed
........................................................................................................... 170J Create
........................................................................................................... 1704 |aIn
........................................................................................................... 1705 Type
......................................................................................................................... 1706 DscIllators
................................................................................................................ 1707 CIATF
........................................................................................................... 1708 |aPerIod
........................................................................................................... 1709 Create
........................................................................................................... 1710 |aIn
........................................................................................................... 1711 Type
................................................................................................................ 1712 CI8earsPower
........................................................................................................... 171J |aPerIod
........................................................................................................... 1714 Create
........................................................................................................... 1715 |aIn
........................................................................................................... 1716 Type
................................................................................................................ 1717 CI8ullsPower
........................................................................................................... 1718 |aPerIod
........................................................................................................... 1719 Create
........................................................................................................... 1720 |aIn
Coaepxanne 25
© 2000·2010, |eta0uotes Software Corp.
........................................................................................................... 1721 Type
................................................................................................................ 1722 CICCÌ
........................................................................................................... 172J |aPerIod
........................................................................................................... 1724 ApplIed
........................................................................................................... 1725 Create
........................................................................................................... 1726 |aIn
........................................................................................................... 1727 Type
................................................................................................................ 1728 CIChaIkIn
........................................................................................................... 1729 Fast|aPerIod
........................................................................................................... 17J0 Slow|aPerIod
........................................................................................................... 17J1 |a|ethod
........................................................................................................... 17J2 ApplIed
........................................................................................................... 17JJ Create
........................................................................................................... 17J4 |aIn
........................................................................................................... 17J5 Type
................................................................................................................ 17J6 CI0e|arker
........................................................................................................... 17J7 |aPerIod
........................................................................................................... 17J8 Create
........................................................................................................... 17J9 |aIn
........................................................................................................... 1740 Type
................................................................................................................ 1741 CIForce
........................................................................................................... 1742 |aPerIod
........................................................................................................... 174J |a|ethod
........................................................................................................... 1744 ApplIed
........................................................................................................... 1745 Create
........................................................................................................... 1746 |aIn
........................................................................................................... 1747 Type
................................................................................................................ 1748 CI|AC0
........................................................................................................... 1749 FastEmaPerIod
........................................................................................................... 1750 SlowEmaPerIod
........................................................................................................... 1751 SIgnalPerIod
........................................................................................................... 1752 ApplIed
........................................................................................................... 175J Create
........................................................................................................... 1754 |aIn
........................................................................................................... 1755 SIgnal
........................................................................................................... 1756 Type
................................................................................................................ 1757 CI|omentum
........................................................................................................... 1758 |aPerIod
........................................................................................................... 1759 ApplIed
........................................................................................................... 1760 Create
........................................................................................................... 1761 |aIn
........................................................................................................... 1762 Type
................................................................................................................ 176J CIDs|A
........................................................................................................... 1764 FastEmaPerIod
........................................................................................................... 1765 SlowEmaPerIod
........................................................................................................... 1766 SIgnalPerIod
........................................................................................................... 1767 ApplIed
........................................................................................................... 1768 Create
........................................................................................................... 1769 |aIn
........................................................................................................... 1770 Type
................................................................................................................ 1771 CIFSÌ
........................................................................................................... 1772 |aPerIod
........................................................................................................... 177J ApplIed
........................................................................................................... 1774 Create
........................................................................................................... 1775 |aIn
........................................................................................................... 1776 Type
................................................................................................................ 1777 CIF7Ì
........................................................................................................... 1778 |aPerIod
Coaepxanne 26
© 2000·2010, |eta0uotes Software Corp.
........................................................................................................... 1779 Create
........................................................................................................... 1780 |aIn
........................................................................................................... 1781 SIgnal
........................................................................................................... 1782 Type
................................................................................................................ 178J CIStochastIc
........................................................................................................... 1784 KperIod
........................................................................................................... 1785 0perIod
........................................................................................................... 1786 SlowIng
........................................................................................................... 1787 |a|ethod
........................................................................................................... 1788 PrIceFIeld
........................................................................................................... 1789 Create
........................................................................................................... 1790 |aIn
........................................................................................................... 1791 SIgnal
........................................................................................................... 1792 Type
................................................................................................................ 179J CIWPF
........................................................................................................... 1794 CalcPerIod
........................................................................................................... 1795 Create
........................................................................................................... 1796 |aIn
........................................................................................................... 1797 Type
................................................................................................................ 1798 CITrIX
........................................................................................................... 1799 |aPerIod
........................................................................................................... 1800 ApplIed
........................................................................................................... 1801 Create
........................................................................................................... 1802 |aIn
........................................................................................................... 180J Type
......................................................................................................................... 1804 7olume Ì ndIcators
................................................................................................................ 1805 CIA0
........................................................................................................... 1806 ApplIed
........................................................................................................... 1807 Create
........................................................................................................... 1808 |aIn
........................................................................................................... 1809 Type
................................................................................................................ 1810 CI|FÌ
........................................................................................................... 1811 |aPerIod
........................................................................................................... 1812 ApplIed
........................................................................................................... 181J Create
........................................................................................................... 1814 |aIn
........................................................................................................... 1815 Type
................................................................................................................ 1816 CID87
........................................................................................................... 1817 ApplIed
........................................................................................................... 1818 Create
........................................................................................................... 1819 |aIn
........................................................................................................... 1820 Type
................................................................................................................ 1821 CI7olumes
........................................................................................................... 1822 ApplIed
........................................................................................................... 182J Create
........................................................................................................... 1824 |aIn
........................................................................................................... 1825 Type
......................................................................................................................... 1826 8Ill WIllIams Ì ndIcators
................................................................................................................ 1827 CIAC
........................................................................................................... 1828 Create
........................................................................................................... 1829 |aIn
........................................................................................................... 18J0 Type
................................................................................................................ 18J1 CIAllIgator
........................................................................................................... 18J2 JawPerIod
........................................................................................................... 18JJ JawShIft
........................................................................................................... 18J4 TeethPerIod
........................................................................................................... 18J5 TeethShIft
........................................................................................................... 18J6 LIpsPerIod
Coaepxanne 27
© 2000·2010, |eta0uotes Software Corp.
........................................................................................................... 18J7 LIpsShIft
........................................................................................................... 18J8 |a|ethod
........................................................................................................... 18J9 ApplIed
........................................................................................................... 1840 Create
........................................................................................................... 1841 Jaw
........................................................................................................... 1842 Teeth
........................................................................................................... 184J LIps
........................................................................................................... 1844 Type
................................................................................................................ 1845 CIAD
........................................................................................................... 1846 Create
........................................................................................................... 1847 |aIn
........................................................................................................... 1848 Type
................................................................................................................ 1849 CIFractals
........................................................................................................... 1850 Create
........................................................................................................... 1851 Upper
........................................................................................................... 1852 Lower
........................................................................................................... 185J Type
................................................................................................................ 1854 CICator
........................................................................................................... 1855 JawPerIod
........................................................................................................... 1856 JawShIft
........................................................................................................... 1857 TeethPerIod
........................................................................................................... 1858 TeethShIft
........................................................................................................... 1859 LIpsPerIod
........................................................................................................... 1860 LIpsShIft
........................................................................................................... 1861 |a|ethod
........................................................................................................... 1862 ApplIed
........................................................................................................... 186J Create
........................................................................................................... 1864 Upper
........................................................................................................... 1865 Lower
........................................................................................................... 1866 Type
................................................................................................................ 1867 CI8W|FÌ
........................................................................................................... 1868 ApplIed
........................................................................................................... 1869 Create
........................................................................................................... 1870 |aIn
........................................................................................................... 1871 Type
......................................................................................................................... 1872 CÌ ndIcators Classes CollectIon
................................................................................................................ 187J Create
................................................................................................................ 1874 Fefresh
............................................................................................................................1875 Trade CIasses
......................................................................................................................... 1876 CAccountÌ nfo
................................................................................................................ 1878 LogIn
................................................................................................................ 1879 Trade|ode
................................................................................................................ 1880 Trade|ode0escrIptIon
................................................................................................................ 1881 Leverage
................................................................................................................ 1882 |argIn|ode
................................................................................................................ 188J |argIn|ode0escrIptIon
................................................................................................................ 1884 TradeAllowed
................................................................................................................ 1885 TradeExpert
................................................................................................................ 1886 LImItDrders
................................................................................................................ 1887 8alance
................................................................................................................ 1888 CredIt
................................................................................................................ 1889 ProfIt
................................................................................................................ 1890 EquIty
................................................................................................................ 1891 |argIn
................................................................................................................ 1892 Free|argIn
................................................................................................................ 189J |argInLevel
................................................................................................................ 1894 |argInCall
................................................................................................................ 1895 |argInStopDut
Coaepxanne 28
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 1896 Name
................................................................................................................ 1897 Server
................................................................................................................ 1898 Currency
................................................................................................................ 1899 Company
................................................................................................................ 1900 Ì nfoÌ nteger
................................................................................................................ 1901 Ì nfo0ouble
................................................................................................................ 1902 Ì nfoStrIng
................................................................................................................ 190J |argInCheck
................................................................................................................ 1904 Free|argInCheck
................................................................................................................ 1905 |axLotCheck
......................................................................................................................... 1906 CSymbolÌ nfo
................................................................................................................ 1910 Fefresh
................................................................................................................ 1911 FefreshFates
................................................................................................................ 1912 Name
................................................................................................................ 191J Select
................................................................................................................ 1914 Ì sSynchronIzed
................................................................................................................ 1915 7olume
................................................................................................................ 1916 7olumeHIgh
................................................................................................................ 1917 7olumeLow
................................................................................................................ 1918 7olume8Id
................................................................................................................ 1919 7olumeAsk
................................................................................................................ 1920 TIme
................................................................................................................ 1921 Spread
................................................................................................................ 1922 SpreadFloat
................................................................................................................ 192J TIck8ook0epth
................................................................................................................ 1924 StopsLevel
................................................................................................................ 1925 FreezeLevel
................................................................................................................ 1926 8Id
................................................................................................................ 1927 8IdHIgh
................................................................................................................ 1928 8IdLow
................................................................................................................ 1929 Ask
................................................................................................................ 19J0 AskHIgh
................................................................................................................ 19J1 AskLow
................................................................................................................ 19J2 Last
................................................................................................................ 19JJ LastHIgh
................................................................................................................ 19J4 LastLow
................................................................................................................ 19J5 TradeCalc|ode
................................................................................................................ 19J6 TradeCalc|ode0escrIptIon
................................................................................................................ 19J7 Trade|ode
................................................................................................................ 19J8 Trade|ode0escrIptIon
................................................................................................................ 19J9 TradeExecutIon
................................................................................................................ 1940 TradeExecutIon0escrIptIon
................................................................................................................ 1941 Swap|ode
................................................................................................................ 1942 Swap|ode0escrIptIon
................................................................................................................ 194J SwapFolloverJdays
................................................................................................................ 1944 SwapFolloverJdays0escrIptIon
................................................................................................................ 1945 |argInÌ nItIal
................................................................................................................ 1946 |argIn|aIntenance
................................................................................................................ 1947 |argInLong
................................................................................................................ 1948 |argInShort
................................................................................................................ 1949 |argInLImIt
................................................................................................................ 1950 |argInStop
................................................................................................................ 1951 |argInStopLImIt
................................................................................................................ 1952 TradeTImeFlags
................................................................................................................ 195J TradeFIllFlags
................................................................................................................ 1954 0IgIts
................................................................................................................ 1955 PoInt
................................................................................................................ 1956 TIck7alue
Coaepxanne 29
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 1957 TIck7alueProfIt
................................................................................................................ 1958 TIck7alueLoss
................................................................................................................ 1959 TIckSIze
................................................................................................................ 1960 ContractSIze
................................................................................................................ 1961 Lots|In
................................................................................................................ 1962 Lots|ax
................................................................................................................ 196J LotsStep
................................................................................................................ 1964 LotsLImIt
................................................................................................................ 1965 SwapLong
................................................................................................................ 1966 SwapShort
................................................................................................................ 1967 Currency8ase
................................................................................................................ 1968 CurrencyProfIt
................................................................................................................ 1969 Currency|argIn
................................................................................................................ 1970 8ank
................................................................................................................ 1971 0escrIptIon
................................................................................................................ 1972 Path
................................................................................................................ 197J Ì nfoÌ nteger
................................................................................................................ 1974 Ì nfo0ouble
................................................................................................................ 1975 Ì nfoStrIng
................................................................................................................ 1976 NormalIzePrIce
......................................................................................................................... 1977 CDrderÌ nfo
................................................................................................................ 1979 TIcket
................................................................................................................ 1980 TImeSetup
................................................................................................................ 1981 Type
................................................................................................................ 1982 Type0escrIptIon
................................................................................................................ 198J State
................................................................................................................ 1984 State0escrIptIon
................................................................................................................ 1985 TImeExpIratIon
................................................................................................................ 1986 TIme0one
................................................................................................................ 1987 TypeFIllIng
................................................................................................................ 1988 TypeFIllIng0escrIptIon
................................................................................................................ 1989 TypeTIme
................................................................................................................ 1990 TypeTIme0escrIptIon
................................................................................................................ 1991 |agIc
................................................................................................................ 1992 PosItIonÌ d
................................................................................................................ 199J 7olumeÌ nItIal
................................................................................................................ 1994 7olumeCurrent
................................................................................................................ 1995 PrIceDpen
................................................................................................................ 1996 StopLoss
................................................................................................................ 1997 TakeProfIt
................................................................................................................ 1998 PrIceCurrent
................................................................................................................ 1999 PrIceStopLImIt
................................................................................................................ 2000 Symbol
................................................................................................................ 2001 Comment
................................................................................................................ 2002 Ì nfoÌ nteger
................................................................................................................ 200J Ì nfo0ouble
................................................................................................................ 2004 Ì nfoStrIng
................................................................................................................ 2005 StoreState
................................................................................................................ 2006 CheckState
................................................................................................................ 2007 Select
......................................................................................................................... 2008 CHIstoryDrderÌ nfo
................................................................................................................ 2010 TImeSetup
................................................................................................................ 2011 Type
................................................................................................................ 2012 Type0escrIptIon
................................................................................................................ 201J State
................................................................................................................ 2014 State0escrIptIon
................................................................................................................ 2015 TImeExpIratIon
................................................................................................................ 2016 TIme0one
Coaepxanne 30
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 2017 TypeFIllIng
................................................................................................................ 2018 TypeFIllIng0escrIptIon
................................................................................................................ 2019 TypeTIme
................................................................................................................ 2020 TypeTIme0escrIptIon
................................................................................................................ 2021 |agIc
................................................................................................................ 2022 PosItIonÌ d
................................................................................................................ 202J 7olumeÌ nItIal
................................................................................................................ 2024 7olumeCurrent
................................................................................................................ 2025 PrIceDpen
................................................................................................................ 2026 StopLoss
................................................................................................................ 2027 TakeProfIt
................................................................................................................ 2028 PrIceCurrent
................................................................................................................ 2029 PrIceStopLImIt
................................................................................................................ 20J0 Symbol
................................................................................................................ 20J1 Comment
................................................................................................................ 20J2 Ì nfoÌ nteger
................................................................................................................ 20JJ Ì nfo0ouble
................................................................................................................ 20J4 Ì nfoStrIng
................................................................................................................ 20J5 TIcket
......................................................................................................................... 20J6 CPosItIonÌ nfo
................................................................................................................ 20J8 TIme
................................................................................................................ 20J9 Type
................................................................................................................ 2040 Type0escrIptIon
................................................................................................................ 2041 |agIc
................................................................................................................ 2042 Ì dentIfIer
................................................................................................................ 204J 7olume
................................................................................................................ 2044 PrIceDpen
................................................................................................................ 2045 StopLoss
................................................................................................................ 2046 TakeProfIt
................................................................................................................ 2047 PrIceCurrent
................................................................................................................ 2048 CommIssIon
................................................................................................................ 2049 Swap
................................................................................................................ 2050 ProfIt
................................................................................................................ 2051 Symbol
................................................................................................................ 2052 Ì nfoÌ nteger
................................................................................................................ 205J Ì nfo0ouble
................................................................................................................ 2054 Ì nfoStrIng
................................................................................................................ 2055 Select
................................................................................................................ 2056 StoreState
................................................................................................................ 2057 CheckState
......................................................................................................................... 2058 C0ealÌ nfo
................................................................................................................ 2060 Drder
................................................................................................................ 2061 TIme
................................................................................................................ 2062 Type
................................................................................................................ 206J Type0escrIptIon
................................................................................................................ 2064 Entry
................................................................................................................ 2065 Entry0escrIptIon
................................................................................................................ 2066 |agIc
................................................................................................................ 2067 PosItIonÌ d
................................................................................................................ 2068 7olume
................................................................................................................ 2069 PrIce
................................................................................................................ 2070 CommIsIon
................................................................................................................ 2071 Swap
................................................................................................................ 2072 ProfIt
................................................................................................................ 207J Symbol
................................................................................................................ 2074 Comment
................................................................................................................ 2075 Ì nfoÌ nteger
................................................................................................................ 2076 Ì nfo0ouble
Coaepxanne 31
© 2000·2010, |eta0uotes Software Corp.
................................................................................................................ 2077 Ì nfoStrIng
................................................................................................................ 2078 TIcket
......................................................................................................................... 2079 CTrade
................................................................................................................ 2081 SetExpert|agIcNumber
................................................................................................................ 2082 Set0evIatIonÌ nPoInts
................................................................................................................ 208J DrderDpen
................................................................................................................ 2085 Drder|odIfy
................................................................................................................ 2086 Drder0elete
................................................................................................................ 2087 PosItIonDpen
................................................................................................................ 2088 PosItIon|odIfy
................................................................................................................ 2089 PosItIonClose
................................................................................................................ 2090 FesultFetcode
................................................................................................................ 2091 FesultFetcode0escrIptIon
................................................................................................................ 2092 Fesult0eal
................................................................................................................ 209J FesultDrder
................................................................................................................ 2094 Fesult7olume
................................................................................................................ 2095 FesultPrIce
................................................................................................................ 2096 Fesult8Id
................................................................................................................ 2097 FesultAsk
................................................................................................................ 2098 FesultComment
................................................................................................................ 2099 CheckFesultFetcode
................................................................................................................ 2100 CheckFesultFetcode0escrIptIon
................................................................................................................ 2101 CheckFesult8alance
................................................................................................................ 2102 CheckFesultEquIty
................................................................................................................ 210J CheckFesult|argIn
................................................................................................................ 2104 CheckFesult|argInFree
................................................................................................................ 2105 CheckFesult|argInLevel
................................................................................................................ 2106 CheckFesultComment
................................................................................................................ 2107 PrIntFequest
................................................................................................................ 2108 PrIntFesult
................................................................................................................ 2109 PrIntCheckFesult
................................................................................................. 2110 24 hovIng from hDL4

© 2000·2010, |eta0uotes Software Corp.
32
hDL5 Peference
|eta0uotes Language 5 (|0L5) Is a buIlt·In language for programmIng tradIng strategIes. ThIs
language Is developed by |eta0uotes Software Corp. based on theIr long experIence In the creatIon of
onlIne tradIng platforms. UsIng thIs language, you can create your own Expert AdvIsors that make
tradIng management automated and are perfectly suItable for ImplementIng your own tradIng
strategIes. 8esIdes, usIng |0L5 you can create your own technIcal IndIcators (custom IndIcators),
scrIpts and lIbrarIes.
|0L5 contaIns a large number of functIons necessary for analyzIng current and prevIously receIved
quotes, and has buIlt·In basIc IndIcators and functIons for managIng trade posItIons and controllIng
them.
The |etaEdItor 5 (text edItor) that hIghlIghts dIfferent constructIons of |0L5 language Is used for
wrItIng the program code. Ìt helps users to orIentate themselves In the expert system text quIte
easIly. |eta0uotes Language 0IctIonary Is used as a Help System for |0L5 language.
The brIef guIde contaIns functIons, operatIons, reserved words, and other language constructIons
dIvIded Into categorIes, and allows fIndIng the descrIptIon of every used element of the language.
Programs wrItten In |eta0uotes Language 5 have dIfferent features and purposes:
Expert AdvIsor Is a mechanIcal tradIng system lInked up to a certaIn chart. An Expert AdvIsor starts
to run when an event happens that can be handled by It: events of InItIalIzatIon and deInItIalIzatIon,
event of a new tIck receIpt, a tImer event, depth of market changIng event, chart event and custom
events.
An Expert AdvIsor can both Inform you about a possIbIlIty to trade and automatIcally trade on an
account sendIng orders dIrectly to a trade server. Expert AdvIsors are stored In
termìncl_dìrectory\MDL5\Experts.
Custom IndIcator Is a technIcal IndIcator wrItten Independently In addItIon to those already
Integrated Into the clIent termInal. LIke buIlt·In IndIcators, they cannot trade automatIcally and are
Intended for ImplementIng of analytIcal functIons only.
Custom IndIcators are stored In termìncl_dìrectory\MDL5\lndìcctors
ScrIpt Is a program Intended for a sIngle executIon of some actIons. UnlIke Expert AdvIsors, scrIpts
do not process any actIons, except for the start event (thIs requIres the DnStart handler functIon In
a scrIpt). ScrIpts are stored In termìncl_dìrectory\MDL5\Scrìpts
LIbrary Is a set of custom functIons Intended for storIng and dIstrIbutIng frequently used blocks of
custom programs. LIbrarIes cannot start executIng by themselves.
LIbrarIes are stored In termìncl_dìrectory\MDL5\Lìbrcrìes
IncIude FIIe Is a source text of the most frequently used blocks of custom programs. Such fIles can
be Included Into the source texts of Expert AdvIsors, scrIpts, custom IndIcators, and lIbrarIes at the
compIlIng stage. The use of Included fIles Is more preferable than the use of lIbrarIes because of
addItIonal burden occurrIng at callIng lIbrary functIons.
Ìnclude fIles can be stored In the same dIrectory as a source fIle · In thIs case the #Include dIrectIve
wIth double quotes Is used. Another place to store Include fIles Is termìncl_dìrectory\MDL5\lnclµde,
ìn thìs ccse the #Include dIrectIve Is used wIth angle brackets.
© 2000·2010, |eta0uotes Software Corp.
Language Basics
© 2000·2010, |eta0uotes Software Corp.
33
Language ßasIcs
The |eta0uotes Language 5 (|0L5) Is an object·orIented hIgh·level programmIng language Intended
for wrItIng automated tradIng strategIes, custom technIcal IndIcators for the analysIs of varIous
fInancIal markets. Ìt allows not only to wrIte a varIety of expert systems, desIgned to operate In real
tIme, but also create theIr own graphIcal tools to help you make trade decIsIons.
|0L5 Is based on the concept of the popular programmIng language C++. As compared to |0L4, the
new language now has enumeratIons, structures, classes and event handlIng. 8y IncreasIng the number
of embedded maIn types, the InteractIon of executable programs In |0L5 wIth other applIcatIons
through dll Is now as easy as possIble. |0L5 syntax Is sImIlar to the syntax of C++, and thIs makes It
easy to translate Into It programs from modern programmIng languages.
To help you study the |0Lº language, all topIcs are grouped Into the followIng sectIons:
Syntax
0ata Types
DperatIons and ExpressIons
Dperators
FunctIons
7arIables
Preprocessor
Dbject·DrIented ProgrammIng
Language Basics
© 2000·2010, |eta0uotes Software Corp.
34
Syntax
As to the syntax, THE |0L5 language for programmIng tradIng strategIes Is very much sImIlar to the
C++ programmIng language, except for some features:
no address arIthmetIc;
no goto operator;
an anonymous enumeratIon can't be declared;
constructors of classes and structures can't have parameters;
no multIple InherItance.
See aIso
EnumeratIons, Structures and Classes, ÌnherItance
Language Basics
© 2000·2010, |eta0uotes Software Corp.
35
Comments
|ultI·lIne comments start wIth the /* paIr of symbols and end wIth the */ one. Such kInd of comments
cannot be nested. SIngle·lIne comments begIn wIth the // paIr of symbols and end wIth the newlIne
character, they can be nested In other multI·lIne comments. Comments are allowed everywhere where
the spaces are allowed, they can have any number of spaces In them.
ExampIes:
//--- ¯LnjL--LLn- ··mm-nr
/· MuLrL-
LLn- // H--r-J -LnjL--LLn- ··mm-nr
··mm-nr
·/
Language Basics
© 2000·2010, |eta0uotes Software Corp.
36
IdentIfIers
ÌdentIfIers are used as names of varIables and functIons. The length of the IdentIfIer can not exceed
J1 characters.
Characters allowed tI be wrItten In an IdentIfIer: fIgures 0·9, the LatIn uppercase and lowercase
letters a·z and A·Z, recognIzed as dIfferent characters, the underscore character (_).The fIrst
character can not be a dIgIt.
The IdentIfIer must not coIncIde wIth reserved word.
ExampIes:
HAMI! n-m-L r·r-L_¯ --p-n
See aIso
7arIables, FunctIons
Language Basics
© 2000·2010, |eta0uotes Software Corp.
37
Peserved Words
The followIng IdentIfIers are recorded as reserved words, each of them corresponds to a certaIn
actIon, and cannot be used In another meanIng:
0ata Types
bool enum struct
char float uchar
class Int uInt
color long ulong
datetIme short ushort
double strIng voId
Access SpecIfIcators
const prIvate protected
publIc vIrtual
hemory CIasses
extern Input statIc
Dperators
break do return
case else sIzeof
contInue for swItch
default If whIle
delete new
Dther
false #defIne #property
thIs #Import
true #Include
Language Basics
© 2000·2010, |eta0uotes Software Corp.
38
Language Basics
© 2000·2010, |eta0uotes Software Corp.
39
0ata Types
Any program operates wIth data. 0ata can be of dIfferent types dependIng on theIr purposes. For
example, Integer data are used to access to array components. PrIce data belong to those of double
precIsIon wIth floatIng poInt. ThIs Is related to the fact that no specIal data type for prIce data Is
provIded In |0L5.
0ata of dIfferent types are processed wIth dIfferent rates. Ìnteger data are processed at the fastest.
To process the double precIsIon data, a specIal co·processor Is used. However, because of complIcIty
of Internal presentatIon of data wIth floatIng poInt, they are processed slower than the Integer ones.
StrIng data are processed at the longest because of dynamIc computer memory allocatIon/reallocatIon.
The basIc data types are:
Integers (char, short, Int, long, uchar, ushort, uInt, ulong);
logIcal (bool);
lIterals (ushort);
strIngs (strIng);
floatIng·poInt numbers (double, float);
color (color);
date and tIme (datetIme);
enumeratIons (enum).
Complex data types are:
structures;
classes.
Ìn terms of DDP complex data types called abstract data types.
The color and dctetìme types make sense only to facIlItate vIsualIzatIon and Input of parameters
defIned from outsIde · from the table of Expert AdvIsor or custom IndIcator propertIes (the Ìnputs
tab). 0ata of color and dctetìme types are represented as Integers. Ìnteger types and floatIng·poInt
types are called arIthmetIc (numerIc) types.
Dnly ImplIcIt type castIng Is used In expressIons, unless the explIcIt castIng Is specIfIed.
See aIso
TypecastIng
Language Basics
© 2000·2010, |eta0uotes Software Corp.
40
Integer Types
Ìn |0L5 Integers are represented by eleven types. Some types can be used together wIth other ones,
If requIred by the program logIc, but In thIs case It's necessary to remember the rules of types
conversIon.
The table below lIsts the characterIstIcs of each type. 8esIdes, the last column features a type In C++
correspondIng to each type.
Type SIze In ßytes hInImum VaIue haxImum VaIue C++ AnaIog
char 1 ·128 127 char
uchar 1 0 255 unsIgned char,
8YTE
bool 1 0(false) 1(true) bool
short 2 ·J2 768 J2 767 short, wchar_t
ushort 2 0 65 5J5 unsIgned short,
WDF0
Int 4 · 2 147 48J 648 2 147 48J 647 Int
uInt 4 0 4 294 967 295 unsIgned Int,
0WDF0
color 4 ·1 16 777 215 Int, CDLDFFEF
long 8 ·9 22J J72 0J6
854 775 808
9 22J J72 0J6
854 775 807
__Int64
ulong 8 0 18 446 744 07J
709 551 615
unsIgned __Int64
datetIme 8 0 (1970.01.01
0:00:00)
J2 5J5 244 799
(J000.12.J1
2J:59:59)
__tIme64_t
Ìnteger type values can also be presented as numerIc constants, color lIterals, date·tIme lIterals,
character constants and enumeratIons.
See aIso
0ata ConversIon, Constants of NumerIc Types
Language Basics
© 2000·2010, |eta0uotes Software Corp.
41
Char, Short, Int and Long Types
char
The chcr type takes 1 byte of memory (8 bIts) and allows expressIng In the bInary notatIon 2´8=256
values. The chcr type can contaIn both posItIve and negatIve values. The range of values Is from ·128
to 127.
uchar
The µchcr Integer type also occupIes 1 byte of memory, as well as the chcr type, but unlIke It µchcr Is
Intended only for posItIve values. The mInImum value Is zero, the maxImum value Is 255. The fIrst
letter u In the name of the µchcr type Is the abbrevIatIon for µnsì¤ned.
short
The sIze of the short type Is 2 bytes (16 bIts) and, accordIngly, It allows expressIng the range of
values equal to 2 to the power 16: 2´16 = 65 5J6.SInce the short type Is a sIgn one, and contaIns both
posItIve and negatIve values, the range of values Is between ·J2 768 and J2 767.
ushort
The unsIgned short type Is the type µshort, whIch also has a sIze of 2 bytes. The mInImum value Is 0,
the maxImum value Is 65 5J5.
Int
The sIze of the ìnt type Is 4 bytes (J2 bIts). The mInImal value Is ·2 147 48J 648, the maxImal one Is
2 147 48J 647.
uInt
The unsIgned Integer type Is µìnt. Ìt takes 4 bytes of memory and allows expressIng Integers from 0 to
4 294 967 295.
Iong
The sIze of the lon¤ type Is 8 bytes (64 bIts). The mInImum value Is ·9 22J J72 0J6 854 775 808, the
maxImum value Is 9 22J J72 0J6 854 775 807.
uIong
The µlon¤ type also occupIes 8 bytes and can store values from 0 to 18 446 744 07J 709 551 615.
ExampIes:
·!-n ·!=!`¡
-!·nr -!=-¯¨¨¨¡
Lnr Ln=`11¯¯¯¯¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
42
SInce the unsIgned Integer types are not desIgned for storIng negatIve values, the attempt to set a
negatIve value can lead to unexpected consequences. Such a sImple scrIpt wIll lead to an InfInIte loop:
//--- PnrLnLr- L··p
v·LJ Jn¯r-nr.·

u·!-n u_·!¡
r·n.·!-n ·!=-!`-¡·!<!`-¡·!--·

u_·!=·!¡
-nLnr.¨·! = ¨,·!,¨ u_·! = ¨,u_·!·¡
·
·
The correct varIant Is:
//--- .·nn-·r v-nL-nr
v·LJ Jn¯r-nr.·

u·!-n u_·!¡
r·n.·!-n ·!=-!`-¡·!<=!`¯¡·!--·

u_·!=·!¡
-nLnr.¨·! = ¨,·!,¨ u_·! = ¨,u_·!·¡
Lr.·!==!`¯· on--k¡
·
·
PesuIt:
·!= -!`- u_·!= !`-
·!= -!`¯ u_·!= !`-
·!= -!`¯ u_·!= !`¨
·!= -!`¯ u_·!= !`!
·!= -!`1 u_·!= !``
·!= -!`` u_·!= !``
·!= -!`` u_·!= !`1
·!= -!`! u_·!= !`¯
·!= -!`¨ u_·!= !`¯
·!= -!!- u_·!= !`¯
·!= -!!- u_·!= !`-
·!= -!!¯ u_·!= !`-
·!= -!!¯ u_·!= !1¨
·!= -!!¯ u_·!= !1!
·!= -!!1 u_·!= !1`
·!= -!!` u_·!= !1`
·!= -!!` u_·!= !11
·!= -!!! u_·!= !1¯
Language Basics
© 2000·2010, |eta0uotes Software Corp.
43
...
ExampIes:
//--- H-j-rLv- v-Lu-- ·-n n·r o- -r·n-J Ln un-Ljn-J ryp--
u·!-n u_·!=-!`¨¡
u-!·nr u_-!=-¯¨¨¨¡
uLnr u_Ln=-1¨!`-¨¡
HexadecImal: numbers 0·9, the letters a·f or A·F for the values of 10·15; start wIth 0x or 0x.
ExampIes:
¨x¨A, ¨x!`, ¨x!`, ¨x`r, ¨xA`, ¨x-`, ¨x¯.¯
See aIso
TypecastIng
Language Basics
© 2000·2010, |eta0uotes Software Corp.
44
Character Constants
Characters as elements of a strIng In |0L5 are Indexes In the UnIcode character set. They are
hexadecImal values that can be cast Into Integers, and that can be manIpulated by Integer operatIons
lIke addItIon and subtractIon.
Any sIngle character In quotatIon marks or a hexadecImal ASCÌÌ code of a character as '\x10' Is a
character constant and Is of ushort type. For example, a record of '0' type Is a numerIcal value J0, that
corresponds to the Index of zero In the table of characters.
ExampIe:
v·LJ Jn¯r-nr.·

//--- J-rLn- ·!-n-·r-n ··n-r-nr-
Lnr -ymo·L_¨='¨'¡
Lnr -ymo·L_-=-ymo·L_¨--¡ // j-r -ymo·L '-'
//--- ·urpur v-Lu-- ·r ··n-r-nr-
pnLnrr.¨Pn - J-·Lm-L r·nm. -ymo·L_¨ = `J, -ymo·L_- = `J¨,-ymo·L_¨,-ymo·L_-·¡
pnLnrr.¨Pn - !-x-J-·Lm-L r·nm. -ymo·L_¨ = ¨x`x, -ymo·L_- = ¨x`x¨,-ymo·L_¨,-ymo·L_-·¡
//--- -nr-n ··n-r-nr- Lnr· - -rnLnj
-rnLnj r--r=¨¨¡
¯rnLnj¯-r.!-n-·r-n.r--r,¨,-ymo·L_¨·¡
¯rnLnj¯-r.!-n-·r-n.r--r,!,-ymo·L_-·¡
//--- r!L- L- .!-r r!-y L··k LLk- Ln - -rnLnj
-nLnr.r--r·¡
·
A backslash Is a control character for a compIler when dealIng wIth constant strIngs and character
constants In a source text of a program. Some symbols, for example a sIngle quote ('), double quotes
(¨), backslash (\) and control characters can be represented as a combInatIon of symbols that start
wIth a backslash (\), accordIng to the below table:
Character name hnemonIc code or
Image
Pecord In hDL5 NumerIc vaIue
new lIne (lIne feed) LF '\n' 1J
horIzontal tab HT '\t' 9
carrIage return CF '\r' 10
backslash \ '\\' 92
sIngle quote ' '\'' J9
double quote ¨ '\¨' J4
hexadecImal code hhhh '\xhhhh' 1 to 4 hexadecImal
characters
decImal code d '\d' decImal number from
0 to 655J5
Language Basics
© 2000·2010, |eta0uotes Software Corp.
45
Ìf a backslash Is followed by a character other than those descrIbed above, result Is undefIned.
ExampIe
v·LJ Jn¯r-nr.·

//--- J-·L-n- ·!-n-·r-n ··n-r-nr-
Lnr -='A'¡
Lnr o='¯'¡
Lnr ·='©'¡ // ··-J ¨xA-
Lnr J='\xAI'¡ // ··J- ·r r!- -ymo·L ®
//--- ·urpur pnLnr ··n-r-nr-
-nLnr.-,o,·,J·¡
//--- -JJ - ·!-n-·r-n r· r!- -rnLnj
-rnLnj r--r=¨¨¡
¯rnLnj¯-r.!-n-·r-n.r--r,¨,-·¡
-nLnr.r--r·¡
//--- n-pL-·- - ·!-n-·r-n Ln - -rnLnj
¯rnLnj¯-r.!-n-·r-n.r--r,¨,o·¡
-nLnr.r--r·¡
//--- n-pL-·- - ·!-n-·r-n Ln - -rnLnj
¯rnLnj¯-r.!-n-·r-n.r--r,¨,··¡
-nLnr.r--r·¡
//--- n-pL-·- - ·!-n-·r-n Ln - -rnLnj
¯rnLnj¯-r.!-n-·r-n.r--r,¨,J·¡
-nLnr.r--r·¡
//--- n-pn---nr ·!-n-·r-n- -- - numo-n
Lnr -!=¯¯¡
Lnr o!=`¯¡
Lnr ·!=!¯-¡
Lnr J!=!¯1¡
//--- -JJ - ·!-n-·r-n r· r!- -rnLnj
¯rnLnj¯-r.!-n-·r-n.r--r,!,-!·¡
-nLnr.r--r·¡
//--- -JJ - ·!-n-·r-n r· r!- -rnLnj
¯rnLnj¯-r.!-n-·r-n.r--r,!,o!·¡
-nLnr.r--r·¡
//--- -JJ - ·!-n-·r-n r· r!- -rnLnj
¯rnLnj¯-r.!-n-·r-n.r--r,!,·!·¡
-nLnr.r--r·¡
//--- -JJ - ·!-n-·r-n r· r!- -rnLnj
¯rnLnj¯-r.!-n-·r-n.r--r,!,J!·¡
-nLnr.r--r·¡
·
As It was mentIoned above, th value of a character constant (or varIable) Is an Index In the table of
characters. Ìndex beIng an Integer, It can be wrItten In dIfferent ways.
v·LJ Jn¯r-nr.·

Language Basics
© 2000·2010, |eta0uotes Software Corp.
46
//---
Lnr -=¨xAI¡ // r!- ··J- ·r ® ··nn--p·nJ- r· r!- '\xAI' LLr-n-L
Lnr o=¨x`1¡ // r!- ··J- ·r ¯ ··nn--p·nJ- r· r!- '\x`1' LLr-n-L
Lnr ·=¨xA-¡ // r!- ··J- ·r © ··nn--p·nJ- r· r!- '\xA-' LLr-n-L
Lnr J=¨x`¯`A¡ // r!- ··J- ·r J ··nn--p·nJ- r· r!- '\x`¯`A' LLr-n-L
//--- -!·. v-Lu--
-nLnr.-,o,·,J·¡
//--- -JJ - ·!-n-·r-n r· r!- -rnLnj
-rnLnj r--r=¨¨¡
¯rnLnj¯-r.!-n-·r-n.r--r,¨,-·¡
-nLnr.r--r·¡
//--- n-pL-·- - ·!-n-·r-n Ln - -rnLnj
¯rnLnj¯-r.!-n-·r-n.r--r,¨,o·¡
-nLnr.r--r·¡
//--- n-pL-·- - ·!-n-·r-n Ln - -rnLnj
¯rnLnj¯-r.!-n-·r-n.r--r,¨,··¡
-nLnr.r--r·¡
//--- n-pL-·- - ·!-n-·r-n Ln - -rnLnj
¯rnLnj¯-r.!-n-·r-n.r--r,¨,J·¡
-nLnr.r--r·¡
//--- ··J-- ·r -uLr-
Lnr -!=¨x`¯¯¨¡
Lnr o!=¨x`¯¯!¡
Lnr ·!=¨x`¯¯`¡
Lnr J!=¨x`¯¯`¡
//--- -JJ - ·!-n-·r-n ·r -p-J--
¯rnLnj¯-r.!-n-·r-n.r--r,!,-!·¡
-nLnr.r--r·¡
//--- -JJ - ·!-n-·r-n ·r !--nr-
¯rnLnj¯-r.!-n-·r-n.r--r,`,o!·¡
-nLnr.r--r·¡
//--- -JJ - ·!-n-·r-n ·r JL-m·nJ-
¯rnLnj¯-r.!-n-·r-n.r--r,`,·!·¡
-nLnr.r--r·¡
//--- -JJ - ·!-n-·r-n ·r ·Luo-
¯rnLnj¯-r.!-n-·r-n.r--r,1,J!·¡
-nLnr.r--r·¡
//--- Ix-mpL- ·r ·!-n-·r-n LLr-n-L- Ln - -rnLnj
r--r=¨,u--n\x`¯¯¨A·-\x`¯¯`¨¡
pnLnrr.¨`-¨,r--r·¡
·
The Internal representatIon of a character lIteral Is the ushort type. Character constants can accept
values from 0 to 655J5.
See aIso
StrIngSetCharacter(), StrIngCetCharacter(), ShortToStrIng(), ShortArrayToStrIng(),
StrIngToShortArray()
Language Basics
© 2000·2010, |eta0uotes Software Corp.
47
0atetIme Type
The datetIme type Is Intended for storIng the date and tIme as the number of seconds elapsed sInce
January 01, 1970. ThIs type occupIes 8 bytes of memory.
Constants of the date and tIme can be represented as a lIteral strIng, whIch consIsts of 6 parts
showIng the numerIcal value of the year, month, day (or day, month, year), hours, mInutes and
seconds. The constant Is enclosed In sIngle quotatIon marks and starts wIth the 0 character.
EIther date (year , month, day) or tIme (hours, mInutes, seconds), or all together can be omItted.
7alues range from 1 January, 1970 to J1 0ecember, J000.
ExampIes:
¯'`¨¨1.¨!.¨! ¨¨.¨¨' // H-. 1--n
¯'!--¨.¨¯.!- !`.`¨.`¯'
¯'!-.¨¯.!--¨ !`.`¨.`¯'
¯'!-.¨¯.!--¨ !`' //-¬uLv-L-nr r· ¯'!--¨.¨¯.!- !`.¨¨.¨¨'
¯'¨!.¨!.`¨¨1' //-¬uLv-L-nr r· ¯'¨!.¨!.`¨¨1 ¨¨.¨¨.¨¨'
¯'!`.`¨.`¯' //-¬uLv-L-nr r· ¯'¯··mpLL-rL·n J-r-` !`.`¨.`¯'
¯'' //-¬uLv-L-nr r· ¯'¯··mpLL-rL·n J-r-` ¨¨.¨¨.¨¨'
See aIso
Structure of the 0ate Type, 0ate and TIme, TImeToStrIng, StrIngToTIme
Language Basics
© 2000·2010, |eta0uotes Software Corp.
48
CoIor Type
The color type Is Intended for storIng InformatIon about color and occupIes 4 bytes In memory. The
fIrst byte Is Ignored, the remaInIng J bytes contaIn the FC8·components.
Color constants can be represented In three ways: lIterally, by Integers, or by name (for named Web·
colors only).
LIteral representatIon consIsts of three parts representIng numerIcal rate values of the three maIn
color components: red, green, blue. The constant starts wIth C and Is enclosed In sIngle quotes.
NumerIcal rate values of a color component lIe In the range from 0 to 255.
Ìnteger·valued representatIon Is wrItten In a form of hexadecImal or a decImal number. A hexadecImal
number looks lIke 0x0088CCFF, where FF Is the rate of the red color component, CC · of the green
one, and 88 · of the blue one. 0ecImal constants are not dIrectly reflected In the FC8. They represent
a decImal value of the hexadecImal Integer representatIon.
SpecIfIc colors reflect the so·called Web·colors set.
ExampIes:
//--- HLr-n-L-
.'!`-,!`-,!`-' // Jn-y
.'¨x¨¨,¨x¨¨,¨x¯¯' // ÐLu-
//··L·n n-m--
--J // --J
1-LL·. // 1-LL·.
ÐL-·k // ÐL-·k
//--- Pnr-jn-L n-pn---nr-rL·n-
¨x¯¯¯¯¯¯ // W!Lr-
!¯¯¯¯`!¯ // W!Lr-
¨x¨¨-¨¨¨ // Jn--n
``¯¯- // Jn--n
See aIso
Web Colors, ColorToStrIng, StrIngToColor, TypecastIng
Language Basics
© 2000·2010, |eta0uotes Software Corp.
49
ßooI Type
The bool type Is Intended to store the logIcal values of true or false, numerIc representatIon of them
Is 1 or 0, respectIvely.
ExampIes:
o··L - = rnu-¡
o··L o = r-L--¡
o··L · = !¡
The Internal representatIon Is a whole number 1 byte large. Ìt should be noted that In logIcal
expressIons you can use other Integer or real types or expressIons of these types · the compIler wIll
not generate any error. Ìn thIs case, the zero value wIll be Interpreted as false, and all other values ·
as true.
ExampIes:
Lnr L=¯¡
J·uoL- J=-`.¯¡
Lr.L· -nLnr.¨L = ¨,L,¨ -nJ L- --r r· rnu-¨·¡
-L-- -nLnr.¨L = ¨,L,¨ -nJ L- --r r· r-L--¨·¡
Lr.J· -nLnr.¨J = ¨,J,¨ -nJ !-- r!- rnu- v-Lu-¨·¡
-L-- -nLnr.¨J = ¨,J,¨ -nJ !-- r!- r-L-- v-Lu-¨·¡
L=¨¡
Lr.L· -nLnr.¨L = ¨,L,¨ -nJ !-- r!- rnu- v-Lu-¨·¡
-L-- -nLnr.¨L = ¨,L,¨ -nJ !-- r!- r-L-- v-Lu-¨·¡
J=¨.¨¡
Lr.J· -nLnr.¨J = ¨,J,¨ -nJ !-- r!- rnu- v-Lu-¨·¡
-L-- -nLnr.¨J = ¨,J,¨ -nJ !-- r!- r-L-- v-Lu-¨·¡
//--- Ix-·urL·n n--uLr-
// L= ¯ -nJ !-- r!- rnu- v-Lu-
// J= -`.¯¨¨¨¨¨¨¨ -nJ !-- r!- rnu- v-Lu-
// L= ¨ -nJ !-- r!- r-L-- v-Lu-
// J= ¨.¨¨¨¨¨¨¨¨ -nJ !-- r!- r-L-- v-Lu-
See aIso
8oolean DperatIons, Precedence Fules
Language Basics
© 2000·2010, |eta0uotes Software Corp.
50
EnumeratIons
0ata of the enum type belong to a certaIn lImIted set of data. 0efInIng the enumeratIon type:
-num n-m- ·r -num-n-oL- ryp-

LL-r ·r v-Lu--
·¡
The lIst of values Is a lIst of IdentIfIers of named constants separated by commas.
ExampIe:
-num m·nr!- // -num-n-rL·n ·r n-m-J ··n-r-nr-

¯-nu-ny,
¯-onu-ny,
M-n·!,
ApnLL,
M-y,
¯un-,
¯uLy,
Auju-r,
¯-pr-mo-n,
J·r·o-n,
H·v-mo-n,
¯-·-mo-n
·¡
After the enumeratIon Is declared, a new Integer·valued 4·byte data type appears. 0eclaratIon of the
new data type allows the compIler to strIctly control types of passed parameters, because enumeratIon
Introduces new named constants. Ìn the above example, the January named constant has the value of
0, February · 1, 0ecember · 11.
PuIe: Ìf a certaIn value Is not assIgned to a named constant · a member of the enumeratIon, Its new
value wIll be formed automatIcally. Ìf It Is the fIrst member of the enumeratIon, the 0 value wIll be
assIgned to It. For all subsequent members, values wIll be calculated based on the value of the
prevIous members by addIng one.
ExampIe:
-num Lnr-nv-L- // Inum-n-rL·n ·r n-m-J ··n-r-nr-

m·nr!=!, // Pnr-nv-L ·r ·n- m·nr!
r.·_m·nr!-, // r.· m·nr!-
¬u-nr-n, // r!n-- m·nr!- - ¬u-nr-n
!-Lry--n=¯, // |-Lr - y--n
y--n=!`, // 1--n - !` m·nr!-
·¡
Notes
Language Basics
© 2000·2010, |eta0uotes Software Corp.
51
UnlIke C++, the sIze of the Internal representatIon of the enumerated type In |0L5 Is always equal
to 4 bytes. That Is, sIzeof (months) returns the value 4.
UnlIke C++, an anonymous enumeratIon can't be declared In |0L5. That Is, a unIque name must be
always specIfIed after the enum keyword.
See aIso
TypecastIng
Language Basics
© 2000·2010, |eta0uotes Software Corp.
52
PeaI Types (doubIe, fIoat)
Feal types (or floatIng·poInt types) represent values wIth a fractIonal part. Ìn the |0L5 language
there are two types for floatIng poInt numbers.The method of representatIon of real numbers In the
computer memory Is defIned by the ÌEEE 754 standard and Is Independent of platforms, operatIng
systems or programmIng languages.
Type SIze In bytes hInImaI
PosItIve
VaIue
haxImum
VaIue
PepresentatI
on Accuracy
C++ AnaIog
float 4 1.175494J51
e·J8
J.40282J466
e+J8
7 sIgnIfIcant
dIgIts
float
double 8 2.22507J858
5072014e·
J08
1.79769J1J4
862J158e+J0
8
15 sIgnIfIcant
dIgIts
double
The double name means that the accuracy of these numbers Is twIce the accuracy of the float type
numbers. Ìn most cases, the double type Is the most convenIent one. Ìn many cases the lImIted
precIsIon of float numbers Is not enough. The reason why the float type Is stIll used Is savIng the
memory (thIs Is Important for large arrays of real numbers).
FloatIng·poInt constants consIst of an Integer part, a poInt (.) and the fractIonal part. The Integer and
fractIonal parts are sequences of decImal dIgIts.
ExampIes:
J·uoL- -=!`.!!!¡
J·uoL- o=--¯¯.!¨¨¯¡
rL·-r · =¨.¨¨¨!¡
rL·-r J =!¯¡
There Is a scIentIfIc way of wrItIng real constants, often thIs method of recordIng Is more compact
than the tradItIonal one.
ExampIe:
J·uoL- ·!=!.!`!``¯!¯--`¯¡
J·uoL- ·`=¨.¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨!!`!``¯!¯¡ // `1 z-n· -rr-n r!- J-·Lm-L p·Lnr

-nLnr.¨!. ·! =¨,¯·uoL-r·¯rnLnj.·!,!¯··¡
// ---uLr. !. ·! = ¨.¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨

-nLnr.¨`. ·! =¨,¯·uoL-r·¯rnLnj.·!,-!¯··¡
// ---uLr. `. ·! = !.!`!``¯!1----------¨`¯
-nLnr.¨`. ·` =¨,¯·uoL-r·¯rnLnj.·`,-!¯··¡
// ---uLr. `. ·` = !.!`!``¯!1----------¨`¯
Ìt should be remembered that real numbers are stored In memory wIth some lImIted accuracy In the
bInary system, whIle generally the decImal notatIon Is used. That's why many numbers that are
Language Basics
© 2000·2010, |eta0uotes Software Corp.
53
precIsely represented In the decImal system can be wrItten only as an InfInIte fractIon In the bInary
system.
For example, numbers 0.J and 0.7 are represented In the computer as InfInIte fractIons, whIle the
number of 0.25 Is stored exactly, because It represents the power of two.
Ìn thIs regard, It Is strongly recommended not to compare two real numbers for equalIty, because such
a comparIson Is not correct.
ExampIe:
v·LJ Jn¯r-nr.·

//---
J·uoL- r!n--=`.¨¡
J·uoL- x,y,z¡
x=!/r!n--¡
y=1/r!n--¡
z=¯/r!n--¡
Lr.x-y==z· -nLnr.¨!/` - 1/` == ¯/`¨·¡
-L-- -nLnr.¨!/` - 1/` .= ¯/`¨·¡
// ---uLr. !/` - 1/` .= ¯/`
·
Ìf you stIll need to compare the equalIty of two real numbers, then you can do thIs In two dIfferent
ways. The fIrst way Is to compare the dIfference between two numbers wIth some small quantIty that
specIfIes the accuracy of comparIson.
ExampIe:
o··L I¬u-L¯·uoL--.J·uoL- J!,J·uoL- J`,J·uoL- -p-LL·n·

Lr.-p-LL·n<¨· -p-LL·n=--p-LL·n¡
//---
Lr.J!-J`-p-LL·n· n-runn r-L--¡
Lr.J!-J`<--p-LL·n· n-runn r-L--¡
//---
n-runn rnu-¡
·
v·LJ Jn¯r-nr.·

J·uoL- J_v-L=¨.¯¡
rL·-r r_v-L=¨.¯¡
Lr.I¬u-L¯·uoL--.J_v-L,r_v-L,¨.¨¨¨¨¨¨¨¨¨¨¨¨¨¨!·· -nLnr.J_v-L,¨ -¬u-L- ¨,r_v-L·¡
-L-- -nLnr.¨¯Lrr-n-nr. J_v-L = ¨,¯·uoL-r·¯rnLnj.J_v-L,!¯·,
¨ r_v-L = ¨,¯·uoL-r·¯rnLnj.r_v-L,!¯··¡
// ---uLr. ¯Lrr-n-nr. J_v-L= ¨.¯¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ r_v-L= ¨.¯--------¨¯-¨¯!¨
·
Noted that the value of epsIlon In the above example can not be less than the predefIned constants
08L_EPSÌLDN.The value of thIs constant Is 2.220446049250J1J1e·016. The constant correspondIng to
Language Basics
© 2000·2010, |eta0uotes Software Corp.
54
the float type Is FLT_EPSÌLDN = 1.192092896e·07. The meanIng of these values Is the followIng: It Is
the lowest value that satIsfIes the condItIon 1.0 + 08L_EPSÌLDN! = 1.0 (for numbers of float type 1.0
+ FLT_EPSÌLDN! = 1.0).
The second way offers comparIng the normalIzed dIfference of two real numbers wIth zero. Ìt's
meanIngless to compare the dIfference of normalIzed numbers wIth a zero, because any mathematIcal
operatIon wIth normalIzed numbers gIves a non·normalIzed result.
ExampIe:
o··L .·mp-n-¯·uoL--.J·uoL- numo-n!,J·uoL- numo-n`·

Lr.H·nm-LLz-¯·uoL-.numo-n!-numo-n`,-·==¨· n-runn.rnu-·¡
-L-- n-runn.r-L--·¡
·
v·LJ Jn¯r-nr.·

J·uoL- J_v-L=¨.`¡
rL·-r r_v-L=¨.`¡
Lr..·mp-n-¯·uoL--.J_v-L,r_v-L·· -nLnr.J_v-L,¨ -¬u-L- ¨,r_v-L·¡
-L-- -nLnr.¨¯Lrr-n-nr. J_v-L = ¨,¯·uoL-r·¯rnLnj.J_v-L,!¯·,
¨ r_v-L = ¨,¯·uoL-r·¯rnLnj.r_v-L,!¯··¡
// ---uLr. ¯Lrr-n-nr. J_v-L= ¨.`¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ r_v-L= ¨.`¨¨¨¨¨¨!!-`¨-`-¨
·
Some operatIons of the mathematIcal co·processor can result In the InvalId real number, whIch can't
be used In mathematIcal operatIons and operatIons of comparIson, because the result of operatIons
wIth InvalId real numbers Is undefIned. For example, when tryIng to calculate the arcsIne of 2, the
result Is the negatIve InfInIty.
ExampIe:
J·uoL- -on·nm-L = M-r!An·-Ln.`.¨·¡
-nLnr.¨M-r!An·-Ln.`.¨· =¨,-on·nm-L·¡
// ---uLr. M-r!An·-Ln.`.¨· = -!.tPH¯¨¨¨¨
8esIdes the mInus InfInIty there Is the plus InfInIty and NaN (not a number). To determIne that thIs
number Is InvalId, you can use |athÌs7alIdNumber(). AccordIng to the ÌEEE standard, they have a
specIal machIne representatIon. For example, plus InfInIty for the double type has the bIt
representatIon of 0x7FF0 0000 0000 0000.
ExampIes:
-rnu·r -rn!

J·uoL- J¡
·¡
-rnu·r -rn`

L·nj L¡
·¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
55
//--- ¯r-nr
-rn! -!¡
-rn` -`¡
//---
-!.J=M-r!An·-Ln.`.¨·¡ // J-r r!- Lnv-LLJ numo-n -!.tPH¯
-`=-!¡
pnLnrr.¨!. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`.L=¨x¯¯¯¯¨¨¨¨¨¨¨¨¨¨¨¨¡ // Lnv-LLJ numo-n -!.t,HAH
-!=-`¡
pnLnrr.¨`. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`.L=¨x¯¯¯¯¨¨¨¨¨¨¨¨¨¨¨¨¡ // jn--r--r n·nnumo-n ¯H-H
-!=-`¡
pnLnrr.¨`. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`.L=¨x¯¯¯-¨¨¨¨¨¨¨¨¨¨¨¨¡ // -m-LL--r n·nnumo-n ,H-H
-!=-`¡
pnLnrr.¨1. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`.L=¨x¯¯¯¯¨¨¨¨¨¨¨¨¨¨¨¨¡ // jn--r--r n·nnumo-n ,H-H
-!=-`¡
pnLnrr.¨¯. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`.L=¨x¯¯¯¨¨¨¨¨¨¨¨¨¨¨¨¨¡ // -·-LrLv- LnrLnLry !.tPH¯ -nJ -m-LL--r nn·nnumo-n ¯H-H
-!=-`¡
pnLnrr.¨¯. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`.L=¨x¯¯¯¨¨¨¨¨¨¨¨¨¨¨¨¨¡ // H-j-rLv- LnrLnLry -!.tPH¯
-!=-`¡
pnLnrr.¨¯. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`.L=¨x-¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¡ // H-j-rLv- z-n· -¨.¨
-!=-`¡
pnLnrr.¨-. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`.L=¨x`¯I¨¨¨¨¨¨¨¨¨¨¨¨¨¡ // ¨.¯
-!=-`¡
pnLnrr.¨-. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`.L=¨x`¯¯¨¨¨¨¨¨¨¨¨¨¨¨¨¡ // !.¨
-!=-`¡
pnLnrr.¨!¨. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`.L=¨x¯¯I¯¯¯¯¯¯¯¯¯¯¯¯¯¡ // Jn--r--r n·nm-LLz-J numo-n .MAx_¯ÐH·
-!=-`¡
pnLnrr.¨!!. `.!¯- `P¯1x¨,-!.J,-`.L·¡
//---
Language Basics
© 2000·2010, |eta0uotes Software Corp.
56
-`.L=¨x¨¨!¨¨¨¨¨¨¨¨¨¨¨¨¨¡ // ¯m-LL--r p·-LrLv- n·nm-LLz-J .MPH_¯ÐH·
-!=-`¡
pnLnrr.¨!`. `.!¯- `.!¯P¯1x¨,-!.J,-`.L·¡
//---
-!.J=¨.¯¡ // ¯!·. r!-r r!- numo-n ·r ¨.¯ - -nJL--- rn-·rL·n
-`=-!¡
pnLnrr.¨!`. `.!¯- `.!¯P¯1x¨,-!.J,-`.L·¡

!. -!.tPH¯¨¨ ¯¯¯-¨¨¨¨¨¨¨¨¨¨¨¨
`. -!.t,HAH¨ ¯¯¯¯¨¨¨¨¨¨¨¨¨¨¨¨
`. !.t¯HAH¨ ¯¯¯¯¨¨¨¨¨¨¨¨¨¨¨¨
1. !.t,HAH¨ ¯¯¯-¨¨¨¨¨¨¨¨¨¨¨¨
¯. !.t,HAH¨ ¯¯¯¯¨¨¨¨¨¨¨¨¨¨¨¨
¯. !.tPH¯¨¨ ¯¯¯¨¨¨¨¨¨¨¨¨¨¨¨¨
¯. -!.tPH¯¨¨ ¯¯¯¨¨¨¨¨¨¨¨¨¨¨¨¨
-. -¨.¨¨¨¨¨¨ -¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
-. ¨.¯¨¨¨¨¨ `¯I¨¨¨¨¨¨¨¨¨¨¨¨¨
!¨. !.¨¨¨¨¨¨ `¯¯¨¨¨¨¨¨¨¨¨¨¨¨¨
!!. !.¯-¯¯-`!`1-¯``!¯¯--`¨- ¯¯I¯¯¯¯¯¯¯¯¯¯¯¯¯
!`. `.``¯¨¯`-¯-¯¨¯`¨!1--`¨- ¨¨!¨¨¨¨¨¨¨¨¨¨¨¨¨
!`. ¯.---------------¯--¨¨! `¯I¯¯¯¯¯¯¯¯¯¯¯¯¯
·/
See aIso
0oubleToStrIng, NormalIze0ouble, Constants of NumerIc Types
Language Basics
© 2000·2010, |eta0uotes Software Corp.
57
StrIng Type
The strIng type Is used for storIng text strIngs. A text strIng Is a sequence of characters In the
UnIcode format wIth the fInal zero at the end of It. A strIng constant can be assIgned to a strIng
varIable. A strIng constant Is a sequence of UnIcode characters enclosed In double quotes: ¨ThIs Is a
strIng constant¨.
The Internal representatIon Is the 8·byte large structure. The fIrst element of the structure Is an
Integer of the Int buf_len type, It contaIns the sIze of the buffer allocated for the strIng. The second
element of the buf_ptr structure Is the J2·bIt poInter to a buffer contaInIng the strIng. FIght before
the buffer the str_len varIable of the Int type Is placed; It contaIns the strIng length (number of
characters In the strIng to the fInal zero).
The member of the buf_len structure can take one of the followIng values:
0 - IndIcates that thIs Is a constant strIng that Is stored In a pool of constant strIngs;
·1 - IndIcates that the lIne belongs to the clIent termInal (thIs lIne Is cleared by the clIent termInal,
and not by the performIng subsystem);
number · the sIze of the buffer In characters of the short type placed In the computer memory to
store the strIng.
TIght before the buffer, there are 4 bytes for the servIce InformatIon about the strIng length.
ÌnformatIon about the strIng length Is obtaIned by the StrIngLen() functIon from thIs place. The strIng
length can be of zero sIze, even If the buffer allocated for the strIng Is of the non·zero sIze. The
strIng end In the buffer Is always at the place where where fIrst byte contaInIng 0 Is met.
Ìf you need to Include a double quote (¨) Into a strIng, the backslash character (\) must be put before
It. Any specIal character constants can be wrItten In a strIng, If the backslash character (\) Is typed
before them.
ExampIes:
-rnLnj -v-n=¨r!L- L- - ·!-n-·r-n -rnLnj¨¡
-rnLnj -v-n`=¯rnLnj¯uo-rn.-v-n,¨,1·¡
-nLnr.¨.·pynLj!r -ymo·L\r\x¨¨A-¨·¡
¯LL-WnLr-.!-nJL-,¨r!L- -rnLnj ··nr-Ln- - n-. LLn- -ymo·L- \n¨·¡
-rnLnj Mr¯p-r!=¨..\\-n·jn-m ¯LL--\\M-r-rn-J-n ¯¨¡
Ìf a varIable of the strIng type Is not explIcItly InItIalIzed, the compIler adds the code that resets the
Language Basics
© 2000·2010, |eta0uotes Software Corp.
58
specIfIed structure. Ìt Is necessary for avoIdIng crItIcal errors when callIng such a varIable.
See aIso
ConversIon FunctIons, StrIng FunctIons, FIleDpen, FIleFeadStrIng, FIleWrIteStrIng
Language Basics
© 2000·2010, |eta0uotes Software Corp.
59
Structures and CIasses
Structures
A structure Is a set of elements of any type (except for the voId type). Thus, the structure combInes
logIcally related data of dIfferent types.
Structure 0ecIaratIon
The structure data type Is determIned by the followIng descrIptIon:
-rnu·r -rnu·run-_n-m-

-L-m-nr-_J--·nLprL·n
·¡
The structure name can's be used as an IdentIfIer (name of a varIable or functIon). Ìt should be noted
that In |0L5 structure elements follow one another dIrectly, wIthout alIgnment. Ìn C++ such an order
Is made to the compIler usIng the followIng InstructIon:
tpn-jm- p-·k.!·
Ìf you want to do another alIgnment In the structure, use auxIlIary members, ¨fIllers¨ to the rIght sIze.
ExampIe:
-rnu·r rn-J-_--rrLnj-

u·!-n -LLpp-j-¡ // v-Lu- ·r r!- p-nmL--LoL- -LLpp-j---Lz- ! oyr-
·!-n n---nv-J!¡ // -kLp ! oyr-
-!·nr n---nv-J`¡ // -kLp ` oyr--
Lnr n---nv-J1¡ // -n·r!-n 1 oyr-- -n- -kLpp-J. -n-un- -LLjnm-nr ·r r!- o·unJ-ny - oyr--
J·uoL- r-k-¡ // V-Lu-- ·r r!- pnL·- ·r pn·rLr rLxLnj
J·uoL- -r·p¡ // -nL·- v-Lu- ·r r!- pn·r-·rLv- -r·p
·¡
Such a descrIptIon of alIgned structures Is necessary only for transferrIng to Imported dll·functIons.
AttentIon: ThIs example Illustrates Incorrectly desIgned data. Ìt would be better fIrst to declare the
tcke and stop large data of the double type, and then declare the slìppc¤e member of the double type.
Ìn thIs case, the Internal representatIon of data wIll always be the same regardless of the value
specIfIed In #prc¤mc pcck().
Ìf a structure contaIns varIables of the strIng type and/or object of a dynamIc array, the compIler
assIgns an ImplIcIt constructor to such a structure. ThIs constructor resets all the structure members
of strIng type and correctly InItIalIzes objects of the dynamIc array.
SImpIe Structures
Structures that do not contaIn strIngs or objects of dynamIc arrays are called sImple structures;
varIables of such structures can be freely copIed to each other, even If they are dIfferent structures.
7arIables of sImple structures, as well as theIr array can be passed as parameters to functIons
Language Basics
© 2000·2010, |eta0uotes Software Corp.
60
Imported from 0LL.
Access to Structure hembers
The structure Is a new type of data allowIng to declare varIables of thIs type. The structure can be
declared only once wIthIn a project. The structure members are accessed usIng the poInt operatIon
(.).
ExampIe:
-rnu·r rn-J-_--rrLnj-

J·uoL- r-k-¡ // v-Lu-- ·r r!- pn·rLr rLxLnj pnL·-
J·uoL- -r·p¡ // v-Lu- ·r r!- pn·r-·rLv- -r·p pnL·-
u·!-n -LLpp-j-¡ // v-Lu- ·r r!- -··-pr-oL- -LLpp-j-
·¡
//--- ·n--r- up -nJ LnLrL-LLz- - v-nL-oL- ·r r!- rn-J-_--rrLnj- ryp-
rn-J-_--rrLnj- my_--r=¨.¨,¨.¨,¯·¡
Lr .Lnpur_r-¨· my_--r.r-k-=Lnpur_r-¡
CIasses
Classes dIffer from structures In the followIng:
the keyword class Is used In declaratIon;
by default, all class members have access specIfIer prIvate, unless otherwIse IndIcated. 0ata·
members of the structure have the default type of access as publIc, unless otherwIse IndIcated;
class objects always have a table of vIrtual functIons, even If there are no vIrtual functIons declared
In the class. Structures can't have vIrtual functIons;
the new operator can be applIed to class objects; thIs operator cannot be applIed to structures;
classes can be InherIted only from classes, structures can be InherIted only from structures.
Classes and structures can have an explIcIt constructor and destructor. Ìf you a constructor Is explIcItly
defIned, the InItIalIzatIon of a structure or class varIable usIng the InItIalIzIng sequence Is ImpossIble.
ExampIe:
-rnu·r rn-J-_--rrLnj-

J·uoL- r-k-¡ // v-Lu-- ·r r!- pn·rLr rLxLnj pnL·-
J·uoL- -r·p¡ // v-Lu- ·r r!- pn·r-·rLv- -r·p pnL·-
u·!-n -LLpp-j-¡ // v-Lu- ·r r!- -··-pr-oL- -LLpp-j-
//--- .·n-rnu·r·n
rn-J-_--rrLnj-.· r-k-=¨.¨¡ -r·p=¨.¨¡ -LLpp-j-=¯¡ ·
//--- ¯--rnu·r·n
rn-J-_--rrLnj-.· -nLnr.¨r!L- L- r!- -nJ¨·¡ ·
·¡
//--- .·mpLL-n .LLL j-n-n-r- -n -nn·n m----j- r!-r LnLrL-LLz-rL·n L- Lmp·--LoL-
rn-J-_--rrLnj- my_--r=¨.¨,¨.¨,¯·¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
61
Constructors and 0estructors
A constructor Is a specIal functIon, whIch Is called automatIcally when an object of structure or class
type Is created, and Is typIcally used to InItIalIze class members. Further we wIll dIscuss only classes,
all the dIscussed can be applIed to structures also, unless otherwIse specIfIed. The name of the
constructor must match wIth the name of the class. The constructor has no return type (you can
specIfy the type of voId). Ìn |0L5 constructors do not have any Input parameters. Thus, each class
can have only one constructor.
Class members: strIngs, dynamIc arrays and objects that requIre InItIalIzatIon wIll be InItIalIzed
anyway regardless of the constructor presence or absence.
A destructor Is a specIal functIon that Is called automatIcally when a class object Is destroyed. The
name of the destructor Is wrItten as a class name wIth a tIlde (-). StrIngs, dynamIc arrays and
objects, requIrIng deInItIalIzatIon, wIll be de·InItIalIzed anyway, regardless of the destructor presence
or absence. Ìf there Is a destructor, these actIons wIll be performed after callIng the destructor.
0estructors are always vIrtual, regardless of whether they are declared wIth the vIrtual keyword or
not.
0efInIng CIass hethods
Class functIon·methods can be defIned both InsIde the class and outsIde the class declaratIon. Ìf the
method Is defIned wIthIn a class, then Its body comes rIght after the method declaratIon.
ExampIe:
·L--- .r-rnL-¯!-p-

pn·r-·r-J.
Lnr m_ryp-¡
Lnr m_xp·-¡
Lnr m_yp·-¡
Lnr m_x-Lz-¡
Lnr m_y-Lz-¡
Lnr m_pn-v_runn¡
Lnr m_runn¡
Lnr m_nLj!r_o·nJ-n¡
puoLL·.
v·LJ .r-rnL-¯!-p-.·¡
v·LJ ¯-r-Lj!rзnJ-n.Lnr o·nJ-n· m_nLj!r_o·nJ-n=o·nJ-n¡ ·
v·LJ ¯-r1-·-.Lnr yp·-· m_yp·-=yp·-¡ ·
v·LJ ¯-rx-·-.Lnr xp·-· m_xp·-=xp·-¡ ·
Lnr J-r1-·-.· n-runn.m_yp·-·¡ ·
Lnr J-rx-·-.· n-runn.m_xp·-·¡ ·
Lnr J-r1¯Lz-.· n-runn.m_y-Lz-·¡ ·
Lnr J-rx¯Lz-.· n-runn.m_x-Lz-·¡ ·
Lnr J-rryp-.· n-runn.m_ryp-·¡ ·
v·LJ H-rr.· m_xp·--=¯|A-I_¯P¯I¡ ·
v·LJ -Lj!r.· m_xp·--=¯|A-I_¯P¯I¡ ·
v·LJ -·r-r-.· m_pn-v_runn=m_runn¡ Lr.--m_runn`· m_runn=¨¡ ·
vLnru-L v·LJ ¯n-..· n-runn¡ ·
vLnru-L o··L .!-·k¯·.n.Lnrs p-J_-nn-y¯`·¡
vLnru-L o··L .!-·kH-rr.Lnrs -LJ-_n·.¯`·¡
vLnru-L o··L .!-·k-Lj!r.Lnrs -LJ-_n·.¯`·¡
·¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
62
FunctIons wIth SetFIght8order(Int border) on the 0raw() are declared and defIned dIrectly InsIde the
CTetrIsShape class.
The CTetrIsShape() constructor and methods Check0own(IntE pad_array[]), CheckLeft(IntE sIde_row
[]) and CheckFIght(IntE sIde_row[]) are only declared InsIde the class, but not defIned yet. 0efInItIons
of these functIons wIll be further In the code. Ìn order to defIne the method outsIde the class, the
scope resolutIon operator Is used, the class name Is used as the as the scope.
ExampIe:
//--------------------------------------------------------------------
// .·n-rnu·r·n ·r r!- o--L· ·L---
//--------------------------------------------------------------------
v·LJ .r-rnL-¯!-p-...r-rnL-¯!-p-.·

m_ryp-=¨¡
m_yp·-=¨¡
m_xp·-=¨¡
m_x-Lz-=¯|A-I_¯P¯I¡
m_y-Lz-=¯|A-I_¯P¯I¡
m_pn-v_runn=¨¡
m_runn=¨¡
m_nLj!r_o·nJ-n=¨¡
·
//--------------------------------------------------------------------
// .!-·kLnj -oLLLry r· m·v- J·.n .r·n r!- -rL·k -nJ ·uo-·
//--------------------------------------------------------------------
o··L .r-rnL-¯!-p-...!-·k¯·.n.Lnrs p-J_-nn-y¯`·

Lnr L,x-Lz-=m_x-Lz-/¯|A-I_¯P¯I¡
//---
r·n.L=¨¡ L<x-Lz-¡ L--·

Lr.m_yp·--m_y-Lz-=p-J_-nn-y¯L`· n-runn.r-L--·¡
·
//---
n-runn.rnu-·¡
·
PubIIc, Protected and PrIvate Access hodIfIers
When developIng a new class, It Is recommended to restrIct access to the members from the outsIde.
For these purposes keywords prIvate or protected are used. Ìn thIs case, hIdden data can be accessed
only from functIon·methods of the same class. Ìf the protected keyword Is used, hIdden data can be
accessed also from methods of classes · InherItors of thIs class. The same method can be used to
restrIct the access to functIons·methods of a class.
Ìf you need to completely open access to members and/or methods of a class, use the keyword publIc.
ExampIe:
·L--- .r-rnL-¯L-LJ

pnLv-r-.
Lnr m_-··n-¡ // ¯··n-
Lnr m_yp·-¡ // .unn-nr p·-LrL·n ·r r!- rLjun--
Language Basics
© 2000·2010, |eta0uotes Software Corp.
63
Lnr m_rL-LJ¯¯PIH¯_|IPJ|r`¯¯PIH¯_WP¯r|`¡ // M-rnLx ·r r!- ¯JM
Lnr m_n·.-¯¯PIH¯_|IPJ|r`¡ // Humo-nLnj ·r r!- ¯JM n·.-
Lnr m_L--r_n·.¡ // H--r rn-- n·.
.r-rnL-¯!-p- ·m_-!-p-¡ // r-rnL- rLjun-
o··L m_o·v-n¡ // J-m- ·v-n
puoLL·.
v·LJ .r-rnL-¯L-LJ.· m_-!-p-=HJHH¡ m_o·v-n=r-L--¡ ·
v·LJ PnLr.·¡
v·LJ ¯-LnLr.·¡
v·LJ ¯·.n.·¡
v·LJ H-rr.·¡
v·LJ -Lj!r.·¡
v·LJ -·r-r-.·¡
v·LJ ¯n·p.·¡
pnLv-r-.
v·LJ H-.¯!-p-.·¡
v·LJ .!-·kAnJ¯-L-r--·.-.·¡
v·LJ H-o-LJv-n.·¡
·¡
Any class members and methods declared after the specIfIer pubIIc: (and before the next access
specIfIer) are avaIlable In any reference to the class object by the program. Ìn thIs example these are
the followIng members: functIons CTetrIsFIeld(), ÌnIt(), 0eInIt(), 0own(), Left(), FIght(), Fotate() and
0rop().
Any members that are declared after the access specIfIer to the elements prIvate: (and before the
next access specIfIer) are avaIlable only to members·functIons of thIs class. SpecIfIers of access to
elements always end wIth a colon (:) and can appear In the class defInItIon many tImes.
Access to the members of the basIs class can be redefIned durIng InherItance In derIved classes.
See aIso
Dbject·DrIented ProgrammIng
Language Basics
© 2000·2010, |eta0uotes Software Corp.
64
0ynamIc Array Dbject
0ynamIc Arrays
A dynamIc array Is a 40·byte large structure. |axImum 4·dImensIon array can be declared.
-rnu·r M¬LAnn-yJo|-·r

u-!·nr ryp-¡ // In··J-J J-r- ryp-
u-!·nr rL-j-¡ // ¯L-j- r!-r J-r-nmLn- r!- -r-ru- ·r r!- -nn-y
uLnr Lr-m_L-n¡ // ¯Lz- ·r ·n- -L-m-nr ·r r!- -nn-y Ln oyr--
Lnr -LL··-r-J¡ // A·ru-L -Lz-, -LL··-r-J r·n r!- -nn-y
Lnr n-nj-¨¡ // ¯Lz- ·r r!- rLn-r JLm-n-L·n .LnLrL-LLy -¬u-L r· ¨·
Lnr n-nj-!¡ // ¯Lz- ·r r!- --··nJ JLm-n-L·n, Lr -ny. Jr!-n.L-- ¨
Lnr n-nj-`¡ // ¯Lz- ·r r!- r!LnJ JLm-n-L·n, Lr -ny. Jr!-n.L-- ¨
Lnr n-nj-`¡ // ¯Lz- ·r r!- r·unr! JLm-n-L·n, Lr -ny. Jr!-n.L-- ¨
Lnr n---nv-J¨¡ // ¯-r- r·n
Lnr n---nv-J!¡ // Pnr-nn-L
Lnr n---nv-J`¡ // J--j-
·¡
When declarIng a dynamIc array (an array of unspecIfIed value In the fIrst paIr of square brackets),
the compIler automatIcally creates a varIable of the above structure (a dynamIc array object) and
provIdes a code for the correct InItIalIzatIon.
0ynamIc arrays are automatIcally freed when goIng beyond the vIsIbIlIty area of the block they are
declared In.
ExampIe:
J·uoL- m-rnLx¯`¯!¨`¯`¨`¡ // `-JLm-n-L·n-L Jyn-mL· -nn-y
Ann-y---Lz-.m-rnLx,¯·¡ // ¯-r r!- -Lz- ·r r!- rLn-r JLm-n-L·n
StatIc Arrays
When all sIgnIfIcant array dImensIons are explIcItly specIfIed, the compIler pre·allocates the necessary
memory sIze. Such an array Is called statIc. Nevertheless, the compIler allocates addItIonal memory
for the object of a dynamIc array, whIch (object) Is assocIated wIth the pre·allocated statIc buffer
(memory part for storIng the array).
CreatIng a dynamIc array object Is due to the possIble need to pass thIs statIc array as a parameter to
some functIon.
ExampIes:
J·uoL- -r-r_-nn-y¯¯`¡ // !-JLm-n-L·n-L -r-rL· -nn-y
-·m-_run·rL·n.-r-r_-nn-y·¡
...
o··L -·m-_run·rL·n.J·uoL-s -nn-y¯`·

Lr.Ann-y---Lz-.-nn-y,!¨¨·· n-runn.r-L--·¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
65
...
n-runn.rnu-·¡
·
Arrays In Structures
When a statIc array Is declared as a member of a structure, a dynamIc array object Is not created.
ThIs Is done to ensure compatIbIlIty of data structures used In the WIndows APÌ.
However, statIc arrays that are declared as members of structures, can also be passed to |0L5·
functIons. Ìn thIs case, when passIng the parameter a temporary object of a dynamIc array, connected
wIth the statIc array · structure member, wIll be created.
See aIso
Array FunctIons, ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and
0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
66
TypecastIng
CastIng NumerIc Types
Dften a necessIty occurs to convert one numerIc type Into another. Not all numerIc types can be
converted Into another. Here Is the scheme of allowed castIng:
SolId lInes wIth arrows IndIcate changes that are performed almost wIthout any loss of InformatIon.
Ìnstead of the char type, the bool type can be used (both take 1 byte of memory), Instead of type Int,
the color type can be used (4 bytes), Instead of the long type, datetIme can be used (take 8 bytes).
The four dashed grey lInes, also arrowed, denote conversIons, when the loss of accuracy can occur.
For example, the number of dIgIts In an Integer equal to 12J456789 (Int) Is hIgher than the number of
dIgIts that can be represented by float.
Lnr n=!``1¯¯¯--¡
rL·-r r=n¡ // r!- ··nr-nr ·r r L- -¬u-L r· !.``1¯¯¯--`I-
-nLnr.¨n = ¨,n,¨ r = ¨,r·¡
// n--uLr n= !``1¯¯¯-- r= !``1¯¯¯-`.¨¨¨¨¨
A number converted Into float has the same order, but Is less accurate. ConversIons, contrary to black
arrows, can be performed wIth possIble data loss. ConversIons between char and uchar, short and
ushort, Int and uInt, long and ulong (conversIons to both sIdes), may lead to the loss of data.
As a result of convertIng floatIng poInt values to Integer type, the fractIonal part Is always deleted. Ìf
you want to round off a float to the nearest whole number (whIch In many cases Is more useful), you
should use |athFound().
ExampIe:
//--- Jn-vLr-rL·n-L -··-L-n-rL·n
J·uoL- j=-.-¡
J·uoL- n·unJ_j=.Lnr·j¡
J·uoL- m-r!_n·unJ_j=M-r!-·unJ.j·¡
-nLnr.¨n·unJ_j = ¨,n·unJ_j·¡
-nLnr.¨m-r!_n·unJ_j = ¨,m-r!_n·unJ_j·¡

---uLr.
n·unJ_j = -.¨¨¨¨¨¨¨¨
m-r!_n·unJ_j = !¨.¨¨¨¨¨¨¨¨
·/
Language Basics
© 2000·2010, |eta0uotes Software Corp.
67
Ìf two values are combIned by a bInary operator, before the operatIon executIon the operand of a
lower type Is converted to the hIgher type In accordance wIth the prIorIty gIven In the below scheme:
The data types char, uchar, short, and ushort uncondItIonally are converted to the Int type.
ExampIes:
·!-n ·!=`¡
//--- ¯Ln-r -x-mpL-
J·uoL- J`=·!/`-¨.`¡
-nLnr.¨·!/` - ¨.` = ¨,J`·¡
// ---uLr. ·!/`-¨.` = !.`¨¨¨¨¨¨¨
//--- ¯-··nJ -x-mpL-
J`=·!/`.¨-¨.`¡
-nLnr.¨·!/`.¨ - ¨.` = ¨,J`·¡
// ---uLr. ·!/`.¨-¨.` = !.-¨¨¨¨¨¨¨
The calculated expressIon consIsts of two operatIons. Ìn the fIrst example, the varIable c1 of the char
type Is converted to a temporary varIable of the Int type, because the second operand In the dIvIsIon
operatIon, the constant 2, Is of the hIgher type Int. As a result of the Integer dIvIsIon J/2 we get the
value 1, whIch Is of the Int type.
Ìn the second operatIon of the fIrst example, the second operand Is the constant 0.J, whIch Is of the
double type, so the result of the fIrst operatIon Is converted Into a temporary varIable of the double
type wIth a value of 1.0.
Ìn the second example the varIable of the char type c1 Is converted to a temporary varIable of the
double type, because the second operand In the dIvIsIon operatIon, the constant 2.0, Is of the double
type; no further conversIons are made.
TypecastIng of NumerIc Types
Ìn the expressIons of the |0L5 language both explIcIt and ImplIcIt typecastIng can be used. The
explIcIt typecastIng Is wrItten as follows:
v-n_! = .ryp-·v-n_`¡
An expressIon or functIon executIon result can be used as the var_2 varIable. The functIonal recordIng
of the explIcIt typecastIng Is also possIble:
v-n_! = ryp-.v-n_`·¡
Let's consIder an explIcIt typecastIng on the basIs of the fIrst example.
//--- r!LnJ -x-mpL-
J·uoL- J`=.J·uoL-··!/`-¨.`¡
-nLnr.¨.J·uoL-··!/` - ¨.` = ¨,J`·¡
// ---uLr. .J·uoL-··!/`-¨.` = !.-¨¨¨¨¨¨¨
Language Basics
© 2000·2010, |eta0uotes Software Corp.
68
8efore the dIvIsIon operatIon Is performed, the c1 varIable Is explIcItly cast to the double type. Now
the Integer constant 2 Is cast to the value 2.0 of the double type, because as a result of convertIng
the fIrst operand has taken the double type. Ìn fact, the explIcIt typecastIng Is a unary operatIon.
8esIdes, when tryIng to cast types, the result may go beyond the permIssIble range. Ìn thIs case, the
truncatIon occurs. For example:
·!-n ·¡
u·!-n u¡
·=1¨¨¡
u=1¨¨¡
-nLnr.¨· = ¨,··¡ // ---uLr ·=-!!`
-nLnr.¨u = ¨,u·¡ // ---uLr u=!11
8efore operatIons (except for the assIgnment ones) are performed, the data are converted Into the
maxImum prIorIty type. 8efore assIgnment operatIons are performed, the data are cast Into the
target type.
ExampIes:
Lnr L=!/`¡ // n· ryp-- ·--rLnj, r!- n--uLr L- ¨
-nLnr.¨L = !/` ¨,L·¡
Lnr k=!/`.¨¡ // r!- -xpn---L·n L- ·--r r· r!- J·uoL- ryp-,
-nLnr.¨k = !/` ¨,k·¡ // r!-n L- r· r!- r-nj-r ryp- ·r Lnr, r!- n--uLr L- ¨
J·uoL- J=!.¨/`.¨¡ // n· ryp-- ·--rLnj, r!- n--uLr L- ¨.¯
-nLnr.¨J = !/`.¨¡ ¨,J·¡
J·uoL- -=!/`.¨¡ // r!- -xpn---L·n L- ·--r r· r!- J·uoL- ryp-,
-nLnr.¨- = !/`.¨¡ ¨,-·¡// r!-r L- r!- --m- -- r!- r-nj-r ryp-, r!- n--uLr L- ¨.¯
J·uoL- x=!/`¡ // r!- -xpn---L·n ·r r!- Lnr ryp- L- ·--r r· r!- J·uoL- r-nj-r rypn,
-nLnr.¨x = !/`¡ ¨,x·¡ // r!- n--uLr L- ¨.¨
TypecastIng for the StrIng Type
The strIng type has the hIghest prIorIty among sImple types. Therefore, If one of operands of an
operatIon Is of the strIng type, the second operand wIll be cast to a strIng automatIcally. Note that for
a strIng, a sIngle dyadIc two·place operatIon of addItIon Is possIble. The explIcIt castIng of strIng to
any numerIc type Is allowed.
ExampIes:
-rnLnj -!=!.¨/-¡ // r!- -xpn---L·n L- ·--r r· r!- J·uoL- ryp-,
-nLnr.¨-! = !.¨/-¡ ¨,-!·¡ // r!-n L- r· r!- r-nj-r ryp- ·r -rnLnj,
// n--uLr L- ¨¨.!`¯¨¨¨¨¨¨ .- -rnLnj ··nr-LnLnj !¨ ·!-n-·r-n-·
-rnLnj -`=HJHH¡ // -rnLnj J-LnLrL-LLz-rL·n
-nLnr.¨-` = HJHH¡ ¨,-`·¡ // r!- n--uLr L- -n -mpry -rnLnj
-rnLnj -`=¨rL·k-r H¨-!``1¯¡ // r!- -xpn---L·n L- ·--r r· r!- -rnLnj ryp-
Language Basics
© 2000·2010, |eta0uotes Software Corp.
69
-nLnr.¨-` = \¨rL·k-r H\¨-!``1¯¨,-`·¡
-rnLnj -rn!=¨rnu-¨¡
-rnLnj -rn`=¨¨,`¯¯,¨¨¡
-rnLnj -rn`=¨`¨¨-.¨¯.¨!¨¡
-rnLnj -rn1=¨!.``1¯-`¨¡
-nLnr.o··L.-rn!··¡
-nLnr.··L·n.-rn`··¡
-nLnr.J-r-rLm-.-rn`··¡
-nLnr.J·uoL-.-rn1··¡
TypecastIng of SImpIe Structure Types
0ata of the sImple structures type can be assIgned to each other only If all the members of both
structures are of numerIc types. Ìn thIs case both operands of the assIgnment operatIon (left and
rIght) must be of the structures type. The member·wIse castIng Is not performed, a sImple copyIng Is
done. Ìf the structures are of dIfferent sIzes, the number of bytes of the smaller sIze Is copIed. Thus
the absence of unIon In |0L5 Is compensated.
ExampIes:
-rnu·r -rn!

J·uoL- J¡
·¡
//---
-rnu·r -rn`

L·nj L¡
·¡
//---
-rnu·r -rn`

Lnr L·._p-nr¡
Lnr !Lj!_p-nr¡
·¡
//---
-rnu·r -rn1

-rnLnj -¡
·¡
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

-rn! -!¡
-rn` -`¡
-rn` -`¡
-rn1 -1¡
//---
-!.J=M-r!An·-Ln.`.¨·¡ // j-r r!- Lnv-LLJ numo-n -!. t PH¯
Language Basics
© 2000·2010, |eta0uotes Software Corp.
70
-`=-!¡
pnLnrr.¨!. `r `P¯1x¨,-!.J,-`.L·¡
//---
-`=-`¡
pnLnrr.¨`. !Lj! p-nr ·r L·nj `.-x L·. p-nr ·r L·nj `.-x¨,
-`.!Lj!_p-nr,-`.L·._p-nr·¡
//---
-1.-=¨-·m- ··n-r-nr -rnLnj¨¡
-`=-1¡
pnLnrr.¨`. ourr-n L-n L- `J ··n-r-nr -rnLnj -JJn--- L- ¨x`.-x¨,
-`.L·._p-nr,-`.!Lj!_p-nr·¡
·
Another example Illustrates the method of organIzIng a custom functIon for receIvIng FC8 (Fed,
Creen, 8lue) representatIon from the color type. Create two structures of the same sIze but wIth
dIfferent contents. For convenIence, let's add a functIon returnIng the FC8 representatIon of a color
as a strIng.
tpn·p-nry -·nLpr_-!·._Lnpur-
Lnpur ··L·n r--r.·L·n=ÐLu-¡// --r ··L·n r·n r--rLnj
//--- -rnu·run- r·n n-pn---nrLnj ··L·n -- -JÐ
-rnu·r -JÐ

u·!-n oLu-¡ // oLu- ··mp·n-nr ·r ··L·n
u·!-n jn--n¡ // jn--n ··mp·n-nr ·r ··L·n
u·!-n n-J¡ // n-J ··mp·n-nr ·r ··L·n
u·!-n -mpry¡ // r!L- oyr- L- n·r u--J
-rnLnj r·¯rnLnj.·¡ // run·rL·n r·n n-·-LvLnj - -rnLnj
·¡
//--- run·rL·n r·n -!·.Lnj ··L·n -- - -rnLnj
-rnLnj -JÐ..r·¯rnLnj.v·LJ·

-rnLnj ·ur=¨.¨-.-rnLnj·n-J-¨.¨-.-rnLnj·jn--n-¨.¨-.-rnLnj·oLu--¨·¨¡
n-runn ·ur¡
·
//--- -rnu·run- r·n -r·nLnj ·r r!- ouLLr-Ln ··L·n ryp-
-rnu·r ouLLr.·L·n

··L·n ·¡
·¡
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//--- - v-nL-oL- r·n -r·nLnj Ln -JÐ
-JÐ ··L·n-JС
//--- v-nL-oL- r·n -r·nLnj r!- ··L·n ryp-
ouLLr.·L·n r--r¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
71
r--r.·=r--r.·L·n¡
//--- ·--rLnj r.· -rnu·run-- oy ··pyLnj ··nr-nr-
··L·n-JÐ=r--r¡
-nLnr.¨··L·n ¨,r--r.·,¨=¨,··L·n-JÐ.r·¯rnLnj.··¡
//---
·
TypecastIng of ßase CIass PoInters to PoInters of 0erIvatIve CIasses
Dbjects of the open generated class can also be vIewed as objects of the correspondIng base class.
ThIs leads to some InterestIng consequences.For example, despIte the fact that objects of dIfferent
classes, generated by a sIngle base class, may dIffer sIgnIfIcantly from each other, we can create a
lInked lIst (LIst) of them, as we vIew them as objects of the base type. 8ut the converse Is not true:
the base class objects are not automatIcally objects of a derIved class.
You can use the explIcIt castIng to convert the base class poInters to the poInters of a derIved class.
8ut you must be fully confIdent In the admIssIbIlIty of such a transformatIon, because otherwIse a
crItIcal runtIme error wIll occur and the mql5 program wIll be stopped.
See aIso
0ata Types
Language Basics
© 2000·2010, |eta0uotes Software Corp.
72
VoId Type and NULL Constant
SyntactIcally the voId type Is a fundamental type along wIth types of char, uchar, bool, short, ushort,
Int, uInt, color, long, ulong, datetIme, float, double and strIng. ThIs type Is used eIther to IndIcate
that the functIon does not return any value, or as a functIon parameter It denotes the absence of
parameters.
The predefIned constant varIable NULL Is of the voìd type. Ìt can be assIgned to varIables of any other
fundamental types wIthout conversIon. The comparIson of fundamental type varIables wIth the NULL
value Is allowed.
ExampIe:
//--- Pr r!- -rnLnj L- n·r LnLrL-LLz-J, r!-n ---Ljn ·un pn-J-rLn-J v-Lu- r· Lr
Lr.-·m-_-rnLnj==HJHH· -·m-_-rnLnj=¨-mpry¨¡
Also NULL can be compared to poInters to objects created wIth the new operator.
See aIso
7arIables, FunctIons
Language Basics
© 2000·2010, |eta0uotes Software Corp.
73
Dbject PoInters
Ìn |0L5, there Is a possIbIlIty to dynamIcally create objects of complex type. ThIs Is done by the new
operator, whIch returns a descrIptor of the created object. 0escrIptor Is 8 bytes large. SyntactIcally,
object descrIptors In |0L5 are sImIlar to poInters In C++.
ExampIes:
MyJo|-·r· !·o|-·r= n-. MyJo|-·r.·¡
AgaIn, unlIke C++, the varIable hob]ect from the example above Is not a poInter to the memory, It Is
a descrIptor of the object.
See aIso
7arIables, ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and
0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
74
Peference. hodIfIer û and Keyword thIs
PassIng Parameters by Peference
Ìn |0L5 parameters of sImple types can be passed both by value and by reference, whIle parameters
of compound types are always passed by reference. To Inform the compIler that a parameter must be
passed by reference, the ampersand character û Is added before the parameter name.
PassIng a parameter by reference means passIng the address of the varIable, that's why all changes In
the parameter that Is passed by reference wIll be ImmedIately reflected In the source varIable. UsIng
parameter passIng by reference, you can Implement return of several results of a functIon at the same
tIme. Ìn order to prevent changIng of a parameter passed by reference, use the const modIfIer.
Thus, If the Input parameter of a functIon Is an array, a structure or class object, symbol '8' Is placed
In the functIon header after the varIable type and before Its name.
ExampIe
·L--- .¯-m·.L---

pnLv-r-.
J·uoL- m_-nn-y¯`¡
puoLL·.
v·LJ --rAnn-y.J·uoL- s-nn-y¯`·¡
·¡
//--------------------------------------------------------------------
// rLLLLnj r!- -nn-y
//--------------------------------------------------------------------
v·LJ .¯-m·.L---..--rAnn-y.J·uoL- s-nn-y¯`·

Lr.Ann-y¯Lz-.-nn-y·¨·

Ann-y---Lz-.m_-nn-y,Ann-y¯Lz-.-nn-y··¡
Ann-y.·py.m_-nn-y, -nn-y·¡
·
·
Ìn the above example class C0emoClass Is declared, whIch contaIns the prIvate member · array
m_array[] of double type. FunctIon setArray() Is declared, to whIch array[] Is passed by reference. Ìf
the functIon header doesn't contaIn the IndIcatIon about passIng by reference, I.e. doesn't contaIn the
ampersand character, an error message wIll be generated at the attempt to compIle such a code.
0espIte the fact that the array Is passed by reference, we can't assIgn one array to another. We need
to perform the element·wIse copyIng of contents of the source array to the recIpIent array. The
presence of 8 In the functIon descrIptIon Is the oblIgatory condItIon for arrays and structures when
passed as the functIon parameter.
Keyword thIs
A varIable of class type (object) can be passed both by reference and by poInter. As well as reference,
the poInter allows havIng access to an object. After the object poInter Is declared, the new operator
should be applIed to It to create and InItIalIze It.
Language Basics
© 2000·2010, |eta0uotes Software Corp.
75
The reserved word thIs Is Intended for obtaInIng the reference of the object to Itself, whIch Is
avaIlable InsIde class or structure methods. thIs always references to the object, In the method of
whIch It Is used, and the expressIon CetPoInter(thIs) gIves the poInter of the object, whose member
Is the functIon, In whIch call of CetPoInter() Is performed. Ìn |0L5 functIons can't return objects, but
they can return the object poInter.
Thus, If we need a functIon to return an object, we can return the poInter of thIs object In the form of
CetPoInter(thIs). Let's add functIon get0emoClass() that returns poInter of the object of thIs class,
Into the descrIptIon of C0emoClass.
·L--- .¯-m·.L---

pnLv-r-.
J·uoL- m_-nn-y¯`¡
puoLL·.
v·LJ --rAnn-y.J·uoL- s-nn-y¯`·¡
.¯-m·.L--- ·j-r¯-m·.L---.·¡
·¡
//--------------------------------------------------------------------
// rLLLLnj r!- -nn-y
//--------------------------------------------------------------------
v·LJ .¯-m·.L---..--rAnn-y.J·uoL- s-nn-y¯`·

Lr.Ann-y¯Lz-.-nn-y·¨·

Ann-y---Lz-.m_-nn-y,Ann-y¯Lz-.-nn-y··¡
Ann-y.·py.m_-nn-y,-nn-y·¡
·
·
//--------------------------------------------------------------------
// n-runn- Lr- ·.n p·Lnr-n
//--------------------------------------------------------------------
.¯-m·.L--- ·.¯-m·.L---..j-r¯-m·.L---.v·LJ·

n-runn.J-r-·Lnr-n.r!L-··¡
·
Structures don't have poInters, operators new and delete can't be applIed to them, not CetPoInter
(thIs) can be used.
See aIso
Dbject PoInters, CreatIng and 0eletIng Dbjects, 7IsIbIlIty Scope and LIfetIme of 7arIables
Language Basics
© 2000·2010, |eta0uotes Software Corp.
76
DperatIons and ExpressIons
Some characters and character sequences are of a specIal Importance. These are so·called operatIon
symbols, for example:
- - · / ` ¯ymo·L- ·r -nLr!m-rL· ·p-n-rL·n-
ss ¯ymo·L- ·r L·jL·-L ·p-n-rL·n-
= -= ·= .!-n-·r-n- ---Ljnm-nr ·p-n-r·n-
DperatIon symbols are used In expressIons and have sense when approprIate operands are gIven
them. PunctuatIon marks are emphasIzed, as well. These are parentheses, braces, comma, colon, and
semIcolon.
DperatIon symbols, punctuatIon marks, and spaces are used to separate language elements from each
other.
ThIs sectIon contaIns the descrIptIon of the followIng topIcs:
ExpressIons
ArIthmetIcal DperatIons
AssIgnment DperatIons
DperatIons of FelatIon
8oolean DperatIons
8ItwIse DperatIons
Dther DperatIons
PrIorItIes and DperatIons Drder
Language Basics
© 2000·2010, |eta0uotes Software Corp.
77
ExpressIons
An expressIon consIsts of one or more operands and operatIon symbols. An expressIon can be wrItten
In several lInes.
ExampIes:
---¡ o = !¨¡ // --v-n-L -xpn---L·n- -n- L··-r-J Ln ·n- LLn-
//--- ·n- -xpn---L·n L- JLvLJ-J Lnr· --v-n-L LLn--
x = .y · z· /
.. - `· - !`¯¡
An expressIon that ends wIth a semIcolon (;) Is an operator.
See aIso
Precedence Fules
Language Basics
© 2000·2010, |eta0uotes Software Corp.
78
ArIthmetIc DperatIons
ArIthmetIcal operatIons Include addItIve and multIplIcatIve operatIons:
¯um ·r v-nL-oL-- L = | - `¡
¯Lrr-n-n·- ·r v-nL-oL-- L = | - `¡
.!-njLnj r!- -Ljn x = - x¡
-n·Ju·r ·r v-nL-oL-- z = ` · x¡
¯LvL-L·n ¬u·rL-nr L = | / ¯¡
¯LvL-L·n- n-mLnJ-n mLnur-- = rLm- ` ¯¨¡
AJJLnj ! r· r!- v-nL-oL- v-Lu- L--¡
AJJLnj ! r· r!- v-nL-oL- v-Lu- --L¡
¯uorn-·rLnj ! rn·m r!- v-nL-oL- v-Lu- k--¡
¯uorn-·rLnj ! rn·m r!- v-nL-oL- v-Lu- --k¡
Ìncrement and decrement operatIons are applIed only to varIables, they can't be applIed to constants.
The prefIx Increment (++I) and decrement (·k) are applIed to the varIable rIght before thIs varIable Is
used In an expressIon.
Post·Increment (I++) and post·decrement (k·) are applIed to the varIable rIght after thIs varIable Is
used In an expressIon.
ExampIes:
Lnr -=`¡
---¡ // v-LLJ -xpn---L·n
Lnr o=.---··`¡ // Lnv-LLJ -xpn---L·n
See aIso
Precedence Fules
Language Basics
© 2000·2010, |eta0uotes Software Corp.
79
AssIgnment DperatIons
The value of the expressIon that Includes the gIven operatIon Is the value of the left operand after
assIgnment:
A--Ljnm-nr r!- x v-Lu- r· r!- y v-nL-oL- y = x¡
The followIng operatIons unIte arIthmetIc or bItwIse operatIons wIth operatIon of assIgnment:
AJJLnj x r· r!- y v-nL-oL- y -= x¡
¯uorn-·rLnj x rn·m r!- y v-nL-oL- y -= x¡
MuLrLpLyLnj r!- y v-nL-oL- oy x y ·= x¡
¯LvLJLnj r!- y v-nL-oL- oy x y /= x¡
--mLnJ-n ·r JLvL-L·n ·r r!- y v-nL-oL- oy x y `= x¡
r!- -!Lrr ·r r!- oLn-ny n-pn---nr-rL·n ·r y r· r!- nLj!r oy x oLr y = x¡
r!- -!Lrr ·r r!- oLn-ny n-pn---nr-rL·n ·r y r· r!- L-rr oy x oLr y y <<= x¡
AH¯ oLr.L-- ·p-n-rL·n ·r oLn-ny n-pn---nr-rL·n- ·r y -nJ x y s= x¡
J- oLr.L-- ·p-n-rL·n ·r oLn-ny n-pn---nr-rL·n- ·r y -nJ x y = x¡
Ix·LuJLnj J- oLr.L-- ·p-n-rL·n ·r oLn-ny n-pn---nr-rL·n- ·r y -nJ x y `= x¡
8ItwIse operatIons can be applIed to Integers only. When performIng the operatIon of the logIcal shIft
of the y representatIon to the rIght/left by x bIts, the 5 smallest bInary dIgIts of the x value are used,
the hIghest ones are dropped, I.e. the shIft Is made to 0·J1 bIts.
8y º= operatIon (y value by module of x), the result sIgn Is equal to the sIgn of dIvIded number.
The assIgnment operator can be used several tImes In an expressIon . Ìn thIs case the processIng of
the expressIon Is performed from left to rIght:
y=x=`¡
FIrst, the varIable x wIll be assIgned the value J, then the y varIable wIll be assIgned the value of x, I.
e. also J.
See aIso
Precedence Fules
Language Basics
© 2000·2010, |eta0uotes Software Corp.
80
DperatIons of PeIatIon
8oolean FALSE Is represented wIth an Integer zero value, whIle the boolean TFUE Is represented by
any non·zero value.
The value of expressIons contaInIng operatIons of relatIon or logIcal operatIons Is FALSE (0) or TFUE
(1).
rnu- Lr - L- -¬u-L r· o - == o¡
rnu- Lr - L- n·r -¬u-L r· o - .= o¡
rnu- Lr - L- L--- r!-n o - < o¡
rnu- Lr - L- jn--r-n r!-n o - o¡
rnu- Lr - L- L--- r!-n ·n -¬u-L r· o - <= o¡
rnu- Lr - L- jn--r-n r!-n ·n -¬u-L r· o - = o¡
The equalIty of two real numbers can't be compared. Ìn most cases, two seemIngly IdentIcal numbers
can be unequal because of dIfferent values In the 15th decImal place. Ìn order to correctly compare
two real numbers, compare the normalIzed dIfference of these numbers wIth zero.
ExampIe:
o··L .·mp-n-¯·uoL--.J·uoL- numo-n!,J·uoL- numo-n`·

Lr.H·nm-LLz-¯·uoL-.numo-n!-numo-n`,-·==¨· n-runn.rnu-·¡
-L-- n-runn.r-L--·¡
·
v·LJ Jn¯r-nr.·

J·uoL- rLn-r=¨.`¡
J·uoL- --··nJ=`.¨¡
J·uoL- r!LnJ=--··nJ-`.¯¡
Lr.rLn-r.=r!LnJ·

Lr..·mp-n-¯·uoL--.rLn-r,r!LnJ··
pnLnrr.¨`.!¯r -nJ `.!¯r -n- -¬u-L¨,rLn-r,r!LnJ·¡
·
·
// ---uLr. ¨.`¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨.`--------------- -n- -¬u-L
See aIso
Precedence Fules
Language Basics
© 2000·2010, |eta0uotes Software Corp.
81
ßooIean DperatIons
LogIcaI NegatIon NDT (!)
Dperand of the logIcal negatIon (!) must be of arIthmetIc type. The result Is TFUE (1), If the operand
value Is FALSE (0); and It Is equal to FALSE (0), If the operand dIffers from FALSE (0).
Lr..-· -nLnr.¨n·r '-'¨·¡
LogIcaI DperatIon DP (||)
LogIcal DF operatIon (11) of x and y values. The expressIon value Is TFUE (1), If x or y value Is true
(not null). DtherwIse · FALSE (0).
Lr.x<¨ x=m-x_o-n-· -nLnr.¨·ur ·r n-nj-¨·¡
LogIcaI DperatIon AN0 (ûû)
LogIcal operatIon AN0 (EE) of x and y values. The expressIon value Is TFUE (1), If the values of x and
y are true (not null). DtherwIse · FALSE (0).
ßrIef EstImate of ßooIean DperatIons
The scheme of the so called ¨brIef estImate¨ Is applIed to boolean operatIons, I.e. the calculatIon of
the expressIon Is termInated when the result of the expressIon can be precIsely estImated.
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//--- r!- rLn-r -x-mpL- ·r r!- onL-r --rLm-r-
Lr.run·_r-L--.· ss run·_rnu-.··

-nLnr.¨Jp-n-rL·n ss. 1·u .LLL n-v-n --- r!L- -xpn---L·n¨·¡
·
-L--

-nLnr.¨Jp-n-rL·n ss. ---uLr ·r r!- rLn-r -xpn---L·n L- r-L--, -· r!- --··nJ .--n'r ·-L·uL-r-J¨·¡
·
//--- r!- --··nJ -x-mpL- ·r r!- onL-r --rLm-r-
Lr..run·_r-L--.· .run·_rnu-.··

-nLnr.¨Jp-n-rL·n . ---uLr ·r r!- rLn-r -xpn---L·n L- rnu-, -· r!- --··nJ .--n'r ·-L·uL-r-J¨·¡
·
-L--

-nLnr.¨Jp-n-rL·n . 1·u .LLL n-v-n --- r!L- -xpn---L·n¨·¡
·
·
Language Basics
© 2000·2010, |eta0uotes Software Corp.
82
//--------------------------------------------------------------------
// r!- run·rL·n -L.-y- n-runn- r-L--
//--------------------------------------------------------------------
o··L run·_r-L--.·

-nLnr.¨¯un·rL·n run·_r-L--.·¨·¡
n-runn.r-L--·¡
·
//--------------------------------------------------------------------
// r!- run·rL·n -L.-y- n-runn- rnu-
//--------------------------------------------------------------------
o··L run·_rnu-.·

-nLnr.¨¯un·rL·n run·_rnu-.·¨·¡
n-runn.rnu-·¡
·
See aIso
Precedence Fules
Language Basics
© 2000·2010, |eta0uotes Software Corp.
83
ßItwIse DperatIons
CompIement to Dne
Complement of the varIable value up to one. The value of the expressIon contaIns 1 In all dIgIts where
the varIable value contaIns 0, and 0 In all dIgIts where the varIable contaIns 1.
o = n¡
ExampIe:
·!-n -='-',o¡
o=-¡
-nLnr.¨- = ¨,-, ¨ o = ¨,o·¡
// r!- n--uLr .LLL o-.
// - = -¯ o = ---
PIght ShIft
The bInary representatIon of x Is shIfted to the rIght by y dIgIts. Ìf the value to shIft Is of the
unsIgned type, the logIcal rIght shIft Is made, I.e. the freed left·sIde bIts wIll be fIlled wIth zeroes.
Ìf the value to shIft Is of a sIgn type, the arIthmetIc rIght shIft Is made, I.e. the freed left·sIde dIgIts
wIll be fIlled wIth the value of a sIgn bIt (If the number Is posItIve, the value of the sIgn bIt Is 0; If the
number Is negatIve, the value of the sIgn bIt Is 1).
x = x y¡
ExampIe:
·!-n -='-',o='o'¡
-nLnr.¨Ð-r·n-. - = ¨,-, ¨ o = ¨,o·¡
//--- -!Lrr r· r!- nLj!r
o=-!¡
-nLnr.¨Arr-n. - = ¨,-, ¨ o = ¨,o·¡
// r!- n--uLr .LLL o-.
// Ð-r·n-. - = -¯ o = --
// Arr-n. - = -¯ o = 1-
Left ShIft
The bInary representatIon of x Is shIfted to the left by y dIgIts, the freed rIght·sIde dIgIts are fIlled
wIth zeros.
x = x << y¡
ExampIe:
·!-n -='-',o='o'¡
-nLnr.¨Ð-r·n-. - = ¨,-, ¨ o = ¨,o·¡
//--- -!Lrr r· r!- L-rr
o=-<<!¡
-nLnr.¨Arr-n. - = ¨,-, ¨ o = ¨,o·¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
84
// r!- n--uLr .LLL o-.
// Ð-r·n-. - = -¯ o = --
// Arr-n. - = -¯ o = -¯`
It Is not recommended to shIft by the number of bIts Iarger or equaI to the Iength of the varIabIe
shIfted, because the resuIt of such an operatIon Is undefIned.
ßItwIse AN0 DperatIon
The bItwIse AN0 operatIon of bInary·coded x and y representatIons. The value of the expressIon
contaIns a 1 (TFUE) In all dIgIts where both x and y contaIn non·zero, and It contaIns 0 (FALSE) In all
other dIgIts.
o = ..x s y· .= ¨·¡
ExampIe:
·!-n -='-',o='o'¡
//--- AH¯ ·p-n-rL·n
·!-n ·=-so¡
-nLnr.¨- = ¨,-,¨ o = ¨,o·¡
-nLnr.¨- s o = ¨,··¡
// r!- n--uLr .LLL o-.
// - = -¯ o = --
// - s o = -¯
ßItwIse DP DperatIon
The bItwIse DF operatIon of bInary representatIons of x and y. The value of the expressIon contaIns 1
In all dIgIts where x or y does not contaIn 0, and It contaIns 0 In all other dIgIts.
o = x y¡
ExampIe:
·!-n -='-',o='o'¡
//--- J- ·p-n-rL·n
·!-n ·=-o¡
-nLnr.¨- = ¨,-,¨ o = ¨,o·¡
-nLnr.¨- o = ¨,··¡
// r!- n--uLr .LLL o-.
// - = -¯ o = --
// - o = --
ßItwIse ExcIusIve DperatIon DP
The bItwIse exclusIve DF (eXclusIve DF) operatIon of bInary representatIons of x and y. The value of
the expressIon contaIns a 1 In all dIgIts where x and y have dIfferent bInary values, and It contaIns 0
In all other dIgIts.
o = x ` y¡
ExampIe:
Language Basics
© 2000·2010, |eta0uotes Software Corp.
85
·!-n -='-', o='o'¡
//--- Ix·LuJLnj J- ·p-n-rL·n
·!-n ·=-`o¡
-nLnr.¨- = ¨,-,¨ o = ¨,o·¡
-nLnr.¨- ` o = ¨,··¡
// r!- n--uLr .LLL o-.
// - = -¯ o = --
// - ` o = --
8ItwIse operatIons are performed wIth Integers only.
See aIso
Precedence Fules
Language Basics
© 2000·2010, |eta0uotes Software Corp.
86
Dther operatIons
IndexIng ( [| )
When addressIng the I·th element of the array, the expressIon value Is the value of a varIable wIth the
serIal number I.
ExampIe:
-nn-y¯L` = `¡ // A--Ljn r!- v-Lu- ·r ` r· L-r! -L-m-nr ·r r!- -nn-y.
Dnly an Integer can be Index of an array. Four·dImensIonal and below arrays are allowed. Each
measurement Is Indexed from 0 to measurement sIze·1. Ìn partIcular case, for a one·dImensIonal
array consIstIng of 50 elements, the reference to the fIrst element wIll look lIke array [0], that to the
last element wIll be array [49].
When addressIng beyond the array, the executIng subsystem wIll generate a crItIcal error, and the
program wIll be stopped.
CaIIIng FunctIon wIth x1, x2 ,..., xn Arguments
Each argument can represent a constant, varIable, or expressIon of the correspondIng type. The
arguments passed are separated by commas and must be InsIde of parentheses, the openIng
parenthesIs must follow the name of the called functIon.
The expressIon value Is the value returned by the functIon. Ìf the return value Is of voId type, such
functIon call cannot be placed to the rIght In the assIgnment operatIon. Please make sure that the
expressIons x1,..., Xn are executed exactly In thIs order.
ExampIe:
Lnr L-njr!=!¨¨¨¨¨¨¡
-rnLnj -=¨-¨,o=¨o¨,·¡
//---
Lnr -r-nr=J-rrL·k.·unr.·,-r·p¡
L·nj L¡
r·n.L=¨¡L<L-njr!¡L--·

·=--o¡
·
-r·p=J-rrL·k.·unr.·¡
-nLnr.¨rLm- r·n '· = - - o' = ¨,.-r·p--r-nr·,¨ mLLLL--··nJ-, L = ¨,L·¡
Comma DperatIon ( , )
ExpressIons separated by commas are executed from left to rIght. All sIde effects of the left
expressIon calculatIon can appear before the rIght expressIon Is calculated. The result type and value
coIncIde wIth those of the rIght expressIon. The lIst of parameters to be passed (see above) can be
consIdered as an example.
ExampIe:
Language Basics
© 2000·2010, |eta0uotes Software Corp.
87
r·n.L=¨,|=--¡ L<!¨¨¡ L--,|--· -nLnr.-nn-y¯L`¯|`·¡
0ot Dperator ( . )
For the dIrect access to the publIc members of structures and classes the dot operatIon Is usesd.
Syntax:
V-nL-oL-_n-m-_·r_-rnu·run-_ryp-.M-mo-n_n-m-
ExampIe:
-rnu·r ¯---L·nrLm-

-rnLnj ----L·nH-m-¡
Lnr -r-nr|·un¡
Lnr -r-nrMLnur--¡
Lnr -nJ|·un¡
Lnr -nJMLnur--¡
· -r¡
-r.----L·nH-m-=¨A-L-n¨¡
-r.-r-nr|·un=¨¡
-r.-r-nrMLnur--=¨¡
-r.-nJ|·un=-¡
-r.-nJMLnur--=¨¡
Scope PesoIutIon DperatIon ( :: )
Each functIon In a mql5 program has Its own executIon scope. For example, the PrInt() system
functIon Is performed In a global scope. Ìmported functIons are called In the scope of the
correspondIng Import. |ethod functIons of classes have the scope of the correspondIng class. The
syntax of the scope resolutIon operatIon Is as follows:
¯¯··p-_n-m-`..¯un·rL·n_n-m-.p-n-m-r-n-·
Ìf there Is no scope name, thIs Is the explIcIt dIrectIon to use the global scope. Ìf there Is no scope
resolutIon operatIon, the functIon Is sought In the nearest scope. Ìf there Is no functIon n the local
scope, the search Is conducted In the global scope.
The scope resolutIon operatIon Is also used to defIne functIon·class member.
ryp- .-L--_n-m-..¯un·rL·n_n-m-.p-n-m-r-n-_J--·nLprL·n·

// run·rL·n o·Jy
·
ExampIe:
tpn·p-nry -·nLpr_-!·._Lnpur-
tLmp·nr ¨k-nn-L``.JLL¨
Lnr J-rH--rInn·n.v·LJ·¡
tLmp·nr
Language Basics
© 2000·2010, |eta0uotes Software Corp.
88
·L--- ..!-·k.·nr-xr

Lnr m_LJ¡
puoLL·.
..!-·k.·nr-xr.· m_LJ=!``1¡ ·
pn·r-·r-J.
Lnr J-rH--rInn·n.· n-runn.m_LJ·¡ ·
·¡
·L--- ..!-·k.·nr-xr` . puoLL· ..!-·k.·nr-xr

Lnr m_LJ`¡
puoLL·.
..!-·k.·nr-xr`.· m_LJ`=¯¯¯-¡ ·
v·LJ -nLnr.·¡
pn·r-·r-J.
Lnr J-rH--rInn·n.· n-runn.m_LJ`·¡ ·
·¡
v·LJ ..!-·k.·nr-xr`..-nLnr.·

..-nLnr.¨r-nmLn-L J-rH--rInn·n¨,..J-rH--rInn·n.··¡
..-nLnr.¨k-nn-L`` J-rH--rInn·n¨,k-nn-L``..J-rH--rInn·n.··¡
..-nLnr.¨p-n-nr J-rH--rInn·n¨,..!-·k.·nr-xr..J-rH--rInn·n.··¡
..-nLnr.¨·un J-rH--rInn·n¨,J-rH--rInn·n.··¡
·
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//---
..!-·k.·nr-xr` r--r¡
r--r.-nLnr.·¡
·
//--------------------------------------------------------------------
DperatIon of DbtaInIng 0ata Type SIze or SIze of Any 0ata Type
Dbject ( sIzeof )
UsIng the sIzeof operatIon, the memory sIze correspondIng to an IdentIfIer or type can be defIned.
The sIzeof operatIon Is of the followIng format:
ExampIe:
-Lz-·r.-xpn---L·n·
Any IdentIfIer, or type name enclosed In brackets can be used as an expressIon. Note that the voId
type name can't be used, and the IdentIfIer cannot belong to the fIeld of bIts, or be a functIon name.
Ìf the expressIon Is the name of a statIc array (I.e. the fIrst dImensIon Is gIven), then the result Is the
sIze of the whole array (I.e. the product of the number of elements the the type length). Ìf the
Language Basics
© 2000·2010, |eta0uotes Software Corp.
89
expressIon Is the name of a dynamIc array (the fIrst dImensIon Is not specIfIed), the result wIll be the
sIze of the object of the dynamIc array.
When sIzeof Is applIed to the name of structure or class type, or to the IdentIfIer of the structure or
class type, the result Is the actual sIze of the structure or class.
ExampIe:
-rnu·r my¯rnu·r

·!-n !¡
Lnr o¡
J·uoL- r¡
· -rn¡
-nLnr.¨-Lz-·r.-rn· = ¨,-Lz-·r.-rn··¡
-nLnr.¨-Lz-·r.my¯rnu·r· = ¨,-Lz-·r.my¯rnu·r··¡
The sIze Is calculated at the compIlatIon stage.
See aIso
Precedence Fules
Language Basics
© 2000·2010, |eta0uotes Software Corp.
90
Precedence PuIes
Each group of operatIons In the table has the same prIorIty. The hIgher the prIorIty of operatIons Is,
the hIgher It Is posItIon of the group In the table. The precedence rules determIne the groupIng of
operatIons and operands.
AttentIon: Precedence of operatIons In the |0L5 language corresponds to the prIorIty adopted In C++,
and dIffers from the prIorIty gIven In the |0L4 language.
DperatIon 0escIptIon ExecutIon Drder
()
[]
.
FunctIon Call
FeferencIng to an array
element
FeferencIng to a structure
element
From left to rIght
!
-
-
++
··
(type)
sIzeof
LogIcal negatIon
8ItwIse negatIon
(complement)
SIgn changIng
Ìncrement by one
0ecrement by one
TypecastIng
0etermInIng sIze In bytes
FIght to left
*
/
º
|ultIplIcatIon
0IvIsIon
|odule dIvIsIon
From left to rIght
+
-
AddItIon
SubtractIon
From left to rIght
··
··
Left shIft
FIght shIft
From left to rIght
·
·=
·
·=
Less than
Less than or equal
Creater than
Creater than or equal
From left to rIght
==
!=
Equal
Not equal
From left to rIght
E 8ItwIse AN0 operatIon From left to rIght
´ 8ItwIse exclusIve DF From left to rIght
1 8ItwIse DF operatIon From left to rIght
EE LogIcal AN0 operatIon From left to rIght
11 LogIcal DF operatIon From left to rIght
:: CondItIonal Dperator FIght to left
Language Basics
© 2000·2010, |eta0uotes Software Corp.
91
=
*=
/=
º=
+=
·=
··=
··=
E=
´=
1=
AssIgnment
|ultIplIcatIon wIth assIgnment
0IvIsIon wIth assIgnment
|odule wIth assIgnment
AddItIon wIth assIgnment
SubtractIon wIth assIgnment
Left shIft wIth assIgnment
FIght shIft wIth assIgnment
8ItwIse AN0 wIth assIgnment
ExclusIve DF wIth assIgnment
8ItwIse DF wIth assIgnment
FIght to left
, Comma From left to rIght
To change the operatIon executIon order, parenthesIs that are of hIgher prIorIty are used.
Language Basics
© 2000·2010, |eta0uotes Software Corp.
92
Dperators
Language operators descrIbe some algorIthmIc operatIons that must be executed to accomplIsh a
task. The program body Is a sequence of such operators. Dperators followIng one by one are separated
by semIcolons.
Dperator 0escrIptIon
Compound operator {] Dne or more operators of any type, enclosed In
curly braces {]
ExpressIon operator (;) Any expressIon that ends wIth a semIcolon (;)
return operator TermInates the current functIon and returns
control to the callIng program
If·else condItIonal operator Ìs used when It's necessary to make a choIce
:: condItIonal operator A sImple analog of the If·else condItIonal
operator
swItch selectIon operator Passes control to the operator, whIch
corresponds to the expressIon value
whIle loop operator Performs an operator untIl the expressIon
checked becomes false. The expressIon Is
checked before each IteratIon
for loop operator Performs an operator untIl the expressIon
checked becomes false. The expressIon Is
checked before each IteratIon
do·whIle loop operator Performs an operator untIl the expressIon
checked becomes false. The end condItIon Is
checked, after each loop. The loop body Is
always executed at least once.
break operator TermInates the executIon of the nearest
attached external operator swItch, whIle, do·
whIle or for
contInue operator Passes control to the begInnIng of the nearest
external loop operator whIle, do·whIle or for
new operator Creates an object of the approprIate sIze and
returns a descrIptor of the created object.
delete operator 0eletes the object created by the new operator
Dne operator can occupy one or more lInes. Two or more operators can be located In the same lIne.
Dperators that control over the executIon order (If, If·else, swItch, whIle and for), can be nested Into
each.
ExampIe:
Lr.M·nr!.· == !`·
Language Basics
© 2000·2010, |eta0uotes Software Corp.
93
Lr.¯-y.· == `!· -nLnr.¨|-ppy H-. 1--n.¨·¡
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
94
Compound Dperator
A compound operator (a block) consIsts of one or more operators of any type, enclosed In braces {].
The closIng brace must not be followed by a semIcolon (;).
ExampIe:
Lr.x==¨·

-nLnr.¨Lnv-LLJ p·-LrL·n x = ¨,x·¡
n-runn¡
·
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
95
ExpressIon Dperator
Any expressIon followed by a semIcolon (;) Is the operator. Here are some examples of expressIon
operators.
AssIgnment Dperator
ÌdentIfIer = expressIon;
x=`¡
y=x=`¡
o··L -¬u-L=.x==y·¡
AssIgnment operator can be used many tImes In an expressIon. Ìn thIs case, the expressIon Is
processed from left to rIght:
FunctIon CaIIIng Dperator
FunctIon_name (argument1,..., argumentN);
¯LL-.L·--.rLL-·¡
Empty Dperator
ConsIsts only of a semIcolon (;) and Is used to denote an empty body of a control operator.
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
96
Peturn Dperator
The return operator termInates the current functIon executIon and returns control to the callIng
program. The expressIon calculatIon result Is returned to the callIng functIon. The expressIon can
contaIn an assIgnment operator.
ExampIe:
Lnr .-L·¯um.Lnr x, Lnr y·

n-runn.x-y·¡
·
Ìn functIons wIth the voId return type, the return operator wIthout expressIon must be used:
v·LJ ¯·m-¯un·rL·n.·

-nLnr.¨|-LL·.¨·¡
n-runn¡ // r!L- ·p-n-r·n ·-n o- n-m·v-J
·
The rIght brace of the functIon means ImplIcIt executIon of the return operator wIthout expressIon.
What can be returned: sImple types, sImple structures, object poInters. WIth the retµrn operator you
can't return any arrays, class objects, varIables of compound structure type.
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
97
If-EIse CondItIonaI Dperator
The ÌF · ELSE operator Is used when a choIce must be made. Formally, the syntax Is as follows:
Lr .-xpn---L·n·
·p-n-r·n!
-L--
·p-n-r·n`
Ìf the expressIon Is true, operator1 Is executed and control Is gIven to the operator that follows
operator2 (operator2 Is not executed). Ìf the expressIon Is false, operator2 Is executed.
The else part of the If operator can be omItted. Thus, a dIvergence may appear In nested If operators
wIth omItted else part. Ìn thIs case, else addresses to the nearest prevIous If operator In the same
block that has no else part.
ExampIes:
//--- r!- -L-- p-nr n-r-n- r· r!- --··nJ Lr ·p-n-r·n.
Lr.x!·
Lr.y==`· z=¯¡
-L-- z=¯¡
//--- r!- -L-- p-nr n-r-n- r· r!- rLn-r Lr ·p-n-r·n.
Lr.xL·

Lr.y==`· z=¯¡
·
-L-- z=¯¡
//--- H--r-J ·p-n-r·n-
Lr.x=='-'·

y=!¡
·
-L-- Lr.x=='o'·

y=`¡
z=`¡
·
-L-- Lr.x=='·'·

y=1¡
·
-L-- -nLnr.¨I--J-¨·¡
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
98
!: condItIonaI Dperator
The general form of the ternary operator Is as follows:
-xpn---L·n!. -xpn---L·n`.-xpn---L·n`
For the fIrst operand · ¨expressIon1¨ · any expressIon that results In a bool type value can be used. Ìf
the result Is true, then the operator set by the second operand, I.e. ¨expressIon2¨ Is executed.
Ìf the fIrst operand Is false, the thIrd operand · ¨expressIonJ¨ Is performed. The second and thIrd
operands, I.e. ¨expressIon2¨ and ¨expressIonJ¨ should return values of one type and should not be of
voId type. The result of the condItIonal operator executIon Is the result of expressIon2 or result of the
expressIonJ, dependIng on the result of expressIon1.
ExampIe:
//--- n·nm-LLz- JLrr-n-n·- o-r.--n ·p-n -nJ ·L·-- pnL·-- r·n - J-y n-nj-
J·uoL- rnu-_n-nj- = .|Lj!==H·.·.¨...L·---Jp-n·/.|Lj!-H·.·¡
ThIs entry Is equIvalent to the followIng:
J·uoL- rnu-_n-nj-¡
Lr.|Lj!==H·.·rnu-_n-nj-=¨¡ // Lr |Lj! -nJ H·. -n- -¬u-L
-L-- rnu-_n-nj-=..L·---Jp-n·/.|Lj!-H·.·¡ // Lr r!- n-nj- L- n·r nuLL
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
99
SwItch Dperator
Ìt compares the expressIon value wIth constants In all varIants of ccse and gIves control to the
operator that corresponds to the expressIon value. Each varIant of ccse can be marked wIth an Integer
constant, a lIteral constant or a constant expressIon. The constant expressIon can's contaIn varIables
or functIon calls. ExpressIon of the swìtch operator must be of Integer type.
-.Lr·!.-xpn---L·n·

·--- ··n-r-nr. ·p-n-r·n-
·--- ··n-r-nr. ·p-n-r·n-
...
J-r-uLr. ·p-n-r·n-
·
Dperators connected wIth the defcµlt label are executed If none of the constants In ccse operators
equals to the expressIon value. The defcµlt varIant should not necessarIly be announced and should
not necessarIly be the last one. Ìf none of the constants corresponds to the expressIon value and the
defcµlt varIant Is not avaIlable, no actIons are executed.
The keyword ccse and the constant are just labels, and If operators are executed for some ccse
varIant, the program wIll further execute the operators of all followIng varIants untIl the breck
operator occurs. Ìt makes It possIble to bInd a subsequence of operators wIth several varIants.
A constant expressIon Is calculated durIng compIlatIon. No two constants In one swìtch operator can
have the same value.
ExampIes:
//--- ¯Ln-r -x-mpL-
-.Lr·!.x·

·--- 'A'.
-nLnr.¨.A¯I A¨·¡
on--k¡
·--- 'Ð'.
·--- '.'.
-nLnr.¨.A¯I Ð ·n .¨·¡
on--k¡
J-r-uLr.
-nLnr.¨HJr A, Ð ·n .¨·¡
on--k¡
·
//--- ¯-··nJ -x-mpL-
-rnLnj n--=¨¨¡
Lnr L=¨¡
-.Lr·!.L·

·--- !.
n--=L¡on--k¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
100
J-r-uLr.
n--=¨J-r-uLr¨¡on--k¡
·--- `.
n--=L¡on--k¡
·--- `.
n--=L¡on--k¡
·
-nLnr.n--·¡

---uLr
J-r-uLr
·/
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
101
WhIIe Loop Dperator
The whIle operator consIsts of a checked expressIon and the operator, whIch must be fulfIlled:
.!LL-.-xpn---L·n·
·p-n-r·n¡
Ìf the expressIon Is true, the operator Is executed untIl the expressIon becomes false. Ìf the
expressIon Is false, the control Is passed to the next operator. The expressIon value Is defIned before
the operator Is executed. Therefore, If the expressIon Is false from the very begInnIng, the operator
wIll not be executed at all.
ExampIe:
.!LL-.k<n·

y=y·x¡
k--¡
·
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
102
For Loop Dperator
The for operator consIsts of three expressIons and an executable operator:
r·n.-xpn---L·n!¡ -xpn---L·n`¡ -xpn---L·n`·
·p-n-r·n¡
ExpressIon1 descrIbes the loop InItIalIzatIon. ExpressIon2 checks the condItIons of the loop
termInatIon. Ìf It Is true, the loop body for Is executed. The loop repeats expressIon2 becomes false.
Ìf It Is false, the loop Is termInated, and control Is transferred to the next operator. ExpressIonJ Is
calculated after each IteratIon.
The for operator Is equIvalent to the followIng successIon of operators:
-xpn---L·n!¡
.!LL-.-xpn---L·n`·

·p-n-r·n¡
-xpn---L·n`¡
·¡
Any of the three or all three expressIons can be absent In the for operator, but the semIcolons (;) that
separate them must be omItted. Ìf expressIon2 Is omItted, It Is consIdered constantly true. The for(;;)
operator Is a contInuous loop, equIvalent to the whIle(1) operator. Each expressIon 1 or J can consIst
of several expressIons combIned by a comma operator ','.
ExampIes:
r·n.x=!¡x<=¯¡x--· -nLnr.M-r!-·.-n.x,`··¡
//--- An·r!-n -x-mpL-
r·n.¡¡·

-nLnr.M-r!-·.-n.x,`··¡
x--¡
Lr.x!¨· on--k¡
·
//--- r!LnJ -x-mpL-
r·n.L=¨,|=n-L¡L<n¡L--,|--· -¯L`=-¯|`¡
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
103
Loop Dperator do whIIe
The for and whIle loops check the termInatIon at the begInnIng, not at the end of a loop. The thIrd
loop operator do · whIle checks the condItIon of termInatIon at the end, after each loop IteratIon. The
loop body Is always executed at least once.

·p-n-r·n¡
.!LL-.-xpn---L·n·
FIrst the operator Is executed, then the expressIon Is calculated. Ìf It Is true, then the operator Is
executed agaIn, and so on. Ìf the expressIon becomes false, the loop termInates.
ExampIe:
//--- .-L·uL-r- r!- ¯Lo·n-··L --nL--
Lnr ··unr-n¯Lo·n-··L=!¯¡
Lnr L=¨,rLn-r=¨,--··nJ=!¡
Lnr ·unn-nr¯Lo·n-··LHumo-n¡


·unn-nr¯Lo·n-··LHumo-n=rLn-r---··nJ¡
-nLnr.¨L = ¨,L,¨ ·unn-nr¯Lo·n-··LHumo-n = ¨,·unn-nr¯Lo·n-··LHumo-n·¡
rLn-r=--··nJ¡
--··nJ=·unn-nr¯Lo·n-··LHumo-n¡
L--¡ // .Lr!·ur r!L- ·p-n-r·n -n LnrLnLr- L··p .LLL -pp--n.
·
.!LL-.L<··unr-n¯Lo·n-··L·¡
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
104
ßreak Dperator
The break operator termInates the executIon of the nearest nested outward swItch, whIle, do·whIle or
for operator. The control Is passed to the operator that follows the termInated one. Dne of the
purposes of thIs operator Is to fInIsh the loopIng executIon when a certaIn value us assIgned to a
varIable.
ExampIe:
//--- ---n·!Lnj r·n r!- rLn-r z-n· -L-m-nr
r·n.L=¨¡L<-nn-y_-Lz-¡L--·
Lr.-nn-y¯L`==¨·
on--k¡
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
105
ContInue Dperator
The contInue operator passes control to the begInnIng of the nearest outward loop whIle, do·whIle or
for operator, the next IteratIon beIng called. The purpose of thIs operator Is opposIte to that of break
operator.
ExampIe:
//--- ¯um ·r -LL n·nz-n· -L-m-nr-
Lnr run·.Lnr -nn-y¯`·

Lnr -nn-y_-Lz-=Ann-y¯Lz-.-nn-y·¡
Lnr -um=¨¡
r·n.Lnr L=¨¡L<-nn-y_-Lz-¡ L--·

Lr.-¯L`==¨· ··nrLnu-¡
-um-=-¯L`¡
·
n-runn.-um·¡
·
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
106
Dbject Create Dperator new
The new operator automatIcally creates an object of a correspondIng sIze, calls the object constructor
and returns descrIptor of the created object. Ìn case of faIlure, the operator returns a null descrIptor
that can be compared wIth the NULL constant.
The new operator can be applIed only to class objects. They can't be applIed to structures.
The operator shall not be used to create arrays of objects. To do thIs, use ArrayFesIze().
ExampIe:
//--------------------------------------------------------------------
// ¯Ljun- ·n--rL·n
//--------------------------------------------------------------------
v·LJ .r-rnL-¯L-LJ..H-.¯!-p-.·

m_yp·-=|J-¯_ÐJ-¯I-¡
//--- n-nJ·mLy ·n--r- ·n- ·r r!- ¯ p·--LoL- -!-p--
Lnr n-!-p-=n-nJ.·`¯¡
-.Lr·!.n-!-p-·

·--- ¨. m_-!-p-=n-. .r-rnL-¯!-p-!¡ on--k¡
·--- !. m_-!-p-=n-. .r-rnL-¯!-p-`¡ on--k¡
·--- `. m_-!-p-=n-. .r-rnL-¯!-p-`¡ on--k¡
·--- `. m_-!-p-=n-. .r-rnL-¯!-p-1¡ on--k¡
·--- 1. m_-!-p-=n-. .r-rnL-¯!-p-¯¡ on--k¡
·--- ¯. m_-!-p-=n-. .r-rnL-¯!-p-¯¡ on--k¡
·--- ¯. m_-!-p-=n-. .r-rnL-¯!-p-¯¡ on--k¡
·
//--- Jn-.
Lr.m_-!-p-.=HJHH·

//--- pn----rrLnj-
m_-!-p-.¯-r-Lj!rзnJ-n.WP¯r|_PH_-PxIH¯-VI-r_ÐJ-¯I-·¡
m_-!-p-.¯-r1-·-.m_yp·-·¡
m_-!-p-.¯-rx-·-.VI-r_ÐJ-¯I--¯|A-I_¯P¯I·-·¡
//--- Jn-.
m_-!-p-.¯n-..·¡
·
//---
·
Ìt should be noted that the object descrIptor not a poInter to the memory.
The object created wIth the new operator must be explIcItly removed by the delete operator.
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
107
Dbject 0eIete Dperator deIete
The delete operator deletes an object created by the new operator, calls the correspondIng class
destructor and frees up memory occupIed by the object. A real descrIptor of an exIstIng object Is used
as an operand. After the delete operatIon Is executed, the object descrIptor becomes InvalId.
ExampIe:
//--- J-L-r- rLjun-
J-L-r- m_-!-p-¡
m_-!-p-=HJHH¡
//--- ·n--r- - n-. rLjun-
H-.¯!-p-.·¡
See aIso
ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
108
FunctIons
Every task can be dIvIded Into subtasks, each of whIch can eIther be dIrectly represented In the form
of a code, or dIvIded Into smaller sub·tasks. ThIs method Is called stepwìse refìnement. FunctIons are
used for wrItIng the code of sub·tasks to be solved. The code that descrIbes what a functIon does Is
called fµnctìon defìnìtìon:
run·rL·n_!--J-n

Ln-rnu·rL·n-
·
All that Is before the fIrst brace Is the hecder of the functIon defInItIon, and what Is between braces Is
the body of the functIon defInItIon. The functIon header Includes a descrIptIon of the return value
type, name (IdentIfIer) and formal parameters. The number of parameters passed to the functIon Is
lImIted and cannot exceed 64.
The functIon can be called from other parts of the program as many tImes as necessary. Ìn fact, the
return type, functIon IdentIfIer and parameter types constItute the fµnctìon prototype.
FunctIon prototype Is the functIon declaratIon, but not Its defInItIon. 0ue to the explIcIt declaratIon of
the return type and a lIst of argument types, the strIct type checkIng and ImplIcIt typecastIng are
possIble durIng functIon calls. 7ery often functIon declaratIons are used In classes to Improve the code
readabIlIty.
The functIon defInItIon must exactly match Its declaratIon. Each declared functIon must be defIned.
ExampIe:
J·uoL- // n-runn v-Lu- ryp-
LLnrun· .J·uoL- -, J·uoL- o· // run·rL·n n-m- -nJ p-n-m-r-n LL-r

// ··mp·-Lr- ·p-n-r·n
n-runn .- - o·¡ // n-runn v-Lu-
·
The return operator can return the value of an expressIon located In thIs operator. Ìf necessary, the
expressIon value Is converted to the functIon result type. A functIon that returns no value should be
descrIbed as that of voId type.
ExampIe:
v·LJ -nnm--j.-rnLnj -·

-nLnr.¨-nn·n. ¨--·¡
·
Parameters passed to the functIon can have default values, whIch are defIned by constants of that
type.
ExampIe:
Language Basics
© 2000·2010, |eta0uotes Software Corp.
109
Lnr -·m-run·.J·uoL- -,
J·uoL- J=¨.¨¨¨!,
Lnr n=¯,
o··L o=rnu-,
-rnLnj -=¨p----J -rnLnj¨·

-nLnr.¨--¬uLn-J p-n-m-r-n - = ¨,-·¡
-nLnr.¨---- r!- r·LL·.Lnj p-n-m-r-n-. J = ¨,J,¨ n = ¨,n,¨ o = ¨,o,¨ - = ¨,-·¡
n-runn.¨·¡
·
Ìf any of parameters has a default value, all subsequent parameters must also have default values.
ExampIe of Incorrect decIaratIon:
Lnr -·m-run·.J·uoL- -,
J·uoL- J=¨.¨¨¨!, // J-r-uLr v-Lu- ¨.¨¨¨! J-·L-n-J
Lnr n, // J-r-uLr v-Lu- L- n·r -p-·LrL-J .
o··L o, // J-r-uLr v-Lu- L- n·r -p-·LrL-J .
-rnLnj -=¨p----J -rnLnj¨·

·
See aIso
Dverload, 7Irtual FunctIons, PolymorphIsm
Language Basics
© 2000·2010, |eta0uotes Software Corp.
110
FunctIon CaII
Ìf a name that has not been descrIbed before, appears In the expressIon and Is followed by the left
parenthesIs, It Is contextually consIdered as the name of a functIon.
run·rL·n_n-m- .x!, x`,..., xn·
Arguments (formal parameters) are passed by value, I.e. each expressIon xl,..., Xn Is calculated, and
the value Is passed to the functIon. The order of expressIons calculatIon and that of values loadIng are
guaranteed. 0urIng the executIon, the system checks the number and type of arguments passed to the
functIon. Such way of addressIng to the functIon Is called a value call.
FunctIon call Is an expressIon, the value of whIch Is the value returned by the functIon. The functIon
type descrIbed above must correspond wIth the type of the return value. The functIon can be declared
or descrIbed In any part of the program on the global scope, I.e., outsIde other functIons. The
functIon cannot be declared or descrIbed InsIde of another functIon.
ExampIes:
Lnr -r-nr.·

J·uoL- -·m-_-nn-y¯1`=¨.`, !.1, `.¯, `.¯·¡
J·uoL- -=LLnrun·.-·m-_-nn-y, !¨.¯, -·¡
//...
·
J·uoL- LLnrun·.J·uoL- x¯`, J·uoL- -, J·uoL- o·

n-runn .-·x¯¨` - o·¡
·
At callIng of a functIon wIth default parameters, the lIst of parameters to be passed can be lImIted,
but not before the fIrst default parameter.
ExampIes:
v·LJ -·m-run·.J·uoL- LnLr,
J·uoL- --·=¨.¨¨¨!, //--r J-r-uLr v-Lu--
Lnr L-v-L=!¨·¡
//...
-·m-run·.·¡ // Wn·nj ·-LL. r!- rLn-r p-n-m-r-n mu-r o- pn---nr-J.
-·m-run·.`.!1·¡ // .·nn-·r ·-LL
-·m-run·.`.!1,¨.¨¨¨`·¡ // .·nn-·r ·-LL
-·m-run·.`.!1,¨.¨¨¨`,!¨·¡ // .·nn-·r ·-LL
When callIng a functIon, one may not skIp parameters, even those havIng default values:
-·m-run·.`.!1, , !¨·¡ // Wn·nj ·-LL - r!- --··nJ p-n-m-r-n .-- -kLpp-J.
See aIso
Dverload, 7Irtual FunctIons, PolymorphIsm
Language Basics
© 2000·2010, |eta0uotes Software Corp.
111
PassIng Parameters
There are two methods, by whIch the machIne language can pass arguments to a subprogram
(functIon). The fIrst method Is to send a parameter by value. ThIs method copIes the argument value
Into a formal functIon parameter. Therefore, any changes In thIs parameter wIthIn the functIon have
no Influence on the correspondIng call argument.
//--------------------------------------------------------------------
// ----Lnj p-n-m-r-n- oy v-Lu-
//--------------------------------------------------------------------
J·uoL- ¯Ln-rM-r!·J.Lnr L,Lnr |·

J·uoL- n--¡
//---
L·=`¡
|/=`¡
n--=L-|¡
//---
n-runn.n--·¡
·
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//---
Lnr -=!1,o=-¡
-nLnr.¨- -nJ o o-r·n- ·-LL.¨,-,o·¡
J·uoL- J=¯Ln-rM-r!·J.-,o·¡
-nLnr.¨- -nJ o -rr-n ·-LL.¨,-,o·¡
·
//--- ---uLr ·r -·nLpr -x-·urL·n
// - -nJ o o-r·n- ·-LL. !1 -
// - -nJ o -rr-n ·-LL. !1 -
The second method Is to pass by reference. Ìn thIs case, reference to a parameter (not Its value) Is
passed to a functIon parameter. ÌnsIde the functIon, It Is used to refer to the actual parameter
specIfIed In the call. ThIs means that the parameter changes wIll affect the argument used to call the
functIon.
//--------------------------------------------------------------------
// ----Lnj p-n-m-r-n- oy n-r-n-n·-
//--------------------------------------------------------------------
J·uoL- ¯-··nJM-r!·J.Lnr sL,Lnr s|·

J·uoL- n--¡
//---
L·=`¡
|/=`¡
n--=L-|¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
112
//---
n-runn.n--·¡
·
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//---
Lnr -=!1,o=-¡
-nLnr.¨- -nJ o o-r·n- ·-LL¡¨,-,o·¡
J·uoL- J=¯-··nJM-r!·J.-,o·¡
-nLnr.¨- -nJ o -rr-n ·-LL.¨,-,o·¡
·
//--------------------------------------------------------------------
//--- n--uLr ·r -·nLpr -x-·urL·n
// - -nJ o o-r·n- ·-LL. !1 -
// - -nJ o -rr-n ·-LL. `- 1
|0L5 uses both methods, wIth one exceptIon: arrays and structure type varIables (class objects) are
always passed by reference. Ìn order to exclude changes In actual parameters (arguments passed at
functIon call) use the access specIfIer const. When tryIng to change the contents of a varIable declared
wIth the const specIfIer, the compIler wIll generate an error.
Note
Ìt should be noted that parameters are passed to a functIon In reversed order, I.e., fIrst the last
parameter Is calculated and passed, and then the last but one, etc. The last calculated and passed
parameter Is the one that stands fIrst after braces.
ExampIe:
v·LJ Jn¯r-nr.·

//---
Lnr -¯`=¨,!,`·¡
Lnr L=¨¡
run·.-¯L`,-¯L--`,¨¯Ln-r ·-LL .L = ¨--rnLnj.L·-¨·¨·¡
run·.-¯L--`,-¯L`,¨¯-··nJ ·-LL .L = ¨--rnLnj.L·-¨·¨·¡
// ---uLr.
// ¯Ln-r ·-LL .L = ¨· . p-n! = ! p-n` = ¨
// ¯-··nJ ·-LL .L = !· . p-n! = ! p-n` = !
·
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
v·LJ run·.Lnr p-n!,Lnr p-n`,-rnLnj ··mm-nr·

Language Basics
© 2000·2010, |eta0uotes Software Corp.
113
-nLnr.··mm-nr,¨. p-n! = ¨,p-n!,¨ p-n` = ¨,p-n`·¡
·
At fIrst call In the mentIoned example the varIable fIrst takes part In the concatenatIon of strIngs
¨¯Ln-r ·-LL .L = ¨--rnLnj.L·-¨·¨
Here Its value doesn't change. The varIable takes part In the calculatIon of the array element,
I.e. after the I element of the array Is taken, the varIable Is Incremented. And only after that the
fIrst parameter wIth the changed value of varIable Is calculated.
At the second call when calculatIng all three parameters, one and the same value of I Is used, the one
that was calculated on the fIrst phase of functIon callIng, and only after the fIrst parameters Is
calculated the varIable Is changed agaIn.
See aIso
7IsIbIlIty Scope and LIfetIme of 7arIables, Dverload, 7Irtual FunctIons, PolymorphIsm
Language Basics
© 2000·2010, |eta0uotes Software Corp.
114
FunctIon DverIoadIng
Usually the functIon name tends to reflect Its maIn purpose. As a rule, readable programs contaIn
varIous well selected IdentIfIers. SometImes dIfferent functIons are used for the same purposes. Let's
consIder, for example, a functIon that calculates the average value of an array of double precIsIon
numbers and the same functIon, but operatIng wIth an array of Integers. 8oth are convenIent to be
called AverageFromArray:
//--------------------------------------------------------------------
// r!- ·-L·uL-rL·n ·r -v-n-j- r·n -n -nn-y ·r J·uoL- ryp-
//--------------------------------------------------------------------
J·uoL- Av-n-j-¯n·mAnn-y.··n-r J·uoL- -nn-y¯`,Lnr -Lz-·

Lr.-Lz-<=¨· n-runn ¨.¨¡
J·uoL- -um=¨.¨¡
J·uoL- -v-n¡
//---
r·n.Lnr L=¨¡L<-Lz-¡L--·

-um-=-nn-y¯L`¡ // AJJLrL·n r· r!- J·uoL-
·
-v-n=-um/-Lz-¡ // ¯u-r JLvLJ- r!- -um oy r!- numo-n
//---
-nLnr.¨.-L·uL-rL·n ·r r!- -v-n-j- r·n -n -nn-y ·r J·uoL- ryp-¨·¡
n-runn -v-n¡
·
//--------------------------------------------------------------------
// r!- ·-L·uL-rL·n ·r -v-n-j- r·n -n -nn-y ·r Lnr ryp-
//--------------------------------------------------------------------
J·uoL- Av-n-j-¯n·mAnn-y.··n-r Lnr -nn-y¯`,Lnr -Lz-·

Lr.-Lz-<=¨· n-runn ¨.¨¡
J·uoL- -v-n=¨.¨¡
Lnr -um=¨¡
//---
r·n.Lnr L=¨¡L<-Lz-¡L--·

-um-=-nn-y¯L`¡ // AJJLrL·n r· r!- J·uoL-
·
-v-n=.J·uoL-·-um/-Lz-¡// JLv- r!- -m·unr ·r ryp- J·uoL-, -nJ JLvLJ-
//---
-nLnr.¨.-L·uL-rL·n ·r r!- -v-n-j- r·n -n -nn-y ·r Lnr ryp-¨·¡
n-runn -v-n¡
·
Each functIon contaIns the message output vIa the PrInt() functIon;
-nLnr.¨.-L·uL-rL·n ·r r!- -v-n-j- r·n -n -nn-y ·r Lnr ryp-¨·¡
The compIler selects a necessary functIon In accordance wIth the types of arguments and theIr
Language Basics
© 2000·2010, |eta0uotes Software Corp.
115
quantIty. The rule, accordIng to whIch the choIce Is made, Is called the sì¤nctµre mctchìn¤ cl¤orìthm.
A sIgnature Is a lIst of types used In the functIon declaratIon.
ExampIe:
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//---
Lnr -¯¯`=!,`,`,1,¯·¡
J·uoL- o¯¯`=!.!,`.`,`.`,1.1,¯.¯·¡
J·uoL- Lnr_-v-n=Av-n-j-¯n·mAnn-y.-,¯·¡
J·uoL- J·uoL-_-v-n=Av-n-j-¯n·mAnn-y.o,¯·¡
-nLnr.¨Lnr_-v-n = ¨,Lnr_-v-n,¨ J·uoL-_-v-n = ¨,J·uoL-_-v-n·¡
·
//--- ---uLr ·r r!- -·nLpr
// .-L·uL-r- r!- -v-n-j- r·n -n -nn-y ·r Lnr ryp-
// .-L·uL-r- r!- -v-n-j- r·n -n -nn-y ·r J·uoL- ryp-
// Lnr_-v-n= `.¨¨¨¨¨¨¨¨ J·uoL-_-v-n= `.`¨¨¨¨¨¨¨
DverloadIng Is the practIce of assIgnIng multIple values to a functIon. SelectIng a specIfIc value
depends on the types of arguments receIved by the functIon. A specIfIc functIon Is selected based on
the correspondence of the lIst of arguments when callIng the functIon, to the lIst of parameters In the
functIon declaratIon.
When an overloaded functIon Is called, the compIler must have an algorIthm to select the approprIate
functIon. The algorIthm that performs thIs choIce depends on conversIons of what type are present.
The best correlatIon must be unIque. Ìt must be the best for at least one argument, and as well as the
other correspondences for all other arguments.
8elow Is a matchIng algorIthm for each argument.
AIgorIthm of ChoosIng an DverIoaded FunctIon
1.
Use strIct matchIng (If possIble).
2.
Try standard type Increase.
J.
Try standard typecastIng.
The standard type Increase Is better than other standard conversIons. Ìncrease Is the conversIon of
float to double, of bool, char, short or enum to Int. TypecastIng of arrays of sImIlar Integer types also
belongs to typecastIng. SImIlar types are: bool, char, uchar, sInce all the three types are sIngle·byte
Integers; double·byte Integers short and ushort; 4·byte Integers Int, uInt, and color; long, ulong, and
datetIme.
Df course, the strIct matchIng Is the best. To achIeve such a consIstency typecastIng can be used. The
compIler cannot cope wIth ambIguous sItuatIons. Therefore you should not rely on subtle dIfferences
of types and ImplIcIt conversIons that make the overloaded functIon unclear.
Ìf you doubt, use explIcIt conversIon to ensure strIct complIance.
Language Basics
© 2000·2010, |eta0uotes Software Corp.
116
Examples of overloaded functIons In |0L5 can be seen In the example of ArrayÌnItIalIze() functIons.
FunctIon overloadIng rules apply to overload of class methods.
DverloadIng of system functIons Is allowed, but It should be observed that the compIler Is able to
accurately select the necessary functIon. For example, we can overload the system functIon fmax() In
J dIfferent ways, but only two varIants are correct.
ExampIe:
// ·v-nL·-J L- p-nmL--LoL- - JLrr-n- Ln r!- numo-n ·r p-n-m-r-n-
J·uoL- rm-x.J·uoL- -,J·uoL- o,J·uoL- ··¡
// ·v-nL·-J .Lr! -nn·n
// numo-n ·r p-n-m-r-n- L- JLrr-n-nr, our r!- L--r !-- - J-r-uLr v-Lu-
// r!L- L--J- r· r!- ··n·--Lm-nr ·r r!- -y-r-m run·rL·n .!-n ·-LLLnj, .!L·! L- un-··-pr-oL-
J·uoL- rm-x.J·uoL- -,J·uoL- o,J·uoL- ·=¯ÐH_MPH·¡
// n·nm-L ·v-nL·-J oy r!- p-n-m-r-n ryp-
Lnr rm-x.Lnr -,Lnr o·¡
See aIso
Dverload, 7Irtual FunctIons, PolymorphIsm
Language Basics
© 2000·2010, |eta0uotes Software Corp.
117
0escrIptIon of ExternaI FunctIons
Type of external functIons defIned In another module, should be explIcItly descrIbed. The absence of
such a descrIptIon can lead to errors when compIlIng, buIldIng, or executIng a program. When
descrIbIng an external object, use the keyword #ìmport IndIcatIng the module.
ExampIes:
tLmp·nr ¨u--n``.JLL¨
Lnr M----j-зxW.Lnr !WnJ ,-rnLnj -zr-xr,-rnLnj -z.-prL·n,Lnr nryp-·¡
Lnr ¯-nJM----j-W.Lnr !WnJ,Lnr M-j,Lnr .--n-m,Lnr L--n-m·¡
tLmp·nr ¨LLo.-x¯¨
J·uoL- n·unJ.J·uoL- v-Lu-·¡
tLmp·nr
WIth the help of Import, It Is easy to descrIbe functIons that are called from external 0LL or compIled
EX5 lIbrarIes. EX5 lIbrarIes are compIled ex5 fIles, whIch have the lIbrary property. Dnly functIon
descrIbed wIth the export modIfIer can be Imported from EX5 lIbrarIes.
See aIso
Dverload, 7Irtual FunctIons, PolymorphIsm
Language Basics
© 2000·2010, |eta0uotes Software Corp.
118
ExportIng FunctIons
A functIon declared In a mql5 program wIth the export postmodIfIer can be used In another mql5
program. Such a functIon Is called exportable, and It can be called from other programs after
compIlatIon.
Lnr ¯un·rL·n.· -xp·nr

·
ThIs modIfIer orders the compIler to add the functIon Into the table of EX5 functIons exported by thIs
ex5 fIle. Dnly functIon wIth such a modIfIer are accessIble (¨vIsIble¨) from other mql5 programs.
The lIbrary property tells the compIler that the EX5·fIle wIll be a lIbrary, and the compIler wIll show It
In the header of EX5.
All functIons that are planned as exportable ones must be marked wIth the export modIfIer.
See aIso
Dverload, 7Irtual FunctIons, PolymorphIsm
Language Basics
© 2000·2010, |eta0uotes Software Corp.
119
Event HandIIng FunctIons
The |0L5 language provIdes processIng of some predefIned events. FunctIons for handlIng these
events must be defIned In the a |0L5 program; functIon name, return type, composItIon of
parameters (If there are any) and theIr types must strIctly conform to the descrIptIon of the event
handler functIon.
The event handler of the clIent termInal IdentIfIes functIons, handlIng thIs or that event, by the type
of return value and type of parameters. Ìf other parameters, not correspondIng to below descrIptIons,
are specIfIed for a correspondIng functIon, or another return type Is IndIcated for It, such a functIon
wIll not be used as an event handler.
DnStart
The DnStart() functIon Is the Start event handler, whIch Is automatIcally generated onIy for runnIng
scrIpts. Ìt must be of voId type, wIth no parameters:
v·LJ Jn¯r-nr.·¡
For the DnStart() functIon, the Int return type can be specIfIed.
DnInIt
The DnÌnIt() functIon Is the ÌnIt event handler. Ìt must be of voId or Int type, wIth no parameters:
v·LJ JnPnLr.·¡
The ÌnIt event Is generated ImmedIately after an Expert AdvIsor or an IndIcator Is downloaded; thIs
event Is not generated for scrIpts. The DnÌnIt() functIon Is used for InItIalIzatIon. Ìf DnÌnIt() has the
Int type of the return value, the non·zero return code means unsuccessful InItIalIzatIon, and It
generates the 0eInIt event wIth the code of deInItIalIzatIon reason FEASDN_ÌNÌTFAÌLE0.
The DnÌnIt() functIon of the voId type always denotes successful InItIalIzatIon.
Dn0eInIt
The Dn0eInIt() functIon Is called durIng deInItIalIzatIon and Is the 0eInIt event handler. Ìt must be
declared as the voId type and should have one parameter of the const Int type, whIch contaIns the
code of deInItIalIzatIon reason. Ìf a dIfferent type Is declared, the compIler wIll generate a warnIng,
but the functIon wIll not be called. For scrIpts the 0eInIt event Is not generated and therefore the
Dn0eInIt() functIon can't be used In scrIpts.
v·LJ Jn¯-LnLr.··n-r Lnr n---·n·¡
The 0eInIt event Is generated for Expert AdvIsors and IndIcators In the followIng cases:
before reInItIalIzatIon due to the change of a symbol or chart perIod, to whIch the mql5 program Is
attached;
before reInItIalIzatIon due to the change of Input parameters;
before unloadIng a mql5 program.
DnTIck
Language Basics
© 2000·2010, |eta0uotes Software Corp.
120
The NewTIck event Is generated for Expert AdvIsors onIy when a new tIck for a symbol Is receIved, to
the chart of whIch the Expert AdvIsor Is attached. Ìt's useless to defIne the DnTIck() functIon In a
custom IndIcator or scrIpt, because the TIck event Is not generated for them.
The TIck event Is generated only for Expert AdvIsors, but thIs does not mean that Expert AdvIsors
requIred the DnTIck() functIon, sInce not only TIck events are generated for Expert AdvIsors, but also
events of TImer, 8ookEvent and ChartEvent are generated. Ìt must be declared as the voId type, wIth
no parameters:
v·LJ JnrL·k.·¡
DnTImer
The DnTImer() functIon Is called when the TImer event occurs, whIch Is generated by the system tImer
only for Expert AdvIsors · It can't be used In scrIpts or IndIcators. The frequency of the event
occurrence Is set when subscrIbIng to notIfIcatIons about thIs event to be receIved by the
EventSetTImer() functIon.
You can unsubscrIbe from receIvIng tImer events for a partIcular Expert AdvIsor usIng the
EventKIllTImer() functIon. The functIon must be defIned wIth the voId type, wIth no parameters:
v·LJ JnrLm-n.·¡
Ìt Is recommended to call the EventSetTImer() functIon once In the DnÌnIt() functIon, and the
EventKIllTImer() functIon should be called once In Dn0eInIt().
Every Expert AdvIsor, as well as every IndIcator works wIth Its own tImer and receIves events only
from It. As soon as a mql5 program stops operatIng, the tImer Is destroyed forcIbly If It was created
but hasn't been dIsabled by the EventKIllTImer() functIon.
DnTrade
The functIon Is called when the Trade event occurs, whIch appears when you change the lIst of placed
orders and open posItIons, the hIstory of orders and hIstory of deals. When a trade actIvIty Is
performed pendIng order openIng, posItIon openIng/closIng, stops settIng, pendIng order trIggerIng,
etc.) the hIstory of orders and trades and/or lIst of posItIons and current orders Is changed
accordIngly.
v·LJ Jnrn-J-.·¡
Users must Independently Implement In the code the verIfIcatIon of a trade account state when such
an event Is receIved (If thIs Is requIred by the trade strategy condItIons). Ìf the DrderSend() functIon
call has been completed successfully and returned a value of true, thIs means that the tradIng server
has put the order Into the queue for executIon and assIgned a tIcket number to It. As soon as the
server processes thIs order. the Trade event wIll be generated. And If the user remembers the tIcket
value, durIng DnTrade() event handlIng he/she wIll be able to fInd out what happened to the order
usIng thIs value.
DnTester
The DnTester() functIon Is the handler of the Tester event that Is automatIcally generated after a
hIstory testIng of an Expert AdvIsor on the chosen Interval Is over. The functIon must be defIned wIth
the double type, wIth no parameters:
Language Basics
© 2000·2010, |eta0uotes Software Corp.
121
J·uoL- Jnr--r-n.·¡
The functIon Is called rIght before the call of Dn0eInIt() and has the same type of the return value ·
double. DnTester() can be used only In the testIng of Expert AdvIsors. Ìts maIn purpose Is to calculate
a certaIn value that Is used as the Custom max crIterIon In the genetIc optImIzatIon of Input
parameters.
Ìn the genetIc optImIzatIon descendIng sortIng Is applIed to results wIthIn one generatIon. Ì.e. from
the poInt of vIew of the optImIzatIon crIterIon, the best results are those wIth largest values (for the
Custom max optImIzatIon crIterIon values returned by the DnTester functIon are taken Into account).
Ìn such a sortIng, the worst values are posItIoned at the end and further thrown off and do not
partIcIpate In the formIng of the next generatIon.
DnßookEvent
The Dn8ookEvent() functIon Is the 8ookEvent handler. 8ookEvent Is generated for Expert AdvIsors
only when 0epth of |arket changes. Ìt must be of the voId type and have one parameter of the strIng
type:
v·LJ Jnз·kIv-nr .··n-r -rnLnjs -ymo·L·¡
To receIve 8ookEvent events for any symbol, you just need to pre·subscrIbe to receIve these events
for thIs symbol usIng the |arket8ookAdd() functIon. Ìn order to unsubscrIbe from receIvIng the
8ookEvent events for a partIcular symbol, call |arket8ookFelease().
UnlIke other events, the 8ookEvent event Is broadcast. ThIs means that If one Expert AdvIsor
subscrIbes to receIvIng 8ookEvent events usIng |arket8ookAdd, all the other Experts AdvIsors that
have the Dn8ookEvent() handler wIll receIve thIs event. Ìt Is therefore necessary to analyze the name
of the symbol, whIch Is passed to the handler as the const strìn¤8 symbol parameter.
DnChartEvent
DnChartEvent() Is the handler of a group of ChartEvent events:
CHAFTE7ENT_KEY0DWN · event of a keystroke, when the chart wIndow Is focused;
CHAFTE7ENT_D8JECT_CFEATE · event of graphIcal object creatIon;
CHAFTE7ENT_D8JECT_CHANCE · event of change of an object property vIa the propertIes dIalog;
CHAFTE7ENT_D8JECT_0ELETE · event of graphIcal object deletIon;
CHAFTE7ENT_CLÌCK · event of a mouse clIck on the chart;
CHAFTE7ENT_D8JECT_CLÌCK · event of a mouse clIck In a graphIcal object belongIng to the chart;
CHAFTE7ENT_D8JECT_0FAC · event of a graphIcal object move usIng the mouse;
CHAFTE7ENT_D8JECT_EN0E0ÌT · event of the fInIshed text edItIng In the entry box of the
LabelEdIt graphIcal object;
CHAFTE7ENT_CUSTD|+n · Ì0 of the user event, where n Is In the range from 0 to 655J5.
CHAFTE7ENT_CUSTD|_LAST · the last acceptable Ì0 of a custom event (CHAFTE7ENT_CUSTD|
+655J5).
The functIon can be called only In Expert AdvIsors and IndIcators. The functIon should be of voId type
wIth 4 parameters:
Language Basics
© 2000·2010, |eta0uotes Software Corp.
122
v·LJ Jn.!-nrIv-nr.··n-r Lnr LJ, // Iv-nr P¯
··n-r L·njs Lp-n-m, // --n-m-r-n ·r ryp- L·nj -v-nr
··n-r J·uoL-s Jp-n-m, // --n-m-r-n ·r ryp- J·uoL- -v-nr
··n-r -rnLnjs -p-n-m // --n-m-r-n ·r ryp- -rnLnj -v-nr-
·¡
For each type of event, the Input parameters of the DnChartEvent() functIon have defInIte values that
are requIred for the processIng of thIs event. The events and values passed through thIs parameters
are lIsted In the below table.
Event VaIue of the Id
parameter
VaIue of the
Iparam
parameter
VaIue of the
dparam
parameter
VaIue of the
sparam
parameter
Event of a
keystroke
CHAFTE7ENT_KE
Y0DWN
code of a
pressed key
· ·
event of
graphIcal object
creatIon
CHAFTE7ENT_D8
JECT_CFEATE
· · Name of the
created graphIcal
object
Event of change
of an object
property vIa the
propertIes dIalog
CHAFTE7ENT_D8
JECT_CHANCE
· · Name of the
modIfIed
graphIcal object
Event of
graphIcal object
deletIon
CHAFTE7ENT_D8
JECT_0ELETE
· · Name of the
deleted graphIcal
object
Event of a
mouse clIck on
the chart
CHAFTE7ENT_C
LÌCK
the X coordInate the Y coordInate ·
Event of a
mouse clIck In a
graphIcal object
belongIng to the
chart
CHAFTE7ENT_D8
JECT_CLÌCK
the X coordInate the Y coordInate Name of the
graphIcal object,
on whIch the
event occurred
Event of a
graphIcal object
draggIng usIng
the mouse
CHAFTE7ENT_D8
JECT_0FAC
· · Name of the
moved graphIcal
object
Event of the
fInIshed text
edItIng In the
entry box of the
LabelEdIt
graphIcal object
CHAFTE7ENT_D8
JECT_EN0E0ÌT
· · Name of the
LabelEdIt
graphIcal object,
In whIch text
edItIng has
completed
Ì0 of the user
event under the
CHAFTE7ENT_CU
STD|+N
7alue set by the
EventChartCusto
7alue set by the
EventChartCusto
7alue set by the
EventChartCusto
Language Basics
© 2000·2010, |eta0uotes Software Corp.
123
N number m() fubctIon m() functIon m() functIon
DnCaIcuIate
The DnCalculate() functIon Is called only In custom IndIcators when It's necessary to calculate the
IndIcator values by the Calculate event. ThIs usually happens when a new tIck Is receIved for the
symbol, for whIch the IndIcator Is calculated. ThIs IndIcator Is not requIred to be attached to any prIce
chart of thIs symbol.
The DnCalculate() functIon must have a return type Int. There are two possIble defInItIons. WIthIn one
IndIcator you cannot use both versIons of the functIon.
The fIrst form Is Intended for those IndIcators that can be calculated on a sIngle data buffer. An
example of such an IndIcator Is Custom |ovIng Average.
Lnr Jn.-L·uL-r- .··n-r Lnr n-r--_r·r-L, // -Lz- ·r r!- pnL·-¯` -nn-y
··n-r Lnr pn-v_·-L·uL-r-J, // o-n- !-nJL-J ·n - pn-vL·u- ·-LL
··n-r Lnr o-jLn, // .!-n- r!- -LjnLrL·-nr J-r- -r-nr rn·m
··n-r J·uoL-s pnL·-¯` // -nn-y r· ·-L·uL-r-
·¡
As the prIce[] array, one of tImeserIes or a calculated buffer of some IndIcator can be passed. To
determIne the dIrectIon of IndexIng In the prIce[] array, call ArrayCetAsSerIes(). Ìn order not to
depend on the default values, you must uncondItIonally call the ArraySetAsSerIes() functIon for those
arrays, that are expected to work wIth.
The approprIate tImeserIes or IndIcator as the prIce[] array Is selected by the user when startIng the
IndIcator In the ¨Parameters¨ tab. To do thIs you must specIfy the necessary Item In the drop·down lIst
of the ¨Apply to¨ fIeld.
To receIve values of a custom IndIcator from other mql5 programs, the ICustom() functIon Is used,
whIch returns the IndIcator handle for nest operatIons. You can also specIfy the approprIate prIce[]
array or the handle of another IndIcator. ThIs parameter should be transmItted last In the lIst of Input
varIables of the custom IndIcator.
ExampIe:
Language Basics
© 2000·2010, |eta0uotes Software Corp.
124
v·LJ Jn¯r-nr.·

//---
-rnLnj r-nmLn-L_p-r!=¯r-ru-Pnr·¯rnLnj.¯rArJ¯_rI-MPHAH_-Ar|·¡
Lnr !-nJL-_·u-r·mMA=L.u-r·m.¯ymo·L.·,-I-PJ¯_.J--IHr, ¨.u-r·m M·vLnj Av-n-j-¨,!`,¨, MJ¯I_IMA,--P.I_r1-P.AH·¡
Lr.!-nJL-_·u-r·mMA¨·
-nLnr.¨!-nJL-_·u-r·mMA = ¨,!-nJL-_·u-r·mMA·¡
-L--
-nLnr.¨.-nn·r ·p-n ·n n·r Ix¯ rLL- '¨-r-nmLn-L_p-r!-¨\\M,H¯\\PnJL·-r·n-\\¨-¨.u-r·m M·vLnj Av-n-j-.-x¯'¨·¡
·
Ìn thIs example, the last parameter passed Is the PFÌCE_TYPÌCAL value (from the
ENU|_APPLÌE0_PFÌCE enumeratIon), whIch IndIcates that the custom IndIcator wIll be buIlt on typIcal
prIces obtaIned as (HIgh+Low+Close)/J. Ìf thIs parameter Is not specIfIed, the IndIcator Is buIlt based
on PFÌCE_CLDSE values, I.e. closIng prIces of each bar.
Another example that shows passIng of the IndIcator handler as the last parameter to specIfy the prIce
[] array, Is gIven In the descrIptIon of the ICustom() functIon.
The second form Is Intended for all other IndIcators, In whIch more than one tImeserIes Is used for
calculatIons.
Lnr Jn.-L·uL-r- .··n-r Lnr n-r--_r·r-L, // -Lz- ·r Lnpur rLm---nL--
··n-r Lnr pn-v_·-L·uL-r-J, // o-n- !-nJL-J Ln pn-vL·u- ·-LL
··n-r J-r-rLm-s rLm-¯`, // rLm-
··n-r J·uoL-s ·p-n¯`, // Jp-n
··n-r J·uoL-s !Lj!¯`, // |Lj!
··n-r J·uoL-s L·.¯`, // H·.
··n-r J·uoL-s ·L·--¯`, // .L·--
··n-r L·njs rL·k_v·Lum-¯`, // rL·k V·Lum-
··n-r L·njs v·Lum-¯`, // ---L V·Lum-
··n-r Lnrs -pn--J¯` // ¯pn--J
·¡
Parameters of open[], hIgh[], low[] and close[] contaIn arrays wIth open prIces, hIgh and low prIces
and close prIces of the current tImeframe.The tIme[] parameter contaIns an array wIth open tIme
values, the spread[] parameter has an array contaInIng the hIstory of spreads (If any spread Is
provIded for the traded securIty). The parameters of volume[] and tIck_volume[] contaIn the hIstory
of trade and tIck volume, respectIvely.
To determIne the IndexIng dIrectIon of tIme[], open[], hIgh[], low[], close[], tIck_volume[], volume[]
and spread[], call ArrayCetAsSerIes(). Ìn order not to depend on default values, you should
uncondItIonally call the ArraySetAsSerIes() functIon for those arrays, whIch are expected to work wIth.
The fIrst rates_total parameter contaIns the number of bars, avaIlable to the IndIcator for calculatIon,
and corresponds to the number of bars avaIlable In the chart.
We should noted the connectIon between the return value of DnCalculate() and the second Input
parameter prev_calculated. 0urIng the functIon call, the prev_calculated parameter contaIns a value
returned by DnCalculate() durIng prevIous call. ThIs allows for economIcal algorIthms for calculatIng
the custom IndIcator In order to avoId repeated calculatIons for those bars that haven't changed sInce
Language Basics
© 2000·2010, |eta0uotes Software Corp.
125
the prevIous run of thIs functIon.
For thIs, It Is usually enough to return the value of the rates_total parameter, whIch contaIns the
number of bars In the current functIon call. Ìf sInce the last call of DnCalculate() prIce data has
changed (a deeper hIstory downloaded or hIstory blanks fIlled), the value of the Input parameter
prev_calculated wIll be set to zero by the termInal.
Note: If DnCalculate returns zero, then the IndIcator values are not shown In the 0ataWIndow of the
clIent termInal.
To understand It better, It would be useful to start the IndIcator, whose code Is attached below.
IndIcator ExampIe:
tpn·p-nry LnJL·-r·n_·!-nr_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- !
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r HLn-
tpn·p-nry LnJL·-r·n_L-o-L! ¨HLn-¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n! ¯-nkÐLu-
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! !
//--- LnJL·-r·n ourr-n-
J·uoL- HLn-Ðurr-n¯`¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,HLn-Ðurr-n,PH¯P.ArJ-_¯ArA·¡
//---
n-runn.¨·¡
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm-s rLm-¯`,
··n-r J·uoL-s ·p-n¯`,
··n-r J·uoL-s !Lj!¯`,
··n-r J·uoL-s L·.¯`,
··n-r J·uoL-s ·L·--¯`,
··n-r L·njs rL·k_v·Lum-¯`,
··n-r L·njs v·Lum-¯`,
··n-r Lnrs -pn--J¯`·

//--- J-r r!- numo-n ·r o-n- -v-LL-oL- r·n r!- ·unn-nr -ymo·L -nJ ·!-nr p-nL·J
Language Basics
© 2000·2010, |eta0uotes Software Corp.
126
Lnr o-n-=Ð-n-.¯ymo·L.·,¨·¡
-nLnr.¨Ð-n- = ¨,o-n-,¨, n-r--_r·r-L = ¨,n-r--_r·r-L,¨, pn-v_·-L·uL-r-J = ¨,pn-v_·-L·uL-r-J·¡
-nLnr.¨rLm-¯¨` = ¨,rLm-¯¨`,¨ rLm-¯n-r--_r·r-L-!` = ¨,rLm-¯n-r--_r·r-L-!`·¡
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
//--------------------------------------------------------------------
See aIso
FunnIng Programs, ClIent TermInal Events, WorkIng wIth Events
Language Basics
© 2000·2010, |eta0uotes Software Corp.
127
VarIabIes
0ecIarIng VarIabIes
7arIables must be declared before they are used. UnIque names are used to IdentIfy varIables.
0escrIptIons of varIables are used for them to be defIned and for types to be declared. 0escrIptIon Is
not an operator.
SImple types are:
char, short, Int, long, uchar, ushort, uInt, ulong - Integers;
color - Integer representIng the FC8·color;
datetIme - the date and tIme, an unsIgned Integer contaInIng the number of seconds sInce 0 hour
January 1, 1970;
bool - boolean values trµe and fclse;
double - double·precIsIon floatIng poInt number;
float - sIngle·precIsIon floatIng poInt number;
strIng - character strIngs.
ExampIes:
-rnLnj -zPnr·Ð·x¡
Lnr nJnJ-n-¡
J·uoL- J¯ymo·L-nL·-¡
o··L oH·j¡
J-r-rLm- rÐ-jLn_¯-r- = ¯'`¨¨1.¨!.¨! ¨¨.¨¨'¡
··L·n ·M·JLry_.·L·n = .'¨x11,¨xÐ-,¨xI¯'¡
CompIex or compound types:
Structures are composIte data types, constructed usIng other types.
-rnu·r MyrLm-

Lnr !·un¡ // ¨-``
Lnr mLnur-¡ // ¨-¯-
Lnr --··nJ¡ // ¨-¯-
·¡
...
MyrLm- -rnrLm-¡ // V-nL-oL- ·r r!- pn-vL·u-Ly J-·L-n-J -rnu·run- MyrLm- MyrLm-
You can't declare varIables of the structure type untIl you declare the structure.
Arrays
Array Is the Indexed sequence of IdentIcal·type data:
Lnr -¯¯¨`¡ // Jn--JLm-n-L·n-L -nn-y ·r ¯¨ Lnr-j-n-.
J·uoL- m¯¯`¯¯¨`¡ // r.·-JLm-n-L·n-L -nn-y ·r --v-n -nn-y-,
// --·! ·r r!-m ··n-L-rLnj ·r ¯¨ numo-n-.
MyrLm- r¯!¨¨`¡ // Ann-y ··nr-LnLnj -L-m-nr- -u·! -- MyrLm-
Language Basics
© 2000·2010, |eta0uotes Software Corp.
128
Dnly an Integer can be an array Index. No more than four·dImensIonal arrays are allowed. NumberIng
of array elements starts wIth 0. The last element of a one·dImensIonal array has the number whIch Is
1 less than the array sIze. ThIs means that call for the last element of an array consIstIng of 50
Integers wIll appear as a[49]. The same concerns multIdImensIonal arrays: A dImensIon Is Indexed
from 0 to the dImensIon sIze·1. The last element of a two·dImensIonal array from the example wIll
appear as m[6][49].
StatIc arrays can't be represented as tImeserIes, I.e., the ArraySetAsSerIes() functIon, whIch sets
access to array elements from the end to begInnIng, can't be applIed to them. Ìf you want to provIde
access to an array the same as In tImeserIes, use the dynamIc array object.
Ìf there Is an attempt to access out of the array range, the executIng subsystem wIll generate a
crItIcal error and the program wIll be stopped.
Access SpecIfIers
Access specIfIers defIne how the compIler can access varIables, members of structures or classes.
The const specIfIer declares a varIable as a constant, and does not allow to change thIs varIable durIng
runtIme. A sIngle InItIalIzatIon of a varIable Is allowed when declarIng It. The const specIfIer can't be
applIed to members of structures and classes.
SampIe
Lnr Jn.-L·uL-r- .··n-r Lnr n-r--_r·r-L, // -Lz- ·r r!- pnL·-¯` -nn-y
··n-r Lnr pn-v_·-L·uL-r-J, // o-n- !-nJL-J ·n - pn-vL·u- ·-LL
··n-r Lnr o-jLn, // .!-n- r!- -LjnLrL·-nr J-r- -r-nr rn·m
··n-r J·uoL-s pnL·-¯` // -nn-y r· ·-L·uL-r-
·¡
To access members of structures and classes use the followIng qualIfIers:
publIc - allows unrestrIcted access to the varIable or class method
protected - allows access from methods of thIs class, as well as from methods of publIcly InherIted
classes. Dther access Is ImpossIble;
prIvate - allows access to varIables and class methods only from methods of the same class.
vIrtual - applIes only to class methods (but not to methods of structures) and tells the compIler that
thIs method should be placed In the table of vIrtual functIons of the class.
Storage CIasses
There are three storage classes: statIc, Input and extern. These modIfIers of a storage class explIcItly
IndIcate to the compIler that correspondIng varIables are dIstrIbuted In a pre·allocated area of
memory, whIch Is called the global pool. 8esIdes, these modIfIers IndIcate the specIal processIng of
varIable data. Ìf a varIable declare on a local level Is not a statIc one, memory for such a varIable Is
allocated automatIcally at a program stack. FreeIng of memory allocated for a non·statIc array Is also
performed automatIcally when goIng beyond the vIsIbIlIty area of the block, In whIch the array Is
declared.
See aIso
0ata Types, EncapsulatIon and ExtensIbIlIty of Types,ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and
Language Basics
© 2000·2010, |eta0uotes Software Corp.
129
LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
130
LocaI VarIabIes
A varIable declared InsIde a functIon Is local. The scope of a local varIable Is lImIted to the functIon
range InsIde whIch It Is declared. Local varIable can be InItIalIzed by outcome of any expressIon. Every
call of the functIon InItIalIzes a local varIable. Local varIables are stored In memory area of the
correspondIng functIon.
ExampIe:
Lnr -·m-run·.·

Lnr n-r_··J-=¨¡
...
n-runn.n-r_··J-·¡
·
Scope of a varIable Is a program part, In whIch a varIable can referred to. 7arIables declared InsIde a
block (at the Internal level), have the block as theIr scope. The block scope start wIth the varIable
declaratIon and ends wIth the fInal rIght brace.
Local varIables declared In the begInnIng of a functIon also have the scope of block, as well as functIon
parameters that are local varIables. Any block can contaIn varIable declaratIons. Ìf blocks are nested
and the IdentIfIer In the external block has the same name as the IdentIfIer In the Internal block, the
external block IdentIfIer Is hIdden, untIl the operatIon of the Internal block Is over.
ExampIe:
v·LJ Jn¯r-nr.·

//---
Lnr L=¯¡ // L··-L v-nL-oL- ·r r!- run·rL·n

Lnr L=!¨¡ // run·rL·n v-nL-oL-
-nLnr.¨Pn oL··k L = ¨,L·¡ // n--uLr L- L=!¨¡
·
-nLnr.¨Jur-LJ- oL··k L = ¨,L·¡ // n--uLr L- L=¯¡
·
ThIs means that whIle the Internal block Is runnIng, It sees values of Its own local IdentIfIers, not the
values of IdentIfIers wIth IdentIcal names In the external block.
ExampIe:
v·LJ Jn¯r-nr.·

//---
Lnr L=¯¡ // L··-L v-nL-oL- ·r r!- run·rL·n
r·n.Lnr L=¨¡L<`¡L--·
-nLnr.¨Pn-LJ- r·n L = ¨,L·¡
-nLnr.¨Jur-LJ- r!- oL··k L = ¨,L·¡
·
/· Ix-·urL·n n--uLr
Language Basics
© 2000·2010, |eta0uotes Software Corp.
131
Pn-LJ- r·n L = ¨
Pn-LJ- r·n L = !
Pn-LJ- r·n L = `
Jur-LJ- oL··k L = ¯
·/
Local varIables declared as statIc have the scope of the block, despIte the fact that they exIst sInce
the program start.
See aIso
0ata Types, EncapsulatIon and ExtensIbIlIty of Types,ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and
LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
132
FormaI Parameters
Parameters passed to the functIon are local. The scope Is the functIon block. Formal parameters must
have names dIfferIng from those of external varIables and local varIables defIned wIthIn one functIon.
Some values can be assIgned to formal parameters In the functIon block. Ìf a formal parameter Is
declared wIth the const modIfIer, Its value can't be changed wIthIn the functIon.
ExampIe:
v·LJ run·.··n-r Lnr x¯`, J·uoL- y, o··L z·

Lr.y¨.¨ ss .z·
-nLnr.x¯¨`·¡
...
·
Formal parameters can be InItIalIzed by constants. Ìn thIs case, the InItIalIzIng value Is consIdered as
the default value. Parameters, next to the InItIalIzed one, must also be InItIalIzed.
ExampIe:
v·LJ run·.Lnr x, J·uoL- y = ¨.¨, o··L z = rnu-·

...
·
When callIng such a functIon, the InItIalIzed parameters can be omItted, the defaults beIng
substItuted Instead of them.
ExampIe:
run·.!``, ¨.¯·¡
Parameters of sImple types are passed by value, I.e., modIfIcatIons of the correspondIng local varIable
of thIs type InsIde the called functIon wIll not be shown In the callIng functIon In any way. Arrays of any
type and data of the structure type are always passed by reference. Ìf It's necessary to prohIbIt
modIfyIng the array or structure contents, the parameters of these types must be declared wIth the
const keyword.
There Is an opportunIty to pass parameters of sImple types by reference. Ìn thIs case, modIfIcatIon of
such parameters wIll affect the correspondIng varIables In the called functIon passed by reference. Ìn
order to IndIcate that a parameter Is passed by reference, put the E modIfIer after the data type.
ExampIe:
v·LJ run·.Lnrs x, J·uoL-s y, J·uoL-s z¯`·

J·uoL- ·-L·uL-r-J_rp¡
...
r·n.Lnr L=¨¡ L<JnJ-n-r·r-L.·¡ L--·

Lr.L==Ann-y¯Lz-.z·· on--k¡
Lr.JnJ-n¯-L-·r.L·==r-L--· on--k¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
133
z¯L`=JnJ-nJp-n-nL·-.·¡
·
x=L¡
y=·-L·uL-r-J_rp¡
·
Parameters passed by reference, can't be InItIalIzed by default values.
|axImum 64 parameters can be passed Into a functIon.
See aIso
Ìnput 7arIables, 0ata Types, EncapsulatIon and ExtensIbIlIty of Types,ÌnItIalIzatIon of 7arIables,
7IsIbIlIty Scope and LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
134
StatIc VarIabIes
The storage class of statIc defInes a statIc varIable. The statIc modIfIer Is IndIcated before the data
type.
ExampIe:
Lnr -·m-run·.·

-r-rL· Lnr rL-j=!¨¡
...
n-runn.rL-j·¡
·
A statIc varIable can be InItIalIzed by a constant or constant expressIon correspondIng to Its type,
unlIke a sImple local varIable, whIch can be InItIalIzed by any expressIon.
StatIc varIables exIst from the moment of program executIon and are InItIalIzed only once before the
specIalIzed functIons DnÌnIt() Is called. Ìf the InItIal values are not specIfIed, varIables of the statIc
storage class are takIng zero InItIal values.
Local varIables declared wIth the stctìc keyword retaIn theIr values throughout the functIon lIfetIme.
WIth each next functIon call, such local varIables contaIn the values that they had durIng the prevIous
call.
Any varIables In a block, except formal parameters of a functIon, can be defIned as statIc. Ìf a
varIable declare on a local level Is not a statIc one, memory for such a varIable Is allocated
automatIcally at a program stack.
ExampIe:
Lnr .·unr-n.·

-r-rL· Lnr ··unr¡
··unr--¡
Lr.··unr`!¨¨==¨· -nLnr.¨¯un·rL·n .·unr-n !-- o--n ·-LL-J ¨,··unr,¨ rLm--¨·¡
n-runn ··unr¡
·
v·LJ Jn¯r-nr.·

//---
Lnr ·=`1¯¡
r·n.Lnr L=¨¡L<!¨¨¨¡L--·

Lnr ·=.·unr-n.·¡
·
-nLnr.¨· =¨,··¡
·
See aIso
0ata Types, EncapsulatIon and ExtensIbIlIty of Types,ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and
Language Basics
© 2000·2010, |eta0uotes Software Corp.
135
LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
136
CIobaI VarIabIes
Clobal varIables are created by placIng theIr declaratIons outsIde functIon descrIptIons. Clobal
varIables are defIned at the same level as functIons, I.e., they are not local In any block.
ExampIe:
Lnr JL·o-L¯L-j=!¨¡ // JL·o-L v-nL-oL-
Lnr Jn¯r-nr.·

...
·
The scope of global varIables Is the entIre program. Clobal varIables are accessIble from all functIons
defIned In the program. They are InItIalIzed to zero unless another InItIal value Is explIcItly defIned. A
global varIable can be InItIalIzed only by a constant or constant expressIon that corresponds to Its
type.
Clobal 7arIables are InItIalIzed only once rIght after the program Is loaded Into the clIent termInal
memory.
Note: 7arIables declared at global level must not be mIxed up wIth the clIent termInal global varIables
that can be accessed usIng the Clobal7arIable...() functIons.
See aIso
0ata Types, EncapsulatIon and ExtensIbIlIty of Types,ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and
LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
137
Input VarIabIes
The Input storage class defInes the external varIable. The ìnpµt modIfIer Is IndIcated before the data
type. A varIable wIth the Input modIfIer can't be changed InsIde mql5·programs, such varIables can be
accessed for readIng only. 7alues of Input varIables can be changed only by a user from the program
propertIes wIndow.
ExampIe:
//--- Lnpur p-n-m-r-n-
Lnpur Lnr MA_--nL·J=!`¡
Lnpur Lnr MA_¯!Lrr=¨¡
Lnpur IHJM_MA_MIr|J¯ MA_M-r!·J=MJ¯I_¯MMA¡
Ìnput varIables determIne the Input parameters of a program. They are avaIlable from the PropertIes
wIndow of a program.
Ìt Is possIble to set another way to dIsplay names of Input parameters In the Ìnputs tab. To do thIs, a
strIng comment Is used, whIch should be located after the descrIptIon of an Input parameter In the
same lIne. Thus, names more understandable for a user can be matched to Input parameters.
ExampIe:
//--- Lnpur p-n-m-r-n-
Lnpur Lnr PnpMA--nL·J=!`¡ // ¯m··r!Lnj p-nL·J
Lnpur Lnr PnpMA¯!Lrr=¨¡ // HLn- !·nLz·nr-L -!Lrr
Lnpur IHJM_MA_MIr|J¯ PnpMAM-r!·J=MJ¯I_¯MMA¡ // ¯m··r!Lnj m-r!·J
Language Basics
© 2000·2010, |eta0uotes Software Corp.
138
Note: Arrays and varIables of complex types can't act as Input varIables.
PassIng Parameters When CaIIIng Custom IndIcators from hDL5 Programs
Custom ÌndIcators are called usIng the ICustom() functIon. After the name of the custom IndIcator,
parameters should go In a strIct accordance wIth the declaratIon of Input varIables of thIs custom
IndIcator. Ìf IndIcated parameters are less than Input varIables declared In the called custom IndIcator,
the mIssIng parameters are fIlled wIth values specIfIed durIng the declaratIon of varIables.
Ìf the custom IndIcator uses the DnCalculate functIon of the fIrst type (I.e., the IndIcator Is calculated
usIng the same array of data), then one of ENU|_APPLÌE0_PFÌCE values or handle of another IndIcator
should be used as the last parameter when callIng such a custom IndIcator. All parameters
correspondIng to Input varIables must be clearly IndIcated.
EnumeratIons as Input Parameters
Not only buIlt·In enumeratIons provIded In |0L5, but also user defIned varIables can be used as Input
varIables (Input parameters for mql5 programs). For example, we can create the dayDfWeek
enumeratIon, descrIbIng days of the week, and use the Input varIable to specIfy a partIcular day of the
week, not as a number, but In a more common way.
ExampIe:
tpn·p-nry -·nLpr_-!·._Lnpur-
//--- J-y ·r .--k
-num J-yJrW--k

¯=¨, // ¯unJ-y
M=!, // M·nJ-y
r=`, // ru--J-y
W=`, // W-Jn--J-y
r!=1, // r!un-J-y
¯n=¯, // ¯nLJ-y,
¯r=¯, // ¯-runJ-y
·¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
139
//--- Lnpur p-n-m-r-n-
Lnpur J-yJrW--k -.-pJ-y=W¡
Ìn order to enable a user to select a necessary value from the propertIes wIndow durIng the scrIpt
startup, we use the preprocessor command #property scrIpt_show_Inputs. We start the scrIpt and can
choose one of values of the dayDfWeek enumeratIon from the lIst. We start the EnumÌnÌnput scrIpt
and go to the Ìnputs tab. 8y default, the value of swapday (day of trIple swap charge) Is Wednesday
(W = J), but we can specIfy any other value, and use thIs value to change the program operatIon.
Number of possIble values of an enumeratIon Is lImIted. Therefore, In order to select the Input value
the drop·down lIst Is used. |nemonIc names of enumeratIon members are used for values dIsplayed In
the lIst. Ìf a comment Is assocIated wIth a mnemonIc name, as shown In thIs example, the comment
content Is used Instead of the mnemonIc name.
Each value of the dayDfWeek enumeratIon has Its value from 0 to 6, but In the lIst of parameters,
comments specIfIed for each value wIll be shown. ThIs provIdes addItIonal flexIbIlIty for wrItIng
programs wIth clear descrIptIons of Input parameters.
See aIso
ICustom, EnumeratIons, PropertIes of Programs
Language Basics
© 2000·2010, |eta0uotes Software Corp.
140
Extern VarIabIes
The extern keyword Is used for declarIng varIable IdentIfIers as IdentIfIers of the statIc storage class
wIth global lIfetIme. These varIables exIst from the start of the program and memory for them Is
allocated and InItIalIzed ImmedIately after the start of the program.
You can create programs that consIst of multIple source fIles; In thIs case a dIrectIve to the
preprocessor #Include Is used. 7arIables declared as an extern wIth the same type and IdentIfIer can
exIst In dIfferent source fIles of one project.
When compIlIng the whole project, all the extern varIables wIth the same type and an IdentIfIer are
assocIated wIth one part of memory of the global varIable pool. Extern varIables are useful for
separate compIlatIon of source fIles. Extern varIables can be InItIalIzed, but only once · exIstence of
several InItIalIzes extern varIables of the same type and wIth the same IdentIfIer Is prohIbIted.
See aIso
0ata Types, EncapsulatIon and ExtensIbIlIty of Types,ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and
LIfetIme of 7arIables, CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
141
InItIaIIzatIon of VarIabIes
Any varIable can be InItIalIzed durIng defInItIon. Ìf a varIable Is not InItIalIzed explIcItly, the value
stored In thIs varIable can be any. ÌmplIcIt InItIalIzatIon Is not used.
Clobal and statIc varIables can be InItIalIzed only by a constant of the correspondIng type or a constant
expressIon. Local varIables can be InItIalIzed by any expressIon, not just a constant.
ÌnItIalIzatIon of global and statIc varIables Is performed only once. ÌnItIalIzatIon of local varIables Is
made every tIme you call the correspondIng functIons.
ExampIes:
Lnr n = !¡
-rnLnj - = ¨!-LL·¨¡
J·uoL- r¯` = ¨.¨, ¨.``¯, ¨.`-`, ¨.¯, ¨.¯!-, !.¨ ·¡
Lnr -¯1`¯1` = !, !, !, !·, `, `, `, `·, `, `, `, `·, 1, 1, 1, 1 · ·¡
//--- rn·m r-rnL-
Lnr nLj!r¯1`=WP¯r|_PH_-PxIH¯-VI-r_ÐJ-¯I-,WP¯r|_PH_-PxIH¯-VI-r_ÐJ-¯I-,
WP¯r|_PH_-PxIH¯-VI-r_ÐJ-¯I-,WP¯r|_PH_-PxIH¯-VI-r_ÐJ-¯I-·¡
LIst of values of the array elements must be enclosed In curly brackets. |Issed InItIalIzIng sequences
are consIdered equal to 0. The InItIalIzIng sequence must have at least one value: thIs value Is
InItIalIzed to the fIrst element of the correspondIng structure or array, mIssIng elements are
consIdered equal to zero.
Ìf the sIze of the InItIalIzed array Is not specIfIed, It Is determIned by a compIler, based on the sIze of
the InItIalIzatIon sequence. |ultI·dImensIonal arrays cannot be InItIalIzed by a one·dImensIonal
sequence (a sequence wIthout addItIonal curly brackets), except for the case, when only one
InItIalIzIng element Is specIfIed (zero, as a rule).
Arrays (IncludIng those announced at the local level) can be InItIalIzed only by constants.
ExampIes:
-rnu·r -rn`

Lnr L·._p-nr¡
Lnr !Lj!_p-nr¡
·¡
-rnu·r -rn!¨

-rn` -`¡
J·uoL- J!¯!¨`¡
Lnr L`¡
·¡
v·LJ Jn¯r-nr.·

-rn!¨ -!¨_!=!,¨·,!.¨,`.!,`.`,1.1,¯.`,¯.!,¯.-,-.¯,-.`,!¨.¨·,!¨¨·¡
-rn!¨ -!¨_`=!,¨·,¨·,!¨¨·¡
-rn!¨ -!¨_`=!,¨·,!.¨··¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
142
//---
-nLnr.¨!. -!¨_!.J!¯¯` = ¨,-!¨_!.J!¯¯`·¡
-nLnr.¨`. -!¨_`.J!¯¯` = ¨,-!¨_`.J!¯¯`·¡
-nLnr.¨`. -!¨_`.J!¯¯` = ¨,-!¨_`.J!¯¯`·¡
-nLnr.¨1. -!¨_`.J!¯¨` = ¨,-!¨_`.J!¯¨`·¡
·
See aIso
0ata Types, EncapsulatIon and ExtensIbIlIty of Types, 7IsIbIlIty Scope and LIfetIme of 7arIables,
CreatIng and 0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
143
VIsIbIIIty Scope and LIfetIme of VarIabIes
There are two basIc types of scope: local scope and global scope.
A varIable declared outsIde all functIons Is located Into the global scope. Access to such varIables can
be done from anywhere In the program.These varIables are located In the global pool of memory, so
theIr lIfetIme coIncIdes wIth the lIfetIme of the program.
A varIable declared InsIde a block (part of code enclosed In curly brackets) belongs to the local scope.
Such a varIable Is not vIsIble (and therefore not avaIlable) outsIde the block, In whIch It Is declared.
The most common case of local declaratIon Is a varIable declared wIthIn a functIon. A varIable
declared locally, Is located on the stack, and the lIfetIme of such a varIable Is equal to the lIfetIme of
the functIon.
SInce the scope of a local varIable Is the block In whIch It Is declared, It Is possIble to declare varIables
wIth the same name, as those of varIables declared In other blocks; as well as of those declared at
upper levels, up to the global level.
ExampIe:
v·LJ .-L·uL-r-HWMA.Lnr n-r--_r·r-L,Lnr pn-v_·-L·uL-r-J,Lnr o-jLn,··n-r J·uoL- spnL·-¯`·

Lnr L,LLmLr¡
-r-rL· Lnr .-Lj!r-um=¨¡
J·uoL- -um=¨¡
//---
Lr.pn-v_·-L·uL-r-J==¨·

LLmLr=MA_--nL·J-o-jLn¡
//--- --r -mpry v-Lu- r·n rLn-r LLmLr o-n-
r·n.L=¨¡ L<LLmLr¡ L--· HLn-Ðurr-n¯L`=¨.¨¡
//--- ·-L·uL-r- rLn-r vL-LoL- v-Lu-
J·uoL- rLn-rV-Lu-=¨¡
r·n.Lnr L=o-jLn¡ L<LLmLr¡ L--·

Lnr k=L-o-jLn-!¡
.-Lj!r-um-=k¡
rLn-rV-Lu--=k·pnL·-¯L`¡
·
rLn-rV-Lu-/=.J·uoL-·.-Lj!r-um¡
HLn-Ðurr-n¯LLmLr-!`=rLn-rV-Lu-¡
·
-L--

LLmLr=pn-v_·-L·uL-r-J-!¡
·
r·n.L=LLmLr¡L<n-r--_r·r-L¡L--·

-um=¨¡
Language Basics
© 2000·2010, |eta0uotes Software Corp.
144
r·n.Lnr |=¨¡ |<MA_--nL·J¡ |--· -um-=.MA_--nL·J-|··pnL·-¯L-|`¡
HLn-Ðurr-n¯L`=-um/.-Lj!r-um¡
·
//---
·
Pay attentIon to the varIable I, declared In lIne
r·n.Lnr L=o-jLn¡ L<LLmLr¡ L--·

Lnr k=L-o-jLn-!¡
.-Lj!r-um-=k¡
rLn-rV-Lu--=k·pnL·-¯L`¡
·
Ìts scope Is only the for cycle; outsIde of thIs cycle there Is another varIable wIth the same name,
declared at the begInnIng of the functIon. Ìn addItIon, the k varIable Is declared In the loop body, Its
scope Is the loop body.
Local varIables can be declared wIth the access specIfIer statIc. Ìn thIs case, the compIler has a
varIable In the global pool of memory. Therefore, the lIfetIme of a statIc varIable Is equal to the
lIfetIme of the program. Here the scope of such a varIable Is lImIted to the block In whIch It Is
declared.
See aIso
0ata Types, EncapsulatIon and ExtensIbIlIty of Types,ÌnItIalIzatIon of 7arIables, CreatIng and
0eletIng Dbjects
Language Basics
© 2000·2010, |eta0uotes Software Corp.
145
CreatIng and 0eIetIng Dbjects
After a mql5 program Is loaded for executIon, memory Is allocated to each varIable accordIng to Its
type. AccordIng to the access level all varIables are dIvIded Into two types · global varIables and local
varIables. AccordIng to the memory class they can be Input parameters of a mql5 program, statIc and
automatIc. Ìf necessary, each varIable Is InItIalIzed by a correspondIng value. After beIng used a
varIable Is unIntIalIzed and memory used by It Is returned to the |0L5 executable system.
InItIaIIzatIon and 0eInItIaIIzatIon of CIobaI VarIabIes
Clobal varIables are InItIalIzed automatIcally rIght after a mql5 program Is loaded and before any of
functIon Is called. 0urIng InItIalIzatIon InItIal values are assIgned to varIables of sImple types and a
constructor (If there Is any) Is called for objects. Ìnput varIables are always declared at a global level,
and are InItIalIzed by values set by a user In the dIalog durIng the program start.
0espIte the fact that statIc varIables are usually declared at a local level, the memory for these
varIables Is pre·allocated, and InItIalIzatIon Is performed rIght after a program Is loaded, the same as
for global varIables.
The InItIalIzatIon order corresponds to the varIable declaratIon order In the program. 0eInItIalIzatIon
Is performed In the reverse order. ThIs rule Is true only for the varIables that were not created by the
new operator. Such varIables are created and InItIalIzed automatIcally rIght after loadIng, and are
deInItIalIzed before the program unloadIng.
InItIaIIzatIon and 0eInItIaIIzatIon of LocaI VarIabIes
Ìf a varIable declared on a local level Is not a statIc one, memory Is allocated automatIcally for such a
varIable. Local varIables, as well as global ones, are InItIalIzed automatIcally at the moment when the
program executIon meets the declaratIon of a local varIable. Thus the InItIalIzatIon order corresponds
to the order of declaratIon.
Local varIables are deInItIalIzed at the end of the program block, In whIch they were declared, and In
the order opposIte to theIr declaratIon. A program block Is a compound operator that can be a part of
selectIon operator swItch, cycle operator (for, whIle, do·whIle), a functIon body or a part of the If·else
operator.
Local varIables are InItIalIzed only at the moment when the program executIon meets the varIable
declaratIon. Ìf durIng the program executIon the block, In whIch the varIable Is declared, was not
executed, such a varIable Is not InItIalIzed.
InItIaIIzatIon and 0eInItIaIIzatIon of Dbjects PIaced
A specIal case Is that wIth object poInters, because declaratIon of a poInter does not entaIl
InItIalIzatIon of a correspondIng objects. 0ynamIcally placed objects are InItIalIzed only at the moment
when the class sample Is created by the new operator. ÌnItIalIzatIon of objects presupposes call of a
constructor of a correspondIng class. Ìf there Is no correspondIng constructor In the class, Its members
of a sImple type wIll not be automatIcally InItIalIzed; members of types strIng, dynamIc array and
complex object wIll be automatIcally InItIalIzed.
PoInters can be declared on a local or global level; and they can be InItIalIzed by the empty value of
NULL or by the value of the poInter of the same or InherIted type. Ìf the new operator Is called for a
Language Basics
© 2000·2010, |eta0uotes Software Corp.
146
poInter declared on a local level, the delete operator for thIs poInter must be performed before exItIng
the level. DtherwIse the poInter wIll be lost and the explIcIt deletIon of the object wIll faIl.
All objects created by the expressIon of ob]ect_poìnter=new Clcss_ncme, must be then deleted by the
delete(ob]ect_poìnter) operator. Ìf for some reasons such a varIable Is not deleted by the delete
operator when the program Is completed, the correspondIng entry wIll appear In the ¨Experts¨ journal.
Dne can declare several varIables and assIgn a poInter of one object to all of them.
Ìf a dynamIcally created object has a constructor, thIs constructor wIll be called at the moment of the
new operator executIon. Ìf an object has a destructor, It wIll be called durIng the executIon of the
delete operator.
Thus dynamIcally placed objects are created only at the moment when are created by the new
operator, and are assuredly deleted eIther by thedelete operator or automatIcally by the executIng
system of |0L5 durIng the program unloadIng. The order of declaratIon of poInters of dynamIcally
created object does'nt Influence the order of theIr InItIalIzatIon. The order of InItIalIzatIon and
deInItIalIzatIon Is fully controlled by the programmer.
ßrIef CharacterIstIcs of VarIabIes
The maIn InformatIon about the order of creatIon, deletIon, about calls of constructors and
destructors Is gIven In the below table.
CIobaI automatIc
varIabIe
LocaI automatIc
varIabIe
0ynamIcaIIy created
object
InItIaIIzatIon rIght after a mql5
program Is loaded
when he code lIne
where It Is declared Is
reached durIng
executIon
at the executIon of
the new operator
InItIaIIzatIon order In the order of
declaratIon
In the order of
declaratIon
IrrespectIve of the
order of declaratIon
0eInItIaIIzatIon before a mql5
program Is unloaded
when executIon exIts
the declaratIon block
when the deIete
operator Is executed
or before a mql5
program Is unloaded
0eInItIaIIzatIon
order
In the order opposIte
to the InItIalIzatIon
order
In the order opposIte
to the InItIalIzatIon
order
IrrespectIve of the
InItIalIzatIon order
Constructor caII at mql5 program
loadIng
at InItIalIzatIon at the executIon of
the new operator
0estructor caII at mql5 program
unloadIng
when exItIng the block
where the varIable
was InItIalIzed
at the executIon of
the delete operator
Error Iogs log In the ¨Experts¨
journal about the
attempt to delete an
automatIcally created
log In the ¨Experts¨
journal about the
attempt to delete an
automatIcally created
log In the ¨Experts¨
journal about
undeleted dynamIcally
created objects at the
Language Basics
© 2000·2010, |eta0uotes Software Corp.
147
object object unload of a mql5
program
See aIso
0ata Types, EncapsulatIon and ExtensIbIlIty of Types,ÌnItIalIzatIon of 7arIables, 7IsIbIlIty Scope and
LIfetIme of 7arIables
Language Basics
© 2000·2010, |eta0uotes Software Corp.
148
Preprocessor
Preprocessor Is a specIal subsystem of the |0L5 compIler that Is Intended for preparatIon of the
program source code ImmedIately before the program Is compIled.
Preprocessor allows enhancement of the source code readabIlIty. The code can be structured by
IncludIng of specIfIc fIles contaInIng source codes of mql5·programs. The possIbIlIty to assIgn
mnemonIc names to specIfIc constants contrIbutes to enhancement of the code readabIlIty.
Preprocessor also allows determInIng specIfIc parameters of mql5·programs:
0eclare constants
Set program propertIes
Ìnclude fIles In program text
Ìmport functIons
Ìf the # symbol Is used In the fIrst lIne of the program, thIs lIne Is a preprocessor dIrectIve. A
preprocessor dIrectIve ends wIth a lIne feed character.
Language Basics
© 2000·2010, |eta0uotes Software Corp.
149
0ecIaratIon of Constants (#defIne)
The #defIne dIrctIve can be used to assIgn mnemonIc names to constants.
tJ-rLn- LJ-nrLrL-n r·k-n_-rnLnj
The #defIne dIrectIve substItutes token_strIng for all further found entrIes of ìdentìfìer In the source
text. The ìdentìfìer Is replaced only If It Is a separate token. The ìdentìfìer Is not replaced If It Is part
of a comment, part of a strIng, or part of another longer IdentIfIer.
The constant IdentIfIer Is governed by the same rules as varIable names. The value can be of any
type:
tJ-rLn- AÐ. !¨¨
tJ-rLn- -P `.!1
tJ-rLn- .JM-AH1_HAMI ¨M-r-,u·r-- ¯·rr.-n- .·np.¨
...
v·LJ ¯!·..·pynLj!r.·

-nLnr.¨.·pynLj!r `¨¨!-`¨¨-, ¨,.JM-AH1_HAMI·¡
-nLnr.¨!rrp.//....m-r-¬u·r--.n-r¨·¡
·
token_strIng can consIst of several tokens, such as keywords, constants, constant and non·constant
expressIons. token_strIng ends wIth the end of the lIne and can't be transferred to the next lIne.
ExampIe:
tJ-rLn- rWJ `
tJ-rLn- r|-II `
tJ-rLn- PH.JM-HIrI rWJ-r|-II
tJ-rLn- .JM-HIrI .rWJ-r|-II·
v·LJ Jn¯r-nr.·

-nLnr.¨` - `·` = ¨,PH.JM-HIrI·`·¡
-nLnr.¨.` - `··` = ¨,.JM-HIrI·`·¡
·
// ---uLr
// ` - `·` = -
// .` - `··` = !¨
See aIso
ÌdentIfIers, Character Constants
Language Basics
© 2000·2010, |eta0uotes Software Corp.
150
Program PropertIes (#property)
Every mql5·program allows to specIfy addItIonal specIfIc parameters named #property that help clIent
termInal In proper servIcIng for programs wIthout the necessIty to launch them explIcItly. ThIs
concerns external settIngs of IndIcators, fIrst of all. PropertIes descrIbed In Included fIles are
completely Ignored. PropertIes must be specIfIed In the maIn mq5·fIle.
tpn·p-nry LJ-nrLrL-n v-Lu-
The compIler wIll wrIte declared values In the confIguratIon of the module executed.
Constant Type 0escrIptIon
lInk strIng lInk to the company websIte
copyrIght strIng the company name
versIon strIng program versIon, maxImum J1
characters
descrIptIon strIng brIef text descrIptIon of a
mql5·program. Several
descrìptìon can be present,
each of them descrIbes one
lIne of the text. The total
length of all descrìptìon can
not exceed 511 characters
IncludIng lIne feed.
stacksIze Int sIze of the stack for recursIve
calls
lIbrary a lIbrary; no start functIon Is
assIgned, functIons wIth the
export modIfIer can be
Imported In other mql5·
programs
IndIcator_applIed_prIce Int specIfIes the default value for
the ¨Apply to¨ fIeld. You can
specIfy one of the values of
ENU|_APPLÌE0_PFÌCE. Ìf the
property Is not specIfIed, the
default value Is PFÌCE_CLDSE
IndIcator_chart_wIndow show the IndIcator In the chart
wIndow
IndIcator_separate_wIndow show the IndIcator In a
separate wIndow
IndIcator_buffers Int number of buffers for
IndIcator calculatIon
IndIcator_plots Int number of graphIc serIes In
the IndIcator
Language Basics
© 2000·2010, |eta0uotes Software Corp.
151
IndIcator_mInImum double the bottom scalIng lImIt for a
separate IndIcator wIndow
IndIcator_maxImum double the top scalIng lImIt for a
separate IndIcator wIndow
IndIcator_labelN strIng sets a label for the N·th
graphIc serIes dIsplayed In
0ataWIndow. For graphIc
serIes requIrIng multIple
IndIcator buffers
(0FAW_CAN0LES,
0FAW_FÌLLÌNC and others),
the tag names are defIned by
the separator ';'.
IndIcator_colorN color the color for dIsplayIng lIne N,
where N Is the number of
graphIc serIes; numberIng
starts from 1
IndIcator_wIdthN Int lIne thIckness In graphIc serIes
, where N · number of graphIc
serIes, numberIng starts from
1
IndIcator_styleN Int lIne style In graphIc serIes,
specIfIed by the values of
ENU|_LÌNE_STYLE. N ·
number of graphIc serIes,
numberIng starts from 1
IndIcator_typeN Int type of graphIcal plottIng,
specIfIed by the values of
ENU|_0FAW_TYPE. N ·
number of graphIc serIes,
numberIng starts from 1
IndIcator_levelN double horIzontal level of N In a
separate IndIcator wIndow
IndIcator_levelcolor color color of horIzontal levels of the
IndIcator
IndIcator_levelwIdth Int thIckness of horIzontal levels
of the IndIcator
IndIcator_levelstyle Int style of horIzontal levels of the
IndIcator
scrIpt_show_confIrm dIsplay a confIrmatIon wIndow
before runnIng the scrIpt
scrIpt_show_Inputs dIsplay a wIndow wIth the
propertIes before runnIng the
Language Basics
© 2000·2010, |eta0uotes Software Corp.
152
scrIpt and dIsable thIs
confIrmatIon wIndow
tester_IndIcator strIng Name of a custom IndIcator In
the format of ¨
ìndìcctor_ncme.ex5´.
ÌndIcators that requIre testIng
are defIned automatIcally from
the call of the ICustom()
functIon, If the correspondIng
parameter Is set through a
constant strIng. For all other
cases (use of the
ÌndIcatorCreate() functIon or
use of a non·constant strIng In
the parameter that sets the
IndIcator name) thIs property
Is requIred
tester_fIle strIng FIle name for a tester wIth the
IndIcatIon of extensIon, In
double quotes (as a constant
strIng). The specIfIed fIle wIll
be passed to tester. Ìnput fIles
to be tested, If there are
necessary ones, must always
be specIfIed.
tester_lIbrary strIng LIbrary name wIth the
extensIon, In double quotes. A
lIbrary can have extensIon dll or
ex5. LIbrarIes that requIre
testIng are defIned
automatIcally. However, If any
of lIbrarIes Is used by a custom
IndIcator, thIs property Is
requIred
SampIe Task of 0escrIptIon and VersIon Number
tpn·p-nry v-n-L·n ¨`.¯¨¨ // .unn-nr v-n-L·n ·r r!- Ixp-nr AJvL-·n
tpn·p-nry J--·nLprL·n ¨¯Lj¯-j unLv-n--L .Lr! ----v-nr· --rr-nn-¨
tpn·p-nry J--·nLprL·n ¨Ar r!- m·m-nr Ln r!- LnJL·-r·n --v-n-L ¯Lj¯-j- .Lr! JLrr-n-nr -Lj·nLr!m- -n- Ln·LuJ-J¨
tpn·p-nry J--·nLprL·n ¨Pr L- p·--LoL- r· -mo-J - L-nj- numo-n ·r ·r!-n LnJL·-r·n- -!·.Lnj r!- !Lj!- -nJ¨
tpn·p-nry J--·nLprL·n ¨L·.- -nJ -ur·m-rL·-LLy ouLLJ rn·m r!--- !Lj!- -nJ L·.- v-nL·u- jn-p!L·-L r··L-¨
Language Basics
© 2000·2010, |eta0uotes Software Corp.
153
ExampIes of SpecIfyIng a Separate LabeI for Each IndIcator ßuffer ( "C open; C hIgh; C Iow; C
cIose")
tpn·p-nry LnJL·-r·n_·!-nr_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- 1
tpn·p-nry LnJL·-r·n_pL·r- !
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_.AH¯HI¯
tpn·p-nry LnJL·-r·n_.LJr!! `
tpn·p-nry LnJL·-r·n_L-o-L! ¨. ·p-n¡. !Lj!¡. L·.¡. ·L·--¨
Language Basics
© 2000·2010, |eta0uotes Software Corp.
154
IncIudIng FIIes (#IncIude)
The #ìnclµde command lIne can be placed anywhere In the program, but usually all InclusIons are
placed at the begInnIng of the source code. Call format:
tLn·LuJ- <rLL-_n-m-
tLn·LuJ- ¨rLL-_n-m-¨
ExampIes:
tLn·LuJ- <WLnJ--n``.m¬!
tLn·LuJ- ¨myLLo.m¬!¨
The preprocessor replaces the lIne #ìnclµde ·fìle_ncme> wIth the content of the fIle WInUserJ2.mqh.
Angle brackets IndIcate that the WInUserJ2.mqh fIle wIll be taken from the standard dIrectory (usually
It Is termìncl_ìnstcllctìon_dìrectory\MDL5\lnclµde). The current dIrectory Is not vIsIble.
Ìf the fIle name Is enclosed In quotatIon marks, the search Is made In the current dIrectory (whIch
contaIns the maIn source fIle). The standard dIrectory Is not vIsIble.
See aIso
Standard LIbrary, ÌmportIng FunctIons
Language Basics
© 2000·2010, |eta0uotes Software Corp.
155
ImportIng FunctIon (#Import)
FunctIons are Imported from compIled |0L5 modules (*. ex5 fIles) and from operatIng system
modules (fIles *. dll). The module name Is specIfIed In the #ìmport dIrectIve. For compIler to be able
to correctly form the Imported functIon call and organIze proper transmIssIon parameters, the full
descrIptIon of functIons Is needed. FunctIon descrIptIons ImmedIately follow the #ìmport ´modµle
ncme´ dIrectIve. New command #ìmport (can be wIthout parameters) completes the block of Imported
functIon descrIptIons.
tLmp·nr ¨rLL-_n-m-¨
run·! J-rLn-¡
run·` J-rLn-¡
...
run·H J-rLn-¡
tLmp·nr
Ìmported functIons can have any names. FunctIons havIng the same names but from dIfferent modules
can be Imported at the same tIme. Ìmported functIons can have names that coIncIde wIth the names
of buIlt·In functIons. DperatIon of scope resolutIon defInes whIch of the functIons should be called.
SInce the Imported functIons are outsIde the compIled module, the compIler can not verIfy the valIdIty
of passed parameters. Therefore, to avoId run·tIme errors, one must accurately descrIbe the
composItIon and order of parameters passed to Imported functIons. Parameters passed to Imported
functIons (both from EX5, and from the 0LL·module) can have default values.
The followIng can't be used for parameters In Imported functIons:
poInters (*);
lInks to objects that contaIn dynamIc arrays and/or poInters.
Classes, strIng arrays or complex objects that contaIn strIngs and/or dynamIc arrays of any types
cannot be passed as a parameter to functIons Imported from 0LL.
ExampIes:
tLmp·nr ¨u--n``.JLL¨
Lnr M----j-зxW.uLnr !WnJ,-rnLnj Lpr-xr,-rnLnj Lp.-prL·n,uLnr uryp-·¡
tLmp·nr ¨-rJLLo.-x¯¨
-rnLnj Inn·n¯--·nLprL·n.Lnr -nn·n_··J-·¡
Lnr -JÐ.Lnr n-J_v-Lu-,Lnr jn--n_v-Lu-,Lnr oLu-_v-Lu-·¡
o··L .·mp-n-¯·uoL--.J·uoL- numo-n!,J·uoL- numo-n`·¡
-rnLnj ¯·uoL-r·¯rnM·n--n-·L-L·n.J·uoL- numo-n,Lnr pn-·L-L·n·¡
-rnLnj Pnr-j-nr·|-x¯rnLnj.Lnr Lnr-j-n_numo-n·¡
tLmp·nr ¨Ixp-nr¯-mpL-.JLL¨
Lnr J-rPnrV-Lu-.Lnr·¡
J·uoL- J-r¯·uoL-V-Lu-.J·uoL-·¡
-rnLnj J-r¯rnLnjV-Lu-.-rnLnj·¡
J·uoL- J-rAnn-yPr-mV-Lu-.J·uoL- s-nn¯`,Lnr,Lnr·¡
o··L ¯-rAnn-yPr-mV-Lu-.J·uoL- s-nn¯`,Lnr,Lnr,J·uoL-·¡
J·uoL- J-r--r--Pr-mV-Lu-.J·uoL- sn-r--¯`¯¯`,Lnr,Lnr,Lnr·¡
tLmp·nr
Language Basics
© 2000·2010, |eta0uotes Software Corp.
156
To Import functIons durIng executIon of a mql5 program, early bIndIng Is used. ThIs means that the
lIbrary Is loaded durIng the loadIng of a program usIng Its ex5 program.
Ìt's not recommended to use a fully qualIfIed name of the loadable module of type 0rìve:
\0ìrectory\FìleNcme.Ext. |0L5 lIbrarIes are loaded from the termìncl_dìr\MDL5\Lìbrcrìes folder.
See aIso
ÌncludIng FIles
Language Basics
© 2000·2010, |eta0uotes Software Corp.
157
Dbject-DrIented ProgrammIng
Dbject·orIented programmIng (DDP) Is programmIng prImarIly focused on data, data and behavIor
beIng Inseparably lInked. 0ata and behavIor together constItute a class, whIle objects are class
Instances.
The components of the object·orIented approach are:
EncapsulatIon and type extensIbIlIty
ÌnherItance
PolymorphIsm
DverloadIng
7Irtual functIons
DDP consIders computatIon as modelIng of behavIor. The modeled Item Is the object represented by
computatIonal abstractIons. Suppose we want to wrIte a well known game ¨TetrIs¨. To do thIs, we
must learn how to model the appearance of random shapes composed of four squares joIned together
by rIbs. Also we need to regulate the fallIng speed of shapes, defIne operatIons of rotatIon and shIft of
shapes. |ovIng of shapes on the screen Is lImIted by the 0D| boundarIes, thIs requIrement must also
be modeled. 8esIdes that, fIlled rows of cubes must be destroyed and earned poInts must be counted.
Thus, thIs easy·to·understand game requIres the creatIon of several models · shape model, 0D|
model, shape movement model and so on. All these models are abstractIons, represented by
calculatIons In the computer. To descrIbe these models, the concept of Abstract 0ata Type, A0T (or
complex data type) Is used. StrIctly speakIng, the model of the ¨shapes¨ motIon In the 0D| Is not a
data type, but It Is the totalIty of operatIons wIth the ¨shape¨ data type, usIng the restrIctIons of the
¨0D|¨ data type.
Dbjects are class varIables. Dbject·orIented programmIng allows you to easIly create and use A0T.
Dbject·orIented programmIng uses the InherItance mechanIsm. The advance of the InherItance Is In
the fact that It allows obtaInIng derIvatIve types from data types already defIned by a user.
For example, to create TetrIs shapes, It's convenIent to create a base class Shape fIrst; the other
seven classes representIng all of the possIble shape types can be derIved on Its basIs. 8ehavIor of
shapes Is defIned In the base class, whIle ImplementatIon of behavIor of each separate shape Is
defIned In derIvatIve classes.
Ìn DDP objects are responsIble for theIr behavIor. A0T developer should Include a code to descrIbe any
behavIor that would normally be expected from the correspondIng objects. The fact that the object
Itself Is responsIble for Its behavIor, greatly sImplIfIes the task of programmIng for the user of thIs
object.
Ìf we want to draw a shape on the screen, we need to know where the center wIll be and how to draw
It. Ìf a separate shape Is well aware of how to draw Itself, the programmer should send a ¨draw¨
message when usIng such a shape.
The |0L5 Language Is a C++ lIke, and It also has the encapsulatIon mechanIsm for the
ImplementatIon of A0T. EncapsulatIon combInes, on the one hand, the Internal detaIls of the
ImplementatIon of a partIcular type and, on the other hand, externally accessIble functIons that can
Influence objects of thIs type. ÌmplementatIon detaIls may be InaccessIble for a program that uses thIs
Language Basics
© 2000·2010, |eta0uotes Software Corp.
158
type.
The concept of DDP has a set of related concepts, IncludIng the followIng:
SImulatIon of actIons from the real world
AvaIlabIlIty of user·defIned data types
HIdIng the ImplementatIon detaIls
PossIbIlIty of the code reuse through InherItance
ÌnterpretatIon of functIon calls durIng executIon
Some of these concepts are rather vague, some are abstract, others are of general character.
Language Basics
© 2000·2010, |eta0uotes Software Corp.
159
EncapsuIatIon and ExtensIbIIIty of Types
DDP Is a balanced approach to wrItIng software. 0ata and behavIor are packed together. ThIs
encapsulatIon creates user·defIned data types, extendIng the language data types and InteractIng wIth
them. Types extensIbIlIty Is an opportunIty to add to the language user·defIned data types, whIch are
also easy to use, as well as basIc types.
An abstract data type, for example, a strIng, Is a descrIptIon of the Ideal, well known behavIor type.
The strIng user knows that the strIng operatIons, such as concatenatIon or prInt, have a certaIn
behavIor. ConcatenatIon and prInt operatIons are called methods.
A certaIn ImplementatIon of A0T may have some restrIctIons, for example, strIngs can be lImIted In
length. These lImItatIons affect the behavIor opened to all. At the same tIme, Internal or prIvate
ImplementatIon detaIls do not affect dIrectly the way the user sees the object. For example, the strIng
Is often Implemented as an array, whIle the Internal base address of thIs array and Its name are not
essentIal for the user.
EncapsulatIon Is the abIlIty to hIde the ImplementatIon detaIls when the open Interfaces to user·
defIned type Is provIded. Ìn |0L5, as well as In C++, class and structure defInItIons (class and struct)
are used for the encapsulatIon provIsIons In combInatIon wIth access keywords prIvate, protected and
publIc.
The publIc keyword shows that access to the members that stand behInd It, Is open wIthout
restrIctIons. WIthout thIs keyword, class members are locked by default. PrIvate members are
accessIble only by member functIons only of Its class.
Protected class functIons are avaIlable to class functIons not only In Its class, but also In Its InherItor
classes. PublIc class functIons are avaIlable for any functIon wIthIn the scope of the class declaratIon.
The protectIon makes possIble to hIde part of the class ImplementatIon, thus preventIng unexpected
changes In the structure of data. Access restrIctIon or data hIdIng Is a feature of the object·orIented
programmIng.
Usually, class functIons are protected and declared wIth the protected modIfIer, the readIng and
wrItIng of the values are performed by usIng specIal so·called set·and get·methods that are defIned by
the publIcs access modIfIer.
ExampIe:
·L--- .--n-·n·

pn·r-·r-J.
-rnLnj m_n-m-¡ // n-m-
puoLL·.
v·LJ ¯-rH-m-.-rnLnj n·m_n-m-=n¡·// --r- n-m-
-rnLnj J-rH-m-.·n-runn .m_n-m-·¡· // n-runn- n-m-
·¡
ThIs approach offers several advantages. FIrst, by functIon name we can understand what It does ·
Language Basics
© 2000·2010, |eta0uotes Software Corp.
160
sets or gets the value of a class member. Secondly, perhaps In the future we wIll need to change the
type of the m_name CPerson varIable In the CPerson class or In any It's derIvatIve classes.
Ìn thIs case, we'll need just to change the ImplementatIon of functIons SetName() and CetName(),
whIle objects of the CPerson class wIll be avaIlable for usIng In a program wIthout any code changes
because the user wIll not even know that the data type of m_name has changed.
ExampIe:
-rnu·r H-m-

-rnLnj rLn-r_n-m-¡ // n-m-
-rnLnj L--r_n-m-¡ // L--r n-m-
·¡
·L--- .--n-·n

pn·r-·r-J.
H-m- m_n-m-¡ // n-m-
puoLL·.
v·LJ ¯-rH-m-.-rnLnj n·¡
-rnLnj J-rH-m-.·n-runn.m_n-m-.rLn-r_n-m--¨ ¨-m_n-m-.L--r_n-m-·¡·
pnLv-r-.
-rnLnj J-r¯Ln-rH-m-.-rnLnj ruLL_n-m-·¡
-rnLnj J-rH--rH-m-.-rnLnj ruLL_n-m-·¡
·¡
v·LJ .--n-·n..¯-rH-m-.-rnLnj n·

m_n-m-.rLn-r_n-m-=J-r¯Ln-rH-m-.n·¡
m_n-m-.L--r_n-m-=J-rH--rH-m-.n·¡
·
-rnLnj .--n-·n..J-r¯Ln-rH-m-.-rnLnj ruLL_n-m-·

Lnr p·-=¯rnLnj¯LnJ.ruLL_n-m-,¨ ¨·¡
Lr.p·-¨· ¯rnLnj¯-r.!-n-·r-n.ruLL_n-m-,p·-,¨·¡
n-runn.ruLL_n-m-·¡
·
-rnLnj .--n-·n..J-rH--rH-m-.-rnLnj ruLL_n-m-·

-rnLnj n-r_-rnLnj¡
Lnr p·-=¯rnLnj¯LnJ.ruLL_n-m-,¨ ¨·¡
Lr.p·-¨· n-r_-rnLnj=¯rnLnj¯uo-rn.ruLL_n-m-,p·--!·¡
-L-- n-r_-rnLnj=ruLL_n-m-¡
n-runn.n-r_-rnLnj·¡
·
See aIso
Language Basics
© 2000·2010, |eta0uotes Software Corp.
161
0ata Types
Language Basics
© 2000·2010, |eta0uotes Software Corp.
162
InherItance
The characterIstIc feature of DDP Is the encouragement of code reuse through InherItance. A new
class Is made from the exIstIng, whIch Is called the base class. The derIved class uses the members of
the base class, but can also modIfy and supplement them.
|any types are varIatIons of the exIstIng types. Ìt Is often tedIous to develop a new code for each of
them. Ìn addItIon, the new code ImplIes new errors. The derIved class InherIts the descrIptIon of the
base class, thus any re·development and re·testIng of code Is unnecessary. The InherItance
relatIonshIps are hIerarchIcal.
HIerarchy Is a method that allows to copy the elements In all theIr dIversIty and complexIty. Ìt
Introduces the objects classIfIcatIon. For example, the perIodIc table of elements has gases. They
possess to propertIes Inherent to all perIodIc elements.
Ìnert gases constItute the next Important subclass. The hIerarchy Is that the Inert gas, such as argon
Is a gas, and gas, In Its turn, Is part of the system. Such a hIerarchy allows to Interpret behavIour of
Inert gases easIly. We know that theIr atoms contaIn protons and electrons, that Is true for all other
elements.
We know that they are In a gaseous state at room temperature, lIke all the gases. We know that no
gas from Inert gas subclass enters usual chemIcal reactIon wIth other elements, and Its a property of
all Inert gases.
ConsIder an example of the InherItance of geometrIc shapes. To descrIbe the whole varIety of sImple
shapes (cIrcle, trIangle, rectangle, square etc.), the best way Is to create a base class (A0T), whIch Is
the ancestor of all the derIved classes.
Let's create a base class CShape, whIch contaIns just the most common members descrIbIng the
shape. These members descrIbe propertIes that are characterIstIc of any shape · the type of the shape
and maIn anchor poInt coordInates.
ExampIe:
//--- r!- o--- ·L--- ¯!-p-
·L--- .¯!-p-·

pn·r-·r-J.
Lnr m_ryp-¡ // ¯!-p- ryp-
Lnr m_xp·-¡ // x - ···nJLn-r- ·r r!- o--- p·Lnr
Lnr m_yp·-¡ // 1 - ···nJLn-r- ·r r!- o--- p·Lnr
puoLL·.
.¯!-p-.·m_ryp-=¨¡ m_xp·-=¨¡ m_yp·-=¨¡· // ··n-rnu·r·n
v·LJ ¯-rx-·-.Lnr x·m_xp·-=x¡· // --r x
v·LJ ¯-r1-·-.Lnr y·m_yp·-=y¡· // --r 1
·¡
Next, create new classes derIved from the base class, In whIch we wIll add necessary fIelds, each
specIfyIng a certaIn class. For the CIrcle shape It Is necessary to add a member that contaIns the
radIus value. The Square shape Is characterIzed by the sIde value. Therefore, derIved classes,
InherIted from the base class CShape wIll be declared as follows:
Language Basics
© 2000·2010, |eta0uotes Software Corp.
163
//--- r!- J-nLv-J ·L--- ·Ln·L-
·L--- ..Ln·L-· . puoLL· .¯!-p- // Arr-n - ··L·n .- J-rLn- r!- o--- ·L---
// rn·m .!L·! Ln!-nLr-n·- L- m-J-
pnLv-r-.
Lnr m_n-JLu-¡ // ·Ln·L- n-JLu-
puoLL·.
..Ln·L-.·m_ryp-=!¡·// ··n-rnu·r·n, ryp- !
·¡
For the Square shape class declaratIon Is sImIlar:
//--- r!- J-nLv-J ·L--- ¯¬u-n-
·L--- .¯¬u-n-· . puoLL· .¯!-p- // Arr-n - ··L·n .- J-rLn- r!- o--- ·L---
// rn·m .!L·! Ln!-nLr-n·- L- m-J-
pnLv-r-.
Lnr m_-¬u-n-_-LJ-¡ // -¬u-n- -LJ-
puoLL·.
.¯¬u-n-.·m_ryp-=`¡· // ··n-rnu·r·n, ryp- `
·¡
Ìt should be noted that whIle object Is created the base class constructor Is called fIrst, and then the
constructor of the derIved class Is called. When an object Is destroyed fIrst the destructor of the
derIved class Is called, and then a base class destructor Is called.
Thus, by declarIng the most general members In the base class, we can add an addItIonal members In
derIved classes, whIch specIfy a partIcular class. ÌnherItance allows creatIng powerful code lIbrarIes
that can be reused many tImes.
The syntax for creatIng a derIved class from an already exIstIng on Is as follows:
·L--- ·L---_n-m- .
.puoLL· pn·r-·r-J pnLv-r-·
.p:
o---_·L---_n-m-

·L--- m-mo-n- J-·L-n-rL·n
·¡
Dne of aspects of the derIved class Is the vIsIbIlIty (openness) of Its members, successors (heIrs). The
publIc, protected and prIvate keywords are used to IndIcate the extent, to whIch members of the
base class wIll be avaIlable for the derIved one. The publIc keyword after a colon In the header of a
derIved class IndIcates that the protected and publIc members of the base class CShape should be
InherIted as protected and publIc members of the derIved class CCIrcle.
The prIvate class members of the base class are not avaIlable for the derIved class. The publIc
InherItance also means that derIved classes (CCIrcle and CSquare) are CShapes. That Is, the Square
(CSquare) Is a shape (CShape), but the shape does not necessarIly have to be a square.
The derIved class Is a modIfIcatIon of the base class, It InherIts the protected and publIc members of
the base class. The constructors and destructors of the base class cannot be InherIted. Ìn addItIon to
Language Basics
© 2000·2010, |eta0uotes Software Corp.
164
members of the base class, new members are added In a derIvatIve class.
The derIved class may Include the ImplementatIon of member functIons, dIfferent from the base class.
Ìt has nothIng common wIth an overload, when the meanIng of the same functIon name may be
dIfferent for dIfferent sIgnatures.
Ìn protected InherItance, publIc and protected members of base class become protected members of
derIved class. Ìn prIvate InherItance, the publIc and protected members of base class become prIvate
members of the derIved class.
Ìn protected and prIvate InherItance, the relatIon that ¨the object of a derIvatIve class Is object of a
base class¨ Is not true. The protected and prIvate InherItance types are rare, and each of them needs
to be used carefully.
|0L5 has no multIple InherItance.
See aIso
Structures and Classes
Language Basics
© 2000·2010, |eta0uotes Software Corp.
165
PoIymorphIsm
PolymorphIsm Is an opportunIty for dIfferent classes of objects, related through InherItance, to
respond In varIous ways when callIng the same functIon element. Ìt helps to create a unIversal
mechanIsm descrIbIng the behavIor of not only the base class, but also descendant classes.
Let's contInue to develop a base class CShape, and defIne a member functIon CetArea(), desIgned to
calculate the area of a shape. Ìn all the descendant classes, produced by InherItance from the base
class, we re·defIne thIs functIon In accordance wIth rules of calculatIng the area of a partIcular shape.
For a square (class CSquare), the area Is calculated through Its sIdes, for a cIrcle (class CCIrcle), area
Is expressed through Its radIus etc. We can create an array to store objects of CShape type, In whIch
both objects of a base class and those of all descendant classes can be stored. Further we can call the
same functIon for each element of the array.
ExampIe:
//--- Ð--- ·L---
·L--- .¯!-p-·¡

pn·r-·r-J.
Lnr m_ryp-¡ // ¯!-p- ryp-
Lnr m_xp·-¡ // x - ···nJLn-r- ·r r!- o--- p·Lnr
Lnr m_yp·-¡ // 1 - ···nJLn-r- ·r r!- o--- p·Lnr
puoLL·.
v·LJ .¯!-p-.·m_ryp-=¨¡·¡ // ··n-rnu·r·n, ryp-=¨
Lnr J-rryp-.·n-runn.m_ryp-·¡·¡// n-runn- ryp- ·r r!- -!-p-
vLnru-L
J·uoL- J-rAn--.·n-runn .¨·¡ ·// n-runn- -n-- ·r r!- -!-p-
·¡
Now, all of the derIved classes have a member functIon getArea(), whIch returns a zero value. The
ImplementatIon of thIs functIon In each descendant wIll vary.
//--- r!- J-nLv-J ·L--- .Ln·L-
·L--- ..Ln·L-· . puoLL· .¯!-p- // Arr-n - ··L·n .- J-rLn- r!- o--- ·L---
// rn·m .!L·! Ln!-nLr-n·- L- m-J-
pnLv-r-.
Lnr m_n-JLu-¡ // ·Ln·L- n-JLu-
puoLL·.
v·LJ ..Ln·L-.·m_ryp-=!¡·¡ // ··n-rnu·r·n, ryp-=!
v·LJ ¯-r--JLu-.J·uoL- n·m_n-JLu-=n¡·¡
vLnru-L J·uoL- J-rAn--.·n-runn .`.!1·m_n-JLu-·m_n-JLu-·¡·// ·Ln·L- -n--
·¡
For the class Square the declaratIon Is the same:
//--- r!- J-nLv-J ·L--- ¯¬u-n-
·L--- .¯¬u-n-· . puoLL· .¯!-p- // Arr-n - ··L·n .- J-rLn- r!- o--- ·L---
// rn·m .!L·! Ln!-nLr-n·- L- m-J-
Language Basics
© 2000·2010, |eta0uotes Software Corp.
166
pnLv-r-.
Lnr m_-¬u-n-_-LJ-¡ // -¬u-n- -LJ-
puoLL·.
v·LJ .¯¬u-n-.·m_ryp-=`¡·¡ // ··n-rnu·r·n, ryp-=!
v·LJ ¯-r¯LJ-.J·uoL- -·m_-¬u-n-_-LJ-=-¡·¡
vLnru-L J·uoL- J-rAn--.·n-runn .m_-¬u-n-_-LJ-·m_-¬u-n-_-LJ-·¡·// -¬u-n- -n--
·¡
For calculatIng the area of the square and cIrcle, we need the correspondIng values of m_radIus and
m_square_sIde, so we have added the functIons SetFadIus and SetSIde() In the declaratIon of the
correspondIng class. Now we can declare an array of the Shap typee and fIll It wIth objects of derIved
classes:
.¯!-p-¯!¨` -!-p--¡ // -nn-y ·r .¯!-p- ·o|-·r-
//... !-n- .- rLLL -nn-y oy J-nLv-J ·o|-·r-
r·n .Lnr L=¨¡ L<!¨¡L--·

//--- ryp- -nJ -n-- ·r r!- -!-p-
-nLnr.¨Jo|-·r ryp- ¨--!-p--¯L`.J-rryp-.·-¨ !-- -n -n-- ¨- -!-p--¯L`.J-rAn--.··¡
·¡
8ut besIdes the redefInIng of functIons durIng InherItance, polymorphIsm also Includes the
ImplementatIon of one and the same functIons wIth dIfferent sets of parameters wIthIn a class. ThIs
means that the class may have several functIons wIth the same name but wIth a dIfferent type and/or
set of parameters. Ìn thIs case, polymorphIsm Is Implemented through the functIon overload.
See aIso
Standard LIbrary
Language Basics
© 2000·2010, |eta0uotes Software Corp.
167
DverIoad
WIthIn one class It Is possIble to defIne two or more methods that use the same name, but have
dIfferent numbers of parameters. When thIs occurs, methods are called overlocded and such a process
Is referred to as method overlocdìn¤.
|ethod overloadIng Is one of ways of polymorthIsm realIzatIon. DverloadIng of methods Is performed
accordIng to the same rules as the functIon overloadIng.
Ìf the called functIon has no exact match, the compIler searches for a suItable functIon on three levels
sequentIally:
1.
search wIthIn class methods;
2.
search wIthIn the base class methods, consIstently from the nearest ancestor to the very fIrst.
J.
search among other functIons.
Ìf there Is no exact correspondence at all levels, but several suItable functIons at dIfferent levels have
been found, the functIon found at the least level Is used. WIthIn one level, there can't be more than
one suItable functIon.
|0L5 has no operator overloadIng.
See aIso
FeloadIng FunctIons
Language Basics
© 2000·2010, |eta0uotes Software Corp.
168
VIrtuaI FunctIons
The vIrtual keyword Is the functIon specIfIer, whIch provIdes a mechanIsm to select dynamIcally at
runtIme an approprIate functIon·member among the functIons of basIc and derIved classes. Structures
cannot have vIrtual functIons. Ìt can be used to change the declaratIons for functIon·members only.
The vIrtual functIon, lIke an ordInary functIon, must have an executable body. When called, Its
semantIc Is the same as that of other functIons.
A vIrtual functIon may be overrIdden In a derIved class. The choIce of what functIon defInItIon should
be called for a vIrtual functIon Is made dynamIcally (at runtIme). A typIcal case Is when a base class
contaIns a vIrtual functIon, and derIved classes have theIr own versIons of thIs functIon.
The poInter to the base class can IndIcate eIther a base class object or the object of a derIved class.
The choIce of the member·functIon to call wIll be performed at runtIme and wIll depend on the type of
the object, not the type of the poInter. Ìf there Is no member of a derIved type, the vIrtual functIon of
the base class Is used by default.
0estructors are always vIrtual, regardless of whether they are declared wIth the vIrtual keyword or
not.
Let's consIder the use of vIrtual functIons on the example of |T5_TetrIs.mq5. The base class
CTetrIsShape wIth the vIrtual functIon 0raw Is defIned In the Included fIle |T5_TetIsShape.mqh.
//--------------------------------------------------------------------
·L--- .r-rnL-¯!-p-

pn·r-·r-J.
Lnr m_ryp-¡
Lnr m_xp·-¡
Lnr m_yp·-¡
Lnr m_x-Lz-¡
Lnr m_y-Lz-¡
Lnr m_pn-v_runn¡
Lnr m_runn¡
Lnr m_nLj!r_o·nJ-n¡
puoLL·.
v·LJ .r-rnL-¯!-p-.·¡
v·LJ ¯-r-Lj!rзnJ-n.Lnr o·nJ-n· m_nLj!r_o·nJ-n=o·nJ-n¡ ·
v·LJ ¯-r1-·-.Lnr yp·-· m_yp·-=yp·-¡ ·
v·LJ ¯-rx-·-.Lnr xp·-· m_xp·-=xp·-¡ ·
Lnr J-r1-·-.· n-runn.m_yp·-·¡ ·
Lnr J-rx-·-.· n-runn.m_xp·-·¡ ·
Lnr J-r1¯Lz-.· n-runn.m_y-Lz-·¡ ·
Lnr J-rx¯Lz-.· n-runn.m_x-Lz-·¡ ·
Lnr J-rryp-.· n-runn.m_ryp-·¡ ·
v·LJ H-rr.· m_xp·--=¯|A-I_¯P¯I¡ ·
v·LJ -Lj!r.· m_xp·--=¯|A-I_¯P¯I¡ ·
v·LJ -·r-r-.· m_pn-v_runn=m_runn¡ Lr.--m_runn`· m_runn=¨¡ ·
Language Basics
© 2000·2010, |eta0uotes Software Corp.
169
vLnru-L v·LJ ¯n-..· n-runn¡ ·
vLnru-L o··L .!-·k¯·.n.Lnrs p-J_-nn-y¯`·¡
vLnru-L o··L .!-·kH-rr.Lnrs -LJ-_n·.¯`·¡
vLnru-L o··L .!-·k-Lj!r.Lnrs -LJ-_n·.¯`·¡
·¡
Further, for each derIved class, thIs functIon Is Implemented In accordance wIth characterIstIcs of a
descendant class. For example, the fIrst shape CTetrIsShape1 has Its own ImplementatIon of the 0raw
() functIon:
·L--- .r-rnL-¯!-p-! . puoLL· .r-rnL-¯!-p-

puoLL·.
//--- -!-p- Jn-.Lnj
vLnru-L v·LJ ¯n-..·

Lnr L¡
-rnLnj n-m-¡
//---
Lr.m_runn==¨ m_runn==`·

//--- !·nLz·nr-L
r·n.L=¨¡ L<1¡ L--·

n-m-=¯|A-I_HAMI-.-rnLnj·L¡
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_x¯P¯rAH.I,m_xp·--L·¯|A-I_¯P¯I·¡
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_1¯P¯rAH.I,m_yp·-·¡
·
·
-L--

//--- v-nrL·-L
r·n.L=¨¡ L<1¡ L--·

n-m-=¯|A-I_HAMI-.-rnLnj·L¡
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_x¯P¯rAH.I,m_xp·-·¡
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_1¯P¯rAH.I,m_yp·--L·¯|A-I_¯P¯I·¡
·
·
·
·
The Square shape Is descrIbed by class CTetrIsShape6 and has Its own ImplementatIon of the 0raw()
method:
·L--- .r-rnL-¯!-p-¯ . puoLL· .r-rnL-¯!-p-

puoLL·.
//--- ¯!-p- Jn-.Lnj
vLnru-L v·LJ ¯n-..·
Language Basics
© 2000·2010, |eta0uotes Software Corp.
170

Lnr L¡
-rnLnj n-m-¡
//---
r·n.L=¨¡ L<`¡ L--·

n-m-=¯|A-I_HAMI-.-rnLnj·L¡
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_x¯P¯rAH.I,m_xp·--L·¯|A-I_¯P¯I·¡
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_1¯P¯rAH.I,m_yp·-·¡
·
r·n.L=`¡ L<1¡ L--·

n-m-=¯|A-I_HAMI-.-rnLnj·L¡
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_x¯P¯rAH.I,m_xp·--.L-`··¯|A-I_¯P¯I·¡
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_1¯P¯rAH.I,m_yp·--¯|A-I_¯P¯I·¡
·
·
·¡
0ependIng on the class, to whIch the created object belongs, It calls the vIrtual functIon of thIs or that
derIved class.
v·LJ .r-rnL-¯L-LJ..H-.¯!-p-.·

//--- ·n--rLnj ·n- ·r r!- ¯ p·--LoL- -!-p-- n-nJ·mLy
Lnr n-!-p-=n-nJ.·`¯¡
-.Lr·!.n-!-p-·

·--- ¨. m_-!-p-=n-. .r-rnL-¯!-p-!¡ on--k¡
·--- !. m_-!-p-=n-. .r-rnL-¯!-p-`¡ on--k¡
·--- `. m_-!-p-=n-. .r-rnL-¯!-p-`¡ on--k¡
·--- `. m_-!-p-=n-. .r-rnL-¯!-p-1¡ on--k¡
·--- 1. m_-!-p-=n-. .r-rnL-¯!-p-¯¡ on--k¡
·--- ¯. m_-!-p-=n-. .r-rnL-¯!-p-¯¡ on--k¡
·--- ¯. m_-!-p-=n-. .r-rnL-¯!-p-¯¡ on--k¡
·
//--- Jn-.
m_-!-p-.¯n-..·¡
//---
·
See aIso
Standard LIbrary
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
171
Standard Constants, EnumeratIons and Structures
To sImplIfy the program wrItIng and to make program texts more convenIent for perceptIon, the |0L5
language provIdes predefIned standard constants and enumeratIons. 8esIdes that, servIce structures
are used for storIng InformatIon.
Standard constants are sImIlar to macros and are of Int type.
The constants are grouped by theIr purposes:
Chart constants are used when workIng wIth prIce charts: openIng, navIgatIon, settIng parameters;
Dbjects constants are Intended for processIng graphIcal objects that can be created and dIsplayed In
charts;
ÌndIcators constants are used for workIng wIth standard and custom IndIcators;
EnvIronment state descrIbe propertIes of a mql5·program, show InformatIon about a clIent termInal,
securIty and current account;
Trade constants allow to specIfy a varIety of InformatIon In the course of tradIng;
Named constants are constants of the |0L5 language;
0ata structures descrIbe data storage formats used;
Codes of errors and warnIngs descrIbe compIler messages and tradIng server answers to trade
requests;
Ìn/out constants are desIgned for workIng wIth fIle functIons and dIsplayIng messages on the screen
by the |essage8ox() functIon.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
172
Chart Constants
Constants descrIbIng varIous propertIes of charts are dIvIded Into the followIng groups:
Types of events - events that occur when workIng wIth charts;
Chart tImeframes - standard buIlt·In perIods;
PropertIes of chart - IdentIfIers that are used as parameters of chart functIons;
PosItIonIng constants · value of a parameter of the ChartNavIgate() functIon;
0IsplayIng charts · settIng the chart appearance.

Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
173
Types of Chart Events
There are 9 types of events that can be processed usIng the predefIned functIon DnChartEvent(). For
custom events 655J6 IdentIfIers are provIded In the range of CHAFTE7ENT_CUSTD| to
CHAFTE7ENT_CUSTD|_LAST InclusIve. To generate a custom event, the EventChartCustom() functIon
should be used.
ENUh_CHAPT_EVENT
I0 0escrIptIon
CHAFTE7ENT_KEY0DWN Keystrokes
CHAFTE7ENT_D8JECT_CFEATE CraphIcal object created
CHAFTE7ENT_D8JECT_CHANCE CraphIcal object property changed vIa the
propertIes dIalog
CHAFTE7ENT_D8JECT_0ELETE CraphIcal object deleted
CHAFTE7ENT_CLÌCK ClIckIng on a chart
CHAFTE7ENT_D8JECT_CLÌCK ClIckIng on a graphIcal object
CHAFTE7ENT_D8JECT_0FAC 0rag and drop of a graphIcal object
CHAFTE7ENT_D8JECT_EN0E0ÌT End of text edItIng In the graphIcal object EdIt
CHAFTE7ENT_CUSTD| ÌnItIal number of an event from a range of
custom events
CHAFTE7ENT_CUSTD|_LAST The fInal number of an event from a range of
custom events
For each type of event, the Input parameters of the DnChartEvent() functIon have defInIte values that
are requIred for the processIng of thIs event. The events and values passed through thIs parameters
are lIsted In the below table.
Event VaIue of the Id
parameter
VaIue of the
Iparam
parameter
VaIue of the
dparam
parameter
VaIue of the
sparam
parameter
Event of a
keystroke
CHAFTE7ENT_KE
Y0DWN
code of a
pressed key
· ·
event of
graphIcal object
creatIon
CHAFTE7ENT_D8
JECT_CFEATE
· · Name of the
created graphIcal
object
Event of change
of an object
property vIa the
propertIes dIalog
CHAFTE7ENT_D8
JECT_CHANCE
· · Name of the
modIfIed
graphIcal object
Event of CHAFTE7ENT_D8 · · Name of the
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
174
graphIcal object
deletIon
JECT_0ELETE deleted graphIcal
object
Event of a
mouse clIck on
the chart
CHAFTE7ENT_C
LÌCK
the X coordInate the Y coordInate ·
Event of a
mouse clIck In a
graphIcal object
belongIng to the
chart
CHAFTE7ENT_D8
JECT_CLÌCK
the X coordInate the Y coordInate Name of the
graphIcal object,
on whIch the
event occurred
Event of a
graphIcal object
draggIng usIng
the mouse
CHAFTE7ENT_D8
JECT_0FAC
· · Name of the
moved graphIcal
object
Event of the
fInIshed text
edItIng In the
entry box of the
LabelEdIt
graphIcal object
CHAFTE7ENT_D8
JECT_EN0E0ÌT
· · Name of the
LabelEdIt
graphIcal object,
In whIch text
edItIng has
completed
Ì0 of the user
event under the
N number
CHAFTE7ENT_CU
STD|+N
7alue set by the
EventChartCusto
m() fubctIon
7alue set by the
EventChartCusto
m() functIon
7alue set by the
EventChartCusto
m() functIon
ExampIe:
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
175
tJ-rLn- ·I1_HJM-A¯_¯ !`
tJ-rLn- ·I1_HI¯r `¯
tJ-rLn- ·I1_J- `-
tJ-rLn- ·I1_-PJ|r `-
tJ-rLn- ·I1_¯JWH 1¨
tJ-rLn- ·I1_HJMHJ.·_¯JWH --
tJ-rLn- ·I1_HJMHJ.·_HI¯r !¨¨
tJ-rLn- ·I1_HJMHJ.·_¯ !¨!
tJ-rLn- ·I1_HJMHJ.·_-PJ|r !¨`
tJ-rLn- ·I1_HJMHJ.·_J- !¨1
//--------------------------------------------------------------------
// Ixp-nr LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr JnPnLr.·

//---
-nLnr.¨r!- -xp-nr .Lr! n-m- ¨,M,H¯Pnr·¯rnLnj.M,H¯_--JJ-AM_HAMI·,¨ L- nunnLnj¨·¡
//---
n-runn.¨·¡
·
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
v·LJ Jn.!-nrIv-nr.··n-r Lnr LJ, // Iv-nr LJ-nrLrL-n
··n-r L·njs Lp-n-m, // Iv-nr p-n-m-r-n ·r L·nj ryp-
··n-r J·uoL-s Jp-n-m, // Iv-nr p-n-m-r-n ·r J·uoL- ryp-
··n-r -rnLnjs -p-n-m // Iv-nr p-n-m-r-n ·r -rnLnj ryp-
·

//--- r!- L-rr m·u-- ourr·n !-- o--n pn----J ·n r!- ·!-nr
Lr.LJ==.|A-rIVIHr_.HP.··

-nLnr.¨r!- ···nJLn-r-- ·r r!- m·u-- ·LL·k ·n r!- ·!-nr -n-. x = ¨,Lp-n-m,¨ y = ¨,Jp-n-m·¡
·
//--- r!- m·u-- !-- o--n ·LL·k-J ·n r!- jn-p!L· ·o|-·r
Lr.LJ==.|A-rIVIHr_JЯI.r_.HP.··

-nLnr.¨r!- m·u-- !-- o--n ·LL·k-J ·n r!- ·o|-·r .Lr! n-m- '¨--p-n-m-¨'¨·¡
·
//--- r!- k-y !-- o--n pn----J
Lr.LJ==.|A-rIVIHr_·I1¯JWH·

-.Lr·!.Lp-n-m·

·--- ·I1_HJMHJ.·_HI¯r. -nLnr.¨r!- ·I1_HJMHJ.·_HI¯r !-- o--n pn----J¨·¡ on--k¡
·--- ·I1_HI¯r. -nLnr.¨r!- ·I1_HI¯r !-- o--n pn----J¨·¡ on--k¡
·--- ·I1_HJMHJ.·_J-. -nLnr.¨r!- ·I1_HJMHJ.·_J- !-- o--n pn----J¨·¡ on--k¡
·--- ·I1_J-. -nLnr.¨r!- ·I1_J- !-- o--n pn----J¨·¡ on--k¡
·--- ·I1_HJMHJ.·_-PJ|r. -nLnr.¨r!- ·I1_HJMHJ.·_-PJ|r !-- o--n pn----J¨·¡ on--k¡
·--- ·I1_-PJ|r. -nLnr.¨r!- ·I1_-PJ|r !-- o--n pn----J¨·¡ on--k¡
·--- ·I1_HJMHJ.·_¯JWH. -nLnr.¨r!- ·I1_HJMHJ.·_¯JWH !-- o--n pn----J¨·¡ on--k¡
·--- ·I1_¯JWH. -nLnr.¨r!- ·I1_¯JWH !-- o--n pn----J¨·¡ on--k¡
·--- ·I1_HJM-A¯_¯. -nLnr.¨r!- ·I1_HJM-A¯_¯ !-- o--n pn----J¨·¡ on--k¡
·--- ·I1_HJMHJ.·_¯. -nLnr.¨r!- ·I1_HJMHJ.·_¯ !-- o--n pn----J¨·¡ on--k¡
J-r-uLr. -nLnr.¨¯·m- n·r LL-r-J k-y !-- o--n pn----J¨·¡
·
.!-nr--Jn-..·¡
·
//--- r!- ·o|-·r !-- o--n J-L-r-J
Lr.LJ==.|A-rIVIHr_JЯI.r_¯IHIrI·

Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
176
-nLnr.¨r!- ·o|-·r .Lr! n-m- ¨,-p-n-m,¨ !-- o--n J-L-r-J¨·¡
·
//--- r!- ·o|-·r !-- o--n ·n--r-J
Lr.LJ==.|A-rIVIHr_JЯI.r_.-IArI·

-nLnr.¨r!- ·o|-·r .Lr! n-m- ¨,-p-n-m,¨ !-- o--n ·n--r-J¨·¡
·
//--- r!- ·o|-·r !-- o--n m·v-J ·n Lr- -n·!·n p·Lnr ···nJLn-r-- !-- o--n ·!-nj-J
Lr.LJ==.|A-rIVIHr_JЯI.r_¯-AJ·

-nLnr.¨r!- -n·!·n p·Lnr ···nJLn-r-- ·r r!- ·o|-·r .Lr! n-m- ¨,-p-n-m,¨ !-- o--n ·!-nj-J¨·¡
·
//--- r!- r-xr Ln r!- IJLr ·r ·o|-·r !-- o--n ·!-nj-J
Lr.LJ==.|A-rIVIHr_JЯI.r_IH¯I¯Pr·

-nLnr.¨r!- r-xr Ln r!- IJLr rL-LJ ·r r!- ·o|-·r .Lr! n-m- ¨,-p-n-m,¨ !-- o--n ·!-nj-J¨·¡
·
·
See aIso
Event HandlIng FunctIons, WorkIng wIth events
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
177
Chart TImeframes
All predefIned tImeframes of charts have unIque IdentIfIers. The PEFÌD0_CUFFENT IdentIfIer means
the current perIod of a chart, at whIch a mql5·program Is runnIng.
ENUh_TIhEFPAhES
I0 0escrIptIon
PEFÌD0_CUFFENT Current tImeframe
PEFÌD0_|1 1 mInute
PEFÌD0_|2 2 mInutes
PEFÌD0_|J J mInutes
PEFÌD0_|4 4 mInutes
PEFÌD0_|5 5 mInutes
PEFÌD0_|6 6 mInutes
PEFÌD0_|10 10 mInutes
PEFÌD0_|12 12 mInutes
PEFÌD0_|15 15 mInutes
PEFÌD0_|20 20 mInutes
PEFÌD0_|J0 J0 mInutes
PEFÌD0_H1 1 hour
PEFÌD0_H2 2 hours
PEFÌD0_HJ J hours
PEFÌD0_H4 4 hours
PEFÌD0_H6 6 hours
PEFÌD0_H8 8 hours
PEFÌD0_H12 12 hours
PEFÌD0_01 1 day
PEFÌD0_W1 1 week
PEFÌD0_|N1 1 month
ExampIe:
-rnLnj ·!-nr_n-m-=¨r--r_Jo|-·r_.!-nr¨¡
-nLnr.¨H-r'- rny r· ·n--r- - .!-nr ·o|-·r .Lr! r!- n-m- ¨,·!-nr_n-m-·¡
//--- Pr -u·! -n ·o|-·r J·-- n·r -xL-r - ·n--r- Lr
Lr.Jo|-·r¯LnJ.¨,·!-nr_n-m-·<¨·Jo|-·r.n--r-.¨,·!-nr_n-m-,JЯ_.|A-r,¨,¨,¨,¨,¨·¡
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
178
//--- ¯-rLn- -ymo·L
Jo|-·r¯-r¯rnLnj.¨,·!-nr_n-m-,JЯ--J-_¯1MÐJH,¨IJ-J¯¯¨·¡
//--- ¯-r x ···nJLn-r- ·r r!- -n·!·n p·Lnr
Jo|-·r¯-rPnr-j-n.¨,·!-nr_n-m-,JЯ--J-_x¯P¯rAH.I,!¨¨·¡
//--- ¯-r 1 ···nJLn-r- ·r r!- -n·!·n p·Lnr
Jo|-·r¯-rPnr-j-n.¨,·!-nr_n-m-,JЯ--J-_1¯P¯rAH.I,!¨¨·¡
//--- ¯-r r!- .LJr! ·r ·!-nr
Jo|-·r¯-rPnr-j-n.¨,·!-nr_n-m-,JЯ--J-_x¯P¯I,1¨¨·¡
//--- ¯-r r!- !-Lj!r
Jo|-·r¯-rPnr-j-n.¨,·!-nr_n-m-,JЯ--J-_1¯P¯I,`¨¨·¡
//--- ¯-r r!- rLm-rn-m-
Jo|-·r¯-rPnr-j-n.¨,·!-nr_n-m-,JЯ--J-_-I-PJ¯,-I-PJ¯_¯!·¡
//--- ¯-r -·-L- .rn·m ¨ r· ¯·
Jo|-·r¯-rPnr-j-n.¨,·!-nr_n-m-,JЯ--J-_¯.AHI,1·¡
//--- ¯L--oL- --L-·rL·n oy - m·u--
Jo|-·r¯-rPnr-j-n.¨,·!-nr_n-m-,JЯ--J-_¯IHI.rAÐHI,r-L--·¡
See aIso
PerIodSeconds, PerIod, 0ate and TIme, 7IsIbIlIty of objects
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
179
Chart PropertIes
ÌdentIfIers of ENU|_CHAFT_PFDPEFTY enumeratIons are used as parameters of functIons for workIng
wIth charts. The abbrevIatIon of r/o In the ¨Type property¨ column means that thIs property Is read·
only and can not be changed. When accessIng certaIn propertIes, It's necessary to specIfy an addItIonal
parameter·modIfIer (modIfIer), whIch serves to IndIcate the number of chart subwIndows. 0 means
the maIn wIndow.
For functIons ChartSetÌnteger() and ChartCetÌnteger()
ENUh_CHAPT_PPDPEPTY_INTECEP
I0 0escrIptIon Property Type
CHAFT_|D0E Chart type (candlestIcks, bars
or lIne)
enum ENU|_CHAFT_|D0E
CHAFT_FDFECFDUN0 PrIce chart In the background bool
CHAFT_SHÌFT |ode of prIce chart Indent
from the rIght border
bool
CHAFT_AUTDSCFDLL |ode of automatIc movIng to
the rIght border of the chart
bool
CHAFT_SCALE Scale Int from 0 to 5
CHAFT_SCALEFÌX FIxed scale mode bool
CHAFT_SCALEFÌX_11 Scale 1:1 mode bool
CHAFT_SCALE_PT_PEF_8AF Scale to be specIfIed In poInts
per bar
bool
CHAFT_SHDW_DHLC Show DHLC values In the upper
left corner
bool
CHAFT_SHDW_8Ì0_LÌNE 0Isplay 8Id values as a
horIzontal lIne In a chart
bool
CHAFT_SHDW_ASK_LÌNE 0Isplay Ask values as a
horIzontal lIne In a chart
bool
CHAFT_SHDW_LAST_LÌNE 0Isplay Last values as a
horIzontal lIne In a chart
bool
CHAFT_SHDW_PEFÌD0_SEP 0Isplay vertIcal separators
between adjacent perIods
bool
CHAFT_SHDW_CFÌ0 0Isplay grId In the chart bool
CHAFT_SHDW_7DLU|ES 0Isplay volume In the chart enum
ENU|_CHAFT_7DLU|E_|D0E
CHAFT_SHDW_D8JECT_0ESCF Pop·up descrIptIons of
graphIcal objects
bool
CHAFT_7ÌSÌ8LE_8AFS The number of bars on the Int r/o
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
180
chart that can be dIsplayed
CHAFT_WÌN0DWS_TDTAL The total number of chart
wIndows, IncludIng IndIcator
subwIndows
Int r/o
CHAFT_WÌN0DW_ÌS_7ÌSÌ8LE 7IsIbIlIty of subwIndows bool r/o modIfIer · subwIndow
number
CHAFT_WÌN0DW_HAN0LE Chart wIndow handle (HWN0) Int r/o
CHAFT_FÌFST_7ÌSÌ8LE_8AF Number of the fIrst vIsIble bar
In the chart. ÌndexIng of bars
Is the same as for tImeserIes.
Int r/o
CHAFT_WÌ0TH_ÌN_8AFS Chart wIdth In bars Int r/o
CHAFT_WÌ0TH_ÌN_PÌXELS Chart wIdth In pIxels Int r/o
CHAFT_HEÌCHT_ÌN_PÌXELS Chart heIght In pIxels Int r/o modIfIer ·
subwIndow number
CHAFT_CDLDF_8ACKCFDUN0 Chart background color color
CHAFT_CDLDF_FDFECFDUN0 Color of axes, scales and DHLC
lIne
color
CHAFT_CDLDF_CFÌ0 CrId color color
CHAFT_CDLDF_7DLU|E Color of volumes and posItIon
openIng levels
color
CHAFT_CDLDF_CHAFT_UP Color for the up bar, shadows
and body borders of bull
candlestIcks
color
CHAFT_CDLDF_CHAFT_0DWN Color for the down bar,
shadows and body borders of
bear candlestIcks
color
CHAFT_CDLDF_CHAFT_LÌNE LIne chart color and color of
Japanese candlestIcks 0odge
color
CHAFT_CDLDF_CAN0LE_8ULL 8ody color of a bull candlestIck color
CHAFT_CDLDF_CAN0LE_8EAF 8ody color of a bear candlestIck color
CHAFT_CDLDF_8Ì0 8Id prIce level color color
CHAFT_CDLDF_ASK Ask prIce level color color
CHAFT_CDLDF_LAST LIne color of the last executed
deal prIce (Last)
color
CHAFT_CDLDF_STDP_LE7EL Color of stop order levels (Stop
Loss and Take ProfIt)
color
CHAFT_SHDW_TFA0E_LE7ELS 0IsplayIng trade levels In the
chart (levels of open posItIons,
bool
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
181
Stop Loss, Take ProfIt and
pendIng orders)
For functIons ChartSet0ouble() and ChartCet0ouble()
ENUh_CHAPT_PPDPEPTY_0DUßLE
I0 0escrIptIon Property Type
CHAFT_SHÌFT_SÌZE The sIze of the zero bar Indent
from the rIght border In
percents
double (from 10 to 50
percents)
CHAFT_FÌXE0_|AX FIxed chart maxImum double
CHAFT_FÌXE0_|ÌN FIxed chart mInImum double
CHAFT_PDÌNTS_PEF_8AF Scale In poInts per bar double
CHAFT_PFÌCE_|ÌN Chart maxImum double r/o modIfIer ·
subwIndow number
CHAFT_PFÌCE_|AX Chart mInImum double r/o modIfIer ·
subwIndow number
For functIons ChartSetStrIng() and ChartCetStrIng()
ENUh_CHAPT_PPDPEPTY_STPINC
I0 0escrIptIon Property Type
CHAFT_CD||ENT Text of a comment In a chart strIng
ExampIe:
Lnr ·!-nrM·J-=.!-nrJ-rPnr-j-n.¨,.|A-r_MJ¯I·¡
-.Lr·!.·!-nrM·J-·

·---..|A-r_ÐA-¯·. -nLnr.¨.|A-r_ÐA-¯¨·¡ on--k¡
·---..|A-r_.AH¯HI¯·. -nLnr.¨.|A-r_.AH¯HI¯¨·¡on--k¡
J-r-uLr.-nLnr.¨.|A-r_HPHI¨·¡
·
o··L -!Lrr-J=.!-nrJ-rPnr-j-n.¨,.|A-r_¯|P¯r·¡
Lr.-!Lrr-J· -nLnr.¨.|A-r_¯|P¯r = rnu-¨·¡
-L-- -nLnr.¨.|A-r_¯|P¯r = r-L--¨·¡
o··L -ur·-·n·LL=.!-nrJ-rPnr-j-n.¨,.|A-r_AJrJ¯.-JHH·¡
Lr.-ur·-·n·LL· -nLnr.¨.|A-r_AJrJ¯.-JHH = rnu-¨·¡
-L-- -nLnr.¨.|A-r_AJrJ¯.-JHH = r-L--¨·¡
Lnr ·!-nr|-nJL-=.!-nrJ-rPnr-j-n.¨,.|A-r_WPH¯JW_|AH¯HI·¡
-nLnr.¨.|A-r_WPH¯JW_|AH¯HI = ¨,·!-nr|-nJL-·¡
Lnr .LnJ·.-=.!-nrJ-rPnr-j-n.¨,.|A-r_WPH¯JW¯_rJrAH·¡
-nLnr.¨.|A-r_WPH¯JW¯_rJrAH = ¨,.LnJ·.-·¡
Lr..LnJ·.-!·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
182

r·n.Lnr L=¨¡L<.LnJ·.-¡L--·

Lnr !-Lj!r=.!-nrJ-rPnr-j-n.¨,.|A-r_|IPJ|r_PH_-PxIH¯,L·¡
J·uoL- pnL·-MLn=.!-nrJ-r¯·uoL-.¨,.|A-r_--P.I_MPH,L·¡
J·uoL- pnL·-M-x=.!-nrJ-r¯·uoL-.¨,.|A-r_--P.I_MAx,L·¡
-nLnr.L-¨. .|A-r_|IPJ|r_PH_-PxIH¯ = ¨,!-Lj!r,¨ pLx-L-¨·¡
-nLnr.L-¨. .|A-r_--P.I_MPH = ¨,pnL·-MLn·¡
-nLnr.L-¨. .|A-r_--P.I_MAx = ¨,pnL·-M-x·¡
·
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
183
PosItIonIng Constants
Three IdentIfIers from the ENU|_CHAFT_PDSÌTÌDN lIst are the possIble values of the posìtìon
parameter for the ChartNavIgate() functIon.
ENUh_CHAPT_PDSITIDN
I0 0escrIptIon
CHAFT_8ECÌN Chart begInnIng (the oldest prIces)
CHAFT_CUFFENT_PDS Current posItIon
CHAFT_EN0 Chart end (the latest prIces)
ExampIe:
L·nj !-nJL-=.!-nrJp-n.¨IJ-J¯¯¨,-I-PJ¯_|!`·¡
Lr.!-nJL-.=¨·

.!-nr¯-rPnr-j-n.!-nJL-,.|A-r_AJrJ¯.-JHH,r-L--·¡
.!-nr¯-rPnr-j-n.!-nJL-,.|A-r_¯|P¯r,rnu-·¡
.!-nr¯-rPnr-j-n.!-nJL-,.|A-r_MJ¯I,.|A-r_HPHI·¡
----rH--rInn·n.·¡
o··L n--=.!-nrH-vLj-r-.!-nJL-,.|A-r_IH¯,!¯¨·¡
Lr..n--· -nLnr.¨H-vLj-r- r-LL-J. Inn·n = ¨,J-rH--rInn·n.··¡
.!-nr--Jn-..·¡
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
184
Chart PepresentatIon
PrIce charts can be dIsplayed In three ways:
as bars;
as candlestIcks;
as a lIne.
The specIfIc way of dIsplayIng the prIce chart Is set by the functIon ChartSetÌnteger(chart_handle,
CHAFT_|D0E, chart_mode), where chart_mode Is one of the values of the ENU|_CHAFT_|D0E
enumeratIon.
ENUh_CHAPT_hD0E
I0 0escrIptIon
CHAFT_8AFS 0Isplay as a sequence of bars
CHAFT_CAN0LES 0Isplay as Japanese candlestIcks
CHAFT_LÌNE 0Isplay as a lIne drawn by Close prIces
To specIfy the mode of dIsplayIng volumes In the prIce chart the functIon ChartSetÌnteger
(chart_handle, CHAFT_SHDW_7DLU|ES, volume_mode) Is used, where volume_mode Is one of values
of the ENU|_CHAFT_7DLU|E_|D0E enumeratIon.
ENUh_CHAPT_VDLUhE_hD0E
I0 0escrIptIon
CHAFT_7DLU|E_HÌ0E 7olumes are not shown
CHAFT_7DLU|E_TÌCK TIck volumes
CHAFT_7DLU|E_FEAL Trade volumes
ExampIe:
//--- J-r r!- !-nJL- ·r r!- ·unn-nr ·!-nr
L·nj !-nJL-=.!-nrP¯.·¡
Lr.!-nJL-¨· // Pr Lr -u··--J-J, -JJLrL·n-LLy ·u-r·mLz-

//--- ¯L--oL- -ur·-·n·LL
.!-nr¯-rPnr-j-n.!-nJL-,.|A-r_AJrJ¯.-JHH,r-L--·¡
//--- ¯-r r!- LnJ-nr ·r r!- nLj!r o·nJ-n ·r r!- ·!-nr
.!-nr¯-rPnr-j-n.!-nJL-,.|A-r_¯|P¯r,rnu-·¡
//--- ¯L-pL-y -- ·-nJL--rL·k-
.!-nr¯-rPnr-j-n.!-nJL-,.|A-r_MJ¯I,.|A-r_.AH¯HI¯·¡
//--- ¯·n·LL oy !¨¨ o-n- rn·m r!- o-jLnnLnj ·r !L-r·ny
.!-nrH-vLj-r-.!-nJL-,.|A-r_.J--IHr_-J¯,!¨¨·¡
//--- ¯-r r!- rL·k v·Lum- JL-pL-y m·J-
.!-nr¯-rPnr-j-n.!-nJL-,.|A-r_¯|JW_VJHJMI¯,.|A-r_VJHJMI_rP.··¡
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
185
·
See aIso
ChartDpen, ChartÌ0
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
186
Dbject Constants
There are J9 graphIcal objects that can be created and dIsplayed In the prIce chart. All constants for
workIng wIth objects are dIvIded Into 9 groups:
Dbject types - ÌdentIfIers of graphIcal objects;
Dbject propertIes - settIng and gettIng propertIes of graphIcal objects;
|ethods of object bIndIng - constants of object posItIonIng In the chart;
8IndIng corner - an IndIcatIon of the angle of the schedule, whIch Is posItIoned on the object;
7IsIbIlIty of objects - settIng tImeframes In whIch an object Is vIsIble;
Levels of EllIott Waves - wave gradatIon markIngs;
Cann objects - trend constants for Cann fan and Cann grId;
Web colors - constants of predefIned web colors;
WIngdIngs - codes of characters of the WIngdIngs font.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
187
Dbject Types
When a graphIcal object Is created usIng the DbjectCreate() functIon, It's necessary to specIfy the
type of object beIng created, whIch can be one of the values of the ENU|_D8JECT enumeratIon.
Further specIfIcatIons of object propertIes are possIble usIng functIons for workIng wIth graphIcal
objects.
ENUh_DßJECT
I0 0escrIptIon
D8J_7LÌNE 7ertIcal LIne
D8J_HLÌNE HorIzontal LIne
D8J_TFEN0 Trend LIne
D8J_TFEN08YANCLE Trend LIne 8y Angle
D8J_CHANNEL EquIdIstant Channel
D8J_ST00E7CHANNEL Standard 0evIatIon Channel
D8J_FECFESSÌDN LInear FegressIon Channel
D8J_PÌTCHFDFK Andrews' PItchfork
D8J_CANNLÌNE Cann LIne
D8J_CANNFAN Cann Fan
D8J_CANNCFÌ0 Cann CrId
D8J_FÌ8D FIbonaccI Fetracement
D8J_FÌ8DTÌ|ES FIbonaccI TIme Zones
D8J_FÌ8DFAN FIbonaccI Fan
D8J_FÌ8DAFC FIbonaccI Arcs
D8J_FÌ8DCHANNEL FIbonaccI Channel
D8J_EXPANSÌDN FIbonaccI ExpansIon
D8J_ELLÌDTWA7E5 EllIott |otIve Wave
D8J_ELLÌDTWA7EJ EllIott CorrectIon Wave
D8J_FECTANCLE Fectangle
D8J_TFÌANCLE TrIangle
D8J_ELLÌPSE EllIpse
D8J_CYCLES Cycle LInes
D8J_AFFDW_THU|8_UP Thumbs Up
D8J_AFFDW_THU|8_0DWN Thumbs 0own
D8J_AFFDW_UP Arrow Up
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
188
D8J_AFFDW_0DWN Arrow 0own
D8J_AFFDW_STDP Stop SIgn
D8J_AFFDW_CHECK Check SIgn
D8J_AFFDW_LEFT_PFÌCE Left PrIce Label
D8J_AFFDW_FÌCHT_PFÌCE FIght PrIce Label
D8J_AFFDW_8UY 8uy SIgn
D8J_AFFDW_SELL Sell SIgn
D8J_AFFDW Arrow
D8J_TEXT Text
D8J_LA8EL Label
D8J_8UTTDN 8utton
D8J_CHAFT Chart
D8J_8ÌT|AP 8Itmap
D8J_8ÌT|AP_LA8EL 8Itmap Label
D8J_E0ÌT EdIt
D8J_AFFDWE0_LÌNE Arrowed LIne
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
189
Dbject PropertIes
Every graphIcal object In a prIce chart has a certaIn set of propertIes. 7alues of object propertIes are
wet up and receIved by correspondIng functIons for workIng wIth graphIcal objects. For each object
type there Is Its own set of propertIes. Here al possIble values from the ENU|_D8JECT_PFDPEFTY
enumeratIon famIly are lIsted. Some propertIes requIre clarIfIcatIon, such as the level number for the
FIbonaccI extensIon object. Ìn such cases It Is necessary to specIfy the value of the modìfìer
parameter In the functIons of DbjectSet...() and DbjectCet...().
For functIons DbjectSetÌnteger() and DbjectCetÌnteger()
ENUh_DßJECT_PPDPEPTY_INTECEP
IdentIfIer 0escrIptIon Property Type
D8JPFDP_CDLDF Color color
D8JPFDP_STYLE Style ENU|_LÌNE_STYLE
D8JPFDP_WÌ0TH LIne thIckness Int
D8JPFDP_8ACK Dbject In the background bool
D8JPFDP_SELECTE0 Dbject Is selected bool
D8JPFDP_FEA0DNLY AbIlIty to edIt text In the EdIt
object
bool
D8JPFDP_TYPE Dbject type ENU|_D8JECT
D8JPFDP_TÌ|E TIme coordInate datetIme modIfIer=number of
anchor poInt
D8JPFDP_SELECTA8LE Dbject avaIlabIlIty bool
D8JPFDP_CFEATETÌ|E TIme of object creatIon datetIme r/o
D8JPFDP_LE7ELS Number of levels Int
D8JPFDP_LE7ELCDLDF Color of the lIne·level color modIfIer=level number
D8JPFDP_LE7ELSTYLE Style of the lIne·level ENU|_LÌNE_STYLE
modIfIer=level number
D8JPFDP_LE7ELWÌ0TH ThIckness of the lIne·level Int modIfIer=level number
D8JPFDP_FDNTSÌZE Font sIze Int
D8JPFDP_FAY_LEFT Fay goes to the left bool
D8JPFDP_FAY_FÌCHT Fay goes to the rIght bool
D8JPFDP_ELLÌPSE EllIpse bool
D8JPFDP_AFFDWCD0E Arrow code for the Arrow
object
char
D8JPFDP_TÌ|EFFA|ES 7IsIbIlIty of an object at
tImeframes
set of flags flags
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
190
D8JPFDP_ANCHDF LocatIon of the anchor poInt of
a graphIcal object
ENU|_AFFDW_ANCHDF (for
D8J_AFFDW),
ENU|_ANCHDFPDÌNT (for
D8J_LA8EL and D8J_TEXT)
D8JPFDP_X0ÌSTANCE The dIstance In pIxels along
the X axIs from the bIndIng
corner
Int
D8JPFDP_Y0ÌSTANCE The dIstance In pIxels along
the Y axIs from the bIndIng
corner
Int
D8JPFDP_0ÌFECTÌDN Trend of the Cann object ENU|_CANN_0ÌFECTÌDN
D8JPFDP_0ECFEE Level of the EllIott Wave
|arkIng
ENU|_ELLÌDT_WA7E_0ECFEE
D8JPFDP_0FAWLÌNES 0IsplayIng lInes for markIng
the EllIott Wave
bool
D8JPFDP_STATE 8utton state (pressed /
depressed)
bool
D8JPFDP_XSÌZE The sIze of the Chart object
along the X axIs (wIdth In
pIxels)
Int
D8JPFDP_YSÌZE The sIze of the Chart object
along the Y axIs (heIght In
pIxels)
Int
D8JPFDP_PEFÌD0 TImeframe for the Chart
object
ENU|_TÌ|EFFA|ES
D8JPFDP_0ATE_SCALE 0IsplayIng the tIme scale for
the Chart object
bool
D8JPFDP_PFÌCE_SCALE 0IsplayIng the prIce scale for
the Chart object
bool
D8JPFDP_CHAFT_SCALE The scale for the Chart object Int value In the range 0-5
D8JPFDP_8CCDLDF The background color for the
EdIt object
color
D8JPFDP_CDFNEF The corner of the chart to lInk
a graphIcal object
ENU|_8ASECDFNEF
For functIons DbjectSet0ouble() and DbjectCet0ouble()
ENUh_DßJECT_PPDPEPTY_0DUßLE
IdentIfIer 0escrIptIon Property Type
D8JPFDP_PFÌCE PrIce coordInate double modIfIer=number of
anchor poInt
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
191
D8JPFDP_LE7EL7ALUE Level value double modIfIer=level number
D8JPFDP_SCALE Scale (propertIes of Cann
objects and FIbonaccI Arcs)
double
D8JPFDP_ANCLE Angle double
D8JPFDP_0E7ÌATÌDN 0evIatIon for the Standard
0evIatIon Channel
double
For functIons DbjectSetStrIng() and DbjectCetStrIng()
ENUh_DßJECT_PPDPEPTY_STPINC
IdentIfIer 0escrIptIon Property Type
D8JPFDP_NA|E Dbject name strIng
D8JPFDP_TEXT 0escrIptIon of the object (the
text contaIned In the object)
strIng
D8JPFDP_LE7ELTEXT Level descrIptIon strIng modIfIer=level number
D8JPFDP_FDNT Font strIng
D8JPFDP_8|PFÌLE The name of 8|P·fIle for
8Itmap Label
strIng modIfIer: 0·state DN,
1·state DFF
D8JPFDP_SY|8DL Symbol for the Chart object strIng
ExampIe:
tJ-rLn- J- ¨\x¨1`!¨
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//---
-rnLnj L-o-L_n-m-=¨my_JЯ_HAÐIH_·o|-·r¨¡
Lr.Jo|-·r¯LnJ.¨,L-o-L_n-m-·<¨·

-nLnr.¨Jo|-·r ¨,L-o-L_n-m-,¨ n·r r·unJ. Inn·n ··J- = ¨,J-rH--rInn·n.··¡
//--- ·n--r- H-o-L ·o|-·r
Jo|-·r.n--r-.¨,L-o-L_n-m-,JЯ_HAÐIH,¨,¨,¨·¡
//--- --r x ···nJLn-r-
Jo|-·r¯-rPnr-j-n.¨,L-o-L_n-m-,JЯ--J-_x¯P¯rAH.I,`¨¨·¡
//--- --r 1 ···nJLn-r-
Jo|-·r¯-rPnr-j-n.¨,L-o-L_n-m-,JЯ--J-_1¯P¯rAH.I,`¨¨·¡
//--- J-rLn- r-xr ··L·n
Jo|-·r¯-rPnr-j-n.¨,L-o-L_n-m-,JЯ--J-_.JHJ-,W!Lr-·¡
//--- J-rLn- r-xr r·n ·o|-·r H-o-L
Jo|-·r¯-r¯rnLnj.¨,L-o-L_n-m-,JЯ--J-_rIxr,J-·¡
//--- J-rLn- r·nr
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
192
Jo|-·r¯-r¯rnLnj.¨,L-o-L_n-m-,JЯ--J-_¯JHr,¨WLnjJLnj-¨·¡
//--- J-rLn- r·nr -Lz-
Jo|-·r¯-rPnr-j-n.¨,L-o-L_n-m-,JЯ--J-_¯JHr¯P¯I,!¨·¡
//--- 1¯ J-jn--- n·r-rL·n ·L··k.L--
Jo|-·r¯-r¯·uoL-.¨,L-o-L_n-m-,JЯ--J-_AHJHI,-1¯·¡
//--- JL--oL- r·n m·u-- --L-·rLnj
Jo|-·r¯-rPnr-j-n.¨,L-o-L_n-m-,JЯ--J-_¯IHI.rAÐHI,r-L--·¡
//--- Jn-. Lr ·n r!- ·!-nr
.!-nr--Jn-..¨·¡
·
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
193
hethods of Dbject ßIndIng
CraphIcal objects Text and Label (D8J_TEXT and D8J_LA8EL) can have one of 9 dIfferent ways of
coordInate bIndIng. The necessary varIant can be specIfIed usIng the functIon DbjectSetÌnteger
(chart_handle, object_name, D8JPFDP_ANCHDF, anchor_poInt_mode), where anchor_poInt_mode Is
one of the values of ENU|_ANCHDFPDÌNT.
ENUh_ANCHDP_PDINT
I0 0escrIptIon
ANCHDF_LEFT_UPPEF Anchor poInt at the upper left corner
ANCHDF_LEFT Anchor poInt to the left In the center
ANCHDF_LEFT_LDWEF Anchor poInt at the lower left corner
ANCHDF_LDWEF Anchor poInt below In the center
ANCHDF_FÌCHT_LDWEF Anchor poInt at the lower rIght corner
ANCHDF_FÌCHT Anchor poInt to the rIght In the center
ANCHDF_FÌCHT_UPPEF Anchor poInt at the upper rIght corner
ANCHDF_UPPEF Anchor poInt above In the center
ANCHDF_CENTEF Anchor poInt strIctly In the center of the object
ExampIe:
-rnLnj r-xr_n-m-=¨my_JЯ_rIxr_·o|-·r¨¡
Lr.Jo|-·r¯LnJ.¨,r-xr_n-m-·<¨·

-nLnr.¨Jo|-·r ¨,r-xr_n-m-,¨ n·r r·unJ. Inn·n ··J- = ¨,J-rH--rInn·n.··¡
//--- J-r r!- m-xLm-L pnL·- ·r r!- ·!-nr
J·uoL- ·!-nr_m-x_pnL·-=.!-nrJ-r¯·uoL-.¨,.|A-r_--P.I_MAx,¨·¡
//--- .n--r- ·o|-·r H-o-L
Jo|-·r.n--r-.¨,r-xr_n-m-,JЯ_rIxr,¨,rLm-.unn-nr.·,·!-nr_m-x_pnL·-·¡
//--- ¯-r ··L·n ·r r!- r-xr
Jo|-·r¯-rPnr-j-n.¨,r-xr_n-m-,JЯ--J-_.JHJ-,W!Lr-·¡
//--- ¯-r o-·kjn·unJ ··L·n
Jo|-·r¯-rPnr-j-n.¨,r-xr_n-m-,JЯ--J-_ÐJ.JHJ-,Jn--n·¡
//--- ¯-r r-xr r·n r!- H-o-L ·o|-·r
Jo|-·r¯-r¯rnLnj.¨,r-xr_n-m-,JЯ--J-_rIxr,rLm-r·¯rnLnj.rLm-.unn-nr.···¡
//--- ¯-r r-xr r·nr
Jo|-·r¯-r¯rnLnj.¨,r-xr_n-m-,JЯ--J-_¯JHr,¨rn-ou·!-r M¯¨·¡
//--- ¯-r r·nr -Lz-
Jo|-·r¯-rPnr-j-n.¨,r-xr_n-m-,JЯ--J-_¯JHr¯P¯I,!¨·¡
//--- ÐLnJ r· r!- upp-n nLj!r ··nn-n
Jo|-·r¯-rPnr-j-n.¨,r-xr_n-m-,JЯ--J-_AH.|J-,AH.|J-_-PJ|r_J--I-·¡
//--- -·r-r- -¨ J-jn--- ··unr-n-·L··k.L--
Jo|-·r¯-r¯·uoL-.¨,r-xr_n-m-,JЯ--J-_AHJHI,-¨·¡
//--- ¯·noLJ r!- --L-·rL·n ·r r!- ·o|-·r oy m·u--
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
194
Jo|-·r¯-rPnr-j-n.¨,r-xr_n-m-,JЯ--J-_¯IHI.rAÐHI,r-L--·¡
//--- n-Jn-. ·o|-·r
.!-nr--Jn-..¨·¡
·
CraphIcal objects Arrow (D8J_AFFDW) have only 2 ways of lInkIng theIr coordInates. ÌdentIfIers are
lIsted In ENU|_AFFDW_ANCHDF.
ENUh_APPDW_ANCHDP
I0 0escrIptIon
ANCHDF_TDP Anchor on the top sIde
ANCHDF_8DTTD| Anchor on the bottom sIde
ExampIe:
v·LJ Jn¯r-nr.·

//--- AuxLLL-ny -nn-y-
J·uoL- Jp-¯`,¯·.n-¯`¡
J-r-rLm- rLm-¯`¡
//--- ¯-r r!- -nn-y- -- rLm---nL--
Ann-y¯-rA-¯-nL--.Jp-,rnu-·¡
Ann-y¯-rA-¯-nL--.¯·.n-,rnu-·¡
Ann-y¯-rA-¯-nL--.rLm-,rnu-·¡
//--- .n--r- !-nJL- ·r r!- PnJL·-r·n ¯n-·r-L-
Lnr ¯n-·r-L-|-nJL-=L¯n-·r-L-.HJHH,¨·¡
-nLnr.¨¯n-·r-L-|-nJL- = ¨,¯n-·r-L-|-nJL-·¡
//--- ¯-r H--r -nn·n v-Lu- r· ¯-n·
----rH--rInn·n.·¡
//--- rny r· ··py r!- v-Lu-- ·r r!- LnJL·-r·n
Lnr ··pL-J=.·pyÐurr-n.¯n-·r-L-|-nJL-,¨,¨,!¨¨¨,Jp-·¡
Lr.··pL-J<=¨·

-nLnr.¨Jn-oL- r· ··py r!- upp-n rn-·r-L-. Inn·n = ¨,J-rH--rInn·n.··¡
n-runn¡
·
----rH--rInn·n.·¡
//--- rny r· ··py r!- v-Lu-- ·r r!- LnJL·-r·n
··pL-J=.·pyÐurr-n.¯n-·r-L-|-nJL-,!,¨,!¨¨¨,¯·.n-·¡
Lr.··pL-J<=¨·

-nLnr.¨Jn-oL- r· ··py r!- o·rr·m rn-·r-L-. Inn·n = ¨,J-rH--rInn·n.··¡
n-runn¡
·
----rH--rInn·n.·¡
//--- .·py rLm---nL-- ··nr-LnLnj r!- ·p-nLnj o-n- ·r r!- L--r !¨¨¨ ·n--
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
195
··pL-J=.·pyrLm-.HJHH,¨,¨,!¨¨¨,rLm-·¡
Lr.··pL-J<=¨·

-nLnr.¨Jn-oL- r· ··py r!- Jp-nLnj rLm- ·r r!- L--r !¨¨¨ o-n-¨·¡
n-runn¡
·
Lnr up··unr-n=¨,J·.n··unr-n=¨¡ // ··unr r!-n- r!- numo-n ·r -nn·.-
o··L ·n--r-J¡// n-·-Lv- r!- n--uLr ·r -rr-mpr- r· ·n--r- -n ·o|-·r
r·n.Lnr L=`¡L<··pL-J¡L--·// -un r!n·uj! r!- v-Lu-- ·r r!- LnJL·-r·n L¯n-·r-L-

Lr.Jp-¯L`.=IM-r1_VAHJI·// ¯·unJ r!- upp-n rn-·r-L

Lr.up··unr-n<!¨·// .n--r- n· m·n- r!-n !¨ ¨Jp¨ -nn·.-

//--- rny r· ·n--r- -n ¨Jp¨ ·o|-·r
·n--r-J=Jo|-·r.n--r-.¨,-rnLnj.rLm-¯L`·,JЯ_A--JW_r|JMÐ_J-,¨,rLm-¯L`,Jp-¯L`·¡
Lr.·n--r-J·// Pr --r up - L-r'- m-k- runLnj r·n Lr

//--- -·Lnr -n·!·n L- o-L·. Ln ·nJ-n n·r r· ··v-n o-n
Jo|-·r¯-rPnr-j-n.¨,-rnLnj.rLm-¯L`·,JЯ--J-_AH.|J-,AH.|J-_ÐJrrJM·¡
//--- ¯Ln-L r·u·! - p-Lnr-J
Jo|-·r¯-rPnr-j-n.¨,-rnLnj.rLm-¯L`·,JЯ--J-_.JHJ-,ÐLu-·¡
up··unr-n--¡
·
·
·
Lr.¯·.n-¯L`.=IM-r1_VAHJI·// ¯·unJ - L·.-n rn-·r-L

Lr.J·.n··unr-n<!¨·// .n--r- n· m·n- r!-n !¨ -nn·.- ¨¯·.n¨

//--- rny r· ·n--r- -n ·o|-·r ¨¯·.n¨
·n--r-J=Jo|-·r.n--r-.¨,-rnLnj.rLm-¯L`·,JЯ_A--JW_r|JMÐ_¯JWH,¨,rLm-¯L`,¯·.n-¯L`·¡
Lr.·n--r-J·// Pr --r up - L-r'- m-k- runLnj r·n Lr

//--- -·Lnr -n·!·n L- -o·v- Ln ·nJ-n n·r r· ··v-n o-n
Jo|-·r¯-rPnr-j-n.¨,-rnLnj.rLm-¯L`·,JЯ--J-_AH.|J-,AH.|J-_rJ-·¡
//--- ¯Ln-L r·u·! - p-Lnr-J
Jo|-·r¯-rPnr-j-n.¨,-rnLnj.rLm-¯L`·,JЯ--J-_.JHJ-,--J·¡
J·.n··unr-n--¡
·
·
·
·
·
After the scrIpt executIon the chart wIll look lIke In thIs fIgure.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
196
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
197
The Chart Corner to WhIch an Dbject Is Attached
There Is a number graphIcal objects, for whIch you can set the corner of a chart, relatIve to whIch
coordInates are specIfIed In pIxels. These are the followIng types of objects (In brackets object type
IdentIfIers are specIfIed):
Label (D8J_LA8EL);
8utton (D8J_8UTTDN);
Chart (D8J_CHAFT);
8Itmap Label (D8J_8ÌT|AP_LA8EL);
EdIt (D8J_E0ÌT).
Ìn order to specIfy the chart corner, from whIch X and Y coordInates wIll be measured In pIxels, use
DbjectSetÌnteger(chartÌ0, name, D8JPFDP_CDFNEF, chart_corner), where:
chartÌ0 · chart IdentIfIer;
name - name of a graphIcal object;
D8JPFDP_CDFNEF - property Ì0 to specIfy the corner for bIndIng;
chart_corner - the desIred chart corner, can be one of the values of the ENU|_8ASECDFNEF
enumeratIon.
ENUh_ßASE_CDPNEP
I0 0escrIptIon
CDFNEF_LEFT_UPPEF Center of coordInates Is In the upper left corner
of the chart
CDFNEF_LEFT_LDWEF Center of coordInates Is In the lower left corner
of the chart
CDFNEF_FÌCHT_LDWEF Center of coordInates Is In the lower rIght
corner of the chart
CDFNEF_FÌCHT_UPPEF Center of coordInates Is In the upper rIght
corner of the chart
ExampIe:
v·LJ .n--r-H-o-L.L·nj ·!-nr_LJ,
-rnLnj n-m-,
Lnr ·!-nr_··nn-n,
-rnLnj r-xr_L-o-L,
Lnr x_·nJ,
Lnr y_·nJ·

//---
Jo|-·r.n--r-.·!-nr_LJ,n-m-,JЯ_HAÐIH,¨,¨,¨·¡
----rH--rInn·n.·¡
Lr..Jo|-·r¯-rPnr-j-n.·!-nr_LJ,n-m-,JЯ--J-_.J-HI-,·!-nr_··nn-n··
-nLnr.¨Jn-oL- r· --r r!- -njL- r· oLnJ r!- ·o|-·r ¨,
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
198
n-m-,¨, -nn·n ··J- ¨,J-rH--rInn·n.··¡
Jo|-·r¯-rPnr-j-n.·!-nr_LJ,n-m-,JЯ--J-_x¯P¯rAH.I,x_·nJ·¡
Jo|-·r¯-rPnr-j-n.·!-nr_LJ,n-m-,JЯ--J-_1¯P¯rAH.I,y_·nJ·¡
Jo|-·r¯-r¯rnLnj.·!-nr_LJ,n-m-,JЯ--J-_rIxr,r-xr_L-o-L·¡
·
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//---
Lnr !-Lj!r=.!-nrJ-rPnr-j-n.¨,.|A-r_|IPJ|r_PH_-PxIH¯,¨·¡
Lnr .LJr!=.!-nrJ-rPnr-j-n.¨,.|A-r_WP¯r|_PH_-PxIH¯,¨·¡
-rnLnj -nn·.-¯1`=¨HI¯r_J--I-¨,¨-PJ|r_J--I-¨,¨-PJ|r_HJWI-¨,¨HI¯r_HJWI-¨·¡
.n--r-H-o-L.¨,-nn·.-¯¨`,.J-HI-_HI¯r_J--I-,¨¨¨,¯¨,¯¨·¡
.n--r-H-o-L.¨,-nn·.-¯!`,.J-HI-_-PJ|r_J--I-,¨!¨,¯¨,¯¨·¡
.n--r-H-o-L.¨,-nn·.-¯``,.J-HI-_-PJ|r_HJWI-,¨`¨,¯¨,¯¨·¡
.n--r-H-o-L.¨,-nn·.-¯``,.J-HI-_HI¯r_HJWI-,¨`¨,¯¨,¯¨·¡
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
199
VIsIbIIIty of Dbjects
The combInatIon of object vIsIbIlIty flags determInes chart tImeframes, where the object Is vIsIble.
To set/get the value of the D8JPFDP_TÌ|EFFA|ES property, you can use functIons DbjectSetÌnteger()
/DbjectCetÌnteger().
I0 VaIue 0escrIptIon
D8J_ND_PEFÌD0S 0 The object Is not drawn In all
tImeframes
D8J_PEFÌD0_|1 0x00000001 The object Is drawn In 1·
mInute chart
D8J_PEFÌD0_|2 0x00000002 The object Is drawn In 2·
mInute chart
D8J_PEFÌD0_|J 0x00000004 The object Is drawn In J·
mInute chart
D8J_PEFÌD0_|4 0x00000008 The object Is drawn In 4·
mInute chart
D8J_PEFÌD0_|5 0x00000010 The object Is drawn In 5·
mInute chart
D8J_PEFÌD0_|6 0x00000020 The object Is drawn In 6·
mInute chart
D8J_PEFÌD0_|10 0x00000040 The object Is drawn In 10·
mInute chart
D8J_PEFÌD0_|12 0x00000080 The object Is drawn In 12·
mInute chart
D8J_PEFÌD0_|15 0x00000100 The object Is drawn In 15·
mInute chart
D8J_PEFÌD0_|20 0x00000200 The object Is drawn In 20·
mInute chart
D8J_PEFÌD0_|J0 0x00000400 The object Is drawn In J0·
mInute chart
D8J_PEFÌD0_H1 0x00000800 The object Is drawn In 1·hour
chart
D8J_PEFÌD0_H2 0x00001000 The object Is drawn In 2·hour
chart
D8J_PEFÌD0_HJ 0x00002000 The object Is drawn In J·hour
chart
D8J_PEFÌD0_H4 0x00004000 The object Is drawn In 4·hour
chart
D8J_PEFÌD0_H6 0x00008000 The object Is drawn In 6·hour
chart
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
200
D8J_PEFÌD0_H8 0x00010000 The object Is drawn In 8·hour
chart
D8J_PEFÌD0_H12 0x00020000 The object Is drawn In 12·hour
chart
D8J_PEFÌD0_01 0x00040000 The object Is drawn In day
charts
D8J_PEFÌD0_W1 0x00080000 The object Is drawn In week
charts
D8J_PEFÌD0_|N1 0x00100000 The object Is drawn In month
charts
D8J_ALL_PEFÌD0S 0xffffffff The object Is drawn In all
tImeframes
7IsIbIlIty flags can be combIned usIng the symbol ¨1¨, for example, the combInatIon of flags
D8J_PEFÌD0_|101D8J_PEFÌD0_H4 means that the object wIll be vIsIble on the 10·mInute and 4·hour
tImeframes.
ExampIe:
v·LJ Jn¯r-nr.·

//---
-rnLnj !Lj!L-v-L=¨-n-vL·u-¯-y|Lj!¨¡
-rnLnj L·.L-v-L=¨-n-vL·u-¯-yH·.¨¡
J·uoL- pn-v|Lj!¡ // r!- pn-vL·u- J-y |Lj!
J·uoL- pn-vH·.¡ // r!- pn-vL·u- J-y H·.
J·uoL- !Lj!-¯`,L·.-¯`¡ // Ann-y- r·n |Lj! -nJ H·.
//--- ----r r!- L--r -nn·n
----rH--rInn·n.·¡
//--- J-r r!- L--r ` |Lj! v-Lu-- ·n r!- J-LLy rLm-rn-m-
Lnr !Lj!-j·r=.·py|Lj!.¯ymo·L.·,-I-PJ¯_¯!,¨,`,!Lj!-·¡
Lr.!Lj!-j·r¨· // Pr ··pyLnj .-- -u··---ruL

-nLnr.¨|Lj! pnL·-- r·n r!- L--r ` J-y- .-n- ·or-Ln-J -u··---ruLLy¨·¡
pn-v|Lj!=!Lj!-¯¨`¡ // r!- pn-vL·u- J-y |Lj!
-nLnr.¨pn-v|Lj! = ¨,pn-v|Lj!·¡
Lr.Jo|-·r¯LnJ.¨,!Lj!L-v-L·<¨· // Jo|-·r .Lr! r!- n-m- !Lj!L-v-L n·r r·unJ

Jo|-·r.n--r-.¨,!Lj!L-v-L,JЯ_|HPHI,¨,¨,¨·¡ // .n--r- r!- |·nLz·nr-L HLn- ·o|-·r
·
//--- ¯-r v-Lu- r·n r!- pnL·- L-v-L r·n r!- LLn- !Lj!L-v-L
Jo|-·r¯-r¯·uoL-.¨,!Lj!L-v-L,JЯ--J-_--P.I,¨,pn-v|Lj!·¡
//--- ¯-r r!- vL-LoLLLry ·nLy -I-PJ¯_M!¨ -nJ -I-PJ¯_|1
Jo|-·r¯-rPnr-j-n.¨,!Lj!L-v-L,JЯ--J-_rPMI¯-AMI¯,JЯ_-I-PJ¯_M!¨JЯ_-I-PJ¯_|1·¡
·
-L--
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
201

-nLnr.¨.·uLJ n·r j-r |Lj! pnL·-- ·v-n r!- p--r ` J-y-, Inn·n = ¨,J-rH--rInn·n.··¡
·
//--- ----r r!- L--r -nn·n
----rH--rInn·n.·¡
//--- J-r r!- ` J-y- v-Lu-- H·. ·n r!- J-LLy rLm-rn-m-
Lnr L·.-j·r=.·pyH·..¯ymo·L.·,-I-PJ¯_¯!,¨,`,L·.-·¡
Lr.L·.-j·r¨· // Pr ··pyLnj .-- -u··---ruL

-nLnr.¨H·. pnL·-- r·n r!- L--r ` J-y- .-n- ·or-Ln-J -u··---ruLLy¨·¡
pn-vH·.=L·.-¯¨`¡ // r!- pn-vL·u- J-y H·.
-nLnr.¨pn-vH·. = ¨,pn-vH·.·¡
Lr.Jo|-·r¯LnJ.¨,L·.L-v-L·<¨· // Jo|-·r .Lr! r!- n-m- L·.L-v-L n·r r·unJ

Jo|-·r.n--r-.¨,L·.L-v-L,JЯ_|HPHI,¨,¨,¨·¡ // .n--r- r!- |·nLz·nr-L HLn- ·o|-·r
·
//--- ¯-r v-Lu- r·n r!- pnL·- L-v-L r·n r!- LLn- L·.L-v-L
Jo|-·r¯-r¯·uoL-.¨,L·.L-v-L,JЯ--J-_--P.I,¨,pn-vH·.·¡
//--- ¯-r r!- vL-LoLLLry ·nLy -I-PJ¯_M!¨ -nJ -I-PJ¯_|1
Jo|-·r¯-rPnr-j-n.¨,L·.L-v-L,JЯ--J-_rPMI¯-AMI¯,JЯ_-I-PJ¯_M!¨JЯ_-I-PJ¯_|1·¡
·
-L-- -nLnr.¨.·uLJ n·r j-r H·. pnL·-- r·n r!- L--r ` J-y-, Inn·n = ¨,J-rH--rInn·n.··¡
.!-nr--Jn-..¨·¡ // n-Jn-. r!- ·!-nr r·n·LoLy
·
See aIso
PerIodSeconds, PerIod, Chart tImeframes, 0ate and TIme
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
202
LeveIs of EIIIott Wave
EllIott Waves are represented by two graphIcal objects of types D8J_ELLÌDTWA7E5 and
D8J_ELLÌDTWA7EJ. To set the wave sIze (method of wave labelIng), the D8JPFDP_0ECFEE property Is
used, to whIch one of values of the ENU|_ELLÌDT_WA7E_0ECFEE enumeratIon can be assIgned.
ENUh_ELLIDT_WAVE_0ECPEE
I0 0escrIptIon
ELLÌDTT_CFAN0_SUPEFCYCLE Crand Supercycle
ELLÌDTT_SUPEFCYCLE Supercycle
ELLÌDTT_CYCLE Cycle
ELLÌDTT_PFÌ|AFY PrImary
ELLÌDTT_ÌNTEF|E0ÌATE ÌntermedIate
ELLÌDTT_|ÌNDF |Inor
ELLÌDTT_|ÌNUTE |Inute
ELLÌDTT_|ÌNUETTE |Inuette
ELLÌDTT_SU8|ÌNUETTE SubmInuette
ExampIe:
r·n.Lnr L=¨¡L<Jo|-·r-r·r-L.¨·¡L--·

-rnLnj ·unn·o|=Jo|-·rH-m-.¨,L·¡
Lr..Jo|-·rJ-rPnr-j-n.¨,·unn·o|,JЯ--J-_r1-I·==JЯ_IHHPJrWAVI`·
..Jo|-·rJ-rPnr-j-n.¨,·unn·o|,JЯ--J-_r1-I·==JЯ_IHHPJrWAVI¯···

//--- --r r!- m-nkLnj L-v-L Ln PHrI-MI¯PArI
Jo|-·r¯-rPnr-j-n.¨,·unn·o|,JЯ--J-_¯IJ-II,IHHPJrr_PHrI-MI¯PArI·¡
//--- -!·. LLn-- o-r.--n r·p- ·r .-v--
Jo|-·r¯-rPnr-j-n.¨,·unn·o|,JЯ--J-_¯-AWHPHI¯,rnu-·¡
//--- --r LLn- ··L·n
Jo|-·r¯-rPnr-j-n.¨,·unn·o|,JЯ--J-_.JHJ-,ÐLu-·¡
//--- --r LLn- .LJr!
Jo|-·r¯-rPnr-j-n.¨,·unn·o|,JЯ--J-_WP¯r|,¯·¡
//--- --r J--·nLprL·n
Jo|-·r¯-r¯rnLnj.¨,·unn·o|,JЯ--J-_rIxr,¨r--r -·nLpr¨·¡
·
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
203
Cann Dbjects
For Cann Fan (D8J_CANNFAN) and Cann CrId (D8J_CANNCFÌ0) of two values of
ENU|_CANN_0ÌFECTÌDN can be specIfIed, whIch wIll set the trend dIrectIon.
ENUh_CANN_0IPECTIDN
I0 0escrIptIon
CANN_UP_TFEN0 LIne correspondIng to the uptrend lIne
CANN_0DWN_TFEN0 LIne correspondIng to the downward trend
To set the scale of the maIn lIne as 1x1, use functIon DbjectSet0ouble(chart_handle,
gann_object_name, D8JPFDP_SCALE, scale), where:
chart_handle - chart wIndow where the object Is located;
gann_object_name - object name;
D8JPFDP_SCALE - IdentIfIer of the ¨Scale¨ property;
scale - requIred scale In unIts of PIps/8ar.
ExampIe of creatIng Cann Fan:
v·LJ Jn¯r-nr.·

//---
-rnLnj my_j-nn=¨JЯ_JAHH¯AH ·o|-·r¨¡
Lr.Jo|-·r¯LnJ.¨,my_j-nn·<¨·// Jo|-·r n·r r·unJ

//--- Pnr·nm -o·ur r!- r-LLun-
-nLnr.¨Jo|-·r ¨,my_j-nn,¨ n·r r·unJ. Inn·n ··J- = ¨,J-rH--rInn·n.··¡
//--- J-r r!- m-xLm-L pnL·- ·r r!- ·!-nr
J·uoL- ·!-nr_m-x_pnL·-=.!-nrJ-r¯·uoL-.¨,.|A-r_--P.I_MAx,¨·¡
//--- J-r r!- mLnLm-L pnL·- ·r r!- ·!-nr
J·uoL- ·!-nr_mLn_pnL·-=.!-nrJ-r¯·uoL-.¨,.|A-r_--P.I_MPH,¨·¡
//--- |·. m-ny o-n- -n- -!·.n Ln r!- ·!-nr.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
204
Lnr o-n-_·n_·!-nr=.!-nrJ-rPnr-j-n.¨,.|A-r_VP¯PÐHI_ÐA-¯·¡
//--- .n--r- -n -nn-y, r· .nLr- r!- ·p-nLnj rLm- ·r --·! o-n r·
J-r-rLm- rLm-¯`¡
//--- Ann-nj- -··--- r· r!- -nn-y -- r!-r ·r rLm---nL--
Ann-y¯-rA-¯-nL--.rLm-,rnu-·¡
//--- H·. ··py J-r- ·r o-n- vL-LoL- Ln r!- ·!-nr Lnr· r!L- -nn-y
Lnr rLm--=.·pyrLm-.HJHH,¨,¨,o-n-_·n_·!-nr,rLm-·¡
Lr.rLm--<=¨·

-nLnr.¨.·uLJ n·r ··py r!- -nn-y .Lr! r!- ·p-n rLm-.¨·¡
n-runn¡
·
//--- -n-LLmLn-ny pn-p-n-rL·n- ··mpL-r-J
//--- PnJ-x ·r r!- ·-nrn-L o-n Ln r!- ·!-nr
Lnr ·-nr-n_o-n=o-n-_·n_·!-nr/`¡
//--- .!-nr -¬u-r·n - o-r.--n r!- m-xLmum -nJ mLnLmum
J·uoL- m--n=.·!-nr_m-x_pnL·--·!-nr_mLn_pnL·-·/`.¨¡
//--- ¯-r r!- ···nJLn-r-- ·r r!- rLn-r -n·!·n p·Lnr r· r!- ·-nr-n
Jo|-·r.n--r-.¨,my_j-nn,JЯ_JAHH¯AH,¨,rLm-¯·-nr-n_o-n`,m--n,
//--- ¯-··nJ -n·!·n p·Lnr r· r!- nLj!r
rLm-¯·-nr-n_o-n/``,.m--n-·!-nr_mLn_pnL·-·/`.¨·¡
-nLnr.¨rLm-¯·-nr-n_o-n` = ¨-.-rnLnj·rLm-¯·-nr-n_o-n`-¨ rLm-¯·-nr-n_o-n/`` = ¨-.-rnLnj·rLm-¯·-nr-n_o-n/``·¡
//-nLnr.¨rLm-¯·-nr-n_o-n`/=¨-rLm-¯·-nr-n_o-n`-¨ rLm-¯·-nr-n_o-n/``=¨-rLm-¯·-nr-n_o-n/``·¡
//--- ¯-r r!- -·-L- Ln unLr- ·r -Lp- / Ð-n
Jo|-·r¯-r¯·uoL-.¨,my_j-nn,JЯ--J-_¯.AHI,!¨·¡
//--- ¯-r r!- LLn- rn-nJ
Jo|-·r¯-rPnr-j-n.¨,my_j-nn,JЯ--J-_¯P-I.rPJH,JAHH_J-_r-IH¯·¡
//--- ¯-r r!- LLn- .LJr!
Jo|-·r¯-rPnr-j-n.¨,my_j-nn,JЯ--J-_WP¯r|,!·¡
//--- ¯-rLn- r!- LLn- -ryL-
Jo|-·r¯-rPnr-j-n.¨,my_j-nn,JЯ--J-_¯r1HI,¯r1HI_¯A¯|¯Jr·¡
//--- ¯-r r!- LLn- ··L·n
Jo|-·r¯-rPnr-j-n.¨,my_j-nn,JЯ--J-_.JHJ-,1-LL·.Jn--n·¡
//--- ALL·. r!- u--n r· --L-·r -n ·o|-·r
Jo|-·r¯-rPnr-j-n.¨,my_j-nn,JЯ--J-_¯IHI.rAÐHI,rnu-·¡
//--- ¯-L-·r Lr y·un--Lr
Jo|-·r¯-rPnr-j-n.¨,my_j-nn,JЯ--J-_¯IHI.rI¯,rnu-·¡
//--- ¯n-. Lr ·n r!- ·!-nr
.!-nr--Jn-..¨·¡
·
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
205
Web CoIors
The followIng color constants are defIned for the color type:
8lack 0arkCreen 0arkSlateC
ray
DlIve Creen Teal Navy Purple
|aroon ÌndIgo |IdnIght8l
ue
0ark8lue 0arkDlIveC
reen
Saddle8ro
wn
ForestCre
en
DlIve0rab
SeaCreen 0arkColde
nrod
0arkSlate8
lue
SIenna |edIum8lu
e
8rown 0arkTurqu
oIse
0ImCray
LIghtSeaCr
een
0ark7Iolet FIre8rIck |edIum7Io
letFed
|edIumSe
aCreen
Chocolate CrImson Steel8lue
Coldenrod |edIumSp
rIngCreen
LawnCree
n
Cadet8lue 0arkDrchI
d
YellowCre
en
LImeCreen DrangeFed
0arkDrang
e
Drange Cold Yellow Chartreus
e
LIme SprIngCree
n
Aqua
0eepSky8l
ue
8lue |agenta Fed Cray SlateCray Peru 8lue7Iolet
LIghtSlate
Cray
0eepPInk |edIumTu
rquoIse
0odger8lu
e
TurquoIse Foyal8lue Slate8lue 0arkKhakI
ÌndIanFed |edIumDr
chId
CreenYell
ow
|edIumAq
uamarIne
0arkSeaCr
een
Tomato Fosy8rown DrchId
|edIumPu
rple
Pale7Iolet
Fed
Coral Cornflowe
r8lue
0arkCray Sandy8row
n
|edIumSla
te8lue
Tan
0arkSalmo
n
8urlyWood HotPInk Salmon 7Iolet LIghtCoral Sky8lue LIghtSalmo
n
Plum KhakI LIghtCree
n
AquamarIn
e
SIlver LIghtSky8l
ue
LIghtSteel
8lue
LIght8lue
PaleCreen ThIstle Powder8lu
e
PaleColde
nrod
PaleTurqu
oIse
LIghtCray Wheat NavajoWhIt
e
|occasIn LIghtPInk CaInsboro PeachPuff PInk 8Isque LIghtColde
nrod
8lanchedAl
mond
LemonChIf
fon
8eIge AntIqueWh
Ite
PapayaWhI
p
CornsIlk LIghtYello
w
LIghtCyan LInen
Lavender |IstyFose DldLace WhIteSmok
e
Seashell Ìvory Honeydew AlIce8lue
Lavender
8lush
|IntCream Snow WhIte
Color can be set to an object usIng the DbjectSetÌnteger() functIon. For settIng color to custom
IndIcators the PlotÌndexSetÌnteger() functIon Is used. For gettIng color values there are sImIlar
functIons DbjectCetÌnteger() and PlotÌndexCetÌnteger().
ExampIe:
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
206
//---- LnJL·-r·n --rrLnj-
tpn·p-nry LnJL·-r·n_·!-nr_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- `
tpn·p-nry LnJL·-r·n_pL·r- `
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_ryp-` ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_ryp-` ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n! ÐLu-
tpn·p-nry LnJL·-r·n_··L·n` --J
tpn·p-nry LnJL·-r·n_··L·n` HLm-
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
207
WIngdIngs
Characters of WIngdIngs used wIth the D8J_AFFDW object:
A necessary character can be set usIng the DbjectSetÌnteger() functIon.
ExampIe:
v·LJ Jn¯r-nr.·

//---
-rnLnj up_-nn·.=¨up_-nn·.¨¡
J-r-rLm- rLm-=rLm-.unn-nr.·¡
J·uoL- L--r.L·--¯!`¡
Lnr ·L·--=.·py.L·--.¯ymo·L.·,--nL·J.·,¨,!,L--r.L·--·¡ // J-r r!- .L·-- pnL·-
//--- Pr r!- pnL·- .-- ·or-Ln-J
Lr.·L·--¨·

Jo|-·r.n--r-.¨,up_-nn·.,JЯ_A--JW,¨,¨,¨,¨,¨·¡ // .n--r- -n -nn·.
Jo|-·r¯-rPnr-j-n.¨,up_-nn·.,JЯ--J-_A--JW.J¯I,`1!·¡ // ¯-r r!- -nn·. ··J-
Jo|-·r¯-rPnr-j-n.¨,up_-nn·.,JЯ--J-_rPMI,rLm-·¡ // ¯-r rLm-
Jo|-·r¯-r¯·uoL-.¨,up_-nn·.,JЯ--J-_--P.I,L--r.L·--¯¨`·¡// ¯-r pnL·-
.!-nr--Jn-..¨·¡ // ¯n-. -nn·. n·.
·
-L--
-nLnr.¨Jn-oL- r· j-r r!- L-r--r .L·-- pnL·-.¨·¡
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
208
IndIcators Constants
There are J7 predefIned technIcal IndIcators, whIch can be used In programs wrItten In the |0L5
language. Ìn addItIon, there Is an opportunIty to create custom IndIcators usIng the ICustom()
functIon. All constants requIred for that are dIvIded Into 5 groups:
PrIce constants - for selectIng the type of prIce or volume, on whIch an IndIcator Is calculated;
SmoothIng methods - buIlt·In smoothIng methods used In IndIcators;
ÌndIcator lInes - IdentIfIers of IndIcator buffers when accessIng IndIcator values usIng Copy8uffer();
0rawIng styles - for IndIcatIng one of 18 types of drawIng and settIng the lIne drawIng style;
Custom IndIcators propertIes are used In functIons for workIng wIth custom IndIcators;
Types of IndIcators are used for specIfyIng the type of technIcal IndIcator when creatIng a handle
usIng ÌndIcatorCreate();
ÌdentIfIers of data types are used for specIfyIng the type of data passed In an array of the |qlParam
type Into the ÌndIcatorCreate() functIon.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
209
PrIce Constants
CalculatIons of technIcal IndIcators requIre prIce values and/or values of volumes, on whIch
calculatIons wIll be performed. There are 7 predefIned IdentIfIers from the ENU|_APPLÌE0_PFÌCE
enumeratIon, used to specIfy the desIred prIce base for calculatIons.
ENUh_APPLIE0_PPICE
I0 0escrIptIon
PFÌCE_CLDSE Close prIce
PFÌCE_DPEN Dpen prIce
PFÌCE_HÌCH The maxImum prIce for the perIod
PFÌCE_LDW The mInImum prIce for the perIod
PFÌCE_|E0ÌAN |edIan prIce, (hIgh + low)/2
PFÌCE_TYPÌCAL TypIcal prIce, (hIgh + low + close)/J
PFÌCE_WEÌCHTE0 Average prIce, (hIgh + low + close + close)/4
Ìf the volume Is used In calculatIons, It's necessary to specIfy one of the two values from the
ENU|_APPLÌE0_7DLU|E enumeratIon.
ENUh_APPLIE0_VDLUhE
I0 0escrIptIon
7DLU|E_TÌCK TIck volume
7DLU|E_FEAL Trade volume
The IStochastIc() technIcal ÌndIcator can be calculated In two ways usIng:
eIther only Close prIces;
or HIgh and Low prIces.
To select a necessary varIant for calculatIon, specIfy one of the values of the ENU|_STD_PFÌCE
enumeratIon.
ENUh_STD_PPICE
I0 0escrIptIon
STD_LDWHÌCH CalculatIon Is based on Low/HIgh prIces
STD_CLDSECLDSE CalculatIon Is based on Close/Close prIces
Ìf a technIcal IndIcator uses for calculatIons prIce data, type of whIch Is set by ENU|_APPLÌE0_PFÌCE,
then handle of any IndIcator (buIlt In the termInal or wrItten by a user) can be used as the Input prIce
serIes. Ìn thIs case, values of the zero buffer of the IndIcator IndIcator wIll be used for calculatIons.
ThIs makes It easy to buIld values of one IndIcator usIng values of another IndIcator. The handle of a
custom IndIcator Is created by callIng the ICustom() functIon.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
210
ExampIe:
tpn·p-nry LnJL·-r·n_--p-n-r-_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- `
tpn·p-nry LnJL·-r·n_pL·r- `
//--- Lnpur p-n-m-r-n-
Lnpur Lnr -¯Pp-nL·J=!1¡ // --nL·J r·n ·-L·uL-rLnj r!- -¯P
Lnpur Lnr ¯m··r!=-¡ // ¯m··r!Lnj p-nL·J -¯P
Lnpur IHJM_MA_MIr|J¯ m-r!=MJ¯I_¯MMA¡ // M-r!·J ·r -m··r!Lnj
//---- pL·r -¯P
tpn·p-nry LnJL·-r·n_L-o-L! ¨-¯P¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n! --J
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! !
//---- pL·r -¯P_¯m··r!-J
tpn·p-nry LnJL·-r·n_L-o-L` ¨-¯P_¯m··r!-J¨
tpn·p-nry LnJL·-r·n_ryp-` ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n` H-vy
tpn·p-nry LnJL·-r·n_-ryL-` ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!` !
//--- LnJL·-r·n ourr-n-
J·uoL- -¯PÐurr-n¯`¡ // |-n- .- -r·n- r!- v-Lu-- ·r -¯P
J·uoL- -¯P_¯m··r!-JÐurr-n¯`¡ // |-n- .LLL o- -m··r!-J v-Lu-- ·r -¯P
Lnr -¯P!-nJL-¡ // |-nJL- r· r!- -¯P LnJL·-r·n
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,-¯PÐurr-n,PH¯P.ArJ-_¯ArA·¡
¯-rPnJ-xÐurr-n.!,-¯P_¯m··r!-JÐurr-n,PH¯P.ArJ-_¯ArA·¡
PnJL·-r·n¯-r¯rnLnj.PH¯P.ArJ-_¯|J-rHAMI,¨L-¯P¨·¡
PnJL·-r·n¯-rPnr-j-n.PH¯P.ArJ-_¯PJPr¯,`·¡
//---
-¯P!-nJL-=L-¯P.HJHH,¨,-¯Pp-nL·J,--P.I_.HJ¯I·¡
//---
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r Lnr o-jLn,
··n-r J·uoL- spnL·-¯`
·

Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
211
//--- ----r r!- v-Lu- ·r r!- L--r -nn·n
----rH--rInn·n.·¡
//--- J-r -¯P LnJL·-r·n J-r- Ln -n -nn-y -¯PÐurr-n ¯`
Lnr ··pL-J=.·pyÐurr-n.-¯P!-nJL-,¨,¨,n-r--_r·r-L,-¯PÐurr-n·¡
Lr.··pL-J<=¨·

-nLnr.¨Jn-oL- r· ··py r!- v-Lu-- ·r r!- LnJL·-r·n -¯P. Inn·n = ¨,
J-rH--rInn·n.·,¨, ··pL-J =¨,··pL-J·¡
n-runn.¨·¡
·
//--- .n--r- r!- LnJL·-r·n ·r -v-n-j- v-Lu-- u-Lnj v-Lu-- ·r -¯P
Lnr -¯P_MA_!-nJL-=LMA.HJHH,¨,¯m··r!,¨,m-r!,-¯P!-nJL-·¡
··pL-J=.·pyÐurr-n.-¯P_MA_!-nJL-,¨,¨,n-r--_r·r-L,-¯P_¯m··r!-JÐurr-n·¡
Lr.··pL-J<=¨·

-nLnr.¨Jn-oL- r· ··py r!- -m··r!-J LnJL·-r·n ·r -¯P. Inn·n = ¨,
J-rH--rInn·n.·,¨, ··pL-J =¨,··pL-J·¡
n-runn.¨·¡
·
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
212
SmoothIng hethods
|any technIcal IndIcators are based on varIous methods of the prIce serIes smoothIng. Some standard
technIcal IndIcators requIre specIfIcatIon of the smoothIng type as an Input parameter. For specIfyIng
the desIred type of smoothIng, IdentIfIers lIsted In the ENU|_|A_|ETHD0 enumeratIon are used.
ENUh_hA_hETHD0
I0 0escrIptIon
|D0E_S|A SImple averagIng
|D0E_E|A ExponentIal averagIng
|D0E_S||A Smoothed averagIng
|D0E_LW|A LInear·weIghted averagIng
ExampIe:
J·uoL- Ixr¯-.-¯`¡
J·uoL- Ixrr--r!¯`¡
J·uoL- IxrHLp-¯`¡
//---- !-nJL-- r·n m·vLnj -v-n-j--
Lnr Ixr¯-.-|-nJL-¡
Lnr Ixrr--r!|-nJL-¡
Lnr IxrHLp-|-nJL-¡
//--- j-r MA'- !-nJL--
Ixr¯-.-|-nJL-=LMA.HJHH,¨,¯-.---nL·J,¨,MJ¯I_¯MMA,--P.I_MI¯PAH·¡
Ixrr--r!|-nJL-=LMA.HJHH,¨,r--r!--nL·J,¨,MJ¯I_¯MMA,--P.I_MI¯PAH·¡
IxrHLp-|-nJL-=LMA.HJHH,¨,HLp---nL·J,¨,MJ¯I_¯MMA,--P.I_MI¯PAH·¡
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
213
IndIcators LInes
Some technIcal IndIcators have several buffers drawn In the chart. NumberIng of IndIcator buffers
starts wIth 0. When copyIng IndIcator values usIng the Copy8uffer() functIon Into an array of the
double type, for some IndIcators one may IndIcate the IdentIfIer of a copIed buffer Instead of Its
number.
ÌdentIfIers of IndIcator lInes permIssIble when copyIng values of I|AC0(), IF7Ì() and IStochastIc().
Constant VaIue 0escrIptIon
|AÌN_LÌNE 0 |aIn lIne
SÌCNAL_LÌNE 1 SIgnal lIne
ÌdentIfIers of IndIcator lInes permIssIble when copyIng values of A0X() and A0XW().
Constant VaIue 0escrIptIon
|AÌN_LÌNE 0 |aIn lIne
PLUS0Ì_LÌNE 1 LIne +0Ì
|ÌNUS0Ì_LÌNE 2 LIne -0Ì
ÌdentIfIers of IndIcator lInes permIssIble when copyIng values of I8ands().
Constant VaIue 0escrIptIon
8ASE_LÌNE 0 |aIn lIne
UPPEF_8AN0 1 Upper lImIt
LDWEF_8AN0 2 Lower lImIt
ÌdentIfIers of IndIcator lInes permIssIble when copyIng values of IEnvelopes() and IFractals().
Constant VaIue 0escrIptIon
UPPEF_LÌNE 0 Upper lIne
LDWEF_LÌNE 1 8ottom lIne
ÌdentIfIers of IndIcator lInes permIssIble when copyIng values of ICator()
Constant VaIue 0escrIptIon
UPPEF_HÌSTDCFA| 0 Upper hIstogram
LDWEF_HÌSTDCFA| 2 8ottom hIstogram
ÌdentIfIers of IndIcator lInes permIssIble when copyIng values of IAllIgator().
Constant VaIue 0escrIptIon
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
214
CATDFJAW_LÌNE 0 Jaw lIne
CATDFTEETH_LÌNE 1 Teeth lIne
CATDFLÌPS_LÌNE 2 LIps lIne
ÌdentIfIers of IndIcator lInes permIssIble when copyIng values of IÌchImoku().
Constant VaIue 0escrIptIon
TENKANSEN_LÌNE 0 Tenkan·sen lIne
KÌJUNSEN_LÌNE 1 KIjun·sen lIne
SENKDUSPANA_LÌNE 2 Senkou Span A lIne
SENKDUSPAN8_LÌNE J Senkou Span 8 lIne
CHÌNKDUSPAN_LÌNE 4 ChInkou Span lIne
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
215
0rawIng StyIes
When creatIng a custom IndIcator, you can specIfy one of 18 types of graphIcal plottIng (as dIsplayed
In the maIn chart wIndow or a chart subwIndow), whose values are specIfIed In the ENU|_0FAW_TYPE
enumeratIon.
Ìn one custom IndIcator, It Is permIssIble to use any IndIcator buIldIng/drawIng types. Each
constructIon type requIres specIfIcatIon of one to fIve global arrays for storIng data necessary for
drawIng. These data arrays must be bound wIth IndIcator buffers usIng the SetÌndex8uffer() functIon.
The type of data from ENU|_ÌN0EX8UFFEF_TYPE should be specIfIed for each buffer.
0ependIng on the drawIng style, you may need one to four value buffers (marked as
ÌN0ÌCATDF_0ATA). Ìf a style admIts dynamIc alternatIon of colors (all styles contaIn CDLDF In theIr
names), then you'll need one more buffer of color (IndIcated type ÌN0ÌCATDF_CDLDF_ÌN0EX). The
color buffer are always bound after value buffers correspondIng to the style.
ENUh_0PAW_TYPE
I0 0escrIptIon 0ata buffers CoIor buffers
0FAW_NDNE Not drawn 1 0
0FAW_LÌNE LIne 1 0
0FAW_SECTÌDN SectIon 1 0
0FAW_HÌSTDCFA| HIstogram from the
zero lIne
1 0
0FAW_HÌSTDCFA|2 HIstogram of the two
IndIcator buffers
2 0
0FAW_AFFDW 0rawIng arrows 1 0
0FAW_ZÌCZAC Style ZIgzag allows
vertIcal sectIon on the
bar
2 0
0FAW_FÌLLÌNC Color fIll between the
two levels
2 0
0FAW_8AFS 0Isplay as a sequence
of bars
4 0
0FAW_CAN0LES 0Isplay as a sequence
of candlestIcks
4 0
0FAW_CDLDF_LÌNE |ultIcolored lIne 1 1
0FAW_CDLDF_SECTÌD
N
|ultIcolored sectIon 1 1
0FAW_CDLDF_HÌSTD
CFA|
|ultIcolored hIstogram
from the zero lIne
1 1
0FAW_CDLDF_HÌSTD
CFA|2
|ultIcolored hIstogram
of the two IndIcator
2 1
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
216
buffers
0FAW_CDLDF_AFFD
W
0rawIng multIcolored
arrows
1 1
0FAW_CDLDF_ZÌCZAC |ultIcolored ZIgZag 2 1
0FAW_CDLDF_8AFS |ultIcolored bars 4 1
0FAW_CDLDF_CAN0L
ES
|ultIcolored
candlestIcks
4 1
To refIne the dIsplay of the selected drawIng type IdentIfIers lIsted In ENU|_PLDT_PFDPEFTY are
used.
For functIons PlotÌndexSetÌnteger() and PlotÌndexCetÌnteger()
ENUh_PLDT_PPDPEPTY_INTECEP
I0 0escrIptIon Property type
PLDT_AFFDW Arrow code for style
0FAW_AFFDW
uchar
PLDT_AFFDW_SHÌFT 7ertIcal shIft of arrows for
style 0FAW_AFFDW
Int
PLDT_0FAW_8ECÌN Number of InItIal bars wIthout
drawIng and values In the
0ataWIndow
Int
PLDT_0FAW_TYPE Type of graphIcal constructIon ENU|_0FAW_TYPE
PLDT_SHDW_0ATA SIgn of dIsplay of constructIon
values In the 0ataWIndow
bool
PLDT_SHÌFT ShIft of IndIcator plottIng along
the tIme axIs In bars
Int
PLDT_LÌNE_STYLE 0rawIng lIne style ENU|_LÌNE_STYLE
PLDT_LÌNE_WÌ0TH The thIckness of the drawIng
lIne
Int
PLDT_CDLDF_ÌN0EXES The number of colors Int
PLDT_LÌNE_CDLDF The Index of a buffer
contaInIng the drawIng color
color modIfIer = Index
number of colors
For the functIon PlotÌndexSet0ouble()
ENUh_PLDT_PPDPEPTY_0DUßLE
I0 0escrIptIon Property type
PLDT_E|PTY_7ALUE An empty value for plottIng, double
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
217
for whIch there Is no drawIng
For the functIon PlotÌndexSetStrIng()
ENUh_PLDT_PPDPEPTY_STPINC
I0 0escrIptIon Property type
PLDT_LA8EL The name of the IndIcator
graphIcal serIes to dIsplay In
the 0ataWIndow
strIng
5 styles can be used for drawIng lInes In custom IndIcators. They are valId only for the lIne thIckness 0
or 1.
ENUh_LINE_STYLE
I0 0escrIptIon
STYLE_SDLÌ0 SolId lIne
STYLE_0ASH 8roken lIne
STYLE_0DT 0otted lIne
STYLE_0ASH0DT 0ash·dot lIne
STYLE_0ASH0DT0DT 0ash · two poInts
To set the lIne drawIng style and the type of drawIng, the PlotÌndexSetÌnteger() functIon Is used. For
the FIbonaccI extensIons the thIckness and drawIng style of levels can be IndIcated usIng the
DbjectSetÌnteger() functIon.
ExampIe:
tpn·p-nry LnJL·-r·n_·!-nr_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- !
tpn·p-nry LnJL·-r·n_pL·r- !
//--- LnJL·-r·n ourr-n-
J·uoL- MAÐurr-n¯`¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ JnPnLr.·

//--- ÐLnJ r!- Ann-y r· r!- LnJL·-r·n ourr-n .Lr! LnJ-x ¨
¯-rPnJ-xÐurr-n.¨,MAÐurr-n,PH¯P.ArJ-_¯ArA·¡
//--- ¯-r r!- LLn- Jn-.Lnj
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_¯-AW_r1-I,¯-AW_HPHI·¡
//--- ¯-r r!- -ryL- LLn-
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_¯r1HI,¯r1HI_¯Jr·¡
//--- ¯-r LLn- ··L·n
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,--J·¡
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
218
//--- ¯-r LLn- r!L·kn---
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_WP¯r|,!·¡
//--- ¯-r L-o-L- r·n r!- LLn-
-L·rPnJ-x¯-r¯rnLnj.¨,-HJr_HAÐIH,¨M·vLnj Av-n-j-¨·¡
//---
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm- srLm-¯`,
··n-r J·uoL- s·p-n¯`,
··n-r J·uoL- s!Lj!¯`,
··n-r J·uoL- sL·.¯`,
··n-r J·uoL- s·L·--¯`,
··n-r L·nj srL·k_v·Lum-¯`,
··n-r L·nj sv·Lum-¯`,
··n-r Lnr s-pn--J¯`·

//---
r·n.Lnr L=pn-v_·-L·uL-r-J¡L<n-r--_r·r-L¡L--·

MAÐurr-n¯L`=·L·--¯L`¡
·
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
219
Custom IndIcators PropertIes
The number of IndIcator buffers that can be used In a custom IndIcator Is unlImIted. 8ut for each
array, whIch Is desIgnated as the IndIcator buffer usIng the SetÌndex8uffer() functIon, It's necessary to
specIfy the data type that It wIll store. ThIs may be one of the values of the ENU|_ÌN0EX8UFFEF_TYPE
enumeratIon.
ENUh_IN0EXßUFFEP_TYPE
I0 0escrIptIon
ÌN0ÌCATDF_0ATA 0ata to draw
ÌN0ÌCATDF_CDLDF_ÌN0EX Color
ÌN0ÌCATDF_CALCULATÌDNS AuxIlIary buffers for IntermedIate calculatIons
A custom IndIcator has a lot of settIngs to provIde convenIent dIsplayIng. These settIngs are made
through the assIgnment of correspondIng IndIcator propertIes usIng functIons ÌndIcatorSet0ouble(),
ÌndIcatorSetÌnteger() and ÌndIcatorSetStrIng(). ÌdentIfIers of IndIcator propertIes are lIsted In the
ENU|_CUSTD|ÌN0_PFDPEFTY enumeratIon.
ENUh_CUSTDhIN0_PPDPEPTY_INTECEP
I0 0escrIptIon Property type
ÌN0ÌCATDF_0ÌCÌTS Accuracy of drawIng of
IndIcator values
Int
ÌN0ÌCATDF_LE7ELS Number of levels In the
IndIcator wIndow
Int
ÌN0ÌCATDF_LE7ELCDLDF Color of the level lIne color modIfIer =
level number
ÌN0ÌCATDF_LE7ELSTYLE Style of the level lIne ENU|_LÌNE_STYLE modIfIer =
level number
ÌN0ÌCATDF_LE7ELWÌ0TH ThIckness of the level lIne Int modIfIer =
level number
ENUh_CUSTDhIN0_PPDPEPTY_0DUßLE
I0 0escrIptIon Property type
ÌN0ÌCATDF_|ÌNÌ|U| |axImum of the IndIcator
wIndow
double
ÌN0ÌCATDF_|AXÌ|U| |InImum of the IndIcator
wIndow
double
ÌN0ÌCATDF_LE7EL7ALUE Level value double modIfIer =
level number
ENUh_CUSTDhIN0_PPDPEPTY_STPINC
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
220
I0 0escrIptIon Property type
ÌN0ÌCATDF_SHDFTNA|E Short IndIcator name strIng
ÌN0ÌCATDF_LE7ELTEXT Level descrIptIon strIng modIfIer =
level number
ExampIes:
//--- LnJL·-r·n --rrLnj-
tpn·p-nry LnJL·-r·n_--p-n-r-_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- 1
tpn·p-nry LnJL·-r·n_pL·r- `
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_ryp-` ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n! HLj!r¯--Jn--n
tpn·p-nry LnJL·-r·n_··L·n` --J
//--- Lnpur p-n-m-r-n-
-xr-nn Lnr ·--nL·J=¯¡
-xr-nn Lnr ¯--nL·J=`¡
-xr-nn Lnr ¯L·.Lnj=`¡
//--- LnJL·-r·n ourr-n-
J·uoL- M-LnÐurr-n¯`¡
J·uoL- ¯Ljn-LÐurr-n¯`¡
J·uoL- |Lj!--Ðurr-n¯`¡
J·uoL- H·.--Ðurr-n¯`¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,M-LnÐurr-n,PH¯P.ArJ-_¯ArA·¡
¯-rPnJ-xÐurr-n.!,¯Ljn-LÐurr-n,PH¯P.ArJ-_¯ArA·¡
¯-rPnJ-xÐurr-n.`,|Lj!--Ðurr-n,PH¯P.ArJ-_.AH.JHArPJH¯·¡
¯-rPnJ-xÐurr-n.`,H·.--Ðurr-n,PH¯P.ArJ-_.AH.JHArPJH¯·¡
//--- --r -··un-·y
PnJL·-r·n¯-rPnr-j-n.PH¯P.ArJ-_¯PJPr¯,`·¡
//--- --r L-v-L-
PnJL·-r·n¯-rPnr-j-n.PH¯P.ArJ-_HIVIH¯,`·¡
PnJL·-r·n¯-r¯·uoL-.PH¯P.ArJ-_HIVIHVAHJI,¨,`¨·¡
PnJL·-r·n¯-r¯·uoL-.PH¯P.ArJ-_HIVIHVAHJI,!,-¨·¡
//--- --r m-xLmum -nJ mLnLmum r·n -uo.LnJ·.
PnJL·-r·n¯-r¯·uoL-.PH¯P.ArJ-_MPHPMJM,¨·¡
PnJL·-r·n¯-r¯·uoL-.PH¯P.ArJ-_MAxPMJM,!¨¨·¡
//--- --r- rLn-r o-n rn·m .!-r LnJ-x .LLL o- Jn-.n
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_¯-AW_ÐIJPH,·--nL·J-¯L·.Lnj-`·¡
-L·rPnJ-x¯-rPnr-j-n.!,-HJr_¯-AW_ÐIJPH,·--nL·J-¯L·.Lnj-¯--nL·J·¡
//--- --r -ryL- ¯r1HI_¯Jr r·n --··nJ LLn-
-L·rPnJ-x¯-rPnr-j-n.!,-HJr_HPHI_¯r1HI,¯r1HI_¯Jr·¡
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
221
//--- n-m- r·n ¯-r-WLnJ·. -nJ LnJL·-r·n -uo.LnJ·. L-o-L
PnJL·-r·n¯-r¯rnLnj.PH¯P.ArJ-_¯|J-rHAMI,¨¯r··!.¨-·--nL·J-¨,¨-¯--nL·J-¨,¨-¯L·.Lnj-¨·¨·¡
-L·rPnJ-x¯-r¯rnLnj.¨,-HJr_HAÐIH,¨M-Ln¨·¡
-L·rPnJ-x¯-r¯rnLnj.!,-HJr_HAÐIH,¨¯Ljn-L¨·¡
//--- --r- Jn-.Lnj LLn- -mpry v-Lu-
-L·rPnJ-x¯-r¯·uoL-.¨,-HJr_IM-r1_VAHJI,¨.¨·¡
-L·rPnJ-x¯-r¯·uoL-.!,-HJr_IM-r1_VAHJI,¨.¨·¡
//--- LnLrL-LLz-rL·n J·n-
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
222
Types of TechnIcaI IndIcators
There are two ways to programmatIcally create the IndIcator handle for further accessIng to Its values.
The fIrst way Is to dIrectly specIfy a functIon name from the lIst of technIcal IndIcators. The second
method usIng the ÌndIcatorCreate() Is to unIformly create a handle of any IndIcator by assIgnIng an
IdentIfIer from the ENU|_ÌN0ÌCATDF enumeratIon. 8oth ways of handle creatIon are equal, you can
use the one that Is most convenIent In a partIcular case when wrItIng a program In |0L5.
When creatIng an IndIcator of type ÌN0_CUSTD|, the type fIeld of the fIrst element of an array of
Input parameters |qlParam must have the TYPE_STFÌNC value of the enumeratIon ENU|_0ATATYPE,
whIle the fIeld strìn¤_vclµe of the fIrst element must contaIn the name of the custom IndIcator.
ENUh_IN0ICATDP
IdentIfIer IndIcator
ÌN0_AC Accelerator DscIllator
ÌN0_A0 AccumulatIon/0IstrIbutIon
ÌN0_A0X Average 0IrectIonal Ìndex
ÌN0_A0XW A0X by Welles WIlder
ÌN0_ALLÌCATDF AllIgator
ÌN0_A|A AdaptIve |ovIng Average
ÌN0_AD Awesome DscIllator
ÌN0_ATF Average True Fange
ÌN0_8AN0S 8ollInger 8ands
ÌN0_8EAFS 8ears Power
ÌN0_8ULLS 8ulls Power
ÌN0_8W|FÌ |arket FacIlItatIon Ìndex
ÌN0_CCÌ CommodIty Channel Ìndex
ÌN0_CHAÌKÌN ChaIkIn DscIllator
ÌN0_CUSTD| Custom IndIcator
ÌN0_0E|A 0ouble ExponentIal |ovIng Average
ÌN0_0E|AFKEF 0e|arker
ÌN0_EN7ELDPES Envelopes
ÌN0_FDFCE Force Ìndex
ÌN0_FFACTALS Fractals
ÌN0_FFA|A Fractal AdaptIve |ovIng Average
ÌN0_CATDF Cator DscIllator
ÌN0_ÌCHÌ|DKU ÌchImoku KInko Hyo
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
223
ÌN0_|A |ovIng Average
ÌN0_|AC0 |AC0
ÌN0_|FÌ |oney Flow Ìndex
ÌN0_|D|ENTU| |omentum
ÌN0_D87 Dn 8alance 7olume
ÌN0_DS|A Ds|A
ÌN0_FSÌ FelatIve Strength Ìndex
ÌN0_F7Ì FelatIve 7Igor Ìndex
ÌN0_SAF ParabolIc SAF
ÌN0_ST00E7 Standard 0evIatIon
ÌN0_STDCHASTÌC StochastIc DscIllator
ÌN0_TE|A TrIple ExponentIal |ovIng Average
ÌN0_TFÌX TrIple ExponentIal |ovIng Averages DscIllator
ÌN0_7Ì0YA 7arIable Ìndex 0ynamIc Average
ÌN0_7DLU|ES 7olumes
ÌN0_WPF WIllIams' Percent Fange
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
224
0ata Type IdentIfIers
When creatIng an IndIcator handle usIng the ÌndIcatorCreate() functIon, an array of |qlParam type
must be specIfIed as the last parameter. AccordIngly, the |qlParam structure, descrIbIng IndIcator,
contaIns a specIal fIeld type. ThIs fIeld contaIns InformatIon about the data type (real, Integer or
strIng type) that are passed by a partIcular element of the array. The value of thIs fIeld of the
|qlParam structure may be one of ENU|_0ATATYPE values.
ENUh_0ATATYPE
IdentIfIer 0ata type
TYPE_8DDL bool
TYPE_CHAF char
TYPE_UCHAF uchar
TYPE_SHDFT short
TYPE_USHDFT ushort
TYPE_CDLDF color
TYPE_ÌNT Int
TYPE_UÌNT uInt
TYPE_0ATETÌ|E datetIme
TYPE_LDNC long
TYPE_ULDNC ulong
TYPE_FLDAT float
TYPE_0DU8LE double
TYPE_STFÌNC strIng
Each element of the array descrIbes the correspondIng Input parameter of a created technIcal
IndIcator, so the type and order of elements In the array must be strIctly maIntaIned In accordance
wIth the descrIptIon.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
225
EnvIronment State
Constants descrIbIng the current runtIme envIronment of an mql5·program are dIvIded Into groups:
ClIent termInal propertIes - InformatIon about the clIent termInal;
Executed |0L5·program propertIes - mql5 program propertIes, whIch help to control Its executIon;
Symbol propertIes - obtaInIng InformatIon about a symbol;
Account propertIes - InformatIon about the current account;
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
226
CIIent TermInaI PropertIes
ÌnformatIon about the clIent termInal can be obtaIned by two functIons: TermInalÌnfoÌnteger() and
TermInalÌnfoStrIng(). For parameters, these functIons accept values from
ENU|_TEF|ÌNAL_ÌNFD_ÌNTECEF and ENU|_TEF|ÌNAL_ÌNFD_STFÌNC respectIvely.
ENUh_TEPhINAL_INFD_INTECEP
IdentIfIer 0escrIptIon Type
TEF|ÌNAL_8UÌL0 The clIent termInal buIld
number
Int
TEF|ÌNAL_CDNNECTE0 ConnectIon to a trade server bool
TEF|ÌNAL_0LLS_ALLDWE0 PermIssIon to use 0LL bool
TEF|ÌNAL_TFA0E_ALLDWE0 PermIssIon to trade bool
TEF|ÌNAL_E|AÌL_ENA8LE0 PermIssIon to send e·maIls
usIng S|TP·server and logIn,
specIfIed In the termInal
settIngs
bool
TEF|ÌNAL_FTP_ENA8LE0 PermIssIon to send reports
usIng FTP·server and logIn,
specIfIed In the termInal
settIngs
bool
TEF|ÌNAL_|AX8AFS The maxImal bars count on the
chart
Int
TEF|ÌNAL_LANCUACE Number of the code page of
the language Installed In the
clIent termInal
Int
FIle operatIons can be performed only In two dIrectorIes; correspondIng paths can be obtaIned usIng
the request for TEF|ÌNAL_0ATA_PATH and TEF|ÌNAL_CD||DN0ATA_PATH propertIes.
ENUh_TEPhINAL_INFD_STPINC
IdentIfIer 0escrIptIon Type
TEF|ÌNAL_CD|PANY Company name strIng
TEF|ÌNAL_NA|E TermInal name strIng
TEF|ÌNAL_PATH Folder from whIch the termInal
Is started
strIng
TEF|ÌNAL_0ATA_PATH Folder In whIch termInal data
are stored
strIng
TEF|ÌNAL_CD||DN0ATA_PAT
H
Common path for all of the
termInals Installed on a
computer
strIng
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
227
For a better understandIng of paths, stored In propertIes of TEF|ÌNAL_PATH, TEF|ÌNAL_0ATA_PATH
and TEF|ÌNAL_CD||DN0ATA_PATH parameters, It Is recommended to execute the scrIpt, whIch wIll
return these values for the current copy of the clIent termInal, Installed on your computer
ExampIe: ScrIpt returns InformatIon about the cIIent termInaI paths
//--------------------------------------------------------------------
// .!-·k_r-nmLn-L--r!-.m¬¯
// .·pynLj!r `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m¬L¯.··m
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨¨¨
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//---
-nLnr.¨rI-MPHAH_-Ar| = ¨,r-nmLn-LPnr·¯rnLnj.rI-MPHAH_-Ar|··¡
-nLnr.¨rI-MPHAH_¯ArA_-Ar| = ¨,r-nmLn-LPnr·¯rnLnj.rI-MPHAH_¯ArA_-Ar|··¡
-nLnr.¨rI-MPHAH_.JMMJH¯ArA_-Ar| = ¨,r-nmLn-LPnr·¯rnLnj.rI-MPHAH_.JMMJH¯ArA_-Ar|··¡
·
As result of the scrIpt executIon In the Experts Journal you wIll see a messages, lIke the followIng:
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
228
PunnIng hDL Program PropertIes
To obtaIn InformatIon about the currently runnIng mql5 program, constants from
ENU|_|0L5_ÌNFD_ÌNTECEF and ENU|_|0L5_ÌNFD_STFÌNC are used.
For functIon |0L5ÌnfoÌnteger
ENUh_hDL5_INFD_INTECEP
IdentIfIer 0escrIptIon Type
|0L5_PFDCFA|_TYPE Type of the mql5 program ENU|_PFDCFA|_TYPE
|0L5_0LLS_ALLDWE0 The permIssIon to use 0LL for
the gIven executed program
bool
|0L5_TFA0E_ALLDWE0 The permIssIon to trade for
the gIven executed program
bool
|0L5_0E8UCCÌNC The flag, that IndIcates the
debug mode
bool
|0L5_TESTÌNC The flag, that IndIcates the
tester process
bool
|0L5_DPTÌ|ÌZATÌDN The flag, that IndIcates the
optImIzatIon process
bool
|0L5_7ÌSUAL_|D0E The flag, that IndIcates the
vIsual tester process
bool
For functIon |0L5ÌnfoStrIng
ENUh_hDL5_INFD_STPINC
IdentIfIer 0escrIptIon Type
|0L5_PFDCFA|_NA|E Name of the mql5·program
executed
strIng
|0L5_PFDCFA|_PATH Path for the gIven executed
program
strIng
ÌnformatIon about the type of the runnIng program, values of ENU|_PFDCFA|_TYPE are used.
ENUh_PPDCPAh_TYPE
IdentIfIer 0escrIptIon
PFDCFA|_SCFÌPT ScrIpt
PFDCFA|_EXPEFT Expert
PFDCFA|_ÌN0ÌCATDF ÌndIcator
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
229
ExampIe:
IHJM_--JJ-AM_r1-I m¬L_pn·jn-m=.IHJM_--JJ-AM_r1-I·M,H¯Pnr·Pnr-j-n.M,H¯_--JJ-AM_r1-I·¡
-.Lr·!.m¬L_pn·jn-m·

·--- --JJ-AM_¯.-P-r.

-nLnr.__¯PHI__-¨ L- -·nLpr¨·¡
on--k¡
·
·--- --JJ-AM_Ix-I-r.

-nLnr.__¯PHI__-¨ L- Ixp-nr AJvL-·n¨·¡
on--k¡
·
·--- --JJ-AM_PH¯P.ArJ-.

-nLnr.__¯PHI__-¨ L- ·u-r·m LnJL·-r·n¨·¡
on--k¡
·
J-r-uLr.-nLnr.¨M,H¯ ryp- v-Lu- L- ¨,m¬L_pn·jn-m·¡
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
230
SymboI propertIes
To obtaIn the current market InformatIon there are several functIons: SymbolÌnfoÌnteger(),
SymbolÌnfo0ouble() and SymbolÌnfoStrIng(). The fIrst parameter Is the symbol name, the values of the
second functIon parameter can be one of the IdentIfIers of ENU|_SY|8DL_ÌNFD_ÌNTECEF,
ENU|_SY|8DL_ÌNFD_0DU8LE and ENU|_SY|8DL_ÌNFD_STFÌNC.
For functIon SymbolÌnfoÌnteger()
ENUh_SYhßDL_INFD_INTECEP
IdentIfIer 0escrIptIon Type
SY|8DL_SELECT Symbol Is selected In |arket
Watch
bool
SY|8DL_7DLU|E 7olume of the last deal long
SY|8DL_7DLU|EHÌCH |axImal day volume long
SY|8DL_7DLU|ELDW |InImal day volume long
SY|8DL_7DLU|E8Ì0 7olume for current 8Id long
SY|8DL_7DLU|EASK 7olume for current Ask long
SY|8DL_TÌ|E TIme of the last quote datetIme
SY|8DL_0ÌCÌTS 0IgIts after a decImal poInt Int
SY|8DL_SPFEA0_FLDAT ÌndIcatIon of a floatIng spread bool
SY|8DL_SPFEA0 Spread value In poInts Int
SY|8DL_TÌCKS_8DDK0EPTH |axImal number of requests
shown In 0epth of |arket. For
symbols that have no queue of
requests, the value Is equal to
zero.
Int
SY|8DL_TFA0E_CALC_|D0E Contract prIce calculatIon mode ENU|_SY|8DL_CALC_|D0E
SY|8DL_TFA0E_|D0E Drder executIon type ENU|_SY|8DL_TFA0E_|D0E
SY|8DL_STAFT_TÌ|E 0ate of the symbol trade
begInnIng (usually used for
futures)
datetIme
SY|8DL_EXPÌFATÌDN_TÌ|E 0ate of the symbol trade end
(usually used for futures)
datetIme
SY|8DL_TFA0E_STDPS_LE7EL |InImal IndentIon In poInts
from the current close prIce to
place Stop orders
Int
SY|8DL_TFA0E_FFEEZE_LE7EL 0Istance to freeze trade
operatIons In poInts
Int
SY|8DL_TFA0E_EXE|D0E 0eal executIon mode ENU|_SY|8DL_TFA0E_EXECUT
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
231
ÌDN
SY|8DL_SWAP_|D0E Swap calculatIon model ENU|_SY|8DL_SWAP_|D0E
SY|8DL_SWAP_FDLLD7EFJ0A
YS
Weekday to charge J days
swap rollover
ENU|_0AY_DF_WEEK
SY|8DL_EXPÌFATÌDN_|D0E Flags of allowed order
expIratIon modes
Int
SY|8DL_FÌLLÌNC_|D0E Flags of allowed order fIllIng
modes
int
For functIon SymbolÌnfo0ouble()
ENUh_SYhßDL_INFD_0DUßLE
IdentIfIer 0escrIptIon Type
SY|8DL_8Ì0 8Id · best sell offer double
SY|8DL_8Ì0HÌCH |axImal 8Id of the day double
SY|8DL_8Ì0LDW |InImal 8Id of the day double
SY|8DL_ASK Ask · best buy offer double
SY|8DL_ASKHÌCH |axImal Ask of the day double
SY|8DL_ASKLDW |InImal Ask of the day double
SY|8DL_LAST PrIce of the last deal double
SY|8DL_LASTHÌCH |axImal Last of the day double
SY|8DL_LASTLDW |InImal Last of the day double
SY|8DL_PDÌNT Symbol poInt value double
SY|8DL_TFA0E_TÌCK_7ALUE 7alue of
SY|8DL_TFA0E_TÌCK_7ALUE_P
FDFÌT
double
SY|8DL_TFA0E_TÌCK_7ALUE_P
FDFÌT
Calculated tIck prIce for a
profItable posItIon
double
SY|8DL_TFA0E_TÌCK_7ALUE_L
DSS
Calculated tIck prIce for a
losIng posItIon
double
SY|8DL_TFA0E_TÌCK_SÌZE |InImal prIce change double
SY|8DL_TFA0E_CDNTFACT_SÌ
ZE
Trade contract sIze double
SY|8DL_7DLU|E_|ÌN |InImal volume for a deal double
SY|8DL_7DLU|E_|AX |axImal volume for a deal double
SY|8DL_7DLU|E_STEP |InImal volume change step
for deal executIon
double
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
232
SY|8DL_7DLU|E_LÌ|ÌT |axImum allowed total volume
of the open posItIon and
pendIng orders (regardless of
dIrectIon) for one symbol
double
SY|8DL_SWAP_LDNC Long swap value double
SY|8DL_SWAP_SHDFT Short swap value double
SY|8DL_|AFCÌN_ÌNÌTÌAL ÌnItIal margIn means the
amount In the margIn currency
requIred for openIng a posItIon
wIth the volume of one lot. Ìt
Is used for checkIng a clIent's
assets when he or she enters
the market.
double
SY|8DL_|AFCÌN_|AÌNTENANC
E
The maIntenance margIn. Ìf Its
Is set, It sets the margIn
amount In the margIn currency
of the symbol, charged from
one lot. Ìt Is used for checkIng
a clIent's assets when hIs/her
account state changes. Ìf the
maIntenance margIn Is equal to
0, the InItIal margIn Is used.
double
SY|8DL_|AFCÌN_LDNC Fate of margIn chargIng on
long posItIons
double
SY|8DL_|AFCÌN_SHDFT Fate of margIn chargIng on
short posItIons
double
SY|8DL_|AFCÌN_LÌ|ÌT Fate of margIn chargIng on
LImIt orders
double
SY|8DL_|AFCÌN_STDP Fate of margIn chargIng on
Stop orders
double
SY|8DL_|AFCÌN_STDPLÌ|ÌT Fate of margIn chargIng on
Stop LImIt orders
double
For functIon SymbolÌnfoStrIng()
ENUh_SYhßDL_INFD_STPINC
IdentIfIer 0escrIptIon Type
SY|8DL_CUFFENCY_8ASE 8asIc currency of a symbol strIng
SY|8DL_CUFFENCY_PFDFÌT ProfIt currency strIng
SY|8DL_CUFFENCY_|AFCÌN |argIn currency strIng
SY|8DL_8ANK Feeder of the current quote strIng
SY|8DL_0ESCFÌPTÌDN Symbol descrIptIon strIng
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
233
SY|8DL_PATH Path In the symbol tree strIng
For each symbol several expIratIon modes of pendIng orders can be specIfIed. A flag Is matched to
each mode. Flags can be combIned usIng the operatIon of logIcal DP (1), for example,
SY|8DL_EXPÌFATÌDN_CTC1SY|8DL_EXPÌFATÌDN_SFECÌFÌE0. Ìn order to check whether a certaIn
mode Is allowed for the symbol, the result of the logIcal AN0 (E) should be compared to the mode flag.
Ìf flag SY|8DL_EXPÌFATÌDN_SFECÌFÌE0 Is specIfIed for a symbol, then whIle sendIng a pendIng order,
you may specIfy the moment thIs pendIng order Is valId tIll.
IdentIfIer VaIue 0escrIptIon
SY|8DL_EXPÌFATÌDN_CTC 1 The order Is valId durIng the
unlImIted tIme perIod, untIl It
Is explIcItly canceled
SY|8DL_EXPÌFATÌDN_0AY 2 The order Is valId tIll the end of
the day
SY|8DL_EXPÌFATÌDN_SFECÌFÌE
0
4 The expIratIon tIme Is
specIfIed In the order
ExampIe:
//--------------------------------------------------------------------
// .!-·k- Lr r!- -p-·LrL-J -xpLn-rL·n m·J- L- -LL·.-J
//--------------------------------------------------------------------
o··L P-IxpLn-rL·nryp-ALL·.-J.-rnLnj -ymo·L,Lnr -xp_ryp-·

//--- Jor-Ln r!- v-Lu- ·r r!- pn·p-nry r!-r J--·nLo-- -LL·.-J -xpLn-rL·n m·J--
Lnr -xpLn-rL·n=.Lnr·¯ymo·LPnr·Pnr-j-n.-ymo·L,¯1MÐJH_Ix-P-ArPJH_MJ¯I·¡
//--- --runn rnu-, Lr m·J- -xp_ryp- L- -LL·.-J
n-runn..-xpLn-rL·ns-xp_ryp-·==-xp_ryp-·¡
·
When sendIng an order, you can specIfy the fIllIng polIcy for the volume set In the order. Allowed order
fIllIng modes for each symbol are specIfIed In the table. You can set several modes for one symbol by
combInIng flags. The flags can be combIned by the operatIon of the logIcal DP (1), for example,
SY|8DL_FÌLLÌNC_ALL_DF_NDNE1SY|8DL_CANCEL_FE|AÌN0. Ìn order to check whether a certaIn
mode Is allowed for the symbol, the result of the logIcal AN0 (E) should be compared to the mode flag.
IdentIfIer VaIue 0escrIptIon
SY|8DL_FÌLLÌNC_ALL_DF_NDN
E
1 ¨All or none¨. Ìf the volume
specIfIed In the order wIth the
specIfIed prIce cannot be fully
fIlled, the order Is canceled and
the deal Is not conducted
SY|8DL_CANCEL_FE|AÌN0 2 Ìf only part of the specIfIed
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
234
volume can be fIlled, the deal
for the avaIlable volume wIll be
executed. The order remaInder
Is canceled, and the new order
Is not placed
SY|8DL_FETUFN_FE|AÌN0 4 A deal Is executed for the
avaIlable volume. A new order
at the same prIce Is set for the
remaInder
ExampIe:
//--------------------------------------------------------------------
// .!-·k- Lr r!- -p-·LrL-J -xpLn-rL·n m·J- L- -LL·.-J
//--------------------------------------------------------------------
o··L P-¯LLLLnjryp-ALL·.-J.-rnLnj -ymo·L,Lnr rLLL_ryp-·

//--- Jor-Ln r!- v-Lu- ·r r!- pn·p-nry r!-r J--·nLo-- -LL·.-J -xpLn-rL·n m·J--
Lnr rLLLLnj=.Lnr·¯ymo·LPnr·Pnr-j-n.-ymo·L,¯1MÐJH_¯PHHPHJ_MJ¯I·¡
//--- --runn rnu-, Lr m·J- rLLL_ryp- L- -LL·.-J
n-runn..rLLLLnj s rLLL_ryp-·==rLLL_ryp-·¡
·
The ENU|_SY|8DL_CALC_|D0E enumeratIon Is used for obtaInIng InformatIon about how the margIn
requIrements for a symbol are calculated.
ENUh_SYhßDL_CALC_hD0E
IdentIfIer 0escrIptIon FormuIa
SY|8DL_CALC_|D0E_FDFEX Forex mode · calculatIon of
profIt and margIn for Forex
|argIn: Lots*Contract_SIze/
Leverage
ProfIt: (close_prIce·
open_prIce)*Contract_SIze*Lots
SY|8DL_CALC_|D0E_FUTUFE
S
Futures mode · calculatIon of
margIn and profIt for futures
|argIn: Lots
*ÌnItIal|argIn*Percentage/100
ProfIt: (close_prIce·
open_prIce)*TIckPrIce/
TIckSIze*Lots
SY|8DL_CALC_|D0E_CF0 CF0 mode · calculatIon of
margIn and profIt for CF0
|argIn: Lots
*ContractSIze*|arketPrIce*Perc
entage/100
ProfIt: (close_prIce·
open_prIce)*Contract_SIze*Lots
SY|8DL_CALC_|D0E_CF0ÌN0E
X
CF0 Index mode · calculatIon
of margIn and profIt for CF0 by
Indexes
|argIn:
(Lots*ContractSIze*|arketPrIce
)*TIckPrIce/TIckSIze
ProfIt: (close_prIce·
open_prIce)*Contract_SIze*Lots
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
235
SY|8DL_CALC_|D0E_CF0LE7E
FACE
CF0 Leverage mode ·
calculatIon of margIn and profIt
for CF0 at leverage tradIng
|argIn:
(Lots*ContractSIze*|arketPrIce
*Percentage)/Leverage
ProfIt: (close_prIce·
open_prIce)*Contract_SIze*Lots
There are several symbol tradIng modes. ÌnformatIon about tradIng modes of a certaIn symbol Is
reflected In the values of enumeratIon ENU|_SY|8DL_TFA0E_|D0E.
ENUh_SYhßDL_TPA0E_hD0E
IdentIfIer 0escrIptIon
SY|8DL_TFA0E_|D0E_0ÌSA8LE0 Trade Is dIsabled for the symbol
SY|8DL_TFA0E_|D0E_LDNCDNLY Allowed only long posItIons
SY|8DL_TFA0E_|D0E_SHDFTDNLY Allowed only short posItIons
SY|8DL_TFA0E_|D0E_CLDSEDNLY Allowed only posItIon close operatIons
SY|8DL_TFA0E_|D0E_FULL No trade restrIctIons
PossIble deal executIon modes for a certaIn symbol are defIned In enumeratIon
ENU|_SY|8DL_TFA0E_EXECUTÌDN.
ENUh_SYhßDL_TPA0E_EXECUTIDN
IdentIfIer 0escrIptIon
SY|8DL_TFA0E_EXECUTÌDN_FE0UEST ExecutIon by request
SY|8DL_TFA0E_EXECUTÌDN_ÌNSTANT Ìnstant executIon
SY|8DL_TFA0E_EXECUTÌDN_|AFKET |arket executIon
|ethods of swap calculatIon at posItIon transfer are specIfIed In enumeratIon
ENU|_SY|8DL_SWAP_|D0E.
ENUh_SYhßDL_SWAP_hD0E
IdentIfIer 0escrIptIon
SY|8DL_SWAP_|D0E_0ÌSA8LE0 Swap mode dIsabled (no swaps)
SY|8DL_SWAP_|D0E_8Y_PDÌNTS Swaps In poInts
SY|8DL_SWAP_|D0E_8Y_|DNEY Swaps In money, Its value Is specIfIed In the
symbol propertIes In the deposIt currency
SY|8DL_SWAP_|D0E_8Y_ÌNTEFEST Swaps In yearly percents (bank mode · J60 days
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
236
In a year)
SY|8DL_SWAP_|D0E_8Y_|AFCÌN_CUFFENCY Swaps In money, Its value Is specIfIed In the
symbol propertIes In the margIn currency
7alues of the ENU|_0AY_DF_WEEK enumeratIon are used for specIfyIng weekdays.
ENUh_0AY_DF_WEEK
IdentIfIer 0escrIptIon
SUN0AY Sunday
|DN0AY |onday
TUES0AY Tuesday
WE0NES0AY Wednesday
THUFS0AY Thursday
FFÌ0AY FrIday
SATUF0AY Saturday
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
237
Account PropertIes
To obtaIn InformatIon about the current account there are several functIons: AccountÌnfoÌnteger(),
AccountÌnfo0ouble() and AccountÌnfoStrIng(). The functIon parameter values can accept values from
the correspondIng ENU|_ACCDUNT_ÌNFD enumeratIons.
For the functIon AccountÌnfoÌnteger()
ENUh_ACCDUNT_INFD_INTECEP
IdentIfIer 0escrIptIon Type
ACCDUNT_LDCÌN Account number long
ACCDUNT_TFA0E_|D0E Account trade mode ENU|_ACCDUNT_TFA0E_|D0E
ACCDUNT_LE7EFACE Account leverage long
ACCDUNT_LÌ|ÌT_DF0EFS |axImum allowed number of
actIve pendIng orders
Int
ACCDUNT_|AFCÌN_SD_|D0E |ode for settIng the mInImal
allowed margIn
ENU|_ACCDUNT_STDPDUT_|D
0E
ACCDUNT_TFA0E_ALLDWE0 Allowed trade for the current
account
bool
ACCDUNT_TFA0E_EXPEFT Allowed trade for an Expert
AdvIsor
bool
For the functIon AccountÌnfo0ouble()
ENUh_ACCDUNT_INFD_0DUßLE
IdentIfIer 0escrIptIon Type
ACCDUNT_8ALANCE Account balance In the deposIt
currency
double
ACCDUNT_CFE0ÌT Account credIt In the deposIt
currency
double
ACCDUNT_PFDFÌT Current profIt of an account In
the deposIt currency
double
ACCDUNT_E0UÌTY Account equIty In the deposIt
currency
double
ACCDUNT_|AFCÌN Account margIn used In the
deposIt currency
double
ACCDUNT_FFEE|AFCÌN Free margIn of an account In
the deposIt currency
double
ACCDUNT_|AFCÌN_LE7EL Account margIn level In
percents
double
ACCDUNT_|AFCÌN_SD_CALL |argIn call level. 0ependIng on double
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
238
the set
ACCDUNT_|AFCÌN_SD_|D0E
Is expressed In percents or In
the deposIt currency
ACCDUNT_|AFCÌN_SD_SD |argIn stop out level.
0ependIng on the set
ACCDUNT_|AFCÌN_SD_|D0E
Is expressed In percents or In
the deposIt currency
double
For functIon AccountÌnfoStrIng()
ENUh_ACCDUNT_INFD_STPINC
IdentIfIer 0escrIptIon Type
ACCDUNT_NA|E ClIent name strIng
ACCDUNT_SEF7EF Trade server name strIng
ACCDUNT_CUFFENCY Account currency strIng
ACCDUNT_CD|PANY Name of a company that serves
the account
strIng
ENUh_ACCDUNT_TPA0E_hD0E
IdentIfIer 0escrIptIon
ACCDUNT_TFA0E_|D0E_0E|D 0emo account
ACCDUNT_TFA0E_|D0E_CDNTEST Contest account
ACCDUNT_TFA0E_|D0E_FEAL Feal account
ENUh_ACCDUNT_STDPDUT_hD0E
IdentIfIer 0escrIptIon
ACCDUNT_STDPDUT_|D0E_PEFCENT Account stop out mode In percents
ACCDUNT_STDPDUT_|D0E_|DNEY Account stop out mode In money
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
239
Trade Constants
7arIous constants used for programmIng tradIng strategIes, are dIvIded Into the followIng groups:
HIstory 0atabase PropertIes - receIvIng general InformatIon on a symbol;
Drder propertIes - obtaInIng InformatIon about trade orders;
PosItIon propertIes - obtaInIng InformatIon about current posItIons;
0eal propertIes - obtaInIng InformatIon about deals;
Trade operatIon types - descrIptIon of trade operatIons avaIlable;
Trade orders In 0D| - separatIon of orders accordIng to the dIrectIon of a requested operatIon.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
240
HIstory 0atabase PropertIes
When accessIng tImeserIes the SerIesÌnfoÌnteger() functIon Is used for obtaInIng addItIonal symbol
InformatIon. ÌdentIfIer of a requIred property Is passed as the functIon parameter. The IdentIfIer can
be one of values of ENU|_SEFÌES_ÌNFD_ÌNTECEF.
ENUh_SEPIES_INFD_INTECEP
IdentIfIer 0escrIptIon Type
SEFÌES_8AFS_CDUNT 8ars count for the symbol·
perIod for the current moment
long
SEFÌES_FÌFST0ATE The very fIrst date for the
symbol·perIod for the current
moment
datetIme
SEFÌES_LAST8AF_0ATE Dpen tIme of the last bar of
the symbol·perIod
datetIme
SEFÌES_SEF7EF_FÌFST0ATE The very fIrst date In the
hIstory of the symbol on the
server regardless of the
tImeframe
datetIme
SEFÌES_TEF|ÌNAL_FÌFST0ATE The very fIrst date In the
hIstory of the symbol In the
clIent termInal, regardless of
the tImeframe
datetIme
SEFÌES_SYNCFDNÌZE0 Symbol/perIod data
synchronIzatIon flag for the
current moment
bool
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
241
Drder PropertIes
Fequests to execute trade operatIons are formalIzed as orders. Each order has a varIety of propertIes
for readIng. ÌnformatIon on them can be obtaIned usIng functIons DrderCet...() and
HIstoryDrderCet...().
For functIons DrderCetÌnteger() and HIstoryDrderCetÌnteger()
ENUh_DP0EP_PPDPEPTY_INTECEP
IdentIfIer 0escrIptIon Type
DF0EF_TÌ|E_SETUP Drder setup tIme datetIme
DF0EF_TYPE Drder type ENU|_DF0EF_TYPE
DF0EF_STATE Drder state ENU|_DF0EF_STATE
DF0EF_TÌ|E_EXPÌFATÌDN Drder expIratIon tIme datetIme
DF0EF_TÌ|E_0DNE Drder executIon or cancellatIon
tIme
datetIme
DF0EF_TYPE_FÌLLÌNC Drder fIllIng type ENU|_DF0EF_TYPE_FÌLLÌNC
DF0EF_TYPE_TÌ|E Drder lIfetIme ENU|_DF0EF_TYPE_TÌ|E
DF0EF_|ACÌC Ì0 of an Expert AdvIsor that
has placed the order (desIgned
to ensure that each Expert
AdvIsor places Its own unIque
number)
long
DF0EF_PDSÌTÌDN_Ì0 PosItIon IdentIfIer that Is set
to an order as soon as It Is
executed. Each executed order
results In a deal that opens or
modIfIes an already exIstIng
posItIon. The IdentIfIer of
exactly thIs posItIon Is set to
the executed order at thIs
moment.
long
For functIons DrderCet0ouble() and HIstoryDrderCet0ouble()
ENUh_DP0EP_PPDPEPTY_0DUßLE
IdentIfIer 0escrIptIon Type
DF0EF_7DLU|E_ÌNÌTÌAL Drder InItIal volume double
DF0EF_7DLU|E_CUFFENT Drder current volume double
DF0EF_PFÌCE_DPEN PrIce specIfIed In the order double
DF0EF_SL Stop Loss value double
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
242
DF0EF_TP Take ProfIt value double
DF0EF_PFÌCE_CUFFENT The current prIce of the order
symbol
double
DF0EF_PFÌCE_STDPLÌ|ÌT The LImIt order prIce for the
StopLImIt order
double
For functIons DrderCetStrIng() and HIstoryDrderCetStrIng()
ENUh_DP0EP_PPDPEPTY_STPINC
IdentIfIer 0escrIptIon Type
DF0EF_SY|8DL Symbol of the order strIng
DF0EF_CD||ENT Drder comment strIng
When sendIng a trade request usIng the DrderSend() functIon, some operatIons requIre the IndIcatIon
of the order type. The order type Is specIfIed In the type fIeld of the specIal structure
|qlTradeFequest, and can accept values of the ENU|_DF0EF_TYPE enumeratIon.
ENUh_DP0EP_TYPE
IdentIfIer 0escrIptIon
DF0EF_TYPE_8UY |arket 8uy order
DF0EF_TYPE_SELL |arket Sell order
DF0EF_TYPE_8UY_LÌ|ÌT 8uy LImIt pendIng order
DF0EF_TYPE_SELL_LÌ|ÌT Sell LImIt pendIng order
DF0EF_TYPE_8UY_STDP 8uy Stop pendIng order
DF0EF_TYPE_SELL_STDP Sell Stop pendIng order
DF0EF_TYPE_8UY_STDP_LÌ|ÌT Upon reachIng the order prIce, a pendIng 8uy
LImIt order Is places at the StopLImIt prIce
DF0EF_TYPE_SELL_STDP_LÌ|ÌT Upon reachIng the order prIce, a pendIng Sell
LImIt order Is places at the StopLImIt prIce
Each order has a status that descrIbes Its state. To obtaIn InformatIon, use DrderCetÌnteger() or
HIstoryDrderCetÌnteger() wIth the DF0EF_STATE modIfIer. Allowed values are stored In the
ENU|_DF0EF_STATE enumeratIon.
ENUh_DP0EP_STATE
IdentIfIer 0escrIptIon
DF0EF_STATE_STAFTE0 Drder checked, but not yet accepted by broker
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
243
DF0EF_STATE_PLACE0 Drder accepted
DF0EF_STATE_CANCELE0 Drder canceled by clIent
DF0EF_STATE_PAFTÌAL Drder partIally executed
DF0EF_STATE_FÌLLE0 Drder fully executed
DF0EF_STATE_FEJECTE0 Drder rejected
DF0EF_STATE_EXPÌFE0 Drder expIred
When sendIng a trade request usIng the DrderSend() functIon, the fIllIng polIcy can be set for an order
In the type_fìllìn¤ fIeld of the specIal structure |qlTradeFequest. 7alues of the
ENU|_DF0EF_TYPE_FÌLLÌNC enumeratIon are allowed. To obtaIn the value of thIs property, use the
functIon DrderCetÌnteger() or HIstoryDrderCetÌnteger() wIth the DF0EF_TYPE_FÌLLÌNC modIfIer.
ENUh_DP0EP_TYPE_FILLINC
IdentIfIer 0escrIptIon
DF0EF_FÌLLÌNC_ADN The deal can be executed exclusIvely wIth a
specIfIed volume at the equal or better prIce
than the order specIfIed prIce. Ìf there Is no
suffIcIent volume of offers on the order symbol,
the order wIll not be executed.
DF0EF_FÌLLÌNC_CANCEL An agreement to execute the deal wIth maxImal
market volume at the equal or better prIce than
the order specIfIed prIce. Ìn thIs case an
addItIonal order for volume unfIlled wIll not be
placed.
DF0EF_FÌLLÌNC_FETUFN An agreement to execute the deal wIth maxImal
market volume at the equal or better prIce than
the order specIfIed prIce. Ìn thIs case an
addItIonal order for volume unfIlled wIll be
placed.
The order valIdIty perIod can be set In the type_tìme fIeld of the specIal structure |qlTradeFequest
when sendIng a trade request usIng the DrderSend() functIon. 7alues of the ENU|_DF0EF_TYPE_TÌ|E
enumeratIon are allowed. To obtaIn the value of thIs property use the functIon DrderCetÌnteger() or
HIstoryDrderCetÌnteger() wIth the DF0EF_TYPE_TÌ|E modIfIer.
ENUh_DP0EP_TYPE_TIhE
IdentIfIer 0escrIptIon
DF0EF_TÌ|E_CTC Cood tIll cancel order
DF0EF_TÌ|E_0AY Cood tIll current trade day order
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
244
DF0EF_TÌ|E_SPECÌFÌE0 Cood tIll expIred order
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
245
PosItIon PropertIes
ExecutIon of trade operatIons results In the openIng of a posItIon, changIng of Its volume and/or
dIrectIon, or Its dIsappearance. Trade operatIons are conducted based on orders, sent by the
DrderSend() functIon In the form of trade requests. For each fInancIal securIty (symbol) only one open
posItIon Is possIble. A posItIon has a set of propertIes avaIlable for readIng by the PosItIonCet...()
functIons.
For the functIon PosItIonCetÌnteger()
ENUh_PDSITIDN_PPDPEPTY_INTECEP
IdentIfIer 0escrIptIon Type
PDSÌTÌDN_TÌ|E PosItIon open tIme datetIme
PDSÌTÌDN_TYPE PosItIon type ENU|_PDSÌTÌDN_TYPE
PDSÌTÌDN_|ACÌC PosItIon magIc number (see
DF0EF_|ACÌC)
long
PDSÌTÌDN_Ì0ENTÌFÌEF PosItIon IdentIfIer Is a unIque
number that Is assIgned to
every newly opened posItIon
and doesn't change durIng the
entIre lIfetIme of the posItIon.
PosItIon turnover doesn't
change Its IdentIfIer.
long
For the functIon PosItIonCet0ouble()
ENUh_PDSITIDN_PPDPEPTY_0DUßLE
IdentIfIer 0escrIptIon Type
PDSÌTÌDN_7DLU|E PosItIon volume double
PDSÌTÌDN_PFÌCE_DPEN PosItIon open prIce double
PDSÌTÌDN_SL Stop Loss level of opened
posItIon
double
PDSÌTÌDN_TP Take ProfIt level of opened
posItIon
double
PDSÌTÌDN_PFÌCE_CUFFENT Current prIce of the posItIon
symbol
double
PDSÌTÌDN_CD||ÌSSÌDN CommIssIon double
PDSÌTÌDN_SWAP CumulatIve swap double
PDSÌTÌDN_PFDFÌT Current profIt double
For the functIon PosItIonCetStrIng()
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
246
ENUh_PDSITIDN_PPDPEPTY_STPINC
IdentIfIer 0escrIptIon Type
PDSÌTÌDN_SY|8DL Symbol of the posItIon strIng
PDSÌTÌDN_CD||ENT PosItIon comment strIng
0IrectIon of an open posItIon (buy or sell) Is defIned by the value from the ENU|_PDSÌTÌDN_TYPE
enumeratIon. Ìn order to obtaIn the type of an open posItIon use the PosItIonCetÌnteger() functIon
wIth the PDSÌTÌDN_TYPE modIfIer.
ENUh_PDSITIDN_TYPE
IdentIfIer 0escrIptIon
PDSÌTÌDN_TYPE_8UY 8uy
PDSÌTÌDN_TYPE_SELL Sell
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
247
0eaI PropertIes
A deal Is the reflectIon of the fact of a trade operatIon executIon based on an order that contaIns a
trade request. Each trade Is descrIbed by propertIes that allow to obtaIn InformatIon about It. Ìn order
to read values of propertIes, functIons of the HIstory0ealCet...() type are used, that return values
from correspondIng enumeratIons.
For the functIon HIstory0ealCetÌnteger()
ENUh_0EAL_PPDPEPTY_INTECEP
IdentIfIer 0escrIptIon Type
0EAL_DF0EF 0eal order number long
0EAL_TÌ|E 0eal tIme datetIme
0EAL_TYPE 0eal type ENU|_0EAL_TYPE
0EAL_ENTFY 0eal entry · entry In, entry out,
reverse
ENU|_0EAL_ENTFY
0EAL_|ACÌC 0eal magIc number (see
DF0EF_|ACÌC)
long
0EAL_PDSÌTÌDN_Ì0 ÌdentIfIer of a posItIon, In the
openIng, modIfIcatIon or
change of whIch thIs deal took
part. Each posItIon has a
unIque IdentIfIer that Is
assIgned to all deals executed
for the symbol durIng the
entIre lIfetIme of the posItIon.
long
For the functIon HIstory0ealCet0ouble()
ENUh_0EAL_PPDPEPTY_0DUßLE
IdentIfIer 0escrIptIon Type
0EAL_7DLU|E 0eal volume double
0EAL_PFÌCE 0eal prIce double
0EAL_CD||ÌSSÌDN 0eal commIssIon double
0EAL_SWAP CumulatIve swap on close double
0EAL_PFDFÌT 0eal profIt double
For the functIon HIstory0ealCetStrIng()
ENUh_0EAL_PPDPEPTY_STPINC
IdentIfIer 0escrIptIon Type
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
248
0EAL_SY|8DL 0eal symbol strIng
0EAL_CD||ENT 0eal comment strIng
Each deal Is characterIzed by a type, allowed values are enumerated In ENU|_0EAL_TYPE. Ìn order to
obtaIn InformatIon about the deal type, use the HIstory0ealCetÌnteger() functIon wIth the 0EAL_TYPE
modIfIer.
ENUh_0EAL_TYPE
IdentIfIer 0escrIptIon
0EAL_TYPE_8UY 8uy
0EAL_TYPE_SELL Sell
0EAL_TYPE_8ALANCE 8alance
0EAL_TYPE_CFE0ÌT CredIt
0EAL_TYPE_CHAFCE AddItIonal charge
0EAL_TYPE_CDFFECTÌDN CorrectIon
0eals dIffer not only In theIr types set In ENU|_0EAL_TYPE, but also In the way they change posItIons.
ThIs can be a sImple posItIon openIng, or accumulatIon of a prevIously opened posItIon (market
enterIng), posItIon closIng by an opposIte deal of a correspondIng volume (market exItIng), or posItIon
reversIng, If the opposIte·dIrectIon deal covers the volume of the prevIously opened posItIon.
All these sItuatIons are descrIbed by values from the ENU|_0EAL_ENTFY enumeratIon. Ìn order to
receIve thIs InformatIon about a deal, use the HIstory0ealCetÌnteger() functIon wIth the 0EAL_ENTFY
modIfIer.
ENUh_0EAL_ENTPY
IdentIfIer 0escrIptIon
0EAL_ENTFY_ÌN Entry In
0EAL_ENTFY_DUT Entry out
0EAL_ENTFY_ÌNDUT Feverse
0EAL_ENTFY_STATE Status record
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
249
Trade DperatIon Types
TradIng Is done by sendIng orders to open posItIons usIng the DrderSend() functIon, as well as to
place, modIfy or delete pendIng orders. Each trade order refers to the type of the requested
operatIon. TradIng operatIons are descrIbed In the ENU|_TFA0E_FE0UEST_ACTÌDNS enumeratIon.
ENUh_TPA0E_PEDUEST_ACTIDNS
IdentIfIer 0escrIptIon
TFA0E_ACTÌDN_0EAL Place a trade order for an ImmedIate executIon
wIth the specIfIed parameters (market order)
TFA0E_ACTÌDN_PEN0ÌNC Place a trade order for the executIon under
specIfIed condItIons (pendIng order)
TFA0E_ACTÌDN_SLTP |odIfy Stop Loss and Take ProfIt values of an
opened posItIon
TFA0E_ACTÌDN_|D0ÌFY |odIfy the parameters of the order placed
prevIously
TFA0E_ACTÌDN_FE|D7E 0elete the pendIng order placed prevIously
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
250
Trade Drders In 0epth Df harket
For equIty securItIes, the 0epth of |arket wIndow Is avaIlable, where you can see the current 8uy and
Sell orders. 0esIred dIrectIon of a trade operatIon, requIred amount and requested prIce are specIfIed
for each order.
To obtaIn InformatIon about the current state of the 0D| by |0L5 means, the |arket8ookCet()
functIon Is used, whIch places the 0D| ¨screen shot¨ Into the |ql8ookÌnfo array of structures. Each
element of the array In the type fIeld contaIns InformatIon about the dIrectIon of the order · the value
of the ENU|_8DDK_TYPE enumeratIon.
ENUh_ßDDK_TYPE
IdentIfIer 0escrIptIon
8DDK_TYPE_8UY 8uy order (8Id)
8DDK_TYPE_SELL Sell order (Dffer)
See aIso
Structures and classes, Structure of the 0D|, Trade operatIon types, |arket Ìnfo
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
251
Named Constants
All constants used In |0L5 can be dIvIded Into the followIng groups:
PredefIned macrosubstItutIons - values are substItuted durIng compIlatIon;
|athematIcal constants - values of some mathematIcal expressIons;
NumerIcal type constants - some of the sImple type restrIctIons;
UnInItIalIzatIon reason codes - descrIptIon of unInItIalIzatIon reasons;
CheckIng Dbject PoInter - enumeratIon of types of poInters returned by the CheckPoInter() functIon;
Dther constants - all other constants.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
252
PredefIned hacrosubstItutIons
To sImplIfy the debuggIng process and obtaIn InformatIon about operatIon of a mql5·program, there
are specIal macro constant, values of whIch are set at the moment of compIlatIon. The easIest way to
use these constants Is outputtIng values by the PrInt() functIon, as It's shown In the example.
Constant 0escrIptIon
__LÌNE__ StrIng number In the source code, In whIch the
macro Is located
__FÌLE__ Name of the current compIled fIle
__FUNCTÌDN__ Name of the functIon, In whose body the macro
Is located
__|058UÌL0__ CompIler buIld number
ExampIe:
tpn·p-nry ··pynLj!r ¨.·pynLj!r © `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m-r-¬u·r--.n-r¨
//--------------------------------------------------------------------
// Ixp-nr LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ JnPnLr.·

//--- -n -x-mpL- ·r Lnr·nm-rL·n ·urpur -r Ixp-nr AJvL-·n LnLrL-LLz-rL·n
-nLnr.¨ __¯JH.rPJH__ = ¨,__¯JH.rPJH__,¨ __HPHI__ = ¨,__HPHI__·¡
//--- --r r!- Lnr-nv-L o-r.--n r!- rLm-n -v-nr-
Iv-nr¯-rrLm-n.¯·¡
//---
·
//--------------------------------------------------------------------
// Ixp-nr J-LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯-LnLr.··n-r Lnr n---·n·

//--- -n -x-mpL- ·r Lnr·nm-rL·n ·urpur -r Ixp-nr AJvL-·n J-LnLrL-LLz-rL·n
-nLnr.¨ __¯JH.rPJH__ = ¨,__¯JH.rPJH__,¨ __HPHI__ = ¨,__HPHI__·¡
//---
·
//--------------------------------------------------------------------
// Ixp-nr rL·k run·rL·n
//--------------------------------------------------------------------
v·LJ JnrL·k.·

//--- Lnr·nm-rL·n ·urpur -r rL·k n-·-Lpr
-nLnr.¨ __M,¯ÐJPH¯__ = ¨,__M,¯ÐJPH¯__,¨ __¯PHI__ = ¨,__¯PHI__·¡
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
253
-nLnr.¨ __¯JH.rPJH__ = ¨,__¯JH.rPJH__,¨ __HPHI__ = ¨,__HPHI__·¡
r--r!.__¯JH.rPJH__·¡
r--r`.·¡
//---
·
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
v·LJ r--r!.-rnLnj p-n·

//--- Lnr·nm-rL·n ·urpur Ln-LJ- r!- run·rL·n
-nLnr.¨ __¯JH.rPJH__ = ¨,__¯JH.rPJH__,¨ __HPHI__ = ¨,__HPHI__,¨ p-n = ¨,p-n·¡
·
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
v·LJ r--r`.·

//--- Lnr·nm-rL·n ·urpur Ln-LJ- r!- run·rL·n
-nLnr.¨ __¯JH.rPJH__ = ¨,__¯JH.rPJH__,¨ __HPHI__ = ¨,__HPHI__·¡
·
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
v·LJ JnrLm-n.·

//---
-nLnr.¨ __¯JH.rPJH__ = ¨,__¯JH.rPJH__,¨ __HPHI__ = ¨,__HPHI__·¡
r--r!.__¯JH.rPJH__·¡
·
//--------------------------------------------------------------------
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
254
hathematIcaI Constants
SpecIal constants contaInIng values are reserved for some mathematIcal expressIons. These constants
can be used In any place of the program Instead of calculatIng theIr values usIng mathematIcal
functIons.
Constant 0escrIptIon VaIue
|_E e 2.7182818284590452J5J6
|_LDC2E log2(e) 1.44269504088896J407J6
|_LDC10E log10(e) 0.4J429448190J251827651
|_LN2 ln(2) 0.69J147180559945J09417
|_LN10 ln(10) 2.J0258509299404568402
|_PÌ pI J.14159265J58979J2J846
|_PÌ_2 pI/2 1.570796J267948966192J
|_PÌ_4 pI/4 0.785J9816JJ97448J09616
|_1_PÌ 1/pI 0.J18J0988618J7906715J8
|_2_PÌ 2/pI 0.6J6619772J67581J4J076
|_2_S0FTPÌ 2/sqrt(pI) 1.128J7916709551257J90
|_S0FT2 sqrt(2) 1.41421J562J7J09504880
|_S0FT1_2 1/sqrt(2) 0.707106781186547524401
ExampIe:
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//--- pnLnr r!- v-Lu-- ·r ··n-r-nr-
-nLnr.¨M_I = ¨,¯·uoL-r·¯rnLnj.M_I,!¯··¡
-nLnr.¨M_HJJ`I = ¨,¯·uoL-r·¯rnLnj.M_HJJ`I,!¯··¡
-nLnr.¨M_HJJ!¨I = ¨,¯·uoL-r·¯rnLnj.M_HJJ!¨I,!¯··¡
-nLnr.¨M_HH` = ¨,¯·uoL-r·¯rnLnj.M_HH`,!¯··¡
-nLnr.¨M_HH!¨ = ¨,¯·uoL-r·¯rnLnj.M_HH!¨,!¯··¡
-nLnr.¨M_-P = ¨,¯·uoL-r·¯rnLnj.M_-P,!¯··¡
-nLnr.¨M_-P_` = ¨,¯·uoL-r·¯rnLnj.M_-P_`,!¯··¡
-nLnr.¨M_-P_1 = ¨,¯·uoL-r·¯rnLnj.M_-P_1,!¯··¡
-nLnr.¨M_!_-P = ¨,¯·uoL-r·¯rnLnj.M_!_-P,!¯··¡
-nLnr.¨M_`_-P = ¨,¯·uoL-r·¯rnLnj.M_`_-P,!¯··¡
-nLnr.¨M_`_¯,-r-P = ¨,¯·uoL-r·¯rnLnj.M_`_¯,-r-P,!¯··¡
-nLnr.¨M_¯,-r` = ¨,¯·uoL-r·¯rnLnj.M_¯,-r`,!¯··¡
-nLnr.¨M_¯,-r!_` = ¨,¯·uoL-r·¯rnLnj.M_¯,-r!_`,!¯··¡
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
255
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
256
NumerIcaI Type Constants
Each sImple numerIcal type Is Intended for a certaIn type of tasks and allows optImIzIng the operatIon
of a mql5·program when used correctly. For a better code readabIlIty and correct handlIng of
calculatIon results, there are constants whIch allow to receIve InformatIon about restrIctIons set to a
certaIn type of sImple data.
Constant 0escrIptIon VaIue
CHAF_|ÌN |InImal value, whIch can be
represented by char type
·128
CHAF_|AX |axImal value, whIch can be
represented by char type
127
UCHAF_|AX |axImal value, whIch can be
represented by uchar type
255
SHDFT_|ÌN |InImal value, whIch can be
represented by short type
·J2768
SHDFT_|AX |axImal value, whIch can be
represented by short type
J2767
USHDFT_|AX |axImal value, whIch can be
represented by ushort type
655J5
ÌNT_|ÌN |InImal value, whIch can be
represented by Int type
·214748J648
ÌNT_|AX |axImal value, whIch can be
represented by Int type
214748J647
UÌNT_|AX |axImal value, whIch can be
represented by uInt type
4294967295
LDNC_|ÌN |InImal value, whIch can be
represented by long type
·922JJ720J6854775808
LDNC_|AX |axImal value, whIch can be
represented by long type
922JJ720J6854775807
ULDNC_|AX |axImal value, whIch can be
represented by ulong type
1844674407J709551615
08L_|ÌN |InImal posItIve value, whIch
can be represented by double
type
2.22507J8585072014e·J08
08L_|AX |axImal value, whIch can be
represented by double type
1.79769J1J4862J158e+J08
08L_EPSÌLDN |InImal value, whIch satIsfIes
the condItIon:
1.0+08L_EPSÌLDN != 1.0 (for
double type)
2.220446049250J1J1e·016
08L_0ÌC Number of sIgnIfIcant decImal 15
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
257
dIgIts for double type
08L_|ANT_0ÌC 8Its count In a mantIssa for
double type
5J
08L_|AX_10_EXP |axImal decImal value of
exponent degree for double
type
J08
08L_|AX_EXP |axImal bInary value of
exponent degree for double
type
1024
08L_|ÌN_10_EXP |InImal decImal value of
exponent degree for double
type
(·J07)
08L_|ÌN_EXP |InImal bInary value of
exponent degree for double
type
(·1021)
FLT_|ÌN |InImal posItIve value, whIch
can be represented by float
type
1.175494J51e·J8
FLT_|AX |axImal value, whIch can be
represented by float type
J.40282J466e+J8
FLT_EPSÌLDN |InImal value, whIch satIsfIes
the condItIon:
1.0+08L_EPSÌLDN != 1.0 (for
float type)
1.192092896e-07
FLT_0ÌC Number of sIgnIfIcant decImal
dIgIts for float type
6
FLT_|ANT_0ÌC 8Its count In a mantIssa for
float type
24
FLT_|AX_10_EXP |axImal decImal value of
exponent degree for float type
J8
FLT_|AX_EXP |axImal bInary value of
exponent degree for float type
128
FLT_|ÌN_10_EXP |InImal decImal value of
exponent degree for float type
·J7
FLT_|ÌN_EXP |InImal bInary value of
exponent degree for float type
(·125)
ExampIe:
v·LJ Jn¯r-nr.·

//--- pnLnr r!- ··n-r-nr v-Lu--
pnLnrr.¨.|A-_MPH = `J¨,.|A-_MPH·¡
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
258
pnLnrr.¨.|A-_MAx = `J¨,.|A-_MAx·¡
pnLnrr.¨J.|A-_MAx = `J¨,J.|A-_MAx·¡
pnLnrr.¨¯|J-r_MPH = `J¨,¯|J-r_MPH·¡
pnLnrr.¨¯|J-r_MAx = `J¨,¯|J-r_MAx·¡
pnLnrr.¨J¯|J-r_MAx = `J¨,J¯|J-r_MAx·¡
pnLnrr.¨PHr_MPH = `J¨,PHr_MPH·¡
pnLnrr.¨PHr_MAx = `J¨,PHr_MAx·¡
pnLnrr.¨JPHr_MAx = `u¨,JPHr_MAx·¡
pnLnrr.¨HJHJ_MPH = `P¯1J¨,HJHJ_MPH·¡
pnLnrr.¨HJHJ_MAx = `P¯1J¨,HJHJ_MAx·¡
pnLnrr.¨JHJHJ_MAx = `P¯1u¨,JHJHJ_MAx·¡
pnLnrr.¨IM-r1_VAHJI = `.!¯-¨,IM-r1_VAHJI·¡
pnLnrr.¨¯ÐH_MPH = `.!¯-¨,¯ÐH_MPH·¡
pnLnrr.¨¯ÐH_MAx = `.!¯-¨,¯ÐH_MAx·¡
pnLnrr.¨¯ÐH_I-¯PHJH = `.!¯-¨,¯ÐH_I-¯PHJH·¡
pnLnrr.¨¯ÐH_¯PJ = `J¨,¯ÐH_¯PJ·¡
pnLnrr.¨¯ÐH_MAHr_¯PJ = `J¨,¯ÐH_MAHr_¯PJ·¡
pnLnrr.¨¯ÐH_MAx_!¨_Ix- = `J¨,¯ÐH_MAx_!¨_Ix-·¡
pnLnrr.¨¯ÐH_MAx_Ix- = `J¨,¯ÐH_MAx_Ix-·¡
pnLnrr.¨¯ÐH_MPH_!¨_Ix- = `J¨,¯ÐH_MPH_!¨_Ix-·¡
pnLnrr.¨¯ÐH_MPH_Ix- = `J¨,¯ÐH_MPH_Ix-·¡
pnLnrr.¨¯Hr_MPH = `.--¨,¯Hr_MPH·¡
pnLnrr.¨¯Hr_MAx = `.--¨,¯Hr_MAx·¡
pnLnrr.¨¯Hr_I-¯PHJH = `.--¨,¯Hr_I-¯PHJH·¡
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
259
UnInItaIIzatIon Peason Codes
UnInItalIzatIon reason codes are returned by the UnInItIalIzeFeason() functIon. The possIble values are
the followIng:
Constant VaIue 0escrIptIon
FEASDN_PFDCFA| 0 Expert AdvIsor termInated Its
operatIon by callIng the
ExpertFemove() functIon
FEASDN_FE|D7E 1 Program has been deleted
from the chart
FEASDN_FECD|PÌLE 2 Program has been recompIled
FEASDN_CHAFTCHANCE J Symbol or chart perIod has
been changed
FEASDN_CHAFTCLDSE 4 Chart has been closed
FEASDN_PAFA|ETEFS 5 Ìnput parameters have been
changed by a user
FEASDN_ACCDUNT 6 A new account has been
actIvated
FEASDN_TE|PLATE 7 A new template has been
applIed
FEASDN_ÌNÌTFAÌLE0 8 ThIs value means that DnÌnIt()
handler has returned a nonzero
value.
The unInItIalIzatIon reason code Is also passed as a parameter of the predetermIned functIon Dn0eInIt
(const Int reason).
ExampIe:
Lnpur Lnr p-n=¯¡
//--------------------------------------------------------------------
// j-r r-xr J--·nLprL·n
//--------------------------------------------------------------------
-rnLnj j-rJnLr----·nr-xr.Lnr n---·n.·J-·

-rnLnj r-xr=¨¨¡
//---
-.Lr·!.n---·n.·J-·

·--- -IA¯JH_A..JJHr.
r-xr=¨A···unr .-- ·!-nj-J¨¡on--k¡
·--- -IA¯JH_.|A-r.|AHJI.
r-xr=¨¯ymo·L ·n rLm-rn-m- .-- ·!-nj-J¨¡on--k¡
·--- -IA¯JH_.|A-r.HJ¯I.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
260
r-xr=¨.!-nr .-- ·L·--J¨¡on--k¡
·--- -IA¯JH_-A-AMIrI-¯.
r-xr=¨Pnpur-p-n-m-r-n .-- ·!-nj-J¨¡on--k¡
·--- -IA¯JH_-I.JM-PHI.
r-xr=¨-n·jn-m ¨-__¯PHI__-¨ .-- n-··mpLL-J¨¡on--k¡
·--- -IA¯JH_-IMJVI.
r-xr=¨-n·jn-m ¨-__¯PHI__-¨ .-- n-m·v-J rn·m ·!-nr¨¡on--k¡
·--- -IA¯JH_rIM-HArI.
r-xr=¨H-. r-mpL-r- .-- -ppLL-J r· ·!-nr¨¡on--k¡
J-r-uLr.r-xr=¨An·r!-n n---·n¨¡
·
//---
n-runn r-xr¡
·
//--------------------------------------------------------------------
// Ixp-nr J-LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯-LnLr.··n-r Lnr n---·n·

//--- r!- rLn-r .-y r· j-r r!- unLnLr-LLz-rL·n n---·n ··J-
-nLnr.__¯JH.rPJH__,¨_JnLnLr-LLz-rL·n n---·n ··J- = ¨,n---·n·¡
//--- r!- --··nJ .-y r· j-r r!- unLnLr-LLz-rL·n n---·n ··J-
-nLnr.__¯JH.rPJH__,¨_JnLnLr----·n = ¨,j-rJnLr----·nr-xr._JnLnLr----·n··¡
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
261
CheckIng Dbject PoInter
The CheckPoInter() functIon Is used for checkIng the type of the object poInter. The functIon returns a
value of the ENU|_PDÌNTEF_TYPE enumeratIon. Ìf an Incorrect poInter Is used, the program executIon
wIll be ImmedIately termInated.
Dbjects created by the new() operator are of PDÌNTEF_0YNA|ÌC type. The delete() operator can and
should be used only for such poInters.
All other poInters are of PDÌNTEF_AUTD|ATÌC type, whIch means that thIs object has been created
automatIcally by the mql5 program envIronment. Such objects are deleted automatIcally after beIng
used.
ENUh_PDINTEP_TYPE
Constant 0escrIptIon
PDÌNTEF_ÌN7ALÌ0 Ìncorrect poInter
PDÌNTEF_0YNA|ÌC PoInter of the object created by the new()
operator
PDÌNTEF_AUTD|ATÌC PoInter of any objects created automatIcally
(not usIng new())
See aIso
FuntIme errors, Dbject 0elete Dperator delete, CheckPoInter
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
262
Dther Constants
The CLF_NDNE constant Is used to outlIne the absence of color, It means that the graphIcal object or
graphIcal serIes of an IndIcator wIll not be plotted. ThIs constant was not Included Into the Web·color
constants lIst, but It can be applIed everywhere where the color arguments are requIred.
The ÌN7ALÌ0_HAN0LE constant can be used for checkIng fIle handles (see FIleDpen() and FIleFIndFIrst
()).
Constant 0escrIptIon VaIue
CHAFTS_|AX The maxImum possIble
number of sImultaneously
open charts In the termInal
100
CLF_NDNE Absence of color ·1
E|PTY_7ALUE Empty value In an IndIcator
buffer
08L_|AX
ÌN7ALÌ0_HAN0LE Ìncorrect handle ·1
ÌS_0E8UC_|D0E Flag that a mq5·program
operates In debug mode
true In debug mode, otherwIse
false
NULL Zero for any types 0
WHDLE_AFFAY |eans the number of Items
remaInIng untIl the end of the
array, I.e., the entIre array
wIll be processed
·1
WFDNC_7ALUE The constant can be ImplIcItly
cast to any enumeratIon type
·1
The E|PTY_7ALUE constant usually corresponds to the values of IndIcators that are not shown Inn the
chart. For example, for buIlt·In IndIcator Standard 0evIatIon wIth a perIod of 20, the lIne for the fIrst
19 bars In the hIstory Is not shown In the chart. Ìf you create a handle of thIs IndIcator wIth the
IStd0ev() functIon and copy It to an array of IndIcator values for these bars through Copy8uffer(), then
these values wIll be equal to E|PTY_7ALUE.
You can choose to specIfy for a custom IndIcator your own empty value of the IndIcator, when the
IndIcator shouldn't be drawn In the chart. Use the PlotÌndexSet0ouble() functIon wIth the
PLDT_E|PTY_7ALUE modIfIer.
The NULL constant can be assIgned to a varIable of any sImple type or to an object structure or class
poInter. The NULL assIgnment for a strIng varIable means the full deInItIalIzatIon of thIs varIable.
The WFDNC_7ALUE constant Is Intended for cases, when It Is necessary to return value of an
enumeratIon, and thIs must be a wrong value. For example, when we need to Inform that a return
value Is a value from thIs enumeratIon. Let's consIder as an example some functIon CheckLIneStyle(),
whIch returns the lIne style for an object, specIfIed by Its name. Ìf at style check by DbjectCetÌnteger
() the result Is true, a value from ENU|_LÌNE_STYLE Is returned; otherwIse WFDNC_7ALUE Is
returned.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
263
v·LJ Jn¯r-nr.·

Lr..!-·kHLn-¯ryL-.¨My.!-nrJo|-·r¨·==W-JHJ_VAHJI·
pnLnrr.¨Inn·n LLn- -ryL- j-rrLnj.¨·¡
·
//--------------------------------------------------------------------
// n-runn- r!- LLn- -ryL- r·n -n ·o|-·r -p-·LrL-J oy Lr- n-m-
//--------------------------------------------------------------------
IHJM_HPHI_¯r1HI .!-·kHLn-¯ryL-.-rnLnj n-m-·

L·nj -ryL-¡
//---
Lr.Jo|-·rJ-rPnr-j-n.¨,n-m-,JЯ--J-_¯r1HI,¨,-ryL-··
n-runn..IHJM_HPHI_¯r1HI·-ryL-·¡
-L--
n-runn.W-JHJ_VAHJI·¡
·
The WHDLE_AFFAY constant Is Intended Intended for functIons that requIre specIfyIng the number of
elements In processed arrays:
ArrayCopy();
Array|InImum();
Array|axImum();
FIleFeadArray();
FIleWrIteArray().
Ìf you want to specIfy, that all the array values from a specIfIed posItIon tIll the end must be
processed, you should specIfy just the WHDLE_AFFAY value.
The ÌS_0E8UC_|D0E constant can be useful when you need to slIghtly change the operatIon of a mql5
program In the debuggIng mode. For example, In debug mode you may need to dIsplay addItIonal
debuggIng InformatIon In the termInal log or create addItIonal graphIcal objects In a chart.
The followIng example creates a Label object and sets Its descrIptIon and color dependIng on the
scrIpt runnIng mode. Ìn order to run a scrIpt In the debug mode from |etaEdItor, press F5. Ìf you run
the scrIpt from the browser wIndow In the termInal, then the color and text of the object Label wIll be
dIfferent.
ExampIe:
//--------------------------------------------------------------------
// .!-·k_¯IÐJJ_MJ¯I.m¬¯
// .·pynLj!r © `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m-r-¬u·r--.n-r
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨.·pynLj!r © `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m-r-¬u·r--.n-r¨
//--------------------------------------------------------------------
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
264
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//---
-rnLnj L-o-L_n-m-=¨LnvL-LoL-_L-o-L¨¡
Lr.Jo|-·r¯LnJ.¨,L-o-L_n-m-·<¨·

-nLnr.¨Jo|-·r¨,L-o-L_n-m-,¨n·r r·unJ. Inn·n ··J- = ¨,J-rH--rInn·n.··¡
//--- ·n--r- H-o-L
Jo|-·r.n--r-.¨,L-o-L_n-m-,JЯ_HAÐIH,¨,¨,¨·¡
//--- --r x ···nJLn-r-
Jo|-·r¯-rPnr-j-n.¨,L-o-L_n-m-,JЯ--J-_x¯P¯rAH.I,`¨¨·¡
//--- --r 1 ···nJLn-r-
Jo|-·r¯-rPnr-j-n.¨,L-o-L_n-m-,JЯ--J-_1¯P¯rAH.I,`¨¨·¡
----rH--rInn·n.·¡
Lr.P¯_¯IÐJJ_MJ¯I· // J-ouj m·J-

//--- -!·. m----j- -o·ur r!- -·nLpr -x-·urL·n m·J-
Jo|-·r¯-r¯rnLnj.¨,L-o-L_n-m-,JЯ--J-_rIxr,¨¯IÐJJ MJ¯I¨·¡
//--- --r r-xr ··L·n r· n-J
Lr..Jo|-·r¯-rPnr-j-n.¨,L-o-L_n-m-,JЯ--J-_.JHJ-,--J··
-nLnr.¨Jn-oL- r· --r r!- ··L·n. Inn·n¨,J-rH--rInn·n.··¡
·
-L-- // ·p-n-rL·n m·J-

Jo|-·r¯-r¯rnLnj.¨,L-o-L_n-m-,JЯ--J-_rIxr,¨-IHIA¯I MJ¯I¨·¡
//--- --r r-xr ··L·n r· LnvL-LoL-
Lr..Jo|-·r¯-rPnr-j-n.¨,L-o-L_n-m-,JЯ--J-_.JHJ-,.H-_HJHI··
-nLnr.¨Jn-oL- r· --r r!- ··L·n. Inn·n ¨,J-rH--rInn·n.··¡
·
.!-nr--Jn-..·¡
¯-oujÐn--k.·¡ // !-n- r-nmLn-rL·n .LLL ···un, Lr .- -n- Ln J-ouj m·J-
·
·
See aIso
0ebug8reak, Executed |0L program propertIes
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
265
0ata Structures
|0L5 Language offers 5 predefIned structures:
|ql0ateTIme Is Intended for workIng wIth date and tIme;
|qlParam can send Input parameters when creatIng a handle of the IndIcator usIng the
ÌndIcatorCreate() functIon;
|qlFates Is Intended for manIpulatIng the hIstorIcal data, It contaIns InformatIon about the prIce,
volume and spread;
|ql8ookÌnfo Is Intended for obtaInIng InformatIon about the 0epth of |arket;
|qlTradeFequest Is used for creatIng a trade request for trade operatIons;
|qlTradeFesult contaIns a trade server reply to a trade request, sent by DrderSend() functIon;
|qlTIck Is desIgned for fast retrIeval of the most requested InformatIon about current prIces.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
266
hqI0ateTIme
The date type structure contaIns eIght fIelds of the Int type:
-rnu·r MgJDaLeTrme

Lnr ya-r¡ // 1--n
Lnr m.n¡ // M·nr!
Lnr j-y¡ // ¯-y
Lnr n.:r¡ // |·un
Lnr min¡ // MLnur--
Lnr ·a·¡ // ¯-··nJ-
Lnr j-y_.f_vaar¡ // ¯-y ·r .--k .¨-¯unJ-y, !-M·nJ-y, ... ,¯-¯-runJ-y·
Lnr j-y_.f_ya-r¡ // ¯-y numo-n ·r r!- y--n .¯-nu-ny !-r L- ---Ljn-J r!- numo-n v-Lu- ·r z-n··
·¡
Note
The day number of the year day_of_year for the leap year, sInce |arch, wIll dIffer from a number of
the correspondIng day for a non·leap year.
ExampIe:
v·LJ Jn¯r-nr.·

//---
J-r-rLm- J-r-!=¯'`¨¨-.¨`.¨!'¡
J-r-rLm- J-r-`=¯'`¨¨-.¨`.¨!'¡
M¬L¯-r-rLm- -rn!,-rn`¡
rLm-r·¯rnu·r.J-r-!,-rn!·¡
rLm-r·¯rnu·r.J-r-`,-rn`·¡
pnLnrr.¨`¨`J.`¨`J.`1J, J-y ·r y--n = `J¨,-rn!.J-y,-rn!.m·n,
-rn!.y--n,-rn!.J-y_·r_y--n·¡
pnLnrr.¨`¨`J.`¨`J.`1J, J-y ·r y--n = `J¨,-rn`.J-y,-rn`.m·n,
-rn`.y--n,-rn`.J-y_·r_y--n·¡
·
/· ---uLr.
¨!.¨`.`¨¨-, J-y ·r y--n = ¯¨
¨!.¨`.`¨¨-, J-y ·r y--n = ¯-
·/
See aIso
TImeToStruct, Structures and Classes
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
267
The Structure of Input Parameters of IndIcators (hqIParam)
The |qlParam structure has been specIally desIgned to provIde Input parameters when creatIng the
handle of a technIcal IndIcator usIng the ÌndIcatorCreate() functIon.
-rnu·r MgJRaram

IHJM_¯ArAr1-I :ypa¡ // ryp- ·r r!- Lnpur p-n-m-r-n, v-Lu- ·r IHJM_¯ArAr1-I
L·nj in:ajar_v-l:a¡ // rL-LJ r· -r·n- -n Lnr-j-n ryp-
J·uoL- j.:ola_v-l:a¡ // rL-LJ r· -r·n- - J·uoL- ryp-
-rnLnj ·:rinj_v-l:a¡ // rL-LJ r· -r·n- - -rnLnj ryp-
·¡
All Input parameters of an IndIcator are transmItted In the form of an array of the |qlParam type, the
type fIeld of each element of thIs array specIfIes the type of data transmItted by the element. The
IndIcator values must be fIrst placed In the approprIate fIelds for each element (In ìnte¤er_vclµe, In
doµble_vclµe or strìn¤_vclµe) dependIng on what value of ENU|_0ATATYPE enumeratIon Is specIfIed
In the type fIeld.
Ìf the ÌN0_CUSTD| value Is passed thIrd as the IndIcator type to the ÌndIcatorCreate() functIon, the
fIrst element of the array of Input parameters must have the type fIeld wIth the value of TYPE_STFÌNC
from the ENU|_0ATATYPE enumeratIon, and the strìn¤_vclµe fIeld must contaIn the name of the
custom IndIcator.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
268
hqIPates
ThIs structure stores InformatIon about the prIces, volumes and spread.
-rnu·r MgJRaLea

J-r-rLm- :ima¡ // --nL·J -r-nr rLm-
J·uoL- .pan¡ // Jp-n pnL·-
J·uoL- nijn¡ // r!- !Lj!--r pnL·- ·r r!- p-nL·J
J·uoL- l.v¡ // r!- L·.--r pnL·- ·r r!- p-nL·J
J·uoL- ·l.·a¡ // .L·-- pnL·-
L·nj :i·r_v.l:ma¡ // rL·k v·Lum-
Lnr ·pra-j¡ // ¯pn--J
L·nj ra-l_v.l:ma¡ // rn-J- v·Lum-
·¡
ExampIe:
v·LJ Jn¯r-nr.·

M¬L--r-- n-r--¯`¡
Lnr ··pL-J=.·py--r--.HJHH,¨,¨,!¨¨,n-r--·¡
Lr.··pL-J<=¨·
-nLnr.¨Inn·n ··pyLnj pnL·- J-r- ¨,J-rH--rInn·n.··¡
-L-- -nLnr.¨.·pL-J ¨,Ann-y¯Lz-.n-r--·,¨ o-n-¨·¡
·
See aIso
CopyFates, Access to tImeserIes
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
269
hqIßookInfo
Ìt provIdes InformatIon about the market depth data.
-rnu·r MgJBookLn£o

IHJM_ÐJJ·_r1-I :ypa¡ // JnJ-n ryp- rn·m IHJM_ÐJJ·_r1-I -num-n-rL·n
J·uoL- pri·a¡ // -nL·-
L·nj v.l:ma¡ // V·Lum-
·¡
Note
The 0D| Is avaIlable only for some symbols. To use the |ql8ookÌnfo structure, It Is suffIcIent to
declare a varIable of such a type, so It Is not necessary to specIfy and descrIbe It specIally.
ExampIe:
M¬Lз·kPnr· pnL·-Ann-y¯`¡
o··L j-rз·k=M-nk-rз·kJ-r.HJHH,pnL·-Ann-y·¡
Lr.j-rз·k·

Lnr -Lz-=Ann-y¯Lz-.pnL·-Ann-y·¡
-nLnr.¨M-nk-rз·kPnr· -o·ur ¨,¯ymo·L.··¡
·
-L--

-nLnr.¨¯-LL-J r· n-·-Lv- ¯JM r·n r!- -ymo·L ¨,¯ymo·L.··¡
·
See aIso
|arket8ookAdd, |arket8ookFelease, |arket8ookCet, Trade Drders In 0D|, 0ata Types
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
270
The Trade Pequest Structure (hqITradePequest)
ÌnteractIon between the clIent termInal and a trade server for executIng the order placIng operatIon,
Is performed by usIng trade requests. The trade request Is represented by the specIal predefIned
structure of |qlTradeFequest type, whIch contaIn all the fIelds necessary to perform trade deals. The
request processIng result Is represented by the structure of |qlTradeFesult type.
-rnu·r MgJTradeRegueaL

IHJM_r-A¯I_-I,JI¯r_A.rPJH¯ -·:i.n¡ // rn-J- ·p-n-rL·n ryp-
uL·nj m-ji·¡ // Ixp-nr AJvL-·n P¯ .m-jL· numo-n·
uL·nj .rjar¡ // JnJ-n rL·k-r
-rnLnj ·ymo.l¡ // rn-J- -ymo·L
J·uoL- v.l:ma¡ // --¬u--r-J v·Lum- r·n - J--L Ln L·r-
J·uoL- pri·a¡ // -nL·-
J·uoL- ·:.plimi:¡ // ¯r·pHLmLr L-v-L ·r r!- ·nJ-n
J·uoL- ·l¡ // ¯r·p H·-- L-v-L ·r r!- ·nJ-n
J·uoL- :p¡ // r-k- -n·rLr L-v-L ·r r!- ·nJ-n
uL·nj javi-:i.n¡ // M-xLm-L p·--LoL- J-vL-rL·n rn·m r!- n-¬u--r-J pnL·-
IHJM_J-¯I-_r1-I :ypa¡ // JnJ-n ryp-
IHJM_J-¯I-_r1-I_¯PHHPHJ :ypa_fillinj¡ // JnJ-n -x-·urL·n ryp-
IHJM_J-¯I-_r1-I_rPMI :ypa_:ima¡ // JnJ-n -x-·urL·n rLm-
J-r-rLm- axpir-:i.n¡ // JnJ-n -xpLn-rL·n rLm- .r·n r!- ·nJ-n- ·r J-¯I-_rPMI_¯-I.P¯PI¯ ryp-·
-rnLnj ·.mman:¡ // JnJ-n ··mm-nr
·¡
FIeIds descrIptIon
FIeId 0escrIptIon
actIon Trade operatIon type. Can be one of the
ENU|_TFA0E_FE0UEST_ACTÌDNS enumeratIon
values.
magIc Expert AdvIsor Ì0. Ìt allows organIzIng
analytIcal processIng of trade orders. Each
Expert AdvIsor can set Its own unIque Ì0 when
sendIng a trade request.
order Drder tIcket. Ìt Is used for modIfyIng pendIng
orders.
symbol Symbol of the order. Ìt Is not necessary for
order modIfIcatIon and posItIon close
operatIons.
volume Fequested order volume In lots. Note that the
real volume of a deal wIll depend on the order
executIon type.
prIce PrIce, reachIng whIch the order must be
executed. |arket orders of symbols, whose
executIon type Is ¨|arket ExecutIon¨ (
SY|8DL_TFA0E_EXECUTÌDN_|AFKET), of
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
271
TFA0E_ACTÌDN_0EAL type, do not requIre
specIfIcatIon of prIce.
stoplImIt The prIce value, at whIch the StopLImIt pendIng
order wIll be placed, when prIce reaches the
prìce value (thIs condItIon Is oblIgatory). UntIl
then the pendIng order Is not placed).
sl Stop Loss prIce In case of the unfavorable prIce
movement
tp Take ProfIt prIce In the case of the favorable
prIce movement
devIatIon The maxImal prIce devIatIon, specIfIed In
poInts
type Drder type. Can be one of the
ENU|_DF0EF_TYPE enumeratIon values.
type_fIllIng Drder executIon type. Can be one of the
enumeratIon ENU|_DF0EF_TYPE_FÌLLÌNC
values.
type_tIme Drder expIratIon type. Can be one of the
enumeratIon ENU|_DF0EF_TYPE_TÌ|E values.
expIratIon Drder expIratIon tIme (for orders of
DF0EF_TÌ|E_SPECÌFÌE0 type)
comment Drder comment
For sendIng orders to perform trade operatIons It Is necessary to use the DrderSend() functIon. For
each trade operatIon It Is necessary to specIfy oblIgatory fIelds; optIonal fIelds also may be fIlled.
There are seven possIble cases to send a trade order:
Pequest ExecutIon
ThIs Is a trade order to open a posItIon In the Fequest ExecutIon mode (trade upon current prIces
request). Ìt requIres to specIfy the followIng 9 fIelds:
actIon
symbol
volume
prIce
sl
tp
devIatIon
type
type_fIllIng
Also It Is possIble to specIfy the ¨magIc¨ and ¨comment¨ fIeld values.
Instant ExecutIon
ThIs Is a trade order to open a posItIon In the Ìnstant ExecutIon mode (trade by flow prIces). Ìt
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
272
requIres specIfIcatIon of the followIng 9 fIelds:
actIon
symbol
volume
prIce
sl
tp
devIatIon
type
type_fIllIng
Also It Is possIble to specIfy the ¨magIc¨ and ¨comment¨ fIeld values.
harket ExecutIon
ThIs Is a trade order to open a posItIon In the |arket ExecutIon mode. Ìt requIres to specIfy the
followIng 5 fIelds:
actIon
symbol
volume
type
type_fIllIng
Also It Is possIble to specIfy the ¨magIc¨ and ¨comment¨ fIeld values.
SL û TP hodIfIcatIon
Trade order to modIfy the StopLoss and/or TakeProfIt prIce levels. Ìt requIres to specIfy the
followIng 5 fIelds:
actIon
symbol
sl
tp
devIatIon
PendIng Drder
Trade order to place a pendIng order. Ìt requIres to specIfy the followIng 11 fIelds:
actIon
symbol
volume
prIce
stoplImIt
sl
tp
type
type_fIllIng
type_tIme
expIratIon
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
273
Also It Is possIble to specIfy the ¨magIc¨ and ¨comment¨ fIeld values.
hodIfy PendIng Drder
Trade order to modIfy the prIces of a pendIng order. Ìt requIres to specIfy the followIng 7 fIelds:
actIon
order
prIce
sl
tp
type_tIme
expIratIon
0eIete PendIng Drder
Trade order to delete a pendIng order. Ìt requIres to specIfy the followIng 2 fIelds:
actIon
order
See aIso
Structures and Classes, Trade FunctIons, Drder PropertIes
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
274
The Structure of PesuIts of a Trade Pequest Check
(hqITradeCheckPesuIt)
8efore sendIng a request for a trade operatIon to a trade server, It Is recommended to check It. The
check Is performed usIng the DrderCheck() functIon, to whIch the checked request and a varIable of
the |qlTradeCheckFesult structure type are passed. The check result wIll be wrItten to thIs varIable.
-rnu·r MgJTradeCheokReauJL

uLnr ra:·.ja¡ // --pLy ··J-
J·uoL- o-l-n·a¡ // Ð-L-n·- -rr-n r!- -x-·urL·n ·r r!- J--L
J·uoL- aj:i:y¡ // I¬uLry -rr-n r!- -x-·urL·n ·r r!- J--L
J·uoL- pr.fi:¡ // ¯L·-rLnj pn·rLr
J·uoL- m-rjin¡ // M-njLn n-¬uLn-m-nr-
J·uoL- m-rjin_fraa¡ // ¯n-- m-njLn
J·uoL- m-rjin_laval¡ // M-njLn L-v-L
-rnLnj ·.mman:¡ // .·mm-nr r· r!- n-pLy ··J- .J--·nLprL·n ·r r!- -nn·n·
·¡
0escrIptIon of FIeIds
FIeId 0escrIptIon
retcode Feturn code
balance 8alance value that wIll be after the executIon of
the trade operatIon
equIty EquIty value that wIll be after the executIon of
the trade operatIon
profIt 7alue of the floatIng profIt that wIll be after the
executIon of the trade operatIon
margIn |argIn requIred for the trade operatIon
margIn_free Free margIn that wIll be left after the executIon
of the trade operatIon
margIn_level |argIn level that wIll be set after the executIon
of the trade operatIon
comment Comment to the reply code, error descrIptIon
See aIso
Trade Fequest Structure, Structure for Current PrIces, DrderSend, DrderCheck
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
275
The Structure of a Trade Pequest PesuIt (hqITradePesuIt)
As result of a trade request, a trade server returns data about the trade request processIng result as a
specIal predefIned structure of |qlTradeFesult type.
-rnu·r MgJTradeReauJL

uLnr ra:·.ja¡ // Jp-n-rL·n n-runn ··J-
uL·nj ja-l¡ // ¯--L rL·k-r, Lr Lr L- p-nr·nm-J
uL·nj .rjar¡ // JnJ-n rL·k-r, Lr Lr L- pL-·-J
J·uoL- v.l:ma¡ // ¯--L v·Lum-, ··nrLnm-J oy on·k-n
J·uoL- pri·a¡ // ¯--L pnL·-, ··nrLnm-J oy on·k-n
J·uoL- oij¡ // .unn-nr ÐLJ pnL·-
J·uoL- -·r¡ // .unn-nr A-k pnL·-
-rnLnj ·.mman:¡ // Ðn·k-n ··mm-nr r· ·p-n-rL·n .oy J-r-uLr Lr L- rLLL-J oy r!- ·p-n-rL·n J--·nLprL·n·
·¡
FIeIds descrIptIon
FIeId 0escrIptIon
retcode Feturn code of a trade server
deal 0eal tIcket, If a deal has been performed. Ìt Is
avaIlable for a trade operatIon of
TFA0E_ACTÌDN_0EAL type
order Drder tIcket, If a tIcket has been placed. Ìt Is
avaIlable for a trade operatIon of
TFA0E_ACTÌDN_PEN0ÌNC type
volume 0eal volume, confIrmed by broker. Ìt depends
on the order fIllIng type
prIce 0eal prIce, confIrmed by broker. Ìt dependens
on the devìctìon fIeld of the trade request and/
or on the trade operatIon
bId The current market 8Id prIce (requote prIce)
ask The current market Ask prIce (requote prIce)
comment The broker comment to operatIon (by default It
Is fIlled by the operatIon descrIptIon)
The trade operatIon result Is returned to a varIable of the |qlTradeFesult type, whIch Is passed as the
second parameter to DrderSend() to perform a trade operatIons.
ExampIe:
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
276
//--------------------------------------------------------------------
// ¯-nJLnj - rn-J- n-¬u--r .Lr! r!- n--uLr pn··---Lnj
//--------------------------------------------------------------------
o··L MyJnJ-n¯-nJ.M¬Lrn-J---¬u--r n-¬u--r,M¬Lrn-J----uLr n--uLr·

//--- n---r r!- L--r -nn·n ··J- r· z-n·
----rH--rInn·n.·¡
//--- --nJ n-¬u--r
o··L -u··---=JnJ-n¯-nJ.n-¬u--r,n--uLr·¡
//--- Lr r!- n--uLr r-LL- - rny r· rLnJ ·ur .!y
Lr..-u··---·

Lnr -n-.-n=n--uLr.n-r··J-¡
-nLnr.¨rn-J-H·j. rn-J- n-¬u--r r-LL-J. Inn·n = ¨,J-rH--rInn·n.··¡
-.Lr·!.-n-.-n·

//--- n-¬u·r-
·--- !¨¨¨1.

-nLnr.¨r-A¯I_-Ir.J¯I_-I,JJrI¨·¡
-nLnr.¨n-¬u--r.pnL·- = ¨,n-¬u--r.pnL·-,¨ n--uLr.--k = ¨,
n--uLr.--k,¨ n--uLr.oLJ = ¨,n--uLr.oLJ·¡
on--k¡
·
//--- ·nJ-n L- n·r -··-pr-J oy r!- --nv-n
·--- !¨¨¨¯.

-nLnr.¨r-A¯I_-Ir.J¯I_-I¯I.r¨·¡
-nLnr.¨n-¬u--r.pnL·- = ¨,n-¬u--r.pnL·-,¨ n--uLr.--k = ¨,
n--uLr.--k,¨ n--uLr.oLJ = ¨,n--uLr.oLJ·¡
on--k¡
·
//--- Lnv-LLJ pnL·-
·--- !¨¨!¯.

-nLnr.¨r-A¯I_-Ir.J¯I_PHVAHP¯_--P.I¨·¡
-nLnr.¨n-¬u--r.pnL·- = ¨,n-¬u--r.pnL·-,¨ n--uLr.--k = ¨,
n--uLr.--k,¨ n--uLr.oLJ = ¨,n--uLr.oLJ·¡
on--k¡
·
//--- Lnv-LLJ ¯H -nJ/·n r-
·--- !¨¨!¯.

-nLnr.¨r-A¯I_-Ir.J¯I_PHVAHP¯_¯rJ-¯¨·¡
-nLnr.¨n-¬u--r.-L = ¨,n-¬u--r.-L,¨ n-¬u--r.rp = ¨,n-¬u--r.rp·¡
-nLnr.¨n--uLr.--k = ¨,n--uLr.--k,¨ n--uLr.oLJ = ¨,n--uLr.oLJ·¡
on--k¡
·
//--- Lnv-LLJ v·Lum-
·--- !¨¨!1.

-nLnr.¨r-A¯I_-Ir.J¯I_PHVAHP¯_VJHJMI¨·¡
-nLnr.¨n-¬u--r.v·Lum- = ¨,n-¬u--r.v·Lum-,¨ n--uLr.v·Lum- = ¨,
n--uLr.v·Lum-·¡
on--k¡
·
//--- n·r -n·uj! m·n-y r·n - rn-J- ·p-n-rL·n
·--- !¨¨!-.

-nLnr.¨r-A¯I_-Ir.J¯I_HJ_MJHI1¨·¡
-nLnr.¨n-¬u--r.v·Lum- = ¨,n-¬u--r.v·Lum-,¨ n--uLr.v·Lum- = ¨,
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
277
n--uLr.v·Lum-,¨ n--uLr.··mm-nr = ¨,n--uLr.··mm-nr·¡
on--k¡
·
//--- -·m- ·r!-n n---·n, ·urpur r!- --nv-n n--p·n-- ··J-
J-r-uLr.

-nLnr.¨Jr!-n -n-.-n = ¨,-n-.-n·¡
·
·
//--- n·rLry -o·ur r!- un-u··---ruL n--uLr ·r r!- rn-J- n-¬u--r oy n-runnLnj r-L--
n-runn.r-L--·¡
·
//--- JnJ-n¯-nJ .· n-runn- rnu- - n-p--r r!- -n-.-n
n-runn.rnu-·¡
·
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
278
The Structure for PeturnIng Current PrIces (hqITIck)
ThIs Is a structure for storIng the latest prIces of the symbol. Ìt Is desIgned for fast retrIeval of the
most requested InformatIon about current prIces.
-rnu·r MgJTrok

J-r-rLm- :ima¡ // rLm- ·r r!- L--r pnL·-- upJ-r-
J·uoL- oij¡ // .unn-nr ÐLJ pnL·-
J·uoL- -·r¡ // .unn-nr A-k pnL·-
J·uoL- l-·:¡ // -nL·- ·r r!- L--r J--L .H--r·
uL·nj v.l:ma¡ // V·Lum- r·n r!- ·unn-nr H--r pnL·-
·¡
The varIable of the |qlTIck type allows obtaInIng values of Ask, 8Id, Last and 7olume wIthIn a sIngle
call of the SymbolÌnfoTIck() functIon.
ExampIe:
v·LJ JnrL·k.·

M¬LrL·k L--r_rL·k¡
//---
Lr.¯ymo·LPnr·rL·k.¯ymo·L.·,L--r_rL·k··

-nLnr.L--r_rL·k.rLm-,¨. ÐLJ = ¨,L--r_rL·k.oLJ,
¨ A-k = ¨,L--r_rL·k.--k,¨ V·Lum- = ¨,L--r_rL·k.v·Lum-·¡
·
-L-- -nLnr.¨¯ymo·LPnr·rL·k.· r-LL-J, -nn·n = ¨,J-rH--rInn·n.··¡
//---
·
See aIso
Structures and Classes
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
279
Codes of Errors and WarnIngs
ThIs sectIon contaIns the followIng descrIptIons:
Feturn codes of the trade server - analyzIng results of the trade request sent by functIon DrderSend
();
CompIler warnIngs - codes of warnIng messages that appear at compIlatIon (not errors);
CompIlatIon errors - codes of error messages at an unsuccessful attempt to compIle;
FuntIme errors - error codes In the performance of mql5·programs, whIch can be obtaIned usIng the
CetLastErtror() functIon.
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
280
Peturn Codes of the Trade Server
All requests to execute trade operatIons are sent as a structure of a trade request |qlTradeFequest
usIng functIon DrderSend(). The functIon executIon result Is placed to structure |qlTradeFesult,
whose retcode fIeld contaIns the trade server return code. All these codes are descrIbed In
enumeratIon ENU|_TFA0E_FETUFN_CD0ES.
ENUh_TPA0E_PETUPN_CD0ES
Code Constant 0escrIptIon
10004 TFA0E_FETCD0E_FE0UDTE Fequote
10006 TFA0E_FETCD0E_FEJECT Fequest rejected
10007 TFA0E_FETCD0E_CANCEL Fequest canceled by trader
10008 TFA0E_FETCD0E_PLACE0 Drder placed
10009 TFA0E_FETCD0E_0DNE Fequest Is completed
10010 TFA0E_FETCD0E_0DNE_PAFTÌ
AL
Fequest Is partIally completed
10011 TFA0E_FETCD0E_EFFDF Fequest processIng error
10012 TFA0E_FETCD0E_TÌ|EDUT Fequest canceled by tImeout
1001J TFA0E_FETCD0E_ÌN7ALÌ0 ÌnvalId request
10014 TFA0E_FETCD0E_ÌN7ALÌ0_7DL
U|E
ÌnvalId volume In the request
10015 TFA0E_FETCD0E_ÌN7ALÌ0_PFÌ
CE
ÌnvalId prIce In the request
10016 TFA0E_FETCD0E_ÌN7ALÌ0_STD
PS
ÌnvalId stops In the request
10017 TFA0E_FETCD0E_TFA0E_0ÌSA
8LE0
Trade Is dIsabled
10018 TFA0E_FETCD0E_|AFKET_CL
DSE0
|arket Is closed
10019 TFA0E_FETCD0E_ND_|DNEY There Is not enough money to
fulfIll the request
10020 TFA0E_FETCD0E_PFÌCE_CHAN
CE0
PrIces changed
10021 TFA0E_FETCD0E_PFÌCE_DFF There are no quotes to process
the request
10022 TFA0E_FETCD0E_ÌN7ALÌ0_EXP
ÌFATÌDN
ÌnvalId order expIratIon date In
the request
1002J TFA0E_FETCD0E_DF0EF_CHA
NCE0
Drder state changed
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
281
10024 TFA0E_FETCD0E_TDD_|ANY_
FE0UESTS
Too frequent requests
10025 TFA0E_FETCD0E_ND_CHANCE
S
No changes In request
10026 TFA0E_FETCD0E_SEF7EF_0ÌS
A8LES_AT
AutotradIng dIsabled by server
10027 TFA0E_FETCD0E_CLÌENT_0ÌSA
8LES_AT
AutotradIng dIsabled by clIent
termInal
10028 TFA0E_FETCD0E_LDCKE0 Fequest locked for processIng
10029 TFA0E_FETCD0E_FFDZEN Drder or posItIon frozen
100J0 TFA0E_FETCD0E_ÌN7ALÌ0_FÌL
L
ÌnvalId order fIllIng type
100J1 TFA0E_FETCD0E_CDNNECTÌDN No connectIon wIth the trade
server
100J2 TFA0E_FETCD0E_DNLY_FEAL DperatIon Is allowed only for
lIve accounts
100JJ TFA0E_FETCD0E_LÌ|ÌT_DF0E
FS
The number of pendIng orders
has reached the lImIt
100J4 TFA0E_FETCD0E_LÌ|ÌT_7DLU
|E
The volume of orders and
posItIons for the symbol has
reached the lImIt
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
282
CompIIer WarnIngs
CompIler warnIngs are shown for InformatIonal purposes only and are not error messages.
Code 0escrIptIon
21 Ìncomplete record of a date In the datetIme
strIng
22 Wrong number In the datetIme strIng for the
date. FequIrements:
Year 1970 ·= X ·= J000
|onth 0 ·X ·= 12
0ay 0 ·X ·= J1/J0/28 (29 )....
2J Wrong number of datetIme strIng for tIme.
FequIrements:
Hour 0 ·= X ·24
|Inute 0 ·= X ·60
24 ÌnvalId color In FC8 format: one of FC8
components Is less than 0 or greater than 255
25 Unknown character of the escape sequences.
Known: \ n \ r \ t \ \ \ ¨\ '\ X \ x
26 Too large volume of local varIables (· 512Kb) of
the functIon, reduce the number
29 EnumeratIon already defIned (duplIcatIon) ·
members wIll be added to the fIrst defInItIon
J0 DverrIdIng macro
J2 Constructor must be of voId type
JJ 0estructor must be of voId type
J4 Constant does not fIt In the range of Integers
(X· _UÌ64_|AX 1 1 X ·_Ì64_|ÌN) and wIll be
converted to the double type
J5 Too long HEX · more than 16 sIgnIfIcant
characters (senIor nIbbles are cut)
J6 No nIbbles In HEX strIng ¨0x¨
J7 No functIon · nothIng to be performed
41 FunctIon has no body, and Is not called
4J PossIble loss of data at typecastIng. Example:
Int x = (double) z;
44 Loss of accuracy (of data) when convertIng a
constant. Example: Int x = |_PÌ
45 0Ifference between the sIgns of operands In the
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
283
operatIons of comparIson. Example: (char) c1·
(uchar) c2
46 Problems wIth functIon ImportIng · declaratIon
of #Import Is requIred or Import of functIons Is
closed
47 Too large descrIptIon · extra characters wIll not
be Included In the executable fIle
48 The number of IndIcator buffers declared Is less
than requIred
49 No color to plot a graphIcal serIes In the
IndIcator
50 No graphIcal serIes to draw the IndIcator
51 'DnStart' handler functIon not found In the
scrIpt
52 'DnStart' handler functIon Is defIned wIth wrong
parameters
5J 'DnStart' functIon can be defIned only In a scrIpt
54 'DnÌnIt' functIon Is defIned wIth wrong
parameters
55 'DnÌnIt' functIon Is not used In scrIpts
56 'Dn0eInIt' functIon Is defIned wIth wrong
parameters
57 'Dn0eInIt' functIon Is not used In scrIpts
58 Two 'DnCalculate' functIons are defIned.
DnCalculate () at one prIce array wIll be used
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
284
CompIIatIon Errors
|etaEdtIor 5 shows error messages about the program errors detected by the buIlt·In compIler durIng
compIlatIon. The lIst of these errors Is gIven below In table. To compIle a source code Into an
executable one, press F7. Programs that contaIn errors cannot be compIled untIl the errors IdentIfIed
by the compIler are elImInated.
Code 0escrIptIon
100 FIle readIng error
101 Error of *. EX5 fIle openIng to wrIte It for
savIng
10J Not enough free memory to complete
compIlatIon
104 Empty syntactIc unIt unrecognIzed by compIler
105 Ìncorrect fIle name In #Include
106 Error accessIng a fIle In #Include (probably the
fIle does not exIst)
108 ÌnapproprIate name for #defIne
109 Unknown command of preprocessor (valId
#Include, #defIne, #property, #Import)
110 Symbol unknown to compIler
111 FunctIon not Implemented (descrIptIon Is
present, but no body)
112 0ouble quote (¨) omItted
11J DpenIng angle bracket (·) or double quote (¨)
omItted
114 SIngle quote (') omItted
115 ClosIng angle bracket ¨·¨ omItted
116 Type not specIfIed In declaratIon
117 No return operator or return Is found not In all
branches of the ImplementatIon
118 DpenIng bracket of call parameters was
expected
119 Error wrItIng EX5
120 ÌnvalId access to an array
121 The functIon Is not of voId type and the return
operator must return a value
122 Ìncorrect declaratIon of the destructor
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
285
12J Colon ¨:¨ Is mIssIng
124 7arIable Is already declared
125 7arIable wIth such IdentIfIer already declared
126 7arIable name Is too long (· 250 characters)
127 Structure wIth such IdentIfIer already defIned
128 Structure Is not defIned
129 Structure member wIth the same name already
defIned
1J0 No such structure member
1J1 8reached paIrIng of brackets
1J2 DpenIng parenthesIs ¨(¨ expected
1JJ Unbalanced braces (no ¨]¨)
1J4 0IffIcult to compIle (too much branchIng,
Internal stack levels Is overfIlled)
1J5 Error of fIle openIng for readIng
1J6 Not enough memory to download the source fIle
Into memory
1J7 7arIable Is expected
1J8 Feference cannot be InItIalIzed
140 AssIgnment expected (appears at declaratIon)
141 DpenIng brace ¨{¨ expected
142 Parameter can be a dynamIc array only
14J Use of ¨voId¨ type Is unacceptable
144 No paIr for ¨)¨ or ¨]¨, I.e. ¨(or¨ [ ¨ Is absent
145 No paIr for ¨(or¨ [ ¨, I.e. ¨) ¨or¨] ¨ Is absent
146 Ìncorrect array sIze
147 Too many parameters (· 64)
149 ThIs token Is not expected here
150 ÌnvalId use of operatIon (InvalId operands)
151 ExpressIon of voId type not allowed
152 Dperator Is expected
15J |Isuse of break
154 SemIcolon ¨;¨ expected
155 Comma ¨,¨ expected
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
286
156 |ust be a class type, not struct
157 ExpressIon Is expected
158 ¨non HEX character¨ found In HEX or too long
number (number of dIgIts· 511)
159 StrIng·constant has more than 655J4 characters
160 FunctIon defInItIon Is unacceptable here
161 Unexpected end of program
162 Forward declaratIon Is prohIbIted for structures
16J FunctIon wIth thIs name Is already defIned and
has another return type
164 FunctIon wIth thIs name Is already defIned and
has a dIfferent set of parameters
165 FunctIon wIth thIs name Is already defIned and
Implemented
166 FunctIon overload for thIs call was not found
167 FunctIon wIth a return value of voId type cannot
return a value
168 FunctIon Is not defIned
170 7alue Is expected
171 Ìn ccse expressIon only Integer constants are
valId
172 The value of ccse In thIs swìtch Is already used
17J Ìnteger Is expected
174 Ìn #Import expressIon fIle name Is expected
175 ExpressIons are not allowed on global level
176 DmItted parenthesIs ¨)¨ before ¨;¨
177 To the left of equalIty sIgn a varIable Is
expected
178 The result of expressIon Is not used
179 0eclarIng of varIables Is not allowed In ccse
180 ÌmplIcIt conversIon from a strIng to a number
181 ÌmplIcIt conversIon of a number to a strIng
182 AmbIguous call of an overloaded functIon
(several overloads fIt)
18J Ìllegal else wIthout proper ìf
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
287
184 ÌnvalId ccse or defcµlt wIthout a swìtch
185 ÌnapproprIate use of ellIpsIs
186 The InItIalIzIng sequence has more elements
than the InItIalIzed varIable
187 A constant for ccse expected
188 A constant expressIon requIred
189 A constant varIable can not be changed
190 ClosIng bracket or a comma Is expected
(declarIng array member)
192 EnumeratIon cannot have access modIfIers
(const, extern, statIc)
19J EnumeratIon member already declared wIth a
dIfferent value
194 There Is a varIable defIned wIth the same name
195 There Is a structure defIned wIth the same
name
196 Name of enumeratIon member expected
197 Ìnteger expressIon expected
198 0IvIsIon by zero In constant expressIon
199 Wrong number of parameters In the functIon
200 Parameter by reference must be a varIable
201 7arIable of the same type to pass by reference
expected
202 A constant varIable cannot be passed by a non·
constant reference
20J FequIres a posItIve Integer constant
204 FaIled to access protected class member
205 Ìmport already defIned In another way
208 Executable fIle not created
209 'DnCalculate' entry poInt not found for the
IndIcator
210 The contInue operatIon can be used only InsIde
a loop
211 Error accessIng prIvate (closed) class member
21J |ethod of structure or class Is not declared
214 Error accessIng prIvate (closed) class method
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
288
216 CopyIng of structures wIth objects Is not
allowed
218 Ìndex out of array range
219 Array InItIalIzatIon In structure or class
declaratIon not allowed
220 Class constructor cannot have parameters
221 Class destructor can not have parameters
222 Class method or structure wIth the same name
and parameters have already been declared
22J Dperand expected
224 Class method or structure wIth the same name
exIsts, but wIth dIfferent parameters
(declaratIon!=ImplementatIon)
225 Ìmported functIon Is not descrIbed
227 AmbIguous call of the overloaded functIon
(exact match of parameters for several
overloads)
228 7arIable name expected
229 A reference cannot be declared In thIs place
2J0 Already used as the enumeratIon name
2J2 Class or structure expected
2J5 Cannot call 'delete' operator to delete the array
2J6 Dperator ' whIle' expected
2J7 Dperator 'delete' must have a poInter
2J8 There Is 'default' for thIs 'swItch' already
2J9 Syntax error
240 Escape·sequence can occur only In strIngs
(starts wIth '\')
241 Array requIred · square bracket '[' does not
apply to an array, or non arrays are passed as
array parameters
242 Can not be InItIalIzed through the InItIalIzatIon
sequence
24J Ìmport Is not defIned
244 DptImIzer error on the syntactIc tree
245 0eclared too many structures (try to sImplIfy
the program)
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
289
246 ConversIon of the parameter Is not allowed
247 Ìncorrect use of the 'delete' operator
248 Ìt's not allowed to declare a poInter to a
reference
249 Ìt's not allowed to declare a reference to a
reference
250 Ìt's not allowed to declare a poInter to a poInter
251 Structure declaratIon In the lIst of parameter Is
not allowed
252 ÌnvalId operatIon of typecastIng
25J A poInter can be declared only for a class or
structure
256 Undeclared IdentIfIer
257 Executable code optImIzer error
258 Executable code generatIon error
260 ÌnvalId expressIon for the 'swItch' operator
261 Pool of strIng constants overfIlled, sImplIfy
program
262 Cannot convert to enumeratIon
26J 0o not use 'vIrtual' for data (members of a class
or structure)
264 Cannot call protected method of class
265 DverrIdden vIrtual functIons returns a dIfferent
type
266 Class cannot be InherIted from a structure
267 Structure cannot be InherIted from a class
268 Constructor cannot be vIrtual (vìrtµcl specIfIer
Is not allowed)
269 Structure cannot have vIrtual methods
270 FunctIon must have a body
271 DverloadIng of system functIons (termInal
functIons) Is prohIbIted
272 Const specIfIer Is InvalId for functIons that are
not members of a class or structure
27J Not allowed to use const for data (members of
a class or structure)
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
290
274 Not allowed to change class members In
constant method
275 Not allowed to declare more than 64 Input
parameters (Input·varIables)
276 ÌnapproprIate InItIalIzatIon sequence
277 |Issed default value for the parameter
(specIfIc declaratIon of default parameters)
278 DverrIdIng the default parameter (dIfferent
values In declaratIon and ImplementatIon)
279 Not allowed to call non·constant method for a
constant object
280 An object Is necessary for accessIng members
(a poInt for a non class/structure Is set)
281 The name of an already declared structure
cannot be used In declaratIon
282 Structure name cannot be used as the name of
a class member
28J Ìncorrect type or combInatIon of parameters for
the 'DnCalculate' entry poInt
284 UnauthorIzed conversIon (at closed InherItance)
285 Structures and arrays cannot be used as Input
varIables
286 Const specIfIer Is not valId for constructor/
destructor
287 Ìncorrect strIng expressIon for a datetIme
288 Unknown property (#property)
289 Ìncorrect value of a property
290 ÌnvalId Index for a property In #property
291 Call parameter omItted · ·func (x,)·
29J Dbject must be passed by reference
294 Array must be passed by reference
295 FunctIon was declared as exportable
296 FunctIon was not declared as exportable
29/ Ìt Is prohIbIted to export Imported functIon
298 Ìmported functIon cannot have thIs parameter
(prohIbIted to pass a poInter, class or structure
contaInIng a dynamIc array, poInter, class,
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
291
etc.)
299 |ust be a class
J00 #Import was not closed
J01 ÌnItIalIze sequence expected
J02 Type mIssmatch
J0J Extern varIable Is already InItIalIzed
J04 No exported functIon or entry poInt found
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
292
PuntIme Errors
CetLastError() Is the functIon that returns the last error code that Is stored In the predefIned varIable
_LastError. ThIs value can be reset to zero by the FesetLastError() functIon.
Constant Code 0escrIptIon
EFF_SUCCESS 0 The operatIon completed
successfully
EFF_ÌNTEFNAL_EFFDF 4001 Unexpected Internal error
EFF_WFDNC_ÌNTEFNAL_PAFA
|ETEF
4002 Wrong parameter In the Inner
call of the clIent termInal
functIon
EFF_ÌN7ALÌ0_PAFA|ETEF 400J Wrong parameter when callIng
the system functIon
EFF_NDT_ENDUCH_|E|DFY 4004 Not enough memory to
perform the system functIon
EFF_STFUCT_WÌTHD8JECTS_
DFCLASS
4005 The structure contaIns objects
of strIngs and/or dynamIc
arrays and/or structure of
such objects and/or classes
EFF_ÌN7ALÌ0_AFFAY 4006 Array of a wrong type, wrong
sIze, or a damaged object of a
dynamIc array
EFF_AFFAY_FESÌZE_EFFDF 4007 Not enough memory for the
relocatIon of an array, or an
attempt to change the sIze of
a statIc array
EFF_STFÌNC_FESÌZE_EFFDF 4008 Not enough memory for the
relocatIon of strIng
EFF_NDTÌNÌTÌALÌZE0_STFÌNC 4009 Not InItIalIzed strIng
EFF_ÌN7ALÌ0_0ATETÌ|E 4010 ÌnvalId date and/or tIme
EFF_AFFAY_8A0_SÌZE 4011 Fequested array sIze exceeds
2 C8
EFF_ÌN7ALÌ0_PDÌNTEF 4012 Wrong poInter
EFF_ÌN7ALÌ0_PDÌNTEF_TYPE 401J Wrong type of poInter
EFF_FUNCTÌDN_NDT_ALLDWE
0
4014 System functIon Is not allowed
to call
Charts
EFF_CHAFT_WFDNC_Ì0 4101 Wrong chart Ì0
EFF_CHAFT_ND_FEPLY 4102 Chart does not respond
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
293
EFF_CHAFT_NDT_FDUN0 410J Chart not found
EFF_CHAFT_ND_EXPEFT 4104 No Expert AdvIsor In the chart
that could handle the event
EFF_CHAFT_CANNDT_DPEN 4105 Chart openIng error
EFF_CHAFT_CANNDT_CHANC
E
4106 FaIled to change chart symbol
and perIod
EFF_CHAFT_WFDNC_TÌ|EF_
PAFA|ETEF
4107 Wrong parameter for tImer
EFF_CHAFT_CANNDT_CFEATE
_TÌ|EF
4108 FaIled to create tImer
EFF_CHAFT_WFDNC_PFDPEF
TY
4109 Wrong chart property Ì0
EFF_CHAFT_SCFEENSHDT_FA
ÌLE0
4110 Error creatIng screenshots
EFF_CHAFT_NA7ÌCATE_FAÌLE
0
4111 Error navIgatIng through chart
EFF_CHAFT_TE|PLATE_FAÌLE
0
4112 Error applyIng template
EFF_CHAFT_WÌN0DW_NDT_F
DUN0
411J SubwIndow contaInIng the
IndIcator was not found
EFF_CHAFT_ÌN0ÌCATDF_CAN
NDT_A00
4114 Error addIng an IndIcator to
chart
CraphIcaI Dbjects
EFF_D8JECT_EFFDF 4201 Error workIng wIth a graphIcal
object
EFF_D8JECT_NDT_FDUN0 4202 CraphIcal object was not found
EFF_D8JECT_WFDNC_PFDPEF
TY
420J Wrong Ì0 of a graphIcal object
property
EFF_D8JECT_CET0ATE_FAÌLE
0
4204 Unable to get date
correspondIng to the value
EFF_D8JECT_CET7ALUE_FAÌL
E0
4205 Unable to get value
correspondIng to the date
harketInfo
EFF_|AFKET_UNKNDWN_SY|
8DL
4J01 Unknown symbol
EFF_|AFKET_SELECT_EFFDF 4J02 Symbol Is not selected In
|arketWatch
EFF_|AFKET_WFDNC_PFDPE
FTY
4J0J Wrong IdentIfIer of a symbol
property
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
294
EFF_|AFKET_LASTTÌ|E_UNK
NDWN
4J04 TIme of the last tIck Is not
known (no tIcks)
HIstory Access
EFF_HÌSTDFY_NDT_FDUN0 4401 Fequested hIstory not found
EFF_HÌSTDFY_WFDNC_PFDPE
FTY
4402 Wrong Ì0 of the hIstory
property
CIobaI_VarIabIes
EFF_CLD8AL7AFÌA8LE_NDT_F
DUN0
4501 Clobal varIable of the clIent
termInal Is not found
EFF_CLD8AL7AFÌA8LE_EXÌSTS 4502 Clobal varIable of the clIent
termInal wIth the same name
already exIsts
EFF_|AÌL_SEN0_FAÌLE0 4510 EmaIl sendIng faIled
EFF_PLAY_SDUN0_FAÌLE0 4511 Sound playIng faIled
EFF_|0L5_WFDNC_PFDPEFT
Y
4512 Wrong IdentIfIer of the
program property
EFF_TEF|ÌNAL_WFDNC_PFDP
EFTY
451J Wrong IdentIfIer of the
termInal property
EFF_FTP_SEN0_FAÌLE0 4514 FIle sendIng vIa ftp faIled
Custom IndIcator ßuffers
EFF_8UFFEFS_ND_|E|DFY 4601 Not enough memory for the
dIstrIbutIon of IndIcator
buffers
EFF_8UFFEFS_WFDNC_ÌN0EX 4602 Wrong IndIcator buffer Index
Custom IndIcator PropertIes
EFF_CUSTD|_WFDNC_PFDPE
FTY
460J Wrong Ì0 of the custom
IndIcator property
Account
EFF_ACCDUNT_WFDNC_PFDP
EFTY
4701 Wrong account property Ì0
EFF_TFA0E_WFDNC_PFDPEF
TY
4751 Wrong trade property Ì0
EFF_TFA0E_0ÌSA8LE0 4752 TradIng by Expert AdvIsors
prohIbIted
EFF_TFA0E_PDSÌTÌDN_NDT_F
DUN0
475J PosItIon not found
EFF_TFA0E_DF0EF_NDT_FDU
N0
4754 Drder not found
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
295
EFF_TFA0E_0EAL_NDT_FDUN
0
4755 0eal not found
EFF_TFA0E_SEN0_FAÌLE0 4756 Trade request sendIng faIled
IndIcators
EFF_ÌN0ÌCATDF_UNKNDWN_S
Y|8DL
4801 Unknown symbol
EFF_ÌN0ÌCATDF_CANNDT_CFE
ATE
4802 ÌndIcator cannot be created
EFF_ÌN0ÌCATDF_ND_|E|DFY 480J Not enough memory to add the
IndIcator
EFF_ÌN0ÌCATDF_CANNDT_APP
LY
4804 The IndIcator cannot be
applIed to another IndIcator
EFF_ÌN0ÌCATDF_CANNDT_A0
0
4805 Error applyIng an IndIcator to
chart
EFF_ÌN0ÌCATDF_0ATA_NDT_F
DUN0
4806 Fequested data not found
EFF_ÌN0ÌCATDF_WFDNC_HAN
0LE
4807 Wrong IndIcator handle
EFF_ÌN0ÌCATDF_WFDNC_PAF
A|ETEFS
4808 Wrong number of parameters
when creatIng an IndIcator
EFF_ÌN0ÌCATDF_PAFA|ETEFS
_|ÌSSÌNC
4809 No parameters when creatIng
an IndIcator
EFF_ÌN0ÌCATDF_CUSTD|_NA
|E
4810 The fIrst parameter In the
array must be the name of the
custom IndIcator
EFF_ÌN0ÌCATDF_PAFA|ETEF_
TYPE
4811 ÌnvalId parameter type In the
array when creatIng an
IndIcator
EFF_ÌN0ÌCATDF_WFDNC_ÌN0
EX
4812 Wrong Index of the requested
IndIcator buffer
0epth of harket
EFF_8DDKS_CANNDT_A00 4901 0epth Df |arket can not be
added
EFF_8DDKS_CANNDT_0ELETE 4902 0epth Df |arket can not be
removed
EFF_8DDKS_CANNDT_CET 490J The data from 0epth Df
|arket can not be obtaIned
EFF_8DDKS_CANNDT_SU8SCFÌ
8E
4904 Error In subscrIbIng to receIve
new data from 0epth Df
|arket
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
296
FIIe DperatIons
EFF_TDD_|ANY_FÌLES 5001 |ore than 64 fIles cannot be
opened at the same tIme
EFF_WFDNC_FÌLENA|E 5002 ÌnvalId fIle name
EFF_TDD_LDNC_FÌLENA|E 500J Too long fIle name
EFF_CANNDT_DPEN_FÌLE 5004 FIle openIng error
EFF_FÌLE_CACHE8UFFEF_EFF
DF
5005 Not enough memory for cache
to read
EFF_CANNDT_0ELETE_FÌLE 5006 FIle deletIng error
EFF_ÌN7ALÌ0_FÌLEHAN0LE 5007 A fIle wIth thIs handle was
closed, or was not openIng at
all
EFF_WFDNC_FÌLEHAN0LE 5008 Wrong fIle handle
EFF_FÌLE_NDTTDWFÌTE 5009 The fIle must be opened for
wrItIng
EFF_FÌLE_NDTTDFEA0 5010 The fIle must be opened for
readIng
EFF_FÌLE_NDT8ÌN 5011 The fIle must be opened as a
bInary one
EFF_FÌLE_NDTTXT 5012 The fIle must be opened as a
text
EFF_FÌLE_NDTTXTDFCS7 501J The fIle must be opened as a
text or CS7
EFF_FÌLE_NDTCS7 5014 The fIle must be opened as
CS7
EFF_FÌLE_FEA0EFFDF 5015 FIle readIng error
EFF_FÌLE_8ÌNSTFÌNCSÌZE 5016 StrIng sIze must be specIfIed,
because the fIle Is opened as
bInary
EFF_ÌNCD|PATÌ8LE_FÌLE 5017 A text fIle must be for strIng
arrays, for other arrays ·
bInary
EFF_FÌLE_ÌS_0ÌFECTDFY 5018 ThIs Is not a fIle, thIs Is a
dIrectory
EFF_FÌLE_NDT_EXÌST 5019 FIle does not exIst
EFF_FÌLE_CANNDT_FEWFÌTE 5020 FIle can not be rewrItten
EFF_WFDNC_0ÌFECTDFYNA|
E
5021 Wrong dIrectory name
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
297
EFF_0ÌFECTDFY_NDT_EXÌST 5022 0Irectory does not exIst
EFF_FÌLE_ÌSNDT_0ÌFECTDFY 502J ThIs Is a fIle, not a dIrectory
EFF_CANNDT_0ELETE_0ÌFECT
DFY
5024 The dIrectory cannot be
removed
EFF_CANNDT_CLEAN_0ÌFECT
DFY
5025 FaIled to clear the dIrectory
(probably one or more fIles are
blocked and removal operatIon
faIled)
StrIng CastIng
EFF_ND_STFÌNC_0ATE 50J0 No date In the strIng
EFF_WFDNC_STFÌNC_0ATE 50J1 Wrong date In the strIng
EFF_WFDNC_STFÌNC_TÌ|E 50J2 Wrong tIme In the strIng
EFF_STFÌNC_TÌ|E_EFFDF 50JJ Error convertIng strIng to date
EFF_STFÌNC_DUT_DF_|E|DF
Y
50J4 Not enough memory for the
strIng
EFF_STFÌNC_S|ALL_LEN 50J5 The strIng length Is less than
expected
EFF_STFÌNC_TDD_8ÌCNU|8E
F
50J6 Too large number, more than
ULDNC_|AX
EFF_WFDNC_FDF|ATSTFÌNC 50J7 ÌnvalId format strIng
EFF_TDD_|ANY_FDF|ATTEF
S
50J8 Amount of format specIfIers
more than the parameters
EFF_TDD_|ANY_PAFA|ETEFS 50J9 Amount of parameters more
than the format specIfIers
EFF_WFDNC_STFÌNC_PAFA|
ETEF
5040 0amaged parameter of strIng
type
EFF_STFÌNCPDS_DUTDFFANC
E
5041 PosItIon outsIde the strIng
EFF_STFÌNC_ZEFDA00E0 5042 0 added to the strIng end, a
useless operatIon
EFF_STFÌNC_UNKNDWNTYPE 504J Unknown data type when
convertIng to a strIng
EFF_WFDNC_STFÌNC_D8JECT 5044 0amaged strIng object
DperatIons wIth Arrays
EFF_ÌNCD|PATÌ8LE_AFFAYS 5050 CopyIng IncompatIble arrays.
StrIng array can be copIed only
to a strIng array, and a
numerIc array · In numerIc
array only
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
298
EFF_S|ALL_ASSEFÌES_AFFAY 5051 The receIvIng array Is declared
as AS_SEFÌES, and It Is of
InsuffIcIent sIze
EFF_S|ALL_AFFAY 5052 Too small array, the startIng
posItIon Is outsIde the array
EFF_ZEFDSÌZE_AFFAY 505J An array of zero length
EFF_NU|8EF_AFFAYS_DNLY 5054 |ust be a numerIc array
EFF_DNE0Ì|_AFFAYS_DNLY 5055 |ust be a one·dImensIonal
array
EFF_SEFÌES_AFFAY 5056 TImeserIes cannot be used
EFF_0DU8LE_AFFAY_DNLY 5057 |ust be an array of type
double
EFF_FLDAT_AFFAY_DNLY 5058 |ust be an array of type float
EFF_LDNC_AFFAY_DNLY 5059 |ust be an array of type long
EFF_ÌNT_AFFAY_DNLY 5060 |ust be an array of type Int
EFF_SHDFT_AFFAY_DNLY 5061 |ust be an array of type short
EFF_CHAF_AFFAY_DNLY 5062 |ust be an array of type char
User-0efIned Errors
EFF_USEF_EFFDF_FÌFST 655J6 User defIned errors start wIth
thIs code
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
299
Input and Dutput Constants
Constants:
FIle openIng flags
PosItIonIng InsIde a fIle
Code page usage
|essage8ox
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
300
FIIe DpenIng FIags
FIle openIng flag values specIfy the fIle access mode. Flags are defIned as follows:
IdentIfIer VaIue 0escrIptIon
FÌLE_FEA0 1 FIle Is opened for readIng. Flag
Is used In FIleDpen()
FÌLE_WFÌTE 2 FIle Is opened for wrItIng. Flag
Is used In FIleDpen()
FÌLE_8ÌN 4 8Inary read/wrIte mode
(wIthout strIng to strIng
conversIon). Flag Is used In
FIleDpen()
FÌLE_CS7 8 CS7 fIle (all Its elements are
converted to strIngs of the
approprIate type, unIcode or
ansI, and separated by
separator). Flag Is used In
FIleDpen()
FÌLE_TXT 16 SImple text fIle (the same as
csv fIle, but wIthout takIng Into
account the separators). Flag Is
used In FIleDpen()
FÌLE_ANSÌ J2 StrIngs of ANSÌ type (one byte
symbols). Flag Is used In
FIleDpen()
FÌLE_UNÌCD0E 64 StrIngs of UNÌCD0E type (two
byte symbols). Flag Is used In
FIleDpen()
FÌLE_SHAFE_FEA0 128 Shared access for readIng from
several programs. Flag Is used
In FIleDpen()
FÌLE_SHAFE_WFÌTE 256 Shared access for wrItIng from
several programs. Flag Is used
In FIleDpen()
FÌLE_FEWFÌTE 512 PossIbIlIty for the fIle rewrIte
usIng functIons FIleCopy() and
FIle|ove(). The fIle should
exIst or should be opened for
wrItIng, otherwIse the fIle wIll
not be opened.
FÌLE_CD||DN 4096 The fIle path In the common
folder of all clIent termInals.
Flag Is used In FIleDpen(),
FIleCopy(), FIle|ove() and In
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
301
FIleÌsExIst() functIons.
Dne or several flags can be specIfIed when openIng a fIle. ThIs Is a combInatIon of flags. The
combInatIon of flags Is wrItten usIng the sIgn of logIcal DF (1), whIch Is posItIoned between
enumerated flags. For example, to open a fIle In CS7 format for readIng and wrItIng at the same tIme,
specIfy the combInatIon FÌLE_FEA01FÌLE_WFÌTE1FÌLE_CS7.
ExampIe:
Lnr rLL-!-nJL-=¯LL-Jp-n.rLL-n-m-,¯PHI_-IA¯¯PHI_W-PrI¯PHI_.¯V·¡
There are some specIfIc features of work when you specIfy read and wrIte flags:
Ìf FÌLE_FEA0 Is specIfIed, an attempt Is made to open an exIstIng fIle. Ìf a fIle does not exIst, fIle
openIng faIls, a new fIle Is not created.
FÌLE_FEA01FÌLE_WFÌTE - a new fIle Is created If the fIle wIth the specIfIed name does not exIst.
FÌLE_WFÌTE - the fIle Is created agaIn wIth a zero suze.
When openIng a fIle specIfIcatIon of FÌLE_WFÌTE and/or FÌLE_FEA0 Is requIred.
Flags that defIne the type of readIng of an open fIle, possess prIorIty. The hIghest flag Is FÌLE_CS7,
then goes FÌLE_8ÌN, and FÌLE_TXT Is of lowest prIorIty. Thus, If several flags are specIfIed at the
same tIme, (FÌLE_TXT1FÌLE_CS7 or FÌLE_TXT1FÌLE_8ÌN or FÌLE_8ÌN1FÌLE_CS7), the flag wIth the
hIghest prIorIty wIll be used.
Flags that defIne the type of encodIng also have prIorIty. FÌLE_UNÌCD0E Is of a hIgher prIorIty than
FÌLE_ANSÌ. So If you specIfy combInatIon FÌLE_UNÌCD0E1FÌLE_ANSÌ, flag FÌLE_UNÌCD0E wIll be used.
Ìf neIther FÌLE_UNÌCD0E nor FÌLE_ANSÌ Is IndIcated, FÌLE_UNÌCD0E Is ImplIed. Ìf neIther FÌLE_CS7,
nor FÌLE_8ÌN, nor FÌLE_TXT Is specIfIed, FÌLE_CS7 Is ImplIed.
Ìf a fIle Is opened for readIng as a text fIle (FÌLE_TXT or FÌLE_CS7), and at the fIle begInnIng a specIal
two·byte IndIcatIon 0xff,0xfe Is found, the encodIng flag wIll be FÌLE_UNÌCD0E, even If FÌLE_ANSÌ Is
specIfIed.
See aIso
FIle FunctIons
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
302
PosItIonIng InsIde a FIIe
|ost of fIle functIons are assocIated wIth data read/wrIte operatIons. At the same tIme, usIng the
FIleSeek() you can specIfy the posItIon of a fIle poInter to a posItIon InsIde the fIle, from whIch the
next read or wrIte operatIon wIll be performed. The ENU|_FÌLE_PDSÌTÌDN enumeratIon contaIns valId
poInter posItIons, relatIve to whIch you can specIfy the shIft In bytes for the next operatIon.
ENUh_FILE_PDSITIDN
IdentIfIer 0escrIptIon
SEEK_SET FIle begInnIng
SEEK_CUF Current posItIon of a fIle poInter
SEEK_EN0 FIle end
See aIso
FIleÌsEndIng, FIleÌsLIneEndIng
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
303
UsIng a Codepage In StrIng ConversIon DperatIons
When convertIng strIng varIables Into arrays of char type and back, the encodIng that by default
corresponds to the current ANSÌ of WIndows operatIng system (CP_ACP) Is used In |0L5. Ìf you want
to specIfy a dIfferent type of encodIng, It can be set through an addItIonal parameters for the
functIons CharArrayToStrIng(), StrIngToCharArray() and FIleDpen().
The table lIsts the buIlt·In constants for some of the most popular code pages. Not mentIoned code
pages can be specIfIed by a code correspondIng to the page.
ßuIIt-In Constants of Codepages
Constant VaIue 0escrIptIon
CP_ACP 0 The current WIndows ANSÌ
code page.
CP_DE|CP 1 The current system DE| code
page.
CP_|ACCP 2 The current system |acIntosh
code page.
Note: ThIs value Is mostly
used In earlIer created
program codes and Is of no
use now, sInce modern
|acIntosh computers use
UnIcode for encodIng.
CP_THFEA0_ACP J The WIndows ANSÌ code page
for the current thread.
CP_SY|8DL 42 Symbol code page
CP_UTF7 65000 UTF·7 code page.
CP_UTF8 65001 UTF·8 code page.
See aIso
ClIent TermInal PropertIes
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
304
Constants of the hessageßox 0IaIog WIndow
ThIs sectIon contaIns return codes of the |essage8ox() functIon. Ìf a message wIndow has a Cancel
button, the functIon returns Ì0CANCEL, In case If the ESC key or the Cancel button Is pressed. Ìf there
Is no Cancel button In the message wIndow, the pressIng of ESC does not gIve any effect.
Constant VaIue 0escrIptIon
Ì0DK 1 ¨DK¨ button has been pressed
Ì0CANCEL 2 ¨Cancel¨ button has been
pressed
Ì0A8DFT J ¨Abort¨ button has been
pressed
Ì0FETFY 4 ¨Fetry¨ button has been
pressed
Ì0ÌCNDFE 5 ¨Ìgnore¨ button has been
pressed
Ì0YES 6 ¨Yes¨ button has been pressed
Ì0ND 7 ¨No¨ button has been pressed
Ì0TFYACAÌN 10 ¨Try AgaIn¨ button has been
pressed
Ì0CDNTÌNUE 11 ¨ContInue¨ button has been
pressed
The maIn flags of the |essage8ox() functIon defIne contents and behavIor of the dIalog wIndow. ThIs
value can be a combInatIon of the followIng flag groups:
Constant VaIue 0escrIptIon
|8_DK 0x00000000 |essage wIndow contaIns only
one button: DK. 0efault
|8_DKCANCEL 0x00000001 |essage wIndow contaIns two
buttons: DK and Cancel
|8_A8DFTFETFYÌCNDFE 0x00000002 |essage wIndow contaIns
three buttons: Abort, Fetry
and Ìgnore
|8_YESNDCANCEL 0x0000000J |essage wIndow contaIns
three buttons: Yes, No and
Cancel
|8_YESND 0x00000004 |essage wIndow contaIns two
buttons: Yes and No
Standard Constants, Enumerations and Structures
© 2000·2010, |eta0uotes Software Corp.
305
|8_FETFYCANCEL 0x00000005 |essage wIndow contaIns two
buttons: Fetry and Cancel
|8_CANCELTFYCDNTÌNUE 0x00000006 |essage wIndow contaIns
three buttons: Cancel, Try
AgaIn, ContInue
To dIsplay an Icon In the message wIndow It Is necessary to specIfy addItIonal flags:
Constant VaIue 0escrIptIon
|8_ÌCDNSTDP,
|8_ÌCDNEFFDF,
|8_ÌCDNHAN0
0x00000010 The STDP sIgn Icon
|8_ÌCDN0UESTÌDN 0x00000020 The questIon sIgn Icon
|8_ÌCDNEXCLA|ATÌDN,
|8_ÌCDNWAFNÌNC
0x000000J0 The exclamatIon/warnIng sIgn
Icon
|8_ÌCDNÌNFDF|ATÌDN,
|8_ÌCDNASTEFÌSK
0x00000040 The encIrcled I sIgn
0efault buttons are defIned by the followIng flags:
Constant VaIue 0escrIptIon
|8_0EF8UTTDN1 0x00000000 The fIrst button
|8_0EF8UTTDN1 · Is default,
If the other buttons
|8_0EF8UTTDN2,
|8_0EF8UTTDNJ, or
|8_0EF8UTTDN4 are not
specIfIed
|8_0EF8UTTDN2 0x00000100 The second button Is default
|8_0EF8UTTDNJ 0x00000200 The thIrd button Is default
|8_0EF8UTTDN4 0x00000J00 The fourth button Is default
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
306
hDL5 Programs
For the mql5·program to operate, It must be compIled (CompIle button or F7 key). CompIlatIon should
pass wIthout errors (some warnIngs are possIble; they should be analyzed). AT thIs process, an
executable fIle wIth the same name and wIth EX5 extensIon must be created In the correspondIng
dIrectory, termInal_dIr\|0L5\Experts, termInal_dIr\|0L5\IndIcators or termInal_dIr\|0L5\scrIpts.
ThIs fIle can be run.
DperatIng features of mql5 programs are descrIbed In he followIng sectIons:
Program runnIng - order of callIng predefIned event·handlers;
ClIent termInal events - descrIptIon of events, whIch can be processed In programs
Call of Imported functIons - descrIptIon order, allowed parameters, search detaIls and call
agreement for Imported functIons;
FuntIme errors - obtaInIng InformatIon about runtIme and crItIcal errors.
Expert AdvIsors, custom IndIcators and scrIpts are attached to one of opened charts by 0rag'n'0rop
method from the NavIgator wIndow.
For an expert AdvIsor to stop operatIng, It should be removed from a chart by selectIng ¨Expert
AdvIsors · Femove¨ In chart context menu. DperatIon of Expert AdvIsors Is also affected by the state
of the button ¨Enable/dIsable Expert AdvIsors¨.
Ìn order to stop a custom IndIcator, It should be removed from a chart.
Custom IndIcators and Expert AdvIsors work untIl they are explIcItly removed from a chart;
InformatIon about attached Expert AdvIsors and ÌndIcators Is saved between clIent termInal starts.
ScrIpts are executed once and are deleted automatIcally upon operatIon completIon or change of the
current chart state, or upon clIent termInal shutdown. After the restart of the clIent termInal scrIpts
are not started, because the InformatIon about them Is not saved.
|axImum one Expert AdvIsor, one scrIpt and unlImIted number of IndIcators can operate In one chart.
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
307
Program PunnIng
FIght after a program Is attached to a chart, It Is uploaded to the clIent termInal memory, as well as
global varIable are InItIalIzed. Ìf some global varIable of the class type has a constructor, thIs
constructor wIll be called durIng InItIalIzatIon of global varIables.
After that the program Is waItIng for an event from the clIent termInal. Each mql5·program should has
at least one event·handler, otherwIse the loaded program wIll not be executed. Event handlers have
predefIned names, parameters and return types.
Type FunctIon name Parameters AppIIcatIon Comment
Int DnÌnIt none Expert AdvIsors
and IndIcators
ÌnIt event
handler. Ìt allows
to use the voId
return type.
voId Dn0eInIt const Int reason Expert AdvIsors
and IndIcators
0eInIt event
handler.
voId DnStart none scrIpts Start event
handler.
Int DnCalculate const Int
rates_total,
const Int
prev_calculated,
const datetIme
ETIme[],
const double
EDpen[],
const double
EHIgh[],
const double
ELow[],
const double
EClose[],
const long
ETIck7olume[],
const long
E7olume[],
const Int
ESpread[]
IndIcators Calculate event
handler for all
prIces.
Int DnCalculate const Int
rates_total,
const Int
prev_calculated,
const Int begIn,
const double
EprIce[]
IndIcators Calculate event
handler on the
sIngle data
array.
ÌndIcator cannot
have two event
handlers
sImultaneously.
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
308
Ìn thIs case the
only one event
handler wIll work
on the data
array.
voId DnTIck none Expert AdvIsors NewTIck event
handler. WhIle
the event of a
new tIck receIpt
Is beIng
processed, no
other events of
thIs type are
receIved.
voId DnTImer none Expert AdvIsors
and IndIcators
TImer event
handler.
voId DnTrade none Expert AdvIsors Trade event
handler.
double DnTester none Expert AdvIsors Tester event
handler.
voId DnChartEvent const Int Id,
const long
Elparam,
const double
Edparam,
const strIng
Esparam
Expert AdvIsors
and IndIcators
ChartEvent event
handler.
voId Dn8ookEvent const strIng
Esymbol_name
Expert AdvIsors 8ookEvent event
handler.
ClIent termInal adds appearIng events to the events queue. So events are processed one after another
In accordance to the order they were receIved. There Is an exceptIon for the NewTIck event. Ìf the
queue already has such an event or thIs event Is beIng processed, the new NewTIck event Is not
enqueued.
0ueue of events Is lImIted In sIze. At queue overflow, old events are removed wIthout beIng
processed In order to allow the receIpt of new events. Therefore, It Is recommended to wrIte effIcIent
event handlers, and It Is not recommended to use InfInIte loops (there Is an exceptIon of scrIpts,
whIch handle the Start event only).
Events are enqueued for Expert AdvIsors only If the operatIon of Expert AdvIsors Is enabled In the the
clIent termInal.
LIbrarIes do not handle any events.
LoadIng and UnIoadIng of IndIcators
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
309
ÌndIcators are loaded In the followIng cases:
an IndIcator Is attached to a chart;
termInal start (If the IndIcator was attached to the chart prIor to the shutdown of the termInal);
loadIng of a template (If the IndIcator attached to a chart Is specIfIed In the template);
change of a profIle (If the IndIcator Is attached to one of the profIle charts);
change of a symbol and/or tImeframe of a chart, to whIch the IndIcator Is attached;
after the successful recompIlatIon of an IndIcator, If the IndIcator was attached to a chart;
change of Input parameters of the IndIcator.
ÌndIcators are unloaded In the followIng cases:
when detachIng an IndIcator from a chart;
termInal shutdown (If the IndIcator was attached to a chart);
loadIng of a template, If an IndIcator Is attached to a chart;
closIng of a chart, to whIch the IndIcator was attached;
change of a profIle, If the IndIcator Is attached to one of charts of the changed profIle;
change of a symbol and/or tImeframe of a chart, to whIch the IndIcator Is attached;
change of Input parameters of the IndIcator.
LoadIng and UnIoadIng of Expert AdvIsors
Expert AdvIsors are loaded In the followIng cases:
when attachIng an Expert AdvIsor to a chart;
termInal start (If the Expert AdvIsor was attached to the chart prIor to the shutdown of the
termInal);
loadIng of a template (If the Expert AdvIsor attached to the chart Is specIfIed In the template);
change of a profIle (If the Expert AdvIsor Is attached to the one of the profIle charts).
Expert AdvIsors are unloaded In the followIng cases:
when detachIng an expert AdvIsor from a chart;
If a new Expert AdvIsor Is attached to a chart, If another Expert AdvIsor has been attached already,
thIs Expert AdvIsor Is unloaded.
termInal shutdown (If the Expert AdvIsor was attached to a chart);
loadIng of a template, If an Expert AdvIsor Is attached to the chart;
close of a chart, to whIch the Expert AdvIsor Is attached.
change of a profIle, If the Expert AdvIsor Is attached to one of charts of the changed profIle.
In case the symboI or tImeframe of a chart, to whIch the Expert AdvIsor Is attached, changes,
Expert AdvIsors are not Ioaded or unIoaded. Ìn thIs case clIent termInal subsequently calls Dn0eInIt
() handlers on the old symbol/tImeframe and DnÌnIt() on the new symbol/tImeframe (If they are such),
values of global varIables and statIc varIables are not reset. All events, whIch have been receIved for
the Expert AdvIsor before the InItIalIzatIon Is completed (DnÌnIt() functIon) are skIpped.
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
310
Expert AdvIsors are not loaded or unloaded when account Is changed.
LoadIng and UnIoadIng of ScrIpts
ScrIpts are loaded ImmedIately after they are attached to a chart and unloaded ImmedIately after they
complete theIr operatIon. DnÌnIt() and Dn0eInIt() are not called for scrIpts.
When a program Is unloaded (deleted from a chart) the clIent termInal performs deInItIalIzatIon of
global varIables and deletes the events queue. Ìn thIs case deInItIalIzatIon means reset of all the
strIng·type varIables, deallocatIon of dynamIcal array objects and call of theIr destructors If they are
avaIlable.
For a better understandIng of the Expert AdvIsor operatIon we recommend to compIle the code of the
followIng Expert AdvIsor and perform actIons of load/unload, template change, symbol change,
tImeframe change etc:
ExampIe:
//--------------------------------------------------------------------
// r--rIxp-nr.m¬¯
// .·pynLj!r `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m¬L¯.··m
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨¨¨
·L--- .r--r.L---

puoLL·.
.r--r.L---.· -nLnr.¨.r--r.L--- ··n-rnu·r·n¨·¡ ·
.r--r.L---.· -nLnr.¨.r--r.L--- J--rnu·r·n¨·¡ ·
·¡
.r--r.L--- jL·o-L¡
//--------------------------------------------------------------------
// Ixp-nr LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr JnPnLr.·

//---
-nLnr.¨PnLrL-LL--rL·n¨·¡
//---
n-runn.¨·¡
·
//--------------------------------------------------------------------
// Ixp-nr J-LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯-LnLr.··n-r Lnr n---·n·

//---
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
311
-nLnr.¨¯-LnLrL-LL--rL·n .Lr! n---·n¨,n---·n·¡
·
//--------------------------------------------------------------------
// Ixp-nr rL·k run·rL·n
//--------------------------------------------------------------------
v·LJ JnrL·k.·

//---
·
//--------------------------------------------------------------------
See aIso
ClIent termInal events, Event handlers
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
312
CIIent TermInaI Events
InIt
ÌmmedIately after the clIent termInal loads a program (an Expert AdvIsor or custom IndIcator) and
starts the process of InItIalIzatIon of global varIables, the ÌnIt event wIll be sent, whIch wIll be
processed by DnÌnIt() event handler, If there Is such. ThIs event Is also generated after a securIty
and/or chart tImeframe Is changed, after a program Is recompIled In |etaEdItor, after Input
parameters are changed from the setup wIndow of an Expert AdvIsor or a custom IndIcator. An Expert
AdvIsor Is also InItIalIzed after the account Is changed. The ÌnIt event Is not generated for scrIpts.
0eInIt
8efore global varIables are deInItIalIzed and the program (Expert AdvIsor or custom IndIcator) Is
unloaded, the clIent termInal sends the 0eInIt event to the program. 0eInIt Is also generated when the
clIent termInal Is closed, when a chart Is closed, rIght before the securIty and/or tImeframe Is
changed, at a successful program re·compIlatIon, when Input parameters are changed, and when
account Is changed.
The deInItIalIzatIon reason can be obtaIned from the parameter, passed to the Dn0eInIt() functIon.
The Dn0eInIt() functIon run Is restrIcted to 2.5 seconds. Ìf durIng thIs tIme the functIon hasn't been
completed, then It Is forcIbly termInated. The 0eInIt event Is not generated for scrIpts.
Start
The Start event Is a specIal event for scrIpt actIvatIon after It Is loaded. ThIs event Is processed by
DnStart handler. The Start event Is not send to Expert AdvIsors or custom IndIcators.
NewTIck
The NewTIck event Is generated If there are new quotes, It Is processed by DnTIck() of Expert
AdvIsors attached. Ìn case when DnTIck functIon for the prevIous quote Is beIng processed when a
new quote Is receIved, the new quote wIll be Ignored by an Expert AdvIsor, because the correspondIng
event wIll not enqueued.
All new quotes that are receIved whIle the program Is runnIng are Ignored untIl the DnTIck() Is
completed. After that the functIon wIll run only after a new quote Is receIved. The NewTIck event Is
generated IrrespectIve of whether automated trade Is allowed or not (¨Allow/prohIbIt Auto tradIng¨
button). The prohIbItIon of automated tradIng denotes only that sendIng of trade requests from an
Expert AdvIsor Is not allowed, whIle the Expert AdvIsor keeps workIng.
The prohIbItIon of automated tradIng by pressIng the approprIate button wIll not stop the current
executIon of the DnTIck() functIon. DnTIck() Is not started when the wIndow of Expert AdvIsor
propertIes Is open. The wIndow of propertIes cannot be opened when the Expert AdvIsor Is runnung.
CaIcuIate
The Calculate event Is generated only for IndIcators rIght after the ÌnIt event Is sent and at any
change of prIce data. Ìt Is processed by the DnCalculate functIon.
TImer
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
313
The TImer event Is perIodIcally generated by the clIent termInal for the Expert AdvIsor that has
actIvated the tImer by the EventSetTImer functIon. Usually, thIs functIon Is called by DnÌnIt. TImer
event processIng Is performed by the DnTImer functIon. After the operatIon of the Expert AdvIsor Is
completed, It Is necessary to destroy the tImer usIng the EventKIllTImer functIon, whIch Is usually
called In the Dn0eInIt functIon.
Trade
The Trade event Is generated when a trade operatIon Is completed on a trade server. The Trade event
Is handled by the DnTrade() functIon for the followIng trade operatIons:
sendIng, modIfyIng or removIng of a pendIng order;
cancellatIon of a pendIng order wIth not enough of money or expIratIon;
actIvatIon of a pendIng order;
openIng, addIng or closIng a posItIon (or part of the posItIon);
modIfyIng of the open posItIon (change stops - Stop Loss and/or Take ProfIt).
Tester
The Tester event Is generated after testIng of an Expert AdvIsor on hIstory data Is over. The event Is
handled by the DnTester() functIon.
ChartEvent
The ChartEvent event Is generated by the clIent termInal when a user Is workIng wIth a chart:
keyboard press, when the chart wIndow Is focused;
graphIcal object created;
graphIcal object deleted;
mouse press on the graphIcal object of the chart;
move of the graphIcal object usIng the mouse
end of text edItIng In LabelEdIt.
Also there Is a custom event ChartEvent, whIch can be sent to an Expert AdvIsor by any mql5·program
by usIng the EventChartCustom functIon. The event Is processed by the DnChartEvent functIon.
ßookEvent
The 8ookEvent event Is generated by the clIent termInal after the 0epth Df |arket Is changed; It Is
processed by the Dn8ookEvent functIon. To start generatIon of 8ookEvent for the specIfIed symbol, It
Is necessary to subscrIbe the symbol to thIs event by usIng the |arket8ookAdd functIon.
To unsubscrIbe from 8ookEvent for a specIfIed symbol, It Is necessary to call the |arket8ookFelease
functIon. The 8ookEvent event Is a broadcastIng·type event · It means that It Is suffIcIent to
subscrIbe just one Expert AdvIsor for thIs event, and all other Expert AdvIsors that have the
Dn8ookEvent event, wIll receIve It. That's why It Is necessary to analyse the symbol name, whIch Is
passed to a handler as a parameter.
See aIso
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
314
Event handlers, Program runnIng
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
315
CaII of Imported FunctIons
To Import functIons durIng the executIon of a mql5·program, the clIent termInal uses early bIndIng.
ThIs means that If a program has call of an Imported functIon, the correspondIng module (ex5 or dll) Is
loaded durIng the program load. |0L5 and 0LL lIbrarIes are executed In the thread of a callIng
module.
Ìt Is not recommended to use the fully specIfIed name of the module to be loaded lIke 0rìve:
\0ìrectory\FìleNcme.Ext. The |0L5 lIbrarIes are loaded from the termìncl_dìr\MDL5\Lìbrcrìes folder.
Ìf the lIbrary hasn't been found, then the clIent termInal performs an attempt to load It from
termìncl_dìr\experts folder.
The system lIbrarIes (0LL) are loaded by the operatIng system rules. Ìf the lIbrary Is already loaded
(for example, another Expert AdvIsor, and even from another clIent termInal, runnIng In parallel),
then It uses requests to the lIbrary already loaded. DtherwIse, It performs a search In the followIng
sequence:
1.
0Irectory, from whIch the module ImportIng dll was started. The module here Is an Expert AdvIsor,
a scrIpt, an IndIcator or EX5 lIbrary;
2.
0Irectory termInal_dIrectory\|0L5\LIbrarIes;
J.
0Irectory |0L5\LIbrarIes In the common dIrectory of all |etaTrader 5 clIent termInals
(Common\|0L5\LIbrarIes);
4.
0Irectory, from whIch the |etaTrader 5 clIent termInal was started;
5.
System dIrectory;
6.
WIndows dIrectory;
7.
Current dIrectory;
8.
0IrectorIes lIsted In the PATH system varIable.
Ìf the 0LL lIbrary uses another 0LL In Its work, the fIrst one cannot be loaded In case when there Is no
second 0LL.
8efore an Expert AdvIsor (scrIpt, IndIcator) Is loaded, a common lIst of all EX5 lIbrary modules Is
formed. Ìt's goIng to be usd both from a loaded Expert AdvIsor (scrIpt, IndIcator) and from lIbrarIes of
thIs lIst. Thus the one·tIme loadIng of many tImes used EX5 lIbrary modules Is needed. LIbrarIes use
predefIned varIables of the Expert AdvIsor (scrIpt, IndIcator) they were called by.
The Imported lIbrary EX5 Is searched for In the followIng sequence:
1.
0Irectory, path to whIch Is set relatIve to the dIrectory of the Expert AdvIsor (scrIpt, IndIcator) that
Imports EX5);
2.
0Irectory termInal_dIrectory\|0L5\LIbrarIes;
J.
0Irectory |0L5\LIbrarIes In the common dIrectory of all |etaTrader 5 clIent termInals
(Common\|0L5\LIbrarIes).
FunctIons Imported 0LL Into a mql5·program must ensure the WIndows APÌ calls agreement. To ensure
such an agreement, In the source text of programs wrItten In C or C++, use the keyword __stdcall,
whIch Is specIfIc to the |Icrosoft(r) compIlers. ThIs agreement Is characterIzed by the followIng:
caller (In our case It Is a mq5·program) should ¨see¨ a prototype of a functIon called (Imported from
the 0LL), In order to properly combIne parameters to a stack;
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
316
caller (In our case It Is a mql5·program) puts parameters to the stack In a reverse order, from rIght
to left · In thIs order an Imported functIon reads parameters passed to It;
parameters are passed by value, except those explIcItly passed by reference (In our case lInes)
an Imported functIon cleans the stack Independently by readIng parameters passed to It.
When descrIbIng the prototype of an Imported functIon, default parameters can be used.
Ìf the correspondIng lIbrary Is unable to load, or there Is a prohIbItIon on the 0LL use, or the Imported
functIon Is not found · the Expert AdvIsor stops Its operatIon wIth the approprIate message ¨Expert
AdvIsor stopped¨ In the Journal (log fIle). Ìn thIs case the Expert AdvIsor wIll not run untIl It Is
reInItIalIzed. An Expert AdvIsor can be reInItIalIzed as a result of recompIlatIon or after the table of
Its propertIes Is opened and DK Is pressed.
PassIng Parameters
All parameters of sImple types are passed by values unless It Is explIcItly IndIcated that they are
passed by reference. When a strIng Is passed, the address of the buffer of the copIed strIng Is passed;
If a strIng Is passed by reference, the address of the buffer of thIs strIng wIthout copyIng It Is passed
to the functIon Imported from 0LL.
Structures that contaIn dynamIc arrays, strIngs, classes, other complex structures, as well as statIc or
dynamIc arrays of the enumerated objects, can't be passed as a parameter to an Imported functIon.
When passIng an array to 0LL, the address of the begInnIng of the data buffer Is always passed
(IrrespectIve of the AS_SEFÌES flag). A functIon InsIde a 0LL knows nothIng about the AS_SEFÌES flag,
the passed array Is a statIc array of an undefIned length; an addItIonal parameter should be used for
specIfyIng the array sIze.
MQL5 programs
© 2000·2010, |eta0uotes Software Corp.
317
PuntIme Errors
The executIng subsystem of the clIent termInal has an opportunIty to save the error code In case any
occurs durIng a mql5·program run. There Is a a predefIned varIable _LastError for each executable
mql5 program.
8efore startIng the DnÌnIt functIon, the _LastError varIable Is reset. Ìn case an erroneous sItuatIons
occurs durIng calculatIons or In the process of Internal functIon calls, the _LastError varIable accepts a
correspondIng error code. The value stored In thIs varIable can be obtaIned by usIng the CetLastError
() functIon.
There are several crItIcal errors, appearIng whIch a program Is termInated ImmedIately :
dIvIsIon by zero;
goIng beyond array ranges;
usIng an Incorrect object poInter;
Predefined VariabIes
© 2000·2010, |eta0uotes Software Corp.
318
The predefIned VarIabIes
For each executable mql5·program a set of predefIned varIables Is supported, whIch reflect the state
of the current prIce chart by the moment a mql5·program (Expert AdvIsor, scrIpt or custom IndIcator)
Is started.
7alues of predefIned varIables are set by the clIent termInal before a mql5·program Is started.
PredefIned varIables are constant and cannot be changed from a mql5·program. As exceptIon, there Is
a specIal varIable _LastError, whIch can be reset to 0 by the FesetLastError functIon.
VarIabIe VaIue
_0IgIts Number of decImal places
_PoInt SIze of the current symbol poInt In the quote
currency
_LastError The last error code
_PerIod TImeframe of the current chart
_StopFlag Program stop flag
_Symbol Symbol name of the current chart
_UnInItFeason UnInItIalIzatIon reason code
LIbrarIes are used by varIables of the program they were called by.
Predefined VariabIes
© 2000·2010, |eta0uotes Software Corp.
319
Int _0IgIts
The _0IgIts varIable stores number of dIgIts after a decImal poInt, whIch defInes the prIce accuracy of
the symbol of the current chart.
You may also use the 0IgIts() functIon.
Predefined VariabIes
© 2000·2010, |eta0uotes Software Corp.
320
doubIe _PoInt
The _PoInt varIable contaIns the poInt sIze of the current symbol In the quote currency.
You may also use the PoInt() functIon.
Predefined VariabIes
© 2000·2010, |eta0uotes Software Corp.
321
Int _LastError
The _LastError varIable contaIns code of the last error, that occurred durIng the mql5·program run. Ìts
value can be reset to zero by FesetLastError().
To obtaIn the code of the last error, you may also use the CetLastError() functIon.
Predefined VariabIes
© 2000·2010, |eta0uotes Software Corp.
322
Int _PerIod
The _PerIod varIable contaIns the value of the tImeframe of the current chart.
Also you may use the PerIod() functIon.
See aIso
PerIodSeconds, Chart tImeframes, 0ate and TIme, 7IsIbIlIty of objects
Predefined VariabIes
© 2000·2010, |eta0uotes Software Corp.
323
booI _StopFIag
The _StopFlag varIable contaIns the flag of the mql5·program stop. When the clIent termInal Is tryIng
to stop the program, It sets the _StopFlag varIable to true.
To check the state of the _StopFlag you may also use the ÌsStopped functIon.
Predefined VariabIes
© 2000·2010, |eta0uotes Software Corp.
324
strIng _SymboI
The _Symbol varIable contaIns the symbol name of the current chart.
You may also use the Symbol() functIon.
Predefined VariabIes
© 2000·2010, |eta0uotes Software Corp.
325
Int _UnInItPeason
The _UnInItFeason varIable contaIns the code of the program unInItIalIzatIon reason.
Usually, thIs code Is obtaIned by UnInItIalIzeFeason()the functIon.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
326
Common FunctIons
Ceneral·purpose functIons not Included Into any specIalIzed group are lIsted here.
FunctIon ActIon
Alert 0Isplays a message In a separate wIndow
CheckPoInter Feturns the type of the object poInter
Comment Dutputs a comment In the left top corner of the
chart
0ebug8reak Program breakpoInt In debuggIng
ExpertFemove Stops expert advIsor and unloads It from the
chart
CetPoInter Feturns the object poInter
CetTIckCount Feturns the number of mIllIseconds that have
elapsed sInce the system was started
|essage8ox Creates, dIsplays a message box and manages
It
PerIodSeconds Feturns the number of seconds In the perIod
PlaySound Plays a sound fIle
PrInt 0Isplays a message In the log
PrIntFormat Formats and prInts the sets of symbols and
values In a log fIle In accordance wIth a preset
format
FesetLastError Sets the value of a predetermIned varIable
_LastError to zero
SendFTP Sends a fIle at the address specIfIed In the
settIngs wIndow of the ¨PublIsher¨ tab
Send|aIl Sends an emaIl at the address specIfIed In the
settIngs wIndow of the ¨|aIlbox¨ tab
Sleep Suspends executIon of the current Expert
AdvIsor or scrIpt wIthIn a specIfIed Interval
TermInalClose Commands the termInal to complete operatIon
Zero|emory Fesets a varIable passed to It by reference. The
varIable can be of any type, except for classes
and structures that have constructors.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
327
AIert
0Isplays a message In a separate wIndow.
v·LJ AL-nr.
-rj:man:, // rLn-r v-Lu-
... // ·r!-n v-Lu--
·¡
Parameters
-rj:man:
[In] Any values, separated by commas. To separate the InformatIon output In several lInes you
can use the lIne feed character ¨\n¨ or ¨\r\n¨. The number of parameters can not exceed 64.
Peturn VaIue
No return value.
Note
Arrays can't be passed to the Alert() functIon. Arrays should be output elementwIse. 0ata of the
double type are output wIth 8 dIgIts after the decImal poInt, data of the float type are dIsplayed
wIth 5 dIgIts after the decImal poInt. To derIve the real numbers wIth a dIfferent precIsIon or In a
scIentIfIc format, use 0oubleToStrIng().
0ata of bool the type are output as ¨true¨ or ¨false¨ strIngs. 0ates are output as YYYY.||.00 HH:
|Ì:SS. To dIsplay a date In another format use TImeToStrIng(). 0ata of the color type are output
eIther as an F,C,8 strIng or as a color name, If the color Is present In a color set.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
328
CheckPoInter
The functIon returns the type of the object poInter.
IHJM_-JPHrI-_r1-I .!-·k-·Lnr-n.
·o|-·r -ny.o¬a·: // ·o|-·r p·Lnr-n
·¡
Parameters
-ny.o¬a·:
[In] Dbject poInter.
Peturn vaIue
Feturns a value from the ENU|_PDÌNTEF_TYPE enumeratIon.
Note
An attempt to call an Incorrect poInter results In the crItIcal termInatIon of a program. That's why
It's necessary to call the CheckPoInter functIon before usIng a poInter. A poInter can be Incorrect In
the followIng cases:
the poInter Is equal to NULL;
the object has been deleted usIng the delete operator.
ThIs functIon can be used for checkIng poInter valIdIty. A non·zero value warrantIes that the poInter
can be used for accessIng.
ExampIe:
//--------------------------------------------------------------------
// J-L-r- LL-r oy J-L-rLnj Lr- -L-m-nr-
//--------------------------------------------------------------------
v·LJ .MyHL-r..¯--rn·y.·

//--- --nvL·- p·Lnr-n r·n .·nkLnj Ln r!- L··p
.Pr-m· Lr-m¡
//--- j· r!n·uj! L··p -nJ rny r· J-L-r- Jyn-mL· p·Lnr-n-
.!LL-..!-·k-·Lnr-n.m_Lr-m-·.=-JPHrI-_PHVAHP¯·

Lr-m=m_Lr-m-¡
m_Lr-m-=m_Lr-m-.H-xr.·¡
Lr..!-·k-·Lnr-n.Lr-m·==-JPHrI-_¯1HAMP.·

-nLnr.¨¯yn-my· ·o|-·r ¨,Lr-m.PJ-nrLrL-n.·,¨ r· o- J-L-r-J¨·¡
J-L-r- .Lr-m·¡
·
-L-- -nLnr.¨H·n-Jyn-mL· ·o|-·r ¨,Lr-m.PJ-nrLrL-n.·,¨ ·-nn·r o- J-L-r-J¨·¡
·
//---
·
Common Functions
© 2000·2010, |eta0uotes Software Corp.
329
See aIso
Dbject PoInters, CheckIng the Dbject PoInter, Dbject 0elete Dperator delete
Common Functions
© 2000·2010, |eta0uotes Software Corp.
330
Comment
ThIs functIon outputs a comment defIned by a user In the top left corner of a chart.
v·LJ .·mm-nr.
-rj:man:, // rLn-r v-Lu-
... // n-xr v-Lu--
·¡
Parameters
...
[In] Any values, separated by commas. To delImIt output InformatIon Into several lInes, a lIne
break symbol ¨\n¨ or ¨\r\n¨ Is used. Number of parameters cannot exceed 64. Total length of the
Input comment (IncludIng InvIsIble symbols) cannot exceed 2045 characters (excess symbols wIll be
cut out durIng output).
Peturn VaIue
No return value
Note
Arrays can't be passed to the Comment() functIon.Arrays must be entered element·by·element.
0ata of double type are shown wIth the accuracy of up to 16 dIgIts after a decImal poInt, and can be
output eIther In tradItIonal or In scIentIfIc format, dependIng on what entry wIll be more compact.
0ata of float type are output wIth 5 dIgIts after a decImal poInt. To output real numbers wIth
another accuracy or In a predefIned format, use the 0oubleToStrIng() functIon.
0ata of bool type are output as ¨true¨ or ¨false¨ lInes. 0ates are shown as YYYY.||.00 HH:|Ì:SS.
To show data In another format, use TImeToStrIng(). 0ata of color type are returned eIther as F,C,
8 lIne or as a color name, If thIs color Is present In the color set.
The Comment functIon can't be called from a custom IndIcator, because a custom IndIcator can't
access chart, to whIch It Is attached.
ExampIe:
v·LJ JnrL·k.·

//---
J·uoL- A-k,ÐLJ¡
Lnr ¯pn--J¡
A-k=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_A¯··¡
ÐLJ=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
¯pn--J=¯ymo·LPnr·Pnr-j-n.¯ymo·L.·,¯1MÐJH_¯--IA¯·¡
//--- Jurpur v-Lu-- Ln r!n-- LLn--
.·mm-nr.¯rnLnj¯·nm-r.¨¯!·. pnL·--\nA-k = `J\nÐLJ = `J\n¯pn--J = `J¨,A-k,ÐLJ,¯pn--J··¡
·
See aIso
ChartSetStrIng, ChartCetStrIng
Common Functions
© 2000·2010, |eta0uotes Software Corp.
331
0ebugßreak
Ìt Is a program breakpoInt In debuggIng.
v·LJ ¯-oujÐn--k.·¡
Peturn VaIue
No return value.
Note
ExecutIon of an mql5 program Is broken only If a program Is started In a debuggIng mode. The
functIon can be used for vIewIng values fo varIables and/or for further step·by·step executIon.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
332
ExpertPemove
The functIon stops an Expert AdvIsor and unloads It from a chart.
v·LJ Ixp-nr--m·v-.·¡
Peturned vaIue
No return value.
Note
The Expert AdvIsor Is not stopped ImmedIately as you call ExpertFemove(); just a flag to stop the
EA operatIon Is set. That Is, any next event won't be processed, Dn0eInIt() wIll be called and the
Expert AdvIsor wIll be unloaded and removed from the chart.
ExampIe:
//--------------------------------------------------------------------
// r--r_Ixp-nr--m·v-.m¬¯
// .·pynLj!r `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m¬L¯.··m
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨¨¨
Lnpur Lnr rL·k-_r·_·L·--=`¨¡// numo-n ·r rL·k- o-r·n- IA unL·-J
//--------------------------------------------------------------------
// Ixp-nr J-LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯-LnLr.··n-r Lnr n---·n·

//---
-nLnr.rLm-.unn-nr.·,¨. ¨ ,__¯JH.rPJH__,¨ n---·n ··J- = ¨,n---·n·¡
//--- ¨·L--n¨ ··mm-nr
.·mm-nr.¨¨·¡
//---
·
//--------------------------------------------------------------------
// Ixp-nr rL·k run·rL·n
//--------------------------------------------------------------------
v·LJ JnrL·k.·

-r-rL· Lnr rL·k_··unr-n=¨¡
//---
rL·k_··unr-n--¡
.·mm-nr.¨\nÐ-r·n- unL·-JLnj -xp-nr -JvL-·n ¨,__¯PHI__,¨ L-rr¨,
.rL·k-_r·_·L·---rL·k_··unr-n·,¨ rL·k-¨·¡
//--- o-r·n-
Lr.rL·k_··unr-n=rL·k-_r·_·L·--·

Common Functions
© 2000·2010, |eta0uotes Software Corp.
333
Ixp-nr--m·v-.·¡
-nLnr.rLm-.unn-nr.·,¨. ¨,__¯JH.rPJH__,¨ -xp-nr -JvL-·n .LLL o- unL·-J-J¨·¡
·
-nLnr.¨rL·k_··unr-n =¨,rL·k_··unr-n·¡
//---
·
//--------------------------------------------------------------------
See aIso
Programs runnIng, ClIent termInal events
Common Functions
© 2000·2010, |eta0uotes Software Corp.
334
CetPoInter
The functIon returns the object poInter.
v·LJ· J-r-·Lnr-n.
-ny_·L--- -ny.o¬a·: // ·o|-·r ·r -ny ·L---
·¡
Parameters
-ny.o¬a·:
[In] Dbject of any class.
Peturn VaIue
The functIon returns the object poInter.
Note
Dnly class objects have poInters. Ìnstances of structures and sImple·type varIables can't have
poInters. The class object not created usIng the new() operator, but, e.g., automatIcally created In
the array of objects, stIll has a poInter. 8ut thIs poInter wIll be of the automatIc type
PDÌNTEF_AUTD|ATÌC, therefore the delete() operator can't be applIed to It. AsIde from that, the
type poInter doesn't dIffer from dynamIc poInters of the PDÌNTEF_AUTD|ATÌC type.
SInce varIables of structure types and sImple types do not have poInters, It's prohIbIted to apply the
CetPoInter() functIon to them. Ìt's also prohIbIted to pass the poInter as a functIon argument. Ìn all
these cases the compIler wIll notIfy of an error.
An attempt to call an Incorrect poInter causes the crItIcal termInatIon of a program. That's why the
CheckPoInter() functIon should be called prIor to usIng a poInter. A poInter can be Incorrect In the
followIng cases:
the poInter Is equal to NULL;
the object has been deleted usIng the delete operator.
ThIs functIon can be used to check the valIdIty of a poInter. A non·zero value guarantees, that the
poInter can be used for accessIng.
ExampIe:
//--------------------------------------------------------------------
// .!-·k_J-r-·Lnr-n.m¬¯
// .·pynLj!r `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m¬L¯.··m
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨¨¨
//--------------------------------------------------------------------
// ·L--- LmpL-m-nrLnj r!- LL-r -L-m-nr
//--------------------------------------------------------------------
Common Functions
© 2000·2010, |eta0uotes Software Corp.
335
·L--- .Pr-m

Lnr m_LJ¡
-rnLnj m_··mm-nr¡
.Pr-m· m_n-xr¡
puoLL·.
.Pr-m.· m_LJ=¨¡ m_··mm-nr=HJHH¡ m_n-xr=HJHH¡ ·
.Pr-m.· -nLnr.¨¯--rnu·r·n ·r ¨,m_LJ,
..!-·k-·Lnr-n.J-r-·Lnr-n.r!L-··==-JPHrI-_¯1HAMP.·.
¨Jyn-mL·¨.¨n·n-Jyn-mL·¨·¡ ·
v·LJ PnLrL-LLz-.Lnr LJ,-rnLnj ··mm· m_LJ=LJ¡ m_··mm-nr=··mm¡ ·
v·LJ -nLnrM-.· -nLnr.__¯JH.rPJH__,¨.¨,m_LJ,m_··mm-nr·¡ ·
Lnr PJ-nrLrL-n.· n-runn.m_LJ·¡ ·
.Pr-m· H-xr.· n-runn.m_n-xr·¡ ·
v·LJ H-xr..Pr-m ·Lr-m· m_n-xr=Lr-m¡ ·
·¡
//--------------------------------------------------------------------
// -LmpL--r ·L--- ·r r!- LL-r
//--------------------------------------------------------------------
·L--- .MyHL-r

.Pr-m· m_Lr-m-¡
puoLL·.
.MyHL-r.· m_Lr-m-=HJHH¡ ·
.MyHL-r.· ¯--rn·y.·¡ ·
o··L Pn--nrr·Ð-jLn..Pr-m· Lr-m·¡
v·LJ ¯--rn·y.·¡
·¡
//--------------------------------------------------------------------
// Ln--nrLnj LL-r -L-m-nr -r r!- o-jLnnLnj
//--------------------------------------------------------------------
o··L .MyHL-r..Pn--nrr·Ð-jLn..Pr-m· Lr-m·

Lr..!-·k-·Lnr-n.Lr-m·==-JPHrI-_PHVAHP¯· n-runn.r-L--·¡
//---
Lr-m.H-xr.m_Lr-m-·¡
m_Lr-m-=Lr-m¡
//---
n-runn.rnu-·¡
·
//--------------------------------------------------------------------
// J-L-rLnj r!- LL-r oy J-L-rLnj -L-m-nr-
//--------------------------------------------------------------------
v·LJ .MyHL-r..¯--rn·y.·

//--- --nvL·- p·Lnr-n r· .·nk Ln - L··p
.Pr-m· Lr-m¡
//--- j· r!n·uj! r!- L··p -nJ rny r· J-L-r- Jyn-mL· p·Lnr-n-
Common Functions
© 2000·2010, |eta0uotes Software Corp.
336
.!LL-..!-·k-·Lnr-n.m_Lr-m-·.=-JPHrI-_PHVAHP¯·

Lr-m=m_Lr-m-¡
m_Lr-m-=m_Lr-m-.H-xr.·¡
Lr..!-·k-·Lnr-n.Lr-m·==-JPHrI-_¯1HAMP.·

-nLnr.¨¯yn-my· ·o|-·r ¨,Lr-m.PJ-nrLrL-n.·,¨ r· o- J-L-r-J¨·¡
J-L-r- .Lr-m·¡
·
-L-- -nLnr.¨H·n-Jyn-mL· ·o|-·r ¨,Lr-m.PJ-nrLrL-n.·,¨ ·-nn·r o- J-L-r-J¨·¡
·
//---
·
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

.MyHL-r LL-r¡
.Pr-m Lr-m-¯!¨`¡
.Pr-m· Lr-m¡
//--- ·n--r- -nJ -JJ Lnr· r!- LL-r - Jyn-mL· ·o|-·r p·Lnr-n
Lr-m=n-. .Pr-m¡
Lr.Lr-m.=HJHH·

Lr-m.PnLrL-LLz-.!¨¨,¨Jyn-mL·¨·¡
Lr-m.-nLnrM-.·¡
LL-r.Pn--nrr·Ð-jLn.Lr-m·¡
·
//--- -JJ -ur·m-rL· p·Lnr-n- Lnr· r!- LL-r
r·n.Lnr L=¨¡ L<!¨¡ L--·

Lr-m-¯L`.PnLrL-LLz-.L,¨-ur·m-rL·¨·¡
Lr-m-¯L`.-nLnrM-.·¡
Lr-m=J-r-·Lnr-n.Lr-m-¯L`·¡
Lr..!-·k-·Lnr-n.Lr-m·.=-JPHrI-_PHVAHP¯·
LL-r.Pn--nrr·Ð-jLn.Lr-m·¡
·
//--- -JJ ·n- m·n- Jyn-mL· ·o|-·r p·Lnr-n -r r!- LL-r o-jLnnLnj
Lr-m=n-. .Pr-m¡
Lr.Lr-m.=HJHH·

Lr-m.PnLrL-LLz-.`¨¨,¨Jyn-mL·¨·¡
Lr-m.-nLnrM-.·¡
LL-r.Pn--nrr·Ð-jLn.Lr-m·¡
·
//--- J-L-r- -LL r!- LL-r -L-m-nr-
LL-r.¯--rn·y.·¡
Common Functions
© 2000·2010, |eta0uotes Software Corp.
337
//--- -LL r!- LL-r -L-m-nr- .LLL o- J-L-r-J -rr-n r!- -·nLpr L- ·v-n
//--- --- r!- Ixp-nr- r-o Ln r!- r-nmLn-L
·
See aIso
Dbject PoInters, CheckIng the Dbject PoInter, Dbject 0elete Dperator delete
Common Functions
© 2000·2010, |eta0uotes Software Corp.
338
CetTIckCount
The CetTIckCount() functIon returns the number of mIllIseconds that elapsed sInce the system start.
uLnr J-rrL·k.·unr.·¡
Peturn VaIue
7alue of uInt type.
Note
Counter Is lImIted by the restrIctIons of the system tImer. TIme Is stored as an unsIgned Integer, so
It's overfIlled every 49.7 If a computer works unInterruptedly.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
339
hessageßox
Ìt creates and shows a message box and manages It. A message box contaIns a message and header,
any combInatIon of predefIned sIgns and command buttons.
Lnr M----j-зx.
-rnLnj :ax:, // m----j- r-xr
-rnLnj ·-p:i.n=:.LL, // o·x !--J-n
Lnr fl-j·=` // J-rLn-- --r ·r ourr·n- Ln r!- o·x
·¡
Parameters
:ax:
[In] Text, contaInIng message to output.
·-p:i.n=:.LL
[In] DptIonal text to be dIsplayed In the box header. Ìf the parameter Is empty, Expert AdvIsor
name Is shown In the box header.
fl-j·=`
[In] DptIonal flags defInIng appearance and behavIor of a message box. Flags can be a
combInatIon of a specIal group of flags.
Peturn VaIue
Ìf the functIon Is successfully performed, the returned value Is one of values of |essage8ox() return
codes.
Note
The functIon can't be called from custom IndIcators, because IndIcators are executed In the
Interface thread and shouldn't slow down It.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
340
PerIodSeconds
ThIs functIon returns number of seconds In a perIod.
Lnr --nL·J¯-··nJ-.
IHJM_rPMI¯-AMI¯ pari.j=PFRF¯D_¯.RRF:. // ·!-nr p-nL·J
·¡
Parameters
pari.j=PFRF¯D_¯.RRF:.
[In] 7alue of a chart perIod from the enumeratIon ENU|_TÌ|EFFA|ES. Ìf the parameter Isn't
specIfIed, It returns the number of seconds of the current chart perIod, at whIch the program
runs.
Peturn VaIue
Number of seconds In a selected perIod.
See aIso
_PerIod, Chart tImeframes, 0ate and TIme, 7IsIbIlIty of objects
Common Functions
© 2000·2010, |eta0uotes Software Corp.
341
PIaySound
Ìt plays a sound fIle.
o··L -L-y¯·unJ.
-rnLnj filan-ma // rLL- n-m-
·¡
Parameters
filan-ma
[In] Path to a sound fIle.
Peturn VaIue
true - If the fIle Is found, otherwIse · false.
Note
The fIle must be located In termInal_dIrectory\Sounds ot Its sub·dIrectory. Dnly WA7 fIles are
played.

Common Functions
© 2000·2010, |eta0uotes Software Corp.
342
PrInt
Ìt enters a message In the Expert advIsor log. parameters can be of any type..
v·LJ -nLnr.
-rj:man:, // rLn-r v-Lu-
... // n-xr v-Lu--
·¡
Parameters
...
[In] Any values separated by commas. Number of parameters can't exceed 64.
Note
Arrays cannot be passed to the PrInt() functIon. Arrays must be Input element·by·element.
0ata of double type are shown wIth the accuracy of up to 16 dIgIts after a decImal poInt, and can be
output eIther In tradItIonal or In scIentIfIc format, dependIng on what entry wIll be more compact.
0ata of float type are output wIth 5 dIgIts after a decImal poInt. To output real numbers wIth
another accuracy or In a predefIned format, use the 0oubleToStrIng() functIon.
0ata of bool type are output as ¨true¨ or ¨false¨ lInes. 0ates are shown as YYYY.||.00 HH:|Ì:SS.
To show data In another format, use TImeToStrIng(). 0ata of color type are returned eIther as F,C,
8 lIne or as a color name, If thIs color Is present In the color set.
ExampIe:
-nLnr.¨rLm- ·r r!- L--r n-·-Lv-J ¬u·r- ¨,rLm-.unn-nr.··¡
See aIso
PrIntFormat, StrIngFormat
Common Functions
© 2000·2010, |eta0uotes Software Corp.
343
PrIntFormat
Ìt formats and enters sets of symbols and values In the Expert AdvIsor log In accordance wIth a preset
format.
v·LJ -nLnr¯·nm-r.
-rnLnj f.rm-:_·:rinj, // r·nm-r LLn-
... // v-Lu-- ·r -LmpL- ryp--
·¡
Parameters
f.rm-:_·:rinj
[In] A format lIne consIsts of sImple symbols, and If the format lIne Is followed by arguments, It
also contaIns format specIfIcatIons.
...
[In] Any values of sImple types separated by commas. Total number of parameters can't exceed
64 IncludIng the format lIne.
Peturn VaIue
StrIng.
Note
Ìnstead of PrIntFormat() you can use prIntf().
Ìf the format lIne Is followed by parameters, thIs lIne must contaIn format specIfIcatIons that
denote output format of these parameters. SpecIfIcatIon of format always starts wIth the percent
sIgn (º).
A format lIne Is read from left to rIght. When the fIrst format specIfIcatIon Is met (If there Is any),
the value of the fIrst parameter after the format lIne Is transformed and output accordIng to the
preset specIfIcatIon. The second format specIfIcatIon calls transformatIon and output of the second
parameter, and so on tIll the format lIne end. Ìf there are more parameters than format
specIfIcatIons, these addItIonal parameters are Ignored.
The format specIfIcatIon has the followIng form:
X[fIags|[wIdth|[.precIsIon|[{h | I | II | I32 | I64||type
Each fIeld of the format specIfIcatIon Is eIther a sImple symbol, or a number denotIng a sImple
format optIon. The sImplest format specIfIcatIon contaIns only the percent sIgn (º) and a symbol
defInIng the type of the output parameter (for example, ºs). Ìf you need to output the percent sIgn
In the format lIne, use the format specIfIcatIon ºº.
fIags
FIag 0escrIptIon 0efauIt ßehavIor
- (mInus) Left justIfIcatIon wIthIn the FIght justIfIcatIon
Common Functions
© 2000·2010, |eta0uotes Software Corp.
344
set wIdth
+ (plus) Dutput of the + or · sIgn for
values of sIgn types
The sIgn Is shown only of the
value Is negatIve
0 (zero) Zeroes are added before an
output value wIthIn the preset
wIdth. Ìf 0 flag Is specIfIed
wIth an Integer format (I, u,
x, X, o, d) and accuracy
specIfIcatIon Is set (for
example, º04.d), then 0 Is
Ignored.
NothIng Is added
space A space Is shown before an
output value, If It Is a sIgn
and posItIve value
Spaces aren't Inserted
# Ìf used together wIth the
format o, x or X, then before
the output value 0, 0x or 0X
Is added respectIvely.
NothIng Is added
Ìf used together wIth the
format e, E, a or A, value Is
always shown wIth a decImal
poInt.
0ecImal poInt Is shown only If
there Is a non·zero fractIonal
part.
Ìf used together wIth the
format g or C, flag defInes
presence of a decImal poInt In
the output value and prevents
the cuttIng off of leadIng
zeroes.
Flag # Is Ignored when used
together wIth formats c, d, I,
u, s.
0ecImal poInt Is shown only If
there Is a non·zero fractIonal
part. LeadIng zeroes are cut
off.
wIdth
A non·negatIve decImal number that sets the mInImal number of output symbols of the formatted
value. Ìf the number of output symbols Is less than the set wIdth, the correspondIng number of
spaces Is added from the left or rIght dependIng on the alIgnment (flag -). Ìf there Is flag zero (0),
the correspondIng number of zeroes Is added before the output value. Ìf the number of output
values Is larger than the the preset wIdth, the output value Is never cut off.
Ìf an asterIsk (*) Is specIfIed as wIdth, value of Int type must be IndIcated In the correspondIng
place of the lIst of passed parameters. Ìt wIll be used for specIfyIng wIdth of the output value.
precIsIon
A non·negatIve decImal number that sets the output accuracy · number of dIgIts after a decImal
Common Functions
© 2000·2010, |eta0uotes Software Corp.
345
poInt. As dIstInct from wIdth specIfIcatIon, accuracy specIfIcatIon can cut off the part of fractIonal
type wIth or wIthout roundIng.
The use of accuracy specIfIcatIon Is dIfferent for dIfferent format types.
Types 0escrIptIon 0efauIt ßehavIor
a, A Accuracy specIfIcatIon sets
the number of dIgIts after a
decImal poInt.
0efault accuracy - 6.
c, C Not used
d, I, u, o, x, X Sets mInImal number of
output dIgIts. Ìf number of
dIgIts In a correspondIng
parameter Is less than thIs
accuracy, zeroes are added to
the left of the output value.
The output value Isn't cut off,
If the number of output dIgIts
Is larger than th specIfIed
accuracy.
0efault accuracy - 1.
e, E, f Sets number of output dIgIts
after a decImal poInt. The
last dIgIt Is rounded off.
0efault accuracy - 6. Ìf set
accuracy Is 0 or decImal part Is
absent, the decImal poInt Is
not shown.
g, C Sets maxImal number of
meanIngful numbers.
6 meanIngful numbers are
output.
s, S Sets number of output
symbols of a lIne. Ìf the lIne
length exceeds the accuracy,
the lIne Is cut off.
The whole lIne Is output.
h | I | II | I32 | I64
SpecIfIcatIon of data sIzes, passed as a parameter.
Parameter Type Used PrefIx JoInt SpecIfIer of Type
Int l (lower case L) d, I, o, x, or X
uInt l (lower case L) o, u, x, or X
long ll (two lower case L) d, I, o, x, or X
short h d, I, o, x, or X
ushort h o, u, x, or X
Int ÌJ2 d, I, o, x, or X
uInt ÌJ2 o, u, x, or X
Common Functions
© 2000·2010, |eta0uotes Software Corp.
346
long Ì64 d, I, o, x, or X
ulong Ì64 o, u, x, or X
type
Type specIfIer Is the only oblIgatory fIeld for formatted output.
SymboI Type Dutput Format
c Int Symbol of short type
(UnIcode)
C Int Symbol of char type (ANSÌ)
d Int SIgn decImal Integer
I Int SIgn decImal Integer
o Int UnsIgned octal Integer
u Int UnsIgned decImal Integer
x Int UnsIgned hexadecImal
Integer, usIng ¨abcdef¨
X Int UnsIgned hexadecImal
Integer, usIng ¨A8C0EF¨
e double A real value In the format [·]
d.dddde[sIgn] ddd, where d ·
one decImal dIgIt, dddd · one
or more decImal dIgIts, ddd ·
a three·dIgIt number that
determInes the sIze of the
exponent, sIgn · plus or
mInus
E double SImIlar to the format of e,
except that the sIgn of
exponent Is output by upper
case letter (E Instead of e)
f double A real value In the format [·]
dddd.dddd, where dddd · one
or more decImal dIgIts.
Number of dIsplayed dIgIts
before the decImal poInt
depends on the sIze of
number value. Number of
dIgIts after the decImal poInt
depends on the requIred
accuracy.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
347
g double A real value output In f or e
format dependIng on what
output Is more compact.
C double A real value output In F or E
format dependIng on what
output Is more compact.
a double A real number In format [-]
0xh.hhhh p±dd, where h.hhhh
- mantIssa In the form of
hexadecImal dIgIts, usIng
¨abcdef¨, dd · Dne or more
dIgIts of exponent. Number of
decImal places Is determIned
by the accuracy specIfIcatIon
A double A real number In format [-]
0xh.hhhh P±dd, where h.hhhh
- mantIssa In the form of
hexadecImal dIgIts, usIng
¨A8S0EF¨, dd · Dne or more
dIgIts of exponent. Number of
decImal places Is determIned
by the accuracy specIfIcatIon
s strIng LIne output
Ìnstead of PrIntFormat() you can use prIntf().
ExampIe:
-nLnr¯·nm-r.¨Jurpur ¯ÐH_MAx Ln - ··mp-·r -·L-nrLrL· r·nm `-¨,¯ÐH_MAx·¡
pnLnrr.¨Jurpur J·uoL- `.!¯-¨,¯ÐH_MAx·¡
pnLnrr.¨Jurpur J·uoL- `!¯-¨,¯ÐH_MAx·¡
pnLnrr.¨Jurpur J·uoL- `!¯.!¨-¨,¯ÐH_MAx·¡
pnLnrr.¨Jurpur J·uoL- `!¯.!¨r¨,¯ÐH_MAx·¡
pnLnrr.¨Jurpur ¯ÐH_MAx `-¨,!¨·¡
pnLnrr.¨Jurpur J·uoL- `J¨,¯ÐH_MAx·¡
pnLnrr.¨Jurpur ¯ÐH_MAx `-¨,!¨·¡
pnLnrr.¨Jurpur J·uoL- `-¨,¯ÐH_MAx·¡
See aIso
StrIngFormat, 0oubleToStrIng, Feal types(double,float)
Common Functions
© 2000·2010, |eta0uotes Software Corp.
348
PesetLastError
Sets the value of the predefIned varIable _LastError Into zero.
v·LJ ----rH--rInn·n.·¡
Peturn VaIue
No return value.
Note
Ìt should be noted that the CetLastError() functIon doesn't zero _LastError varIable. Usually
FesetLastError() Is called befor functIon call, after whIch error appearance Is checked.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
349
SetUserError
Sets the predefIned varIable _LastError Into the value equal to EFF_USEF_EFFDF_FÌFST + user_error
v·LJ ¯-rJ--nInn·n.
u-!·nr :·ar_arr.r, // -nn·n numo-n
·¡
Parameters
:·ar_arr.r
[In] Error number set by a user.
Peturn VaIue
No return value.
Note
After an error has been set usIng the SetUserError(user_error) functIon, CetLastError() returns
value equal to EFF_USEF_EFFDF_FÌFST + user_error.
ExampIe:
v·LJ Jn¯r-nr.·

//--- --r -nn·n numo-n ¯¯¯`¯=.I--_J¯I-_I--J-_¯P-¯r -!·
¯-rJ--nInn·n.!·¡
//--- j-r L--r -nn·n ··J-
-nLnr.¨J-rH--rInn·n = ¨,J-rH--rInn·n.··¡

---uLr
J-rH--rInn·n = ¯¯¯`¯
·/
·
Common Functions
© 2000·2010, |eta0uotes Software Corp.
350
SendFTP
Sends a fIle at the address, specIfIed In the settIng wIndow of the ¨PublIsher¨ tab.
o··L ¯-nJ¯r-.
-rnLnj filan-ma, // rLL- r· --nJ oy rrp
-rnLnj f:p_p-:n=:.LL // rLL- r· upL·-J ·n rrp --nv-n
·¡
Parameters
filan-ma
[In] Name of sent fIle.
f:p_p-:n=:.LL
[In] FTP catalog. Ìf a dIrectory Is not specIfIed, dIrectory descrIbed In settIngs Is usesd.
Peturn VaIue
Ìn case of faIlure returns 'false'.
Note
Sent fIle must be located In the folder termìncl_dìrectory\MDL5\fìles or Its subfolders. SendIng Isn't
performed If FTP address and/or access password are not specIfIed In settIngs.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
351
SendhaII
Sends an emaIl at the address specIfIed In the settIngs wIndow of the ¨|aIlbox¨ tab.
o··L ¯-nJM-LL.
-rnLnj ·:o¬a·:, // !--J-n
-rnLnj ·.ma_:ax: // -m-LL r-xr
·¡
Parameters
·:o¬a·:
[In] EmaIl header.
·.ma_:ax:
[In] EmaIl body.
Peturn VaIue
true - If an emaIl Is put Into the send queue, otherwIse · false.
Note
SendIng can be prohIbIted In settIngs, emaIl address can be not specIfIed. For the error InformatIon
call CetLastError().

Common Functions
© 2000·2010, |eta0uotes Software Corp.
352
SIeep
The functIon suspends executIon of the current Expert AdvIsor or scrIpt wIthIn a specIfIed Interval.
v·LJ ¯L--p.
Lnr milli·a·.nj· // Lnr-nv-L
·¡
Parameters
milli·a·.nj·
[In] 0elay Interval In mIllIseconds.
Peturn VaIue
No return value.
Note
The Sleep() functIon can't be called for custom IndIcators, because IndIcators are executed In the
Interface thread and must not slow down It. The functIon has the buIlt·In check of EA halt flag every
0.1 seconds.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
353
TermInaICIose
The functIon commands the termInal to complete operatIon.
o··L r-nmLn-L.L·--.
Lnr ra:_·.ja // ·L·-Lnj ··J- ·r r!- ·LL-nr r-nmLn-L
·¡
Parameters
ra:_·.ja
[In] Feturn code, returned by the process of the clIent termInal at the operatIon completIon.
Peturn VaIue
The functIon returns true on success, otherwIse · false.
Note
The TermInalClose() functIon does not stop the termInal ImmedIately, It just commands the
termInal to complete Its operatIon.
The code of an Expert AdvIsor that called TermInalClose() must have all arrangements for the
ImmedIate completIon (e.g. all prevIously opened fIles must be closed In the normal mode). Call of
thIs functIon must be followed by the return operator.
The ret_code parameter allows IndIcatIng the necessary return code for analyzIng reasons of the
program termInatIon of the termInal operatIon when startIng It from the command prompt.
ExampIe:
//--- Lnpur p-n-m-r-n-
Lnpur Lnr rLk-_o-r·n-=¯¨¨¡ // numo-n ·r rL·k- rLLL r-nmLn-rL·n
Lnpur Lnr pLp-_r·_j·=!¯¡ // JL-r-n·- Ln pLp-
Lnpur Lnr --··nJ-_-r=¯¨¡ // numo-n ·r --··nJ- jLv-n r· r!- Ixp-nr AJvL-·n
//--- jL·o-L-
J-r-rLm- L-un·!_rLm-¡
Lnr rL·k_··unr-n=¨¡
//--------------------------------------------------------------------
// Ixp-nr J-LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯-LnLr.··n-r Lnr n---·n·

//---
-nLnr.__¯JH.rPJH__,¨ n---·n ··J- = ¨,n---·n·¡
.·mm-nr.¨¨·¡
·
//--------------------------------------------------------------------
// Ixp-nr rL·k run·rL·n
//--------------------------------------------------------------------
v·LJ JnrL·k.·

-r-rL· J·uoL- rLn-r_oLJ=¨.¨¡
Common Functions
© 2000·2010, |eta0uotes Software Corp.
354
M¬LrL·k rL·k¡
J·uoL- JL-r-n·-¡
//---
¯ymo·LPnr·rL·k._¯ymo·L,rL·k·¡
rL·k_··unr-n--¡
Lr.rLn-r_oLJ==¨.¨·

L-un·!_rLm-=rL·k.rLm-¡
rLn-r_oLJ=rL·k.oLJ¡
-nLnr.¨rLn-r_oLJ =¨,rLn-r_oLJ·¡
n-runn¡
·
//--- pnL·- JL-r-n·- Ln pLp-
JL-r-n·-=.rL·k.oLJ-rLn-r_oLJ·/_-·Lnr¡
//--- -!·. - n·rLrL·-rL·n r· rn-·k r!- IA ·p-n-rL·n
-rnLnj ··mm=¨¯n·m r!- m·m-nr ·r -r-nr.\n\n\x`¯.¯ -L-p--J --··nJ-. ¨-
Pnr-j-nr·¯rnLnj.rL·k.rLm--L-un·!_rLm-·-¨ ¡¨-
¨\n\n\x`¯.¯ rL·k- n-·-Lv-J. ¨-.-rnLnj·rL·k_··unr-n-¨ ¡¨-
¨\n\n\x`¯.¯ pnL·- .-nr Ln p·Lnr-. ¨-¯rnLnj¯·nm-r.¨`J¨,JL-r-n·-·¡
.·mm-nr.··mm·¡
//--- --·rL·n r·n ·!-·kLnj ··nJLrL·n r· ·L·-- r!- r-nmLn-L
Lr.rL·k_··unr-n=rLk-_o-r·n-·
r-nmLn-L.L·--.¨·¡ // -xLr oy rL·k ··unr-n
Lr.JL-r-n·-pLp-_r·_j··
r-nmLn-L.L·--.!·¡ // j· up oy r!- numo-n ·r pLp- -¬u-L r· pLp-_r·_j·
Lr.JL-r-n·-<-pLp-_r·_j··
r-nmLn-L.L·--.-!·¡ // j· J·.n oy r!- numo-n ·r pLp- -¬u-L r· pLp-_r·_j·
Lr.rL·k.rLm--L-un·!_rLm---··nJ-_-r·
r-nmLn-L.L·--.!¨¨·¡ // r-nmLn-rL·n oy rLm-·ur
//---
·
See aIso
Program runnIng, ExecutIon errors, Feasons for deInItIalIzatIon
Common Functions
© 2000·2010, |eta0uotes Software Corp.
355
TesterWIthdrawaI
The specIal functIon to emulate the operatIon of money wIthdrawal In the process of testIng. Can be
used In some asset management systems.
o··L r--r-nWLr!Jn-.-L.
J·uoL- m.nay // r!- -um r· .Lr!Jn-.
·¡
Parameters
m.nay
[In] The sum of money that we need to wIthdraw (In the deposIt currency).
Peturn VaIue
Ìf successful, returns true, otherwIse · false.
Common Functions
© 2000·2010, |eta0uotes Software Corp.
356
Zerohemory
The functIon resets a varIable passed to It by reference.
v·LJ ¯-n·M-m·ny.
v·LJs v-ri-ola // n---r v-nL-oL-
·¡
Parameters
v-ri-ola
[In] [out] 7arIable passed by reference, you want to reset (InItIalIze by zero values).
Peturn VaIue
No return value.
Note
Ìf the functIon parameter Is a strIng, the call wIll be equIvalent to IndIcatIng NULL as Its value.
For sImple types and theIr arrays, as well as for structures/classes consIstIng of such types, thIs Is a
sImple reset.
For objects contaInIng strIngs and dynamIc arrays, Zero|emory() Is called for each element.
For any arrays not protected by the const modIfIer, thIs Is the zeroIng of all elements.
For arrays of complex objects, Zero|emory() Is called for each element.
Zero|emory() can't be applIed to classes wIth protected members or InherItance.
Array Functions
© 2000·2010, |eta0uotes Software Corp.
357
Croup of FunctIons for WorkIng wIth Arrays
Arrays are allowed to be maxImum four·dImensIonal. Each dImensIon Is Indexed from 0 to
dìmensìon_sìze·1. Ìn a partIcular case of a one·dImensIonal array of 50 elements, callIng of the fIrst
element wIll appear as array[0], of the last one · as array[49].
FunctIon ActIon
Array8search Feturns Index of the fIrs found element In the
fIrst array dImensIon
ArrayCopy CopIes one array Into another
ArrayFree Frees up buffer of any dynamIc array and sets
the sIze of the zero dImensIon In 0.
ArrayCetAsSerIes Checks dIrectIon of array IndexIng
ArrayÌnItIalIze Sets all elements of a numerIc array Into a
sIngle value
ArrayÌsSerIes Checks whether an array Is a tImeserIes
ArrayÌs0ynamIc Checks whether an array Is dynamIc
Array|axImum Search for an element wIth the maxImal value
Array|InImum Search for an element wIth the mInImal value
ArrayFange Feturns the number of elements In the
specIfIed dImensIon of the array
ArrayFesIze Sets the new sIze In the fIrst dImensIon of the
array
ArraySetAsSerIes Sets the dIrectIon of array IndexIng
ArraySIze Feturns the number of elements In the array
ArraySort SortIng of numerIc arrays by the fIrst dImensIon
Array Functions
© 2000·2010, |eta0uotes Software Corp.
358
Arrayßsearch
The functIon searches for a specIfIed value In a one·dImensIon numerIc array.
For searchIng In an array of doubIe type
Lnr Ann-yÐ---n·!.
J·uoL- -rr-y/¹, // -nn-y r·n ---n·!
J·uoL- ·a-r·naj_v-l:a // .!-r L- ---n·!-J r·n
·¡
For searchIng In an array of fIoat type
Lnr Ann-yÐ---n·!.
rL·-r -rr-y/¹, // -nn-y r·n ---n·!
rL·-r ·a-r·naj_v-l:a // .!-r L- ---n·!-J r·n
·¡
For searchIng In an array of Iong type
Lnr Ann-yÐ---n·!.
L·nj -rr-y/¹, // -nn-y r·n ---n·!
L·nj ·a-r·naj_v-l:a // .!-r L- ---n·!-J r·n
·¡
For searchIng In an array of Int type
Lnr Ann-yÐ---n·!.
Lnr -rr-y/¹, // -nn-y r·n ---n·!
Lnr ·a-r·naj_v-l:a // .!-r L- ---n·!-J r·n
·¡
For searchIng In an array of short type
Lnr Ann-yÐ---n·!.
-!·nr -rr-y/¹, // -nn-y r·n ---n·!
-!·nr ·a-r·naj_v-l:a // .!-r L- ---n·!-J r·n
·¡
For searchIng In an array of char type
Lnr Ann-yÐ---n·!.
·!-n -rr-y/¹, // -nn-y r·n ---n·!
·!-n ·a-r·naj_v-l:a // .!-r L- ---n·!-J r·n
·¡
Parameters
-rr-y/¹
[In] NumerIc array for search.
·a-r·naj_v-l:a
[In] 7alue for search.
Array Functions
© 2000·2010, |eta0uotes Software Corp.
359
Peturn VaIue
The functIon returns Index of a found element. Ìf the wanted value Isn't found, the functIon returns
the Index of an element nearest In value.
Note
8Inary search processes only sorted arrays. To sort numerIc arrays use the ArraySort() functIon.
Array Functions
© 2000·2010, |eta0uotes Software Corp.
360
ArrayCopy
Ìt copIes an array Into another one.
Lnr Ann-y.·py.
v·LJ j·:_-rr-y/¹, // J--rLn-rL·n -nn-y
v·LJ ·r·_-rr-y/¹, // -·un·- -nn-y
Lnr j·:_·:-r:=`, // LnJ-x -r-nrLnj rn·m .!L·! .nLr- Lnr· J--rLn-rL·n -nn-y
Lnr ·r·_·:-r:=`, // rLn-r LnJ-x ·r - -·un·- -nn-y
Lnr ·n:=VH¯LF_ÁRRÁ: // numo-n ·r -L-m-nr-
·¡
Parameters
j·:_-rr-y/¹
[out] 0estInatIon array
·r·_-rr-y/¹
[In] Source array
j·:_·:-r:=`
[In] StartIng Index fro the destInatIon array. 8y default, start Index Is 0.
·r·_·:-r:=`
[In] StartIng Index for the source array. 8y default, start Index Is 0.
·n:=-.
[In] Number of elements that should be copIed. 8y default, the whole array Is copIed
(cnt=WHDLE_AFFAY).
Peturn VaIue
Ìt returns the number of copIed elements.
Note
Ìf cnt·0 or cnt·src_sIze·src_start, all the remaInIng array part Is copIed. Arrays are copIed from left
to rIght. For serIes arrays, the startIng posItIon Is correctly defIned adjusted for copyIng from left
to rIght. Ìf an array Is copIed to Itself, the result Is undefIned.
Ìf arrays are of dIfferent types, durIng copyIng It trIes to transform each element of a source array
Into the type of the destInatIon array. A strIng array can be copIed Into a strIng array only. Array of
classes and structures contaInIng objects that requIre InItIalIzatIon aren't copIed. An array of
structures can be copIed Into an array of the same type only.
Array Functions
© 2000·2010, |eta0uotes Software Corp.
361
ArrayFree
Ìt frees up a buffer of any dynamIc array and sets the sIze of the zero dImensIon to 0.
v·LJ Ann-y¯n--.
v·LJ -rr-y/¹ // -nn-y
·¡
Parameters
-rr-y/¹
[In] 0ynamIc array.
Peturn VaIue
No return value.
Array Functions
© 2000·2010, |eta0uotes Software Corp.
362
ArrayCetAsSerIes
Ìt checks dIrectIon of an array Index.
o··L Ann-yJ-rA-¯-nL--.
v·LJ -rr-y // -nn-y r·n ·!-·kLnj
·¡
Parameters
-rr-y
[In] Checked array.
Peturn VaIue
Feturns true, If the specIfIed array has the AS_SEFÌES flag set, I.e. access to the array Is performed
back to front as In tImeserIes. A tImeserIes dIffers from a usual array In that the IndexIng of
tImeserIes elements Is performed from Its end to begInnIng (from the newest data to old).
Note
To check whether an array belongs to tImeserIes, use the ArrayÌsSerIes() functIon. Arrays of prIce
data passed as Input parameters Into the DnCalculate() functIon do not oblIgatorIly have the
IndexIng dIrectIon the same as In tImeserIes. The necessary IndexIng dIrectIon can be set usIng the
ArraySetAsSerIes() functIon.
See aIso
Access to tImeserIes, ArraySetAsSerIes
Array Functions
© 2000·2010, |eta0uotes Software Corp.
363
ArrayInItIaIIze
The functIon InItIalIzes a numerIc array by a preset value.
v·LJ Ann-yPnLrL-LLz-.
J·uoL- -rr-y/¹, // LnLrL-LLz-J -nn-y
J·uoL- v-l:a // v-Lu- r!-r .LLL o- --r
·¡
Parameters
-rr-y/¹
[out] NumerIc array that should be InItIalIzed.
v-l:a
[In] New value that should be set to all array elements.
Peturn VaIue
No return value.
Note
The ArrayFesIze() functIon allows to set sIze of an array wIth a reserve for further expansIon
wIthout the physIcal relocatIon of memory. Ìt Is Implemented for the better performance, because
the operatIons of memory relocatIon are reasonably slow.
ÌnItIalIzatIon of the array usIng ArrayÌnItIalIze(array, InIt_val) doesn't mean the InItIalIzatIon wIth
the same value of reserve elements allocated for thIs array. At further expandIng of the crrcy usIng
the ArrayFesIze() functIon, the elements wIll be added at the end of the array, theIr values wIll be
undefIned and In most cases wIll not be equal to ìnìt_vclµe.
ExampIe:
v·LJ Jn¯r-nr.·

//--- Jyn-mL· -nn-y
J·uoL- -nn-y¯`¡
//--- L-r'- --r r!- -nn-y -Lz- r·n !¨¨ -L-m-nr- -nJ n---nv- - ourr-n r·n -n·r!-n !¨ -L-m-nr-
Ann-y---Lz-.-nn-y,!¨¨,!¨·¡
//--- LnLrL-LLz- r!- -nn-y -L-m-nr- .Lr! IM-r1_VAHJI=¯ÐH_MAx v-Lu-
Ann-yPnLrL-LLz-.-nn-y,IM-r1_VAHJI·¡
-nLnr.¨V-Lu-- ·r !¨ L--r -L-m-nr- -rr-n LnLrL-LLz-rL·n¨·¡
r·n.Lnr L=-¨¡L<!¨¨¡L--· pnLnrr.¨-nn-y¯`J` = `J¨,L,-nn-y¯L`·¡
//--- -xp-nJ r!- -nn-y oy ¯ -L-m-nr-
Ann-y---Lz-.-nn-y,!¨¯·¡
-nLnr.¨V-Lu-- ·r !¨ L--r -L-m-nr- -rr-n Ann-y---Lz-.-nn-y,!¨¯·¨·¡
//--- v-Lu-- ·r ¯ L--r -L-m-nr- -n- ·or-Ln-J rn·m n---nv- ourr-n
r·n.Lnr L=-¯¡L<!¨¯¡L--· pnLnrr.¨-nn-y¯`J` = `J¨,L,-nn-y¯L`·¡
·
Array Functions
© 2000·2010, |eta0uotes Software Corp.
364
ArrayIs0ynamIc
The functIon checks whether an array Is dynamIc.
o··L Ann-yP-¯yn-mL·.
v·LJ -rr-y/¹ // ·!-·k-J -nn-y
·¡
Parameters
-rr-y/¹
[In] Checked array.
Peturn VaIue
Ìt returns true If the selected array Is dynamIc, otherwIse It returns false.
See aIso
Access to tImeserIes and IndIcators
Array Functions
© 2000·2010, |eta0uotes Software Corp.
365
ArrayIsSerIes
The functIon checks whether an array Is a tImeserIes.
o··L Ann-yP-¯-nL--.
v·LJ -rr-y/¹ // ·!-·k-J -nn-y
·¡
Parameters
-rr-y/¹
[In] Checked array.
Peturn VaIue
Ìt returns true, If a checked array Is an array tImeserIes, otherwIse It returns false. Arrays passed
as a parameter to the DnCalculate() functIon must be checked for the order of accessIng the array
elements by ArrayCetAsSerIes().
ExampIe:
tpn·p-nry LnJL·-r·n_·!-nr_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- !
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r H-o-L!
tpn·p-nry LnJL·-r·n_L-o-L! ¨H-o-L!¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n! --J
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! !
//--- LnJL·-r·n ourr-n-
J·uoL- H-o-L!Ðurr-n¯`¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,H-o-L!Ðurr-n,PH¯P.ArJ-_¯ArA·¡
//---
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm- srLm-¯`,
··n-r J·uoL- s·p-n¯`,
··n-r J·uoL- s!Lj!¯`,
··n-r J·uoL- sL·.¯`,
··n-r J·uoL- s·L·--¯`,
Array Functions
© 2000·2010, |eta0uotes Software Corp.
366
··n-r L·nj srL·k_v·Lum-¯`,
··n-r L·nj sv·Lum-¯`,
··n-r Lnr s-pn--J¯`·

//---
Lr.Ann-yP-¯-nL--.·p-n··

-nLnr.¨·p-n¯` L- rLm---nL--¨·¡
·
-L--


-nLnr.¨·p-n¯` L- n·r rLm---nL--...¨·¡
·
·
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
See aIso
Access to tImeserIes and IndIcators
Array Functions
© 2000·2010, |eta0uotes Software Corp.
367
ArrayhaxImum
The functIon searches a maxImal element In a one·dImensIon numerIc array.
Lnr Ann-yM-xLmum.
J·uoL- -rr-y/¹, // -nn-y r·n ---n·!
Lnr ·:-r:=` // LnJ-x r· -r-nr ·!-·kLnj .Lr!
Lnr ·.:n:=VH¯LF_ÁRRÁ:, // numo-n ·r ·!-·k-J -L-m-nr-
·¡
Parameters
-rr-y/¹
[In] A numerIc array, In whIch search Is made.
·:-r:=`
[In] Ìndex to start checkIng wIth.
·.:n:=VH¯LF_ÁRRÁ:
[In] Number of elements for search. 8y default, searches In the entIre array (cnt=WHDLE_AFFAY
).
Peturn VaIue
The functIon returns an Index of a found element takIng Into account the array serIal. Ìn case of
faIlure It returns ·1.
Array Functions
© 2000·2010, |eta0uotes Software Corp.
368
ArrayhInImum
The functIon searches a mInImal element In a one·dImensIon numerIc array.
Lnr Ann-yMLnLmum.
J·uoL- -rr-y/¹, // -nn-y r·n ---n·!
Lnr ·:-r:=` // LnJ-x r· -r-nr ·!-·kLnj .Lr!
Lnr ·.:n:=VH¯LF_ÁRRÁ:, // numo-n ·r ·!-·k-J -L-m-nr-
·¡
Parameters
-rr-y/¹
[In] A numerIc array, In whIch search Is made.
·:-r:=`
[In] Ìndex to start checkIng wIth.
·.:n:=VH¯LF_ÁRRÁ:
[In] Number of elements for search. 8y default, searches In the entIre array (cnt=WHDLE_AFFAY
).
Peturn VaIue
The functIon returns an Index of a found element takIng Into account the array serIal. Ìn case of
faIlure It returns ·1.
Array Functions
© 2000·2010, |eta0uotes Software Corp.
369
ArrayPange
The functIon returns the number of elements In a selected array dImensIon.
Lnr Ann-y--nj-.
v·LJ -rr-y/¹, // -nn-y r·n ·!-·k
Lnr r-nr_injax // numo-n ·r JLm-n-L·n
·¡
Parameters
-rr-y/¹
[In] Checked array.
r-nr_injax
[In] Ìndex of dImensIon.
Peturn VaIue
Number of elements In a selected array dImensIon.
Note
SInce Indexes are zero·based, the sIze of dImensIon Is 1 greater than the largest Index.
Array Functions
© 2000·2010, |eta0uotes Software Corp.
370
ArrayPesIze
The functIon sets a new sIze for the fIrst dImensIon
Lnr Ann-y---Lz-.
v·LJ -rr-y/¹, // -nn-y p----J oy n-r-n-n·-
Lnr nav_·iza, // n-. -nn-y -Lz-
Lnr -ll.·-:aj_·iza=` // n---nv- -Lz- v-Lu- .-x·---·
·¡
Parameters
-rr-y/¹
[out] Array for changIng sIzes.
nav_·iza
[In] New sIze for the fIrst dImensIon.
-ll.·-:aj_·iza=`
[In] 0IstrIbuted sIze to get reserve.
Peturn VaIue
Ìf executed successfully, It returns count of all elements contaIned In the array after resIzIng,
otherwIse, returns ·1, and array Is not resIzed.
Note
0urIng memory allocatIon the allocated_sIze parameter Is taken Into account. Ìf thIs parameter Is
specIfIed, It sets the sIze of addItIonal memory for the array. Fe·calls of ArrayFesIze do not result
In physIcal re·allocatIon of memory, only the fIrst array dImensIon Is resIzed wIthIn the reserved
memory.
The functIon can be applIed only to dynamIc arrays. Please note that you can't change the sIze for
dynamIc arrays set as IndIcator buffers by the functIon SetÌndex8uffer(). For IndIcator buffers, all
operatIons of sIze changes are performed by the executIng sub·system of the termInal.
See aIso
ArrayÌnItIalIze
Array Functions
© 2000·2010, |eta0uotes Software Corp.
371
ArraySetAsSerIes
The functIon sets the AS_SEFÌES flag to a selected object of a dynamIc array, and elements wIll be
Indexed lIke In tImeserIes.
o··L Ann-y¯-rA-¯-nL--.
v·LJ -rr-y/¹, // -nn-y oy n-r-n-n·-
o··L ·a: // rnu- J-n·r-- n-v-n-- ·nJ-n ·r LnJ-xLnj
·¡
Parameters
-rr-y/¹
[In][out] NumerIc array to set.
·a:
[In] Array IndexIng dIrectIon.
Peturn VaIue
The functIon returns true on success, otherwIse · false.
Note
The AS_SEFÌES flag can't be set for multI·dImensIonal arrays or statIc arrays (arrays, whose sIze In
square brackets Is preset already on the compIlatIon stage). ÌndexIng In tImeserIes dIffers from a
common array In that the elements of tImeserIes are Indexed from the end toeards the begInnIng
(from the newest to oldest data).
ExampIe: IndIcator that shows bar number
//--------------------------------------------------------------------
// Ð-nHumo-n.m¬¯
// .·pynLj!r `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m¬L¯.··m
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
Array Functions
© 2000·2010, |eta0uotes Software Corp.
372
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨¨¨
tpn·p-nry LnJL·-r·n_·!-nr_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- !
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r Hum-n-rL·n
tpn·p-nry LnJL·-r·n_L-o-L! ¨Hum-n-rL·n¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n! .H-_HJHI
//--- LnJL·-r·n ourr-n-
J·uoL- Hum-n-rL·nÐurr-n¯`¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,Hum-n-rL·nÐurr-n,PH¯P.ArJ-_¯ArA·¡
//--- --r LnJ-xLnj r·n r!- ourr-n LLk- Ln rLm---nL--
Ann-y¯-rA-¯-nL--.Hum-n-rL·nÐurr-n,rnu-·¡
//--- --r -··un-·y ·r -!·.Lnj Ln ¯-r-WLnJ·.
PnJL·-r·n¯-rPnr-j-n.PH¯P.ArJ-_¯PJPr¯,¨·¡
//--- !·. r!- n-m- ·r r!- LnJL·-r·n -nny L- JL-pL-y-J Ln ¯-r-WLnJ·.
-L·rPnJ-x¯-r¯rnLnj.¨,-HJr_HAÐIH,¨Ð-n t¨·¡
//---
n-runn.¨·¡
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm- srLm-¯`,
··n-r J·uoL- s·p-n¯`,
··n-r J·uoL- s!Lj!¯`,
··n-r J·uoL- sL·.¯`,
··n-r J·uoL- s·L·--¯`,
··n-r L·nj srL·k_v·Lum-¯`,
··n-r L·nj sv·Lum-¯`,
··n-r Lnr s-pn--J¯`·

//--- .-'LL -r·n- r!- rLm- ·r r!- ·unn-nr z-n· o-n ·p-nLnj
-r-rL· J-r-rLm- ·unn-nrÐ-nrLm-Jp-n=¨¡
//--- n-v-nr -··--- r· -nn-y rLm-¯` - J· Lr LLk- Ln rLm---nL--
Ann-y¯-rA-¯-nL--.rLm-,rnu-·¡
//--- Pr rLm- ·r z-n· o-n JLrr-n- rn·m r!- -r·n-J ·n-
Lr.·unn-nrÐ-nrLm-Jp-n.=rLm-¯¨`·

Array Functions
© 2000·2010, |eta0uotes Software Corp.
373
//--- -num-n-r- -LL o-n- rn·mr!- ·unn-nr r· r!- ·!-nr J-pr!
r·n.Lnr L=n-r--_r·r-L-!¡L=¨¡L--· Hum-n-rL·nÐurr-n¯L`=L¡
·unn-nrÐ-nrLm-Jp-n=rLm-¯¨`¡
·
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
See aIso
Access to tImeserIes, ArrayCetAsSerIes
Array Functions
© 2000·2010, |eta0uotes Software Corp.
374
ArraySIze
The functIon returns the number of elements of a selected array.
Lnr Ann-y¯Lz-.
v·LJ -rr-y/¹ // ·!-·k-J -nn-y
·¡
Parameters
-rr-y/¹
[In] Array of any type.
Peturn VaIue
7alue of Int type.
Note
For a one·dImensIonal array, the value to be returned by the ArraySIze Is equal to that of
ArrayFange(array,0).
Array Functions
© 2000·2010, |eta0uotes Software Corp.
375
ArraySort
The functIon sorts numerIc arrays In ascendIng order from left to rIght.
o··L Ann-y¯·nr.
numo-ns -rr-y/¹ // -nn-y r·n -·nrLnj
·¡
Parameters
-rr-y/¹
[In][out] NumerIc array for sortIng.
Peturn VaIue
The functIon returns true on success, otherwIse · false.
Note
An array marked by the AS_SEFÌES flag Is sorted In descendIng order.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
376
ConversIon FunctIons
ThIs Is a group of functIons that provIde conversIon of data from one format Into another.
The NormalIze0ouble() functIon must be specIally noted as It provIdes the necessary accuracy of the
prIce presentatIon. Ìn tradIng operatIons, no unnormalIzed prIces may be used If theIr accuracy even a
dIgIt exceeds that requIred by the trade server.
FunctIon ActIon
CharToStrIng ConvertIng a symbol code Into a one·character
strIng
0oubleToStrIng ConvertIng a numerIc value to a text lIne wIth a
specIfIed accuracy
NormalIze0ouble FoundIng of a floatIng poInt number to a
specIfIed accuracy
StrIngTo0ouble ConvertIng a strIng contaInIng a symbol
representatIon of number Into number of
double type
StrIngToÌnteger ConvertIng a strIng contaInIng a symbol
representatIon of number Into number of Int
type
StrIngToTIme ConvertIng a strIng contaInIng tIme or date In
¨yyyy.mm.dd [hh:mI]¨ format Into datetIme
type
TImeToStrIng ConvertIng a value contaInIng tIme In seconds
elapsed sInce 01.01.1970 Into a strIng of ¨yyyy.
mm.dd hh:mI¨ format
ÌntegerToStrIng ConvertIng Int Into a strIng of preset length
ShortToStrIng ConvertIng symbol code (unIcode) Into one·
symbol strIng
ShortArrayToStrIng CopyIng array part Into a strIng
StrIngToShortArray Symbol·wIse copyIng a strIng to a selected part
of array of ushort type
CharArrayToStrIng ConvertIng symbol code (ansI) Into one·symbol
array
StrIngToCharArray Symbol·wIse copyIng a strIng converted from
UnIcode to ANSÌ, to a selected place of array of
uchar type
ColorToStrIng ConvertIng color value Into strIng as ¨F,C,8¨
StrIngToColor ConvertIng ¨F,C,8¨ strIng or strIng wIth color
name Into color type value
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
377
StrIngFormat ConvertIng number Into strIng accordIng to
preset format
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
378
CharToStrIng
ConvertIng a symbol code Into a one·character strIng.
-rnLnj .!-nr·¯rnLnj.
Lnr ·n-r_·.ja // num-nL· ··J- ·r -ymo·L
·¡
Parameters
·n-r_·.ja
[In] Code of UnIcode symbol.
Peturn VaIue
StrIng wIth a UnIcode symbol.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
379
CharArrayToStrIng
Ìt copIes and converts part of array of uchar type Into a returned strIng.
-rnLnj .!-nAnn-yr·¯rnLnj.
u·!-n -rr-y/¹, // -nn-y
Lnr ·:-r:=`, // -r-nrLnj p·-LrL·n Ln r!- -nn-y
Lnr ·.:n:=-. // numo-n ·r -umo·L-
uLnr ·.jap-ja=¯P_Á¯P // ··J- p-j-
·¡
Parameters
-rr-y/¹
[In] Array of uchar type.
·:-r:=`
[In] PosItIon from whIch copyIng starts. by default 0 Is used.
·.:n:=-.
[In] Number of array elements for copyIng. 0efInes the length of a resultIng strIng. 0efault value
Is ·1, whIch means copyIng up to the array end, or tIll termInal 0.
·.jap-ja=¯P_Á¯P
[In] The value of the code page. For the most·used code pages provIde approprIate constants.
Peturn VaIue
StrIng.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
380
CoIorToStrIng
Ìt converts color value Into strIng of ¨F,C,8¨ form.
-rnLnj .·L·nr·¯rnLnj.
··L·n ·.l.r_v-l:a, // ··L·n v-Lu-
o··L ·.l.r_n-ma // -!·. ··L·n n-m- ·n n·r
·¡
Parameters
·.l.r_v-l:a
[In] Color value In color type varIable.
·.l.r_n-ma
[In] SIgn of the necessIty to return color name, If color name Is IdentIcal to one of predefIned
color constants.
Peturn VaIue
StrIng presentatIon of color as ¨F,C,8¨, where F, C and 8 are decImal constants from 0 to 255
converted Into a strIng. Ìf the color_name=true parameter Is set, It wIll try to convert color value
Into color name.
ExampIe:
-rnLnj ·Ln=.·L·nr·¯rnLnj..'¨,`¯¯,¨'·¡ // jn--n ··L·n
-nLnr.·Ln·¡
·Ln=.·L·nr·¯rnLnj..'¨,`¯¯,¨',rnu-·¡ // j-r ··L·n ··n-r-nr
-nLnr.·Ln·¡
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
381
0oubIeToStrIng
ConvertIng numerIc value Into text strIng.
-rnLnj ¯·uoL-r·¯rnLnj.
J·uoL- v-l:a, // numo-n
Lnr jiji:·=+ // numo-n ·r JLjLr- -rr-n J-·Lm-L p·Lnr
·¡
Parameters
v-l:a
[In] 7alue wIth a floatIng poInt.
jiji:·
[In] Accuracy format. Ìf the dì¤ìts value Is In the range between 0 and 16, a strIng presentatIon of
a number wIth the specIfIed number of dIgIts after the poInt wIll be obtaIned. Ìf the dì¤ìts value Is
In the range between ·1 and ·16, a strIng representatIon of a number In the scIentIfIc format wIth
the specIfIed number of dIgIts after the decImal poInt wIll be obtaIned. Ìn all other cases the strIng
value wIll contaIn 8 dIgIts after the decImal poInt.
Peturn VaIue
StrIng contaInIng a symbol representatIon of a number wIth the specIfIed accuracy.
ExampIe:
-nLnr.¨¯·uoL-r·¯rnLnj.!`¨.¨ - M_-P· . ¨,¯·uoL-r·¯rnLnj.!`¨.¨-M_-P··¡
-nLnr.¨¯·uoL-r·¯rnLnj.!`¨.¨ - M_-P,!¯· . ¨,¯·uoL-r·¯rnLnj.!`¨.¨-M_-P,!¯··¡
-nLnr.¨¯·uoL-r·¯rnLnj.!`¨.¨ - M_-P,-!¯· . ¨,¯·uoL-r·¯rnLnj.!`¨.¨-M_-P,-!¯··¡
-nLnr.¨¯·uoL-r·¯rnLnj.!`¨.¨ - M_-P,-!· . ¨,¯·uoL-r·¯rnLnj.!`¨.¨-M_-P,-!··¡
-nLnr.¨¯·uoL-r·¯rnLnj.!`¨.¨ - M_-P,-`¨· . ¨,¯·uoL-r·¯rnLnj.!`¨.¨-M_-P,-`¨··¡
See aIso
NormalIze0ouble, StrIngTo0ouble
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
382
IntegerToStrIng
ThIs functIon convertIng value of Integer type Into a strIng of a specIfIed length and returns the
obtaIned strIng.
-rnLnj Pnr-j-nr·¯rnLnj.
L·nj n:moar, // numo-n
Lnr ·:r_lan=`, // L-njr! ·r n--uLr -rnLnj
u-!·nr fill_·ymo.l=' ' // rLLL-n
·¡
Parameters
n:moar
[In] Number for conversIon.
·:r_lan=`
[In] StrIng length. Ìf the resultIng strIng length Is larger than the specIfIed one, the strIng Is not
cut off. Ìf It Is smaller, fIller symbols wIll be added to the left.
fill_·ymo.l=' '
[In] FIller symbol. 8y default It Is a space.
Peturn VaIue
StrIng.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
383
ShortToStrIng
Ìt converts the symbol code (unIcode) Into one·symbol strIng and returns resultIng strIng.
-rnLnj ¯!·nrr·¯rnLnj.
u-!·nr ·ymo.l_·.ja // -ymo·L
·¡
Parameters
·ymo.l_·.ja
[In] Symbol code. Ìnstead of a symbol code you can use lIteral strIng contaInIng a symbol or a
lIteral strIng wIth 2·byte hexadecImal code correspondIng to the symbol from the UnIcode table.
Peturn VaIue
StrIng.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
384
ShortArrayToStrIng
Ìt copIes part of array Into a returned strIng.
-rnLnj ¯!·nrAnn-yr·¯rnLnj.
u-!·nr -rr-y/¹, // -nn-y
Lnr ·:-r:=`, // -r-nrLnj p·-LrL·n Ln r!- -nn-y
Lnr ·.:n:=-. // numo-n ·r -ymo·L-
·¡
Parameters
-rr-y/¹
[In] Array of ushort type (analog of wchar_t type).
·:-r:=`
[In] PosItIon, from whIch copyIng starts, 0efault · 0.
·.:n:=-.
[In] Number of array elements to copy. 0efInes the length of a resultIng strIng. 0efault value Is ·
1, whIch means copyIng up to the array end, or tIll termInal 0.
Peturn VaIue
StrIng.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
385
TImeToStrIng
ConvertIng a value contaInIng tIme In seconds elapsed sInce 01.01.1970 Into a strIng of ¨yyyy.mm.dd
hh:mI¨ format.
-rnLnj rLm-r·¯rnLnj.
J-r-rLm- v-l:a, // numo-n
Lnr m.ja=.FMF_DÁ.F.FMF_MF:..FS // ·urpur r·nm-r
·¡
Parameters
v-l:a
[In] TIme In seconds from 00:00 1970/01/01.
m.ja=.FMF_DÁ.F.FMF_MF:..FS
[In] AddItIonal data Input mode. Can be one or combIned flag: TÌ|E_0ATE gets result as ¨yyyy.
mm.dd¨, TÌ|E_|ÌNUTES gets result as ¨hh:mI¨, TÌ|E_SECDN0S gets results as ¨hh:mI:ss¨.
Peturn VaIue
StrIng.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
386
NormaIIze0oubIe
FoundIng floatIng poInt number to a specIfIed accuracy.
J·uoL- H·nm-LLz-¯·uoL-.
J·uoL- v-l:a, // n·nm-LLz-J numo-n
Lnr jiji:· // numo-n ·r JLjLr- -rr-n J-·Lm-L p·Lnr
·¡
Parameters
v-l:a
[In] 7alue wIth a floatIng poInt.
jiji:·
[In] Accuracy format, number of dIgIts after poInt (0·8).
Peturn VaIue
7alue of double type wIth preset accuracy.
Note
Calculated values of StopLoss, TakeProfIt, and values of open prIces for pendIng orders must be
normalIzed wIth the accuracy, the value of whIch can be obtaIned by 0IgIts().
ExampIe:
J·uoL- pL=M_-P¡
-nLnr.¨pL = ¨,¯·uoL-r·¯rnLnj.pL,!¯··¡

J·uoL- pL_`=H·nm-LLz-¯·uoL-.M_-P,`·¡
-nLnr.¨H·nm-LLz-¯·uoL-.pL,`· = ¨,¯·uoL-r·¯rnLnj.pL_`,!¯··
¡
J·uoL- pL_-=H·nm-LLz-¯·uoL-.M_-P,-·¡
-nLnr.¨H·nm-LLz-¯·uoL-.pL,-· = ¨,¯·uoL-r·¯rnLnj.pL_-,!¯··¡

J·uoL- pL_¨=H·nm-LLz-¯·uoL-.M_-P,¨·¡
-nLnr.¨H·nm-LLz-¯·uoL-.pL,¨· = ¨,¯·uoL-r·¯rnLnj.pL_¨,!¯··¡

---uLr.
pL= `.!1!¯-`¯¯`¯--¯-`!
H·nm-LLz-¯·uoL-.pL,`·= `.!1!-------------
H·nm-LLz-¯·uoL-.pL,-·= `.!1!¯-`¯1--------
H·nm-LLz-¯·uoL-.pL,¨·= `.¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨
·/
See aIso
0oubleToStrIng, Feal types(double,float), FeductIon of types,
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
387
StrIngToCharArray
Symbol·wIse copIes a strIng converted from UnIcode to ANSÌ, to a selected place of array of uchar
type. Ìt returns the number of copIed elements.
Lnr ¯rnLnjr·.!-nAnn-y.
-rnLnj :ax:_·:rinj, // -·un·- -rnLnj
u·!-ns -rr-y/¹, // -nn-y
Lnr ·:-r:=`, // -r-nrLnj p·-LrL·n Ln r!- -nn-y
Lnr ·.:n:=-. // numo-n ·r -ymo·L-
uLnr ·.jap-ja=¯P_Á¯P // ··J- p-j-
·¡
Parameters
:ax:_·:rinj
[In] StrIng to copy.
-rr-y/¹
[out] Array of uchar type.
·:-r:=`
[In] PosItIon from whIch copyIng starts. 0efault · 0.
·.:n:=-.
[In] Number of array elements to copy. 0efInes length of a resultIng strIng. 0efault value Is ·1,
whIch means copyIng up to the array end, or tIll termInal 0. TermInal 0 wIll also be copIed to the
recIpIent array, In thIs case the sIze of a dynamIc array can be Increased If necessary to the sIze
of the strIng. Ìf the sIze of the dynamIc array exceeds the length of the lIne, the sIze of the array
wIll not be reduced.
·.jap-ja=¯P_Á¯P
[In] The value of the code page. For the most·used code pages provIde approprIate constants.
Peturn VaIue
Number of copIed elements.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
388
StrIngToCoIor
ConvertIng ¨F,C,8¨ strIng or strIng wIth color name Into color type value.
··L·n ¯rnLnjr·.·L·n.
-rnLnj ·.l.r_·:rinj // -rnLnj n-pn---nr-rL·n ·r ··L·n
·¡
Parameters
·.l.r_·:rinj
[In] StrIng representatIon of a color of ¨F,C,8¨ type or name of one of predefIned Web·colors.
Peturn VaIue
Color value.
ExampIe:
··L·n -rn_··L·n=¯rnLnjr·.·L·n.¨¨,!`¯,¨¨·¡
-nLnr.-rn_··L·n·¡
-nLnr..-rnLnj·-rn_··L·n·¡
//--- ·!-nj- ··L·n - LLrrL-
-rn_··L·n=¯rnLnjr·.·L·n.¨¨,!`-,¨¨·¡
-nLnr.-rn_··L·n·¡
-nLnr..-rnLnj·-rn_··L·n·¡
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
389
StrIngTo0oubIe
The functIon converts strIng contaInIng a symbol representatIon of number Into number of double
type.
J·uoL- ¯rnLnjr·¯·uoL-.
-rnLnj v-l:a // -rnLnj
·¡
Parameters
v-l:a
[In] StrIng contaInIng a symbol representatIon of a number.
Peturn VaIue
7alue of double type.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
390
StrIngToInteger
The functIon converts strIng contaInIng a symbol representatIon of number Into number of Int
(Integer) type.
L·nj ¯rnLnjr·Pnr-j-n.
-rnLnj v-l:a // -rnLnj
·¡
Parameters
v-l:a
[In] StrIng contaInIng a number.
Peturn VaIue
7alue of Int type.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
391
StrIngToShortArray
The functIon symbol·wIse copIes a strIng Into a specIfIed place of an array of ushort type. Ìt returns
the number of copIed elements.
Lnr ¯rnLnjr·¯!·nrAnn-y.
-rnLnj :ax:_·:rinj, // -·un·- -rnLnj
u-!·nrs -rr-y/¹, // -nn-y
Lnr ·:-r:=`, // -r-nrLnj p·-LrL·n Ln r!- -nn-y
Lnr ·.:n:=-. // numo-n ·r -ymo·L-
·¡
Parameters
:ax:_·:rinj
[In] StrIng to copy
-rr-y/¹
[out] Array of ushort type (analog of wchar_t type).
·:-r:=`
[In] PosItIon, from whIch copyIng starts. 0efault · 0.
·.:n:=-.
[In] Number of array elements to copy. 0efInes length of a resultIng strIng. 0efault value Is ·1,
whIch means copyIng up to the array end, or tIll termInal 0.TermInal 0 wIll also be copIed to the
recIpIent array, In thIs case the sIze of a dynamIc array can be Increased If necessary to the sIze
of the strIng. Ìf the sIze of the dynamIc array exceeds the length of the lIne, the sIze of the array
wIll not be reduced.
Peturn VaIue
Number of copIed elements.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
392
StrIngToTIme
The functIon converts a strIng contaInIng tIme or date In ¨yyyy.mm.dd [hh:mI]¨ format Into datetIme
type.
J-r-rLm- ¯rnLnjr·rLm-.
-rnLnj v-l:a // J-r- -rnLnj
·¡
Parameters
v-l:a
[In] StrIng In ¨ yyyy.mm.dd hh:mI ¨ format.
Peturn VaIue
7alue of datetIme type contaInIng total number of seconds that elapsed sInce 01.01.1970.
Conversion Functions
© 2000·2010, |eta0uotes Software Corp.
393
StrIngFormat
The functIon formats obtaIned parameters and returns a strIng.
-rnLnj ¯rnLnj¯·nm-r.
-rnLnj f.rm-:, // -rnLnj .Lr! r·nm-r J--·nLprL·n
... ... // p-n-m-r-n-
·¡
Parameters
f.rm-:
[In] StrIng contaInIng method of formattIng. FormattIng rules are the same as for the
PrIntFormat functIon.
...
[In] Parameters, separated by a comma.
Peturn VaIue
StrIng.
See aIso
PrIntFormat, 0oubleToStrIng,ColorToStrIng, TImeToStrIng
Math Functions
© 2000·2010, |eta0uotes Software Corp.
394
hathematIcaI FunctIons
A set of mathematIcal and trIgonometrIc functIons.
FunctIon ActIon
|athAbs Feturns absolute value (modulus) of the
specIfIed numerIc value
|athArccos Feturns the arc cosIne of x In radIans
|athArcsIn Feturns the arc sIne of x In radIans
|athArctan Feturns the arc tangent of x In radIans
|athCeIl Feturns Integer numerIc value closest from
above
|athCos Feturns the cosIne of a number
|athExp Feturns exponent of a number
|athFloor Feturns Integer numerIc value closest from
below
|athLog Feturns natural logarIthm
|ath|ax Feturns the maxImal value of the two numerIc
values
|ath|In Feturns the mInImal value of the two numerIc
values
|ath|od Feturns the real remaInder after the dIvIsIon of
two numbers
|athPow FaIses the base to the specIfIed power
|athFand Feturns a pseudorandom value wIthIn the range
of 0 to J2767
|athFound Founds of a value to the nearest Integer
|athSIn Feturns the sIne of a number
|athSqrt Feturns a square root
|athSrand Sets the startIng poInt for generatIng a serIes
of pseudorandom Integers
|athTan Feturns the tangent of a number
|athÌs7alIdNumber Checks the correctness of a real number
Math Functions
© 2000·2010, |eta0uotes Software Corp.
395
hathAbs
The functIon returns the absolute value (modulus) of the specIfIed numerIc value.
J·uoL- M-r!Ao-.
J·uoL- v-l:a // num-nL· v-Lu-
·¡
Parameters
v-l:a
[In] NumerIc value.
Peturn VaIue
7alue of double type more than or equal to zero.
Note
Ìnstead the |athAbs() functIon you can use fabs().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
396
hathArccos
The functIon returns the arccosIne of x wIthIn the range 0 to In radIans.
J·uoL- M-r!An···-.
J·uoL- v-l // -!<v-L<!
·¡
Parameters
v-l
[In] The val value between ·1 and 1, the arc cosIne of whIch Is to be calculated.
Peturn VaIue
Arc cosIne of a number In radIans. Ìf val Is less than ·1 or more than 1, the functIon returns NaN
(IndetermInate value).
Note
Ìnstead of the |athArccos() functIon you can use acos().
See aIso
Feal types (double, float)
Math Functions
© 2000·2010, |eta0uotes Software Corp.
397
hathArcsIn
The functIon the arc sIne of x wIthIn the range of · /2 to /2 radIans.
J·uoL- M-r!An·-Ln.
J·uoL- v-l // -!<v-Lu-<!
·¡
Parameters
v-l
[In] The val value between ·1 and 1, the arc sIne of whIch Is to be calculated.
Peturn VaIue
Arc sIne of the val number In radIans wIthIn the range of · /2 to /2 radIans. Ìf val Is less than ·1
or more than 1, the functIon returns NaN (IndetermInate value).
Note
Ìnstead of the |athArcsIn() functIon you can use asIn().
See aIso
Feal types (double, float)
Math Functions
© 2000·2010, |eta0uotes Software Corp.
398
hathArctan
The functIon returns the arc tangent of x. Ìf x Is equal to 0, the functIon returns 0.
J·uoL- M-r!An·r-n.
J·uoL- v-l:a // r-nj-nr
·¡
Parameters
v-l:a
[In] A number representIng a tangent.
Peturn VaIue
|athArctan returns a value wIthIn the range of · /2 to /2 radIans.
Note
Ìnstead of the |athArctan() functIon you can use atan().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
399
hathCeII
The functIon returns Integer numerIc value closest from above.
J·uoL- M-r!.-LL.
J·uoL- v-l // numo-n
·¡
Parameters
v-l
[In] NumerIc value.
Peturn VaIue
NumerIc value representIng the smallest Integer that exceeds or equals to val.
Note
Instead of the |athCeIl() functIon you can use ceIl().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
400
hathCos
The functIon returns the cosIne of an angle.
J·uoL- M-r!.·-.
J·uoL- v-l:a // numo-n
·¡
Parameters
v-l:a
[In] Angle In radIans.
Peturn VaIue
7alue of double type wIthIn the range of ·1 to 1.
Note
Ìnstead of |athCos() you can use cos().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
401
hathExp
The functIon returns the value of e raIsed to the power of d.
J·uoL- M-r!Ixp.
J·uoL- v-l:a // p·.-n r·n r!- numo-n -
·¡
Parameters
v-l:a
[In] A number specIfyIng the power.
Peturn VaIue
A number of double type. At overflow, the functIon returns ÌNF (InfInIty), In case of order loss
|athExp returns 0.
Note
Ìnstead of |athExp() you can use exp().
See aIso
Feal types (double, float)
Math Functions
© 2000·2010, |eta0uotes Software Corp.
402
hathFIoor
The functIon returns Integer numerIc value closest from below.
J·uoL- M-r!¯L··n.
J·uoL- v-l // numo-n
·¡
Parameters
v-l
[In] NumerIc value.
Peturn VaIue
A numerIc value representIng the largest Integer that Is less than or equal to val.
Note
Ìnstead of |athFloor() you can use floor().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
403
hathLog
The functIon returns a natural logarIthm.
J·uoL- M-r!H·j.
J·uoL- v-l // v-Lu- r· r-k- r!- L·j-nLr!m
·¡
Parameters
v-l
[In] 7alue logarIthm of whIch Is to be found.
Peturn VaIue
The natural logarIthm of val In case of success. Ìf val Is negatIve, the functIon returns NaN
(undetermIned value). Ìf val Is equal to 0, the functIon returns ÌNF (InfInIty).
Note
Ìnstead of |athLog() you can use log().
See aIso
Feal types (double, float)
Math Functions
© 2000·2010, |eta0uotes Software Corp.
404
hathLog
Feturns the logarIthm of a number by base 10.
J·uoL- M-r!H·j!¨.
J·uoL- v-l // numo-n r· r-k- L·j-nLr!m
·¡
Parameters
v-l
[In] NumerIc value the common logarIthm of whIch Is to be calculated.
Peturn VaIue
The common logarIthm In case of success. Ìf val Is negatIve, the functIon returns NaN
(undetermIned value). Ìf val Is equal to 0, the functIon returns ÌNF (InfInIty).
Note
Ìnstead of |athLog10() you can use log10().
See aIso
Feal types (double, float)
Math Functions
© 2000·2010, |eta0uotes Software Corp.
405
hathhax
The functIon returns the maxImal value of two values.
J·uoL- M-r!M-x.
J·uoL- v-l:a., // rLn-r v-Lu-
J·uoL- v-l:a2 // --··nJ v-Lu-
·¡
Parameters
v-l:a.
[In] FIrst numerIc value.
v-l:a2
[In] Second numerIc value.
Peturn VaIue
The largest of the two values.
Note
Ìnstead of |ath|ax() you can use fmax(). FunctIons fmax(), fmIn(), |ath|ax(), |ath|In() can
work wIth Integer types wIthout typecastIng them to the type of double.
Ìf parameters of dIfferent types are passed Into a functIon, the parameter of the mInor type Is
automatIcally cast to the major type. The type of the return value corresponds to the major type.
Ìf data of the same type are passed, no castIng Is performed.
Math Functions
© 2000·2010, |eta0uotes Software Corp.
406
hathhIn
The functIon returns the mInImal value of two values.
J·uoL- M-r!MLn.
J·uoL- v-l:a., // rLn-r v-Lu-
J·uoL- v-l:a2 // --··nJ v-Lu-
·¡
Parameters
v-l:a.
[In] FIrst numerIc value.
v-l:a2
[In] Second numerIc value.
Peturn VaIue
The smallest of the two values.
Note
Ìnstead of |ath|In() you can use fmIn(). FunctIons fmax(), fmIn(), |ath|ax(), |ath|In() can work
wIth Integer types wIthout typecastIng them to the type of double.
Ìf parameters of dIfferent types are passed Into a functIon, the parameter of the mInor type Is
automatIcally cast to the major type. The type of the return value corresponds to the major type.
Ìf data of the same type are passed, no castIng Is performed.
Math Functions
© 2000·2010, |eta0uotes Software Corp.
407
hathhod
The functIon returns the real remaInder of dIvIsIon of two numbers.
J·uoL- M-r!M·J.
J·uoL- v-l:a, // JLvLJ-nr v-Lu-
J·uoL- v-l:a2 // JLvL-·n v-Lu-
·¡
Parameters
v-l:a
[In] 0IvIdend value.
v-l:a2
[In] 0IvIsor value.
Peturn VaIue
The |ath|od functIon calsulates the real value of f of val / y such that val = I * y + f , where I Is an
Integer, f has the same sIgn as val, and the absolute value of f Is less than the absolute value of y.
Note
Ìnstead of |ath|od() you can use fmod().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
408
hathPow
The functIon raIses a base to a specIfIed power.
J·uoL- M-r!-·..
J·uoL- o-·a, // o---
J·uoL- axp.nan: // -xp·n-nr v-Lu-
·¡
Parameters
o-·a
[In] 8ase.
axp.nan:
[In] Exponent value.
Peturn VaIue
7alue of base raIsed to the specIfIed power.
Note
Ìnstead of |athPow() you can use pow().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
409
hathPand
Feturns a pseudorandom Integer wIthIn the range of 0 to J2767.
Lnr M-r!--nJ.·¡
Peturn VaIue
Ìnteger value wIthIn the range of 0 to J2767.
Note
8efore the fIrst call of the functIon, It's necessary to call |athSrand to set the generator of
pseudorandom numbers to the InItIal state.
Note
Ìnstead of |athFand() you can use rand().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
410
hathPound
The functIon returns a value rounded off to the nearest Integer of the specIfIed numerIc value.
J·uoL- M-r!-·unJ.
J·uoL- v-l:a // v-Lu- r· o- n·unJ-J
·¡
Parameters
v-l:a
[In] NumerIc value before roundIng.
Peturn VaIue
7alue rounded tIll to the nearest Integer.
Note
Ìnstead of |athFound() you can use round().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
411
hathSIn
Feturns the sIne of a specIfIed angle.
J·uoL- M-r!¯Ln.
J·uoL- v-l:a // -njum-nr Ln n-JL-n-
·¡
Parameters
v-l:a
[In] Angle In radIans.
Peturn VaIue
SIne of an angle measured In radIans. Feturns value wIthIn the range of ·1 to 1.
Note
Ìnstead of |athSIn() you can use sIn().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
412
hathSqrt
Feturns the square root of a number.
J·uoL- M-r!¯¬nr.
J·uoL- v-l:a // p·-LrLv- numo-n
·¡
Parameters
v-l:a
[In] PosItIve numerIc value.
Peturn VaIue
Square root of value. Df value Is negatIve, |athSqrt returns NaN (IndetermInate value).
Note
Ìnstead of |athSqrt() you can use sqrt().
See aIso
Feal types (double, float)
Math Functions
© 2000·2010, |eta0uotes Software Corp.
413
hathSrand
Sets the startIng poInt for generatIng a serIes of pseudorandom Integers.
v·LJ M-r!¯n-nJ.
Lnr ·aaj // LnLrL-LLzLnj numo-n
·¡
Parameters
·aaj
[In] StartIng number for the row of random numbers.
Peturn VaIue
No return value.
Note
To re·InItIalIze the generator (I.e. set generator Into prevIous InItIal state), It's necessary to use
value 1 as the InItIalIzIng parameter. Any other value for the InItIal number sets the generator to
the random startIng poInt.
|athFand returns pseudorandom numbers that are generated In successIon. CallIng |athFand
before any call to |athSrand generates the same sequence as callIng |athSrand wIth parameter 1.
Ìnstead of |athSrand() you can use srand().
Math Functions
© 2000·2010, |eta0uotes Software Corp.
414
hathTan
The functIon returns a tangent of a number.
J·uoL- M-r!r-n.
J·uoL- r-j // -njum-nr Ln n-JL-n-
·¡
Parameters
r-j
[In] Angle In radIans.
Peturn VaIue
Tangent of rad. Ìf rad Is greater than or equal to 26J, or less than or equal to ·26J, a loss of
sIgnIfIcance In the result occurs, In whIch case the functIon returns an IndefInIte.
Note
Ìnstead of |athTan() you can use tan().
See aIso
Feal types (double, float)
Math Functions
© 2000·2010, |eta0uotes Software Corp.
415
hathIsVaIIdNumber
Ìt checks the correctness of a real number.
o··L M-r!P-V-LLJHumo-n.
J·uoL- n:moar // numo-n r· ·!-·k
·¡
Parameters
n:moar
[In] Checked numerIc value.
Peturn VaIue
Ìt returns true, If the checked value Is an acceptable real number. Ìf the checked value Is a plus or
mInus InfInIty, or ¨not a number¨ (NaN), the functIon returns false.
ExampIe:
J·uoL- -on·nm-L=M-r!An·-Ln.`.¨·¡
Lr..M-r!P-V-LLJHumo-n.-on·nm-L·· -nLnr.¨Arr-nrL·n. M-r!An·-Ln.`.¨· = ¨,-on·nm-L·¡
See aIso
Feal types(double,float)
String Functions
© 2000·2010, |eta0uotes Software Corp.
416
StrIng FunctIons
ThIs Is a group of functIons Intended for workIng wIth data of the strIng type.
FunctIon ActIon
StrIngAdd Adds a strIng at the place of IndIcated substrIng
StrIng8ufferLen Feturns the sIze of buffer dIstrIbuted for the
strIng
StrIngConcatenate Forms a strIng of parameters passed
StrIngFIll FIlls out a specIfIed strIng by selected symbols
StrIngFInd Search for a substrIng In a strIng
StrIngCetCharacter Feturns the value of a number located In the
specIfIed strIng posItIon
StrIngÌnIt ÌnItIalIzes strIng by specIfIed symbols and
provIdes the specIfIed strIng length
StrIngLen Feturns the number of symbols In a strIng
StrIngSetCharacter Feturns a copy of a strIng wIth a changed value
of a symbol In a specIfIed posItIon
StrIngSubstr Extracts a substrIng from a text strIng startIng
from a specIfIed posItIon
StrIngToLower Transforms all symbols of a selected strIng to
lowercase by locatIon
StrIngToUpper Transforms all symbols of a selected strIng Into
capItals by locatIon
StrIngTrImLeft Cuts lIne feed characters, spaces and tabs In
the left part of the strIng
StrIngTrImFIght Cuts lIne feed characters, spaces and tabs In
the rIght part of the strIng
String Functions
© 2000·2010, |eta0uotes Software Corp.
417
StrIngAdd
The functIon adds a substrIng to the end of a strIng.
o··L ¯rnLnjAJJ.
-rnLnjs ·:rinj_v-r, // -rnLnj, r· .!L·! .- -JJ
-rnLnj -jj_·:o·:rinj // -rnLnj, .!L·! L- -JJ-J
·¡
Parameters
·:rinj_v-r
[In][out] StrIng, to whIch another one Is added.
-jj_·:o·:rinj
[In] StrIng that Is added tI the end of a source strIng.
Peturn VaIue
Ìn case of success returns true, otherwIse false. Ìn order to get an error code, the CetLastError()
functIon should be called.
Note
The StrIngAdd() add functIons Is faster and memory savIng, as compared to bIndIng strIngs usIng
addItIon operatIons.
ExampIe:
v·LJ Jn¯r-nr.·

-rnLnj -=¨-¨,o=¨o¨,·¡
//--- rLn-r m-r!·J
Lnr -r-nr=J-rrL·k.·unr.·,-r·p¡
L·nj L¡
r·n.L=¨¡L<L-njr!¡L--·

·=--o¡
·
-r·p=J-rrL·k.·unr.·¡
-nLnr.¨rLm- r·n '· = - - o' = ¨,.-r·p--r-nr·,¨ mLLLL--··nJ-, L = ¨,L·¡
//--- --··nJ m-r!·J
-r-nr=J-rrL·k.·unr.·¡
r·n.L=¨¡L<L-njr!¡L--·

¯rnLnjAJJ.-,o·¡
·
-r·p=J-rrL·k.·unr.·¡
-nLnr.¨rLm- r·n '¯rnLnjAJJ.-,o·' = ¨,.-r·p--r-nr·,¨ mLLLL--··nJ-, L = ¨,L·¡
//--- r!LnJ m-r!·J
String Functions
© 2000·2010, |eta0uotes Software Corp.
418
-r-nr=J-rrL·k.·unr.·¡
-=¨-¨¡ // n--LnLrL-LLz- v-nL-oL- -
r·n.L=¨¡L<L-njr!¡L--·

Lnr k=¯rnLnj.·n·-r-n-r-.·,-,o·¡
·
-r·p=J-rrL·k.·unr.·¡
-nLnr.¨rLm- r·n '¯rnLnj.·n·-r-n-r-.·,-,o·' = ¨,.-r·p--r-nr·,¨ mLLLL--··nJ-, L = ¨,L·¡
·
See aIso
StrIngConcatenate
String Functions
© 2000·2010, |eta0uotes Software Corp.
419
StrIngßufferLen
The functIon returns the sIze of buffer dIstrIbuted for the strIng.
Lnr ¯rnLnjÐurr-nH-n.
-rnLnj ·:rinj_v-r // -rnLnj
·
Parameters
·:rinj_v-r
[In] StrIng.
Peturn VaIue
The value 0 means that the strIng Is constant and buffer sIze can't be changed. ·1 means that the
strIng belongs to the clIent termInal, and modIfIcatIon of the buffer contents can have
IndetermInate results.
Note
|InImal buffer sIze Is equal to 16.
ExampIe:
v·LJ Jn¯r-nr.·

L·nj L-njr!=!¨¨¨¡
-rnLnj -=¨-¨,o=¨o¨¡
//---
L·nj L¡
-nLnr.¨o-r·n-. ¯rnLnjÐurr-nH-n.-· = ¨,¯rnLnjÐurr-nH-n.-·,
¨ ¯rnLnjH-n.-· = ¨,¯rnLnjH-n.-··¡
r·n.L=¨¡L<L-njr!¡L--·

¯rnLnjAJJ.-,o·¡
·
-nLnr.¨-rr-n. ¯rnLnjÐurr-nH-n.-· = ¨,¯rnLnjÐurr-nH-n.-·,
¨ ¯rnLnjH-n.-· = ¨,¯rnLnjH-n.-··¡
·
See aIso
StrIngAdd, StrIngÌnIt, StrIngLen, StrIngFIll
String Functions
© 2000·2010, |eta0uotes Software Corp.
420
StrIngConcatenate
The functIon forms a strIng of passed parameters and returns the sIze of the formed strIng.
Parameters can be of any type. Number of parameters can't be less than 2 or more than 64.
Lnr ¯rnLnj.·n·-r-n-r-.
-rnLnjs ·:rinj_v-r, // -rnLnj r· r·nm
v·LJ -rj:man:. // rLn-r p-n-m-r-n ·r -ny -LmpL- ryp-
v·LJ -rj:man:2 // --··nJ p-n-m-r-n ·r -ny -LmpL- ryp-
... // n-xr p-n-m-r-n ·r -ny -LmpL- ryp-
·¡
Parameters
·:rinj_v-r
[In][out] StrIng that wIll be formed as a result of concatenatIon.
-rj:man::
[In] Any comma separated values. From 2 to 6J parameters of any sImple type.
Peturn VaIue
Feturns the strIng length, formed by concatenatIon of parameters transformed Into strIng type.
Parameters are transformed Into strIngs accordIng to the sane rules as In PrInt() and Comment(). As
dIstInct from PrInt, In the resultIng strIng concatenated parameters are not separated by a space.
Note
StrIngConcatenate() Is faster and memory savIng, as compared to bIndIng strIngs usIng addItIon
operatIons, because they don't use temporary varIables of strIng type.
See aIso
StrIngAdd
String Functions
© 2000·2010, |eta0uotes Software Corp.
421
StrIngFIII
Ìt fIlls out a selected strIng by specIfIed symbols.
o··L ¯rnLnj¯LLL.
-rnLnjs ·:rinj_v-r, // -rnLnj r· rLLL
-!·nr ·n-r-·:ar // -ymo·L r!-r .LLL rLLL r!- -rnLnj
·¡
Parameters
·:rinj_v-r
[In][out] StrIng, that wIll be fIlled out by the selected symbol.
·n-r-·:ar
[In] Symbol, by whIch the strIng wIll be fIlled out.
Peturn VaIue
Ìn case of success returns true, otherwIse · false. To get the error code call CetLastError().
Note
FIllIng out a strIng at place means that symbols are Inserted dIrectly to the strIng wIthout
transItIonal operatIons of new strIng creatIon or copyIng. ThIs allows to save the operatIon tIme.
ExampIe:
v·LJ Jn¯r-nr.·

-rnLnj -rn¡
¯rnLnjPnLr.-rn,`¨,'_'·¡
-nLnr.¨-rn = ¨,-rn·¡
¯rnLnj¯LLL.-rn,¨·¡
-nLnr.¨-rn = ¨,-rn,¨. ¯rnLnjÐurr-nH-n.-rn· = ¨, ¯rnLnjÐurr-nH-n.-rn··¡
·
// ---uLr
// -rn = ____________________
// -rn = . ¯rnLnjÐurr-nH-n.-rn· = `¨
//
See aIso
StrIng8ufferLen, StrIngLen, StrIngÌnIt
String Functions
© 2000·2010, |eta0uotes Software Corp.
422
StrIngFInd
Search for a substrIng In a strIng.
Lnr ¯rnLnj¯LnJ.
-rnLnj ·:rinj_v-l:a, // -rnLnj Ln .!L·! ---n·! L- m-J-
-rnLnj m-:·n_·:o·:rinj, // .!-r L- ---n·!-J
Lnr ·:-r:_p.·=` // rn·m .!-r p·-LrL·n ---n·! -r-nr-
·¡
Parameters
·:rinj_v-l:a
[In] StrIng, In whIch search Is made.
m-:·n_·:o·:rinj
[In] Searched substrIng.
·:-r:_p.·=`
[In] PosItIon In the strIng from whIch search Is started.
Peturn VaIue
Feturns posItIon number In a strIng, from whIch the searched substrIng starts, or ·1, If the
substrIng Is not found.
String Functions
© 2000·2010, |eta0uotes Software Corp.
423
StrIngCetCharacter
Feturns value of a symbol, located In the specIfIed posItIon of a strIng.
u-!·nr ¯rnLnjJ-r.!-n-·r-n.
-rnLnj ·:rinj_v-l:a, // -rnLnj
Lnr p.· // -ymo·L p·-LrL·n Ln r!- -rnLnj
·¡
Parameters
·:rinj_v-l:a
[In] StrIng.
p.·
[In] PosItIon of a symbol In the strIng. Can be from 0 to StrIngLen(text) ·1.
Peturn VaIue
Symbol code or 0 In case of an error. To get the error code call CetLastError().
String Functions
© 2000·2010, |eta0uotes Software Corp.
424
StrIngInIt
ÌnItIalIzes a strIng by specIfIed symbols and provIdes the specIfIed strIng sIze.
o··L ¯rnLnjPnLr.
-rnLnjs ·:rinj_v-r, // -rnLnj r· LnLrL-LLz-
Lnr nav_lan=`, // n-¬uLn-J -rnLnj L-njr! -rr-n LnLrL-LLz-rL·n
-!·nr ·n-r-·:ar=` // -ymo·L, oy .!L·! r!- -rnLnj .LLL o- rLLL-J
·¡
Parameters
·:rinj_v-r
[In][out] StrIng that should be InItIalIzed and deInItIalIzed.
nav_lan=`
[In] StrIng length after InItIalIzatIon. Ìf length=0, It deInItIalIzes the strIng, I.e. the strIng buffer
Is cleared and the buffer address Is zeroed.
·n-r-·:ar=`
[In] Symbol to fIll the strIng.
Peturn VaIue
Ìn case of success returns true, otherwIse · false. To get the error code call CetLastError().
Note
Ìf character=0 and the length new_len·0, the buffer of the strIng of IndIcated length wIll be
dIstrIbuted and fIlled by zeroes. The strIng length wIll be equal to zero, because the whole buffer Is
fIlled out by strIng termInators.
ExampIe:
v·LJ Jn¯r-nr.·

//---
-rnLnj -rn¡
¯rnLnjPnLr.-rn,`¨¨,¨·¡
-nLnr.¨-rn = ¨,-rn,¨. ¯rnLnjÐurr-nH-n.-rn· = ¨,
¯rnLnjÐurr-nH-n.-rn·,¨ ¯rnLnjH-n.-rn· = ¨,¯rnLnjH-n.-rn··¡
·
/· ---uLr
-rn = . ¯rnLnjÐurr-nH-n.-rn· = `¨¨ ¯rnLnjH-n.-rn· = ¨
·/
See aIso
StrIng8ufferLen, StrIngLen
String Functions
© 2000·2010, |eta0uotes Software Corp.
425
StrIngLen
Feturns the number of symbols In a strIng.
Lnr ¯rnLnjH-n.
-rnLnj ·:rinj_v-l:a // -rnLnj
·¡
Parameters
·:rinj_v-l:a
[In] StrIng to calculate length.
Peturn VaIue
Number of symbols In a strIng wIthout the endIng zero.
String Functions
© 2000·2010, |eta0uotes Software Corp.
426
StrIngSetCharacter
Feturns copy of a strIng wIth a changed character In a specIfIed posItIon.
o··L ¯rnLnj¯-r.!-n-·r-n.
-rnLnjs ·:rinj_v-r, // -rnLnj
Lnr p.·, // p·-LrL·n
u-!·nr ·n-r-·:ar // ·!-n-·r-n
·¡
Parameters
·:rinj_v-r
[In][out] StrIng.
p.·
[In] PosItIon of a character In a strIng. Can be from 0 to StrIngLen(text).
·n-r-·:ar
[In] Symbol code UnIcode.
Note
Ìf pos Is less than strIng length and the symbol code value = 0, the strIng Is cut off (but the buffer
sIze, dIstrIbuted for the strIngremaIns unchanged). The strIng length becomes equal to pos.
Ìf pos Is equal to strIng length, the specIfIed symbol Is added at the strIng end, and the length Is
enlarged by one.
ExampIe:
v·LJ Jn¯r-nr.·

-rnLnj -rn=¨¨!``1¯¯¯--¨¡
-nLnr.¨o-r·n-. -rn = ¨,-rn,¨,¯rnLnjÐurr-nH-n.-rn· = ¨,
¯rnLnjÐurr-nH-n.-rn·,¨ ¯rnLnjH-n.-rn· = ¨,¯rnLnjH-n.-rn··¡
//--- -JJ z-n· v-Lu- Ln r!- mLJJL-
¯rnLnj¯-r.!-n-·r-n.-rn,¯,¨·¡
-nLnr.¨ -rr-n. -rn = ¨,-rn,¨,¯rnLnjÐurr-nH-n.-rn· = ¨,
¯rnLnjÐurr-nH-n.-rn·,¨ ¯rnLnjH-n.-rn· = ¨,¯rnLnjH-n.-rn··¡
//--- -JJ -ymo·L -r r!- -nJ
Lnr -Lz-=¯rnLnjH-n.-rn·¡
¯rnLnj¯-r.!-n-·r-n.-rn,-Lz-,'-'·¡
-nLnr.¨-JJLrL·n. -rn = ¨,-rn,¨,¯rnLnjÐurr-nH-n.-rn· = ¨,
¯rnLnjÐurr-nH-n.-rn·,¨ ¯rnLnjH-n.-rn· = ¨,¯rnLnjH-n.-rn··¡
·
/· ---uLr
o-r·n-. -rn = ¨!``1¯¯¯-- ,¯rnLnjÐurr-nH-n.-rn· = ¨ ¯rnLnjH-n.-rn· = !¨
-rr-n. -rn = ¨!``1¯ ,¯rnLnjÐurr-nH-n.-rn· = !¯ ¯rnLnjH-n.-rn· = ¯
-JJLrL·n. -rn = ¨!``1¯- ,¯rnLnjÐurr-nH-n.-rn· = !¯ ¯rnLnjH-n.-rn· = ¯
·/
String Functions
© 2000·2010, |eta0uotes Software Corp.
427
See aIso
StrIng8ufferLen, StrIngLen, StrIngFIll, StrIngÌnIt
String Functions
© 2000·2010, |eta0uotes Software Corp.
428
StrIngSubstr
Extracts a substrIng from a text strIng startIng from the specIfIed posItIon.
-rnLnj ¯rnLnj¯uo-rn.
-rnLnj ·:rinj_v-l:a, // -rnLnj
Lnr ·:-r:_p.·, // p·-LrL·n r· -r-nr .Lr!
Lnr lanj:n=-. // L-njr! ·r -xrn-·r-J -rnLnj
·¡
Parameters
·:rinj_v-l:a
[In] StrIng to extract a substrIng from.
·:-r:_p.·
[In] ÌnItIal posItIon of a substrIng. Can be from 0 to StrIngLen(text) ·1.
lanj:n=-.
[In] Length of an extracted substrIng. Ìf the parameter value Is equal to ·1 or parameter Isn't set,
the substrIng wIll be extracted from the IndIcated posItIon tIll the strIng end.
Peturn VaIue
Copy of a extracted substrIng, If possIble. DtherwIse returns an empty strIng.
String Functions
© 2000·2010, |eta0uotes Software Corp.
429
StrIngToLower
Transforms all all symbols of a selected strIng Into lowercase by locatIon.
o··L ¯rnLnjr·H·.-n.
-rnLnjs ·:rinj_v-r // -rnLnj r· pn··---
·¡
Parameters
·:rinj_v-r
[In][out] StrIng.
Peturn VaIue
Ìn case of success returns true, otherwIse · false. To get the error code call CetLastError().
String Functions
© 2000·2010, |eta0uotes Software Corp.
430
StrIngToUpper
Transforms all all symbols of a selected strIng Into capItals by locatIon.
o··L ¯rnLnjr·Jpp-n.
-rnLnjs ·:rinj_v-r // -rnLnj r· pn··---
·¡
Parameters
·:rinj_v-r
[In][out] StrIng.
Peturn VaIue
Ìn case of success returns true, otherwIse · false. To get the error code call CetLastError().
String Functions
© 2000·2010, |eta0uotes Software Corp.
431
StrIngTrImLeft
The functIon cuts lIne feed characters, spaces and tabs In the left part of the strIng tIll the fIrst
meanIngful symbol. The strIng Is modIfIed at place.
Lnr ¯rnLnjrnLmH-rr.
-rnLnjs ·:rinj_v-r // -rnLnj r· ·ur
·¡
Parameters
·:rinj_v-r
[In][out] StrIng that wIll be cut from the left.
Peturn VaIue
Feturns the number of cut symbols.
String Functions
© 2000·2010, |eta0uotes Software Corp.
432
StrIngTrImPIght
The functIon cuts lIne feed characters, spaces and tabs In the rIght part of the strIng after the last
meanIngful symbol. The strIng Is modIfIed at place.
Lnr ¯rnLnjrnLm-Lj!r.
-rnLnjs ·:rinj_v-r // -rnLnj r· ·ur
·¡
·¡
Parameters
·:rinj_v-r
[In][out] StrIng that wIll be cut from the rIght.
Peturn VaIue
Feturns the number of cut symbols.
Date and Time
© 2000·2010, |eta0uotes Software Corp.
433
0ate and TIme
ThIs Is the group of functIons for workIng wIth data of datetIme type (an Integer that represents the
number of seconds elapsed from 0 hours of January 1, 1970).
FunctIon ActIon
TImeCurrent Feturns the last known server tIme (tIme of the
last quote receIpt) In the datetIme format
TImeTradeServer Feturns the current calculatIon tIme of the
trade server
TImeLocal Feturns the local computer tIme In datetIme
format
TImeC|T Feturns C|T In datetIme format wIth the
0aylIght SavIng TIme by local tIme of the
computer, where the clIent termInal Is runnIng
TIme0aylIghtSavIngs Feturns the sIgn of 0aylIght SavIng TIme swItch
TImeC|TDffset Feturns the current dIfference between C|T
tIme and the local computer tIme In seconds,
takIng Into account 0ST swItch
TImeToStruct Converts a datetIme value Into a varIable of
|ql0ateTIme structure type
StructToTIme Converts a varIable of |ql0ateTIme structure
type Into a datetIme value
Date and Time
© 2000·2010, |eta0uotes Software Corp.
434
TImeCurrent
Feturns the last known server tIme server, tIme of the last quote receIpt for one of the symbols
selected In the ¨|arket Watch¨ wIndow. Ìn the DnTIck() handler, thIs functIon returns the tIme of the
receIved handled tIck. Ìn other cases (for example, call In handlers DnÌnIt(), Dn0eInIt(), DnTImer()
and so on) thIs Is the tIme of the last quote receIpt for any symbol avaIlable In the ¨|arket Watch¨
wIndow, the tIme shown In the tItle of thIs wIndow. The tIme value Is formed on a trade server and
does not depend on the tIme settIngs on your computer. There are 2 varIants of the functIon.
CaII wIthout parameters
J-r-rLm- rLm-.unn-nr.·¡
CaII wIth hqI0ateTIme type parameter
J-r-rLm- rLm-.unn-nr.
M¬L¯-r-rLm-s j:_·:r:·: // -rnu·run- ryp- v-nL-oL-
·¡
Parameters
j:_·:r:·:
[out] |ql0ateTIme structure type varIable.
Peturn VaIue
7alue of datetIme type
Note
Ìf the |ql0ateTIme structure type varIable has been passed as a parameter, It Is fIlled accordIngly.
Date and Time
© 2000·2010, |eta0uotes Software Corp.
435
TImeTradeServer
Feturns the calculated current tIme of the trade server. UnlIke TImeCurrent(), the calculatIon of the
tIme value Is performed In the clIent termInal and depends on the tIme settIngs on your computer.
There are 2 varIants of the functIon.
CaII wIthout parameters
J-r-rLm- rLm-rn-J-¯-nv-n.·¡
CaII wIth hqI0ateTIme type parameter
J-r-rLm- rLm-rn-J-¯-nv-n.
M¬L¯-r-rLm-s j:_·:r:·: // V-nL-oL- ·r -rnu·run- ryp-
·¡
Parameters
j:_·:r:·:
[out] 7arIable of structure type |ql0ateTIme.
Peturn VaIue
7alue of datetIme type
Note
Ìf the |ql0ateTIme structure type varIable has been passed as a parameter, It Is fIlled accordIngly.
Date and Time
© 2000·2010, |eta0uotes Software Corp.
436
TImeLocaI
Feturns the local tIme of a computer, where the clIent termInal Is runnIng. There are 2 varIants of the
functIon.
CaII wIthout parameters
J-r-rLm- rLm-H··-L.·¡
CaII wIth hqI0ateTIme type parameter
J-r-rLm- rLm-H··-L.
M¬L¯-r-rLm-s j:_·:r:·: // V-nL-oL- ·r -rnu·run- ryp-
·¡
Parameters
j:_·:r:·:
[out] 7arIable of structure type |ql0ateTIme.
Peturn VaIue
7alue of datetIme type
Note
Ìf the |ql0ateTIme structure type varIable has been passed as a parameter, It Is fIlled accordIngly.
Date and Time
© 2000·2010, |eta0uotes Software Corp.
437
TImeChT
Feturns the C|T, whIch Is calculated takIng Into account the 0ST swItch by the local tIme on the
computer where the clIent termInal Is runnIng. There are 2 varIants of the functIon.
CaII wIthout parameters
J-r-rLm- rLm-JMr.·¡
CaII wIth hqI0ateTIme type parameter
J-r-rLm- rLm-JMr.
M¬L¯-r-rLm-s j:_·:r:·: // V-nL-oL- ·r -rnu·run- ryp-
·¡
Parameters
j:_·:r:·:
[out] 7arIable of structure type |ql0ateTIme.
Peturn VaIue
7alue of datetIme type
Note
Ìf the |ql0ateTIme structure type varIable has been passed as a parameter, It Is fIlled accordIngly.
Date and Time
© 2000·2010, |eta0uotes Software Corp.
438
TIme0ayIIghtSavIngs
Feturns correctIon for daylIght savIng tIme In seconds, swItch to summer tIme has been made. Ìt
depends on the tIme settIngs of your computer.
Lnr rLm-¯-yLLj!r¯-vLnj-.·¡
Peturn VaIue
Ìf swItch to wInter (standard) tIme has been made, It returns 0.
Date and Time
© 2000·2010, |eta0uotes Software Corp.
439
TImeChTDffset
Feturns the current dIfference between C|T tIme and the local computer tIme In seconds, takIng Into
account swItch to wInter or summer tIme. 0epends on the tIme settIngs of your computer.
Lnr rLm-JMrJrr--r.·¡
Peturn VaIue
The value of Int type, representIng the current dIfference between the local tIme of the computer
and C|T tIme In seconds.
Date and Time
© 2000·2010, |eta0uotes Software Corp.
440
TImeToStruct
Converts a value of datetIme type (number of seconds sInce 01.01.1970) Into a structure varIable
|ql0ateTIme.
v·LJ rLm-r·¯rnu·r.
J-r-rLm- j:, // J-r- -nJ rLm-
M¬L¯-r-rLm-s j:_·:r:·: // -rnu·run- r·n r!- -J·prL·n ·r v-Lu--
·¡
Parameters
j:
[In] 0ate value to convert.
j:_·:r:·:
[out] 7arIable of structure type |ql0ateTIme.
Peturn VaIue
No return value.
Date and Time
© 2000·2010, |eta0uotes Software Corp.
441
StructToTIme
Converts a structure varIable |ql0ateTIme Into a value of datetIme type and returns the resultIng
value.
J-r-rLm- ¯rnu·rr·rLm-.
M¬L¯-r-rLm-¯ j:_·:r:·: // -rnu·run- ·r r!- J-r- -nJ rLm-
·¡
Parameters
j:_·:r:·:
[In] 7arIable of structure type |ql0ateTIme.
Peturn VaIue
The value of datetIme type contaInIng the number of seconds sInce 01.01.1970.
Account Information
© 2000·2010, |eta0uotes Software Corp.
442
Account InformatIon
FunctIons that return parameters of the current account.
FunctIon ActIon
AccountÌnfo0ouble Feturns a value of double type of the
correspondIng account property
AccountÌnfoÌnteger Feturns a value of Integer type (bool, Int or
long) of the correspondIng account property
AccountÌnfoStrIng Feturns a value strIng type correspondIng
account property
Account Information
© 2000·2010, |eta0uotes Software Corp.
443
AccountInfo0oubIe
Feturns the value of the correspondIng account property.
J·uoL- A···unrPnr·¯·uoL-.
Lnr pr.par:y_ij // LJ-nrLrL-n ·r r!- pn·p-nry
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of the property. The value can be one of the values of
ENU|_ACCDUNT_ÌNFD_0DU8LE.
Peturn VaIue
7alue of double type.
ExampIe:
v·LJ Jn¯r-nr.·

//--- -!·. -LL r!- Lnr·nm-rL·n -v-LL-oL- rn·m r!- run·rL·n A···unrPnr·¯·uoL-.·
pnLnrr.¨A..JJHr_ÐAHAH.I = `J¨,A···unrPnr·¯·uoL-.A..JJHr_ÐAHAH.I··¡
pnLnrr.¨A..JJHr_.-I¯Pr = `J¨,A···unrPnr·¯·uoL-.A..JJHr_.-I¯Pr··¡
pnLnrr.¨A..JJHr_--J¯Pr = `J¨,A···unrPnr·¯·uoL-.A..JJHr_--J¯Pr··¡
pnLnrr.¨A..JJHr_I,JPr1 = `J¨,A···unrPnr·¯·uoL-.A..JJHr_I,JPr1··¡
pnLnrr.¨A..JJHr_MA-JPH = `J¨,A···unrPnr·¯·uoL-.A..JJHr_MA-JPH··¡
pnLnrr.¨A..JJHr_¯-IIMA-JPH = `J¨,A···unrPnr·¯·uoL-.A..JJHr_¯-IIMA-JPH··¡
pnLnrr.¨A..JJHr_MA-JPH_HIVIH = `J¨,A···unrPnr·¯·uoL-.A..JJHr_MA-JPH_HIVIH··¡
pnLnrr.¨A..JJHr_MA-JPH_¯J_.AHH = `J¨,A···unrPnr·¯·uoL-.A..JJHr_MA-JPH_¯J_.AHH··¡
pnLnrr.¨A..JJHr_MA-JPH_¯J_¯J = `J¨,A···unrPnr·¯·uoL-.A..JJHr_MA-JPH_¯J_¯J··¡
·
See aIso
SymbolÌnfo0ouble, SymbolÌnfoStrIng, SymbolÌnfoÌnteger, PrIntFormat
Account Information
© 2000·2010, |eta0uotes Software Corp.
444
AccountInfoInteger
Feturns the value of the propertIes of the account.
L·nj A···unrPnr·Pnr-j-n.
Lnr pr.par:y_ij // PJ-nrLrL-n ·r r!- pn·p-nry
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of the property. The value can be one of the values of
ENU|_ACCDUNT_ÌNFD_ÌNTECEF.
Peturn VaIue
7alue of long type.
Note
The property must be one of the bool, Int or long types.
ExampIe:
v·LJ Jn¯r-nr.·

//--- -!·. -LL r!- Lnr·nm-rL·n -v-LL-oL- rn·m r!- run·rL·n A···unrPnr·Pnr-j-n.·
pnLnrr.¨A..JJHr_HJJPH = `J¨,A···unrPnr·Pnr-j-n.A..JJHr_HJJPH··¡
pnLnrr.¨A..JJHr_HIVI-AJI = `J¨,A···unrPnr·Pnr-j-n.A..JJHr_HIVI-AJI··¡
o··L r!L-A···unrrn-J-ALL·.-J=A···unrPnr·Pnr-j-n.A..JJHr_r-A¯I_AHHJWI¯·¡
o··L IArn-J-ALL·.-J=A···unrPnr·Pnr-j-n.A..JJHr_r-A¯I_Ix-I-r·¡
IHJM_A..JJHr_r-A¯I_MJ¯I rn-J-M·J-=A···unrPnr·Pnr-j-n.A..JJHr_r-A¯I_MJ¯I·¡
IHJM_A..JJHr_¯rJ-JJr_MJ¯I -r·pJurM·J-=A···unrPnr·Pnr-j-n.A..JJHr_MA-JPH_¯J_MJ¯I·¡
//--- Pnr·nm -o·ur r!- p·--LoLLLry r· p-nr·nm - rn-J- ·p-n-rL·n
Lr.r!L-A···unrrn-J-ALL·.-J·
-nLnr.¨rn-J- r·n r!L- -···unr L- p-nmLrr-J¨·¡
-L--
-nLnr.¨rn-J- r·n r!L- -···unr L- pn·!LoLr-J.¨·¡
//--- ¯LnJ ·ur Lr Lr L- p·--LoL- r· rn-J- ·n r!L- -···unr oy Ixp-nr AJvL-·n-
Lr.IArn-J-ALL·.-J·
-nLnr.¨rn-J- oy Ixp-nr AJvL-·n- L- p-nmLrr-J r·n r!L- -···unr¨·¡
-L--
-nLnr.¨rn-J- oy Ixp-nr AJvL-·n- L- pn·!LoLr-J r·n r!L- -···unr.¨·¡
//--- ¯LnJ ·ur r!- -···unr ryp-
-.Lr·!.rn-J-M·J-·

·---.A..JJHr_r-A¯I_MJ¯I_¯IMJ·.
-nLnr.¨r!L- L- - J-m· -···unr¨·¡
on--k¡
Account Information
© 2000·2010, |eta0uotes Software Corp.
445
·---.A..JJHr_r-A¯I_MJ¯I_.JHrI¯r·.
-nLnr.¨r!L- L- - ··mp-rLrL·n -···unr¨·¡
on--k¡
J-r-uLr.-nLnr.¨r!L- L- - n--L -···unr.¨·¡
·
//--- ¯LnJ ·ur r!- ¯r·pJur L-v-L --rrLnj m·J-
-.Lr·!.-r·pJurM·J-·

·---.A..JJHr_¯rJ-JJr_MJ¯I_-I-.IHr·.
-nLnr.¨r!- ¯r·pJur L-v-L L- -p-·LrL-J p-n·-nr-j-¨·¡
on--k¡
J-r-uLr.-nLnr.¨r!- ¯r·pJur L-v-L L- -p-·LrL-J Ln m·n-r-ny r-nm-¨·¡
·
·
See aIso
Account ÌnformatIon
Account Information
© 2000·2010, |eta0uotes Software Corp.
446
AccountInfoStrIng
Feturns the value of the correspondIng account property.
-rnLnj A···unrPnr·¯rnLnj.
Lnr pr.par:y_ij // PJ-nrLrL-n ·r r!- pn·p-nry
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of the property. The value can be one of the values of
ENU|_ACCDUNT_ÌNFD_STFÌNC.
Peturn VaIue
7alue of strIng type.
ExampIe:
v·LJ Jn¯r-nr.·

//--- ¯!·. -LL r!- Lnr·nm-rL·n -v-LL-oL- rn·m r!- run·rL·n A···unrPnr·¯rnLnj.·
-nLnr.¨r!- n-m- ·r r!- on·k-n = ¨,A···unrPnr·¯rnLnj.A..JJHr_.JM-AH1··¡
-nLnr.¨¯-p·-Lr ·unn-n·y = ¨,A···unrPnr·¯rnLnj.A..JJHr_.J--IH.1··¡
-nLnr.¨.LL-nr n-m- = ¨,A···unrPnr·¯rnLnj.A..JJHr_HAMI··¡
-nLnr.¨r!- n-m- ·r r!- rn-J- --nv-n = ¨,A···unrPnr·¯rnLnj.A..JJHr_¯I-VI-··¡
·
See aIso
Account ÌnformatIon
Checkup
© 2000·2010, |eta0uotes Software Corp.
447
State CheckIng
FunctIons that return parameters of the current state of the clIent termInal
FunctIon ActIon
CetLastError Feturns the last error
ÌsStopped Feturns true, If an mql5 program has been
commanded to stop Its operatIon
UnInItIalIzeFeason Feturns the code of the reason for
deInItIalIzatIon
TermInalÌnfoÌnteger Feturns an Integer value of a correspondIng
property of the mql5 program envIronment
TermInalÌnfoStrIng Feturns a strIng value of a correspondIng
property of the mql5 program envIronment
|0L5ÌnfoÌnteger Feturns an Integer value of a correspondIng
property of a runnIng mql5 program
|0L5ÌnfoStrIng Feturns a strIng value of a correspondIng
property of a runnIng mql5 program
Symbol Feturns the name of a symbol of the current
chart
PerIod Feturns the current chart tImeframe
0IgIts Feturns the number of decImal dIgIts
determInIng the accuracy of the prIce value of
the current chart symbol
PoInt Feturns the poInt sIze of the the current symbol
In the quote currency
Checkup
© 2000·2010, |eta0uotes Software Corp.
448
CetLastError
Feturns the contents of the system varIable _LastError.
Lnr J-rH--rInn·n.·¡
Peturn VaIue
Feturns the value of the last error that occurred durIng the executIon of an mql5 program.
Note
After the functIon call, the contents of _LastError are not reset. To reset thIs varIable, you need to
call FesetLastError().
Checkup
© 2000·2010, |eta0uotes Software Corp.
449
IsStopped
Checks the forced shutdown of an mql5 program.
o··L P-¯r·pp-J.·¡
Peturn VaIue
Feturns true, If the _StopFlag system varIable contaIns a value other than 0. A nonzero value Is
wrItten Into _StopFlag, If a mql5 program has been commanded to complete Its operatIon. Ìn thIs
case, you must ImmedIately termInate the program, otherwIse the program wIll be completed
forcIbly from the outsIde after J seconds.
Checkup
© 2000·2010, |eta0uotes Software Corp.
450
UnInItIaIIzePeason
Feturns the code of a reason for deInItIalIzatIon.
Lnr JnLnLrL-LLz-----·n.·¡
Peturn VaIue
Feturns the value of _UnInItFeason whIch Is formed before Dn0eInIt() Is called. 7alue depends on
the reasons that led to deInItIalIzatIon.
Checkup
© 2000·2010, |eta0uotes Software Corp.
451
TermInaIInfoInteger
Feturns the value of a correspondIng property of the mql5 program envIronment.
Lnr r-nmLn-LPnr·Pnr-j-n.
Lnr pr.par:y_ij // LJ-nrLrL-n ·r - pn·p-nry
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of a property. Can be one one of the values of the enumeratIon
ENU|_TEF|ÌNAL_ÌNFD_ÌNTECEF.
Peturn VaIue
7alue of Int type.
Checkup
© 2000·2010, |eta0uotes Software Corp.
452
TermInaIInfoStrIng
the functIon returns the value of a correspondIng property of the mql5 program envIronment. The
property must be of strIng type.
-rnLnj r-nmLn-LPnr·¯rnLnj.
Lnr pr.par:y_ij // LJ-nrLrL-n ·r - pn·p-nry
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of a property. Perhaps one of the values of the enumeratIon
ENU|_TEF|ÌNAL_ÌNFD_STFÌNC.
Peturn VaIue
7alue of strIng type.
Checkup
© 2000·2010, |eta0uotes Software Corp.
453
hDL5InfoInteger
Feturns the value of a correspondIng property of a runnIng mql5 program.
Lnr M,H¯Pnr·Pnr-j-n.
Lnr pr.par:y_ij // LJ-nrLrL-n ·r - pn·p-nry
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of a property. Cam be one of values of the ENU|_|0L5_ÌNFD_ÌNTECEF
enumeratIon.
Peturn VaIue
7alue of Int type.
Checkup
© 2000·2010, |eta0uotes Software Corp.
454
hDL5InfoStrIng
Feturns the value of a correspondIng property of a runnIng mql5 program.
-rnLnj M,H¯Pnr·¯rnLnj.
Lnr pr.par:y_ij // PJ-nrLrL-n ·r - pn·p-nry
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of a property. Can be one of the ENU|_|0L5_ÌNFD_STFÌNC enumeratIon.
Peturn VaIue
7alue of strIng type.
Checkup
© 2000·2010, |eta0uotes Software Corp.
455
SymboI
Feturns the name of a symbol of the current chart.
-rnLnj ¯ymo·L.·¡
Peturn VaIue
7alue of the _Symbol system varIable, whIch stores the name of the current chart symbol.
Checkup
© 2000·2010, |eta0uotes Software Corp.
456
PerIod
Feturns the current chart tImeframe.
IHJM_rPMI¯-AMI¯ --nL·J.·¡
Peturn VaIue
The contents of the _PerIod varIable that contaIns the value of the current chart tImeframe. The
value can be one of the values of the ENU|_TÌ|EFFA|ES enumeratIon.
See aIso
PerIodSeconds, Chart tImeframes, 0ate and TIme, 7IsIbIlIty of objects
Checkup
© 2000·2010, |eta0uotes Software Corp.
457
0IgIts
Feturns the number of decImal dIgIts determInIng the accuracy of prIce of the current chart symbol.
Lnr ¯LjLr-.·¡
Peturn VaIue
The value of the _0IgIts varIable whIch stores the number of decImal dIgIts determInIng the
accuracy of prIce of the current chart symbol.
Checkup
© 2000·2010, |eta0uotes Software Corp.
458
PoInt
Feturns the poInt sIze of the current symbol In the quote currency.
J·uoL- -·Lnr.·¡
Peturn VaIue
The value of the _PoInt varIable whIch stores the poInt sIze of the current symbol In the quote
currency.
Market Info
© 2000·2010, |eta0uotes Software Corp.
459
CettIng harket InformatIon
These are functIons Intended for receIvIng InformatIon about the market state.
FunctIon ActIon
SymbolsTotal Feturns the number of avaIlable (selected In
|arket Watch or all) symbols
SymbolName Feturns the name of a specIfIed symbol
SymbolSelect Selects a symbol In the |arket Watch wIndow
or removes a symbol from the wIndow
SymbolÌsSynchronIzed Checks whether data of a selected symbol In
the termInal are synchronIzed wIth data on the
trade server
SymbolÌnfo0ouble Feturns the double value of the symbol for the
correspondIng property
SymbolÌnfoÌnteger Feturns a value of an Integer type (long,
datetIme, Int or bool) of a specIfIed symbol for
the correspondIng property
SymbolÌnfoStrIng Feturns a value of the strIng type of a specIfIed
symbol for the correspondIng property
SymbolÌnfoTIck Feturns the current prIces for the specIfIed
symbol In a varIable of the |qlTIck type
SymbolÌnfoSessIon0uote Allows receIvIng tIme of begInnIng and end of
the specIfIed quotIng sessIons for a specIfIed
symbol and weekday.
SymbolÌnfoSessIonTrade Allows receIvIng tIme of begInnIng and end of
the specIfIed tradIng sessIons for a specIfIed
symbol and weekday.
|arket8ookAdd ProvIdes openIng of 0epth of |arket for a
selected symbol, and subscrIbes for receIvIng
notIfIcatIons of the 0D| changes
|arket8ookFelease ProvIdes closIng of 0epth of |arket for a
selected symbol, and cancels the subscrIptIon
for receIvIng notIfIcatIons of the 0D| changes
|arket8ookCet Feturns a structure array |ql8ookÌnfo
contaInIng records of the 0epth of |arket of a
specIfIed symbol
Market Info
© 2000·2010, |eta0uotes Software Corp.
460
SymboIsTotaI
Feturns the number of avaIlable (selected In |arket Watch or all) symbols.
Lnr ¯ymo·L-r·r-L.
o··L ·ala·:aj // rnu- - ·nLy -ymo·L- Ln M-nk-rW-r·!
·¡
Parameters
·ala·:aj
[In] Fequest mode. Can be true or false.
Peturn VaIue
Ìf the 'selected' parameter Is true, the functIon returns the number of symbols selected In
|arketWatch. Ìf the value Is false, It returns the total number of all symbols.
Market Info
© 2000·2010, |eta0uotes Software Corp.
461
SymboIName
Feturns the name of a symbol.
-rnLnj ¯ymo·LH-m-.
Lnr p.·, // numo-n Ln r!- LL-r
o··L ·ala·:aj // rnu- - ·nLy -ymo·L- Ln M-nk-rW-r·!
·¡
Parameters
p.·
[In] Drder number of a symbol.
·ala·:aj
[In] Fequest mode. Ìf the value Is true, the symbol Is taken from the lIst of symbols selected In
|arketWatch. Ìf the value Is false, the symbol Is taken from the general lIst.
Peturn VaIue
7alue of strIng type wIth the symbol name.
Market Info
© 2000·2010, |eta0uotes Software Corp.
462
SymboISeIect
Selects a symbol In the |arket Watch wIndow or removes a symbol from the wIndow.
o··L ¯ymo·L¯-L-·r.
-rnLnj n-ma, // -ymo·L n-m-
o··L ·ala·: // -JJ ·n n-m·v-
·¡
Parameters
n-ma
[In] Symbol name.
·ala·:
[In] SwItch. Ìf the value Is false, a symbol should be removed from |arketWatch, otherwIse a
symbol should be selected In thIs wIndow. A symbol can't be removed If the symbol chart Is open,
or there are open posItIons for thIs symbol.
Peturn VaIue
Ìn case of faIlure returns false.
Market Info
© 2000·2010, |eta0uotes Software Corp.
463
SymboIIsSynchronIzed
The functIon checks whether data of a selected symbol In the termInal are synchronIzed wIth data on
the trade server.
o··L ¯ymo·LP-¯yn·!n·nLz-J.
-rnLnj n-ma, // -ymo·L n-m-
·¡
Parameters
n-ma
[In] Symbol name.
Peturn vaIue
Ìf data are synchronIzed, returns 'true'; otherwIse returns 'false'.
See aIso
SymbolÌnfoÌnteger, DrganIzIng 0ata Access
Market Info
© 2000·2010, |eta0uotes Software Corp.
464
SymboIInfo0oubIe
Feturns the correspondIng property of a specIfIed symbol. There are 2 varIants of the functIon.
1. ÌmmedIately returns the property value.
J·uoL- ¯ymo·LPnr·¯·uoL-.
-rnLnj n-ma, // -ymo·L
Lnr pr.p_ij // LJ-nrLrL-n ·r r!- pn·p-nry
·¡
2. Feturns true or false dependIng on whether a functIon Is successfully performed. Ìn case of success,
the value of the property Is placed Into a recIpIent varIable, passed by reference by the last
parameter.
o··L ¯ymo·LPnr·¯·uoL-.
-rnLnj n-ma, // -ymo·L
Lnr pr.p_ij, // LJ-nrLrL-n ·r r!- pn·p-nry
J·uoL-s j.:ola_v-r // !-n- .- ---um- r!- pn·p-nry v-Lu-
·¡
Parameters
n-ma
[In] Symbol name.
pr.p_ij
[In] ÌdentIfIer of a symbol property. The value can be one of the values of the
ENU|_SY|8DL_ÌNFD_0DU8LE enumeratIon.
j.:ola_v-r
[out] 7arIable of double type receIvIng the value of the requested property.
Peturn VaIue
The value of double type.
ExampIe:
v·LJ JnrL·k.·

//--- ·or-Ln -pn--J rn·m r!- -ymo·L pn·p-nrL--
o··L -pn--JrL·-r=¯ymo·LPnr·Pnr-j-n.¯ymo·L.·,¯1MÐJH_¯--IA¯_¯HJAr·¡
-rnLnj ··mm=¯rnLnj¯·nm-r.¨¯pn--J `- = `P¯1J p·Lnr-\n\n¨,
-pn--JrL·-r.¨rL·-rLnj¨.¨rLx-J¨,
¯ymo·LPnr·Pnr-j-n.¯ymo·L.·,¯1MÐJH_¯--IA¯··¡
//--- n·. L-r'- ·-L·uL-r- r!- -pn--J oy ·un--Lv--
J·uoL- --k=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_A¯··¡
J·uoL- oLJ=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
J·uoL- -pn--J=--k-oLJ¡
Lnr -pn--J_p·Lnr-=.Lnr·M-r!-·unJ.-pn--J/¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_-JPHr··¡
··mm=··mm-¨.-L·uL-r-J -pn--J = ¨-.-rnLnj·-pn--J_p·Lnr--¨ p·Lnr-¨¡
Market Info
© 2000·2010, |eta0uotes Software Corp.
465
.·mm-nr.··mm·¡
·
Market Info
© 2000·2010, |eta0uotes Software Corp.
466
SymboIInfoInteger
Feturns the correspondIng property of a specIfIed symbol. There are 2 varIants of the functIon.
1. ÌmmedIately returns the property value.
L·nj ¯ymo·LPnr·Pnr-j-n.
-rnLnj n-ma, // -ymo·L
Lnr pr.p_ij // LJ-nrLrL-n ·r - pn·p-nry
·¡
2. Feturns true or false dependIng on whether a functIon Is successfully performed. Ìn case of success,
the value of the property Is placed Into a recIpIent varIable, passed by reference by the last
parameter.
o··L ¯ymo·LPnr·Pnr-j-n.
-rnLnj n-ma, // -ymo·L
Lnr pr.p_ij, // LJ-nrLrL-n ·r - pn·p-nry
L·njs l.nj_v-r // !-n- .- ---um- r!- pn·p-nry v-Lu-
·¡
Parameters
n-ma
[In] Symbol name.
pr.p_ij
[In] ÌdentIfIer of a symbol property. The value can be one of the values of the
ENU|_SY|8DL_ÌNFD_ÌNTECEF enumeratIon.
l.nj_v-r
[out] 7arIable of the long type receIvIng the value of the requested property.
Peturn VaIue
The value of Int type.
ExampIe:
v·LJ JnrL·k.·

//--- ·or-Ln -pn--J rn·m r!- -ymo·L pn·p-nrL--
o··L -pn--JrL·-r=¯ymo·LPnr·Pnr-j-n.¯ymo·L.·,¯1MÐJH_¯--IA¯_¯HJAr·¡
-rnLnj ··mm=¯rnLnj¯·nm-r.¨¯pn--J `- = `P¯1J p·Lnr-\n\n¨,
-pn--JrL·-r.¨rL·-rLnj¨.¨rLx-J¨,
¯ymo·LPnr·Pnr-j-n.¯ymo·L.·,¯1MÐJH_¯--IA¯··¡
//--- n·. L-r'- ·-L·uL-r- r!- -pn--J oy ·un--Lv--
J·uoL- --k=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_A¯··¡
J·uoL- oLJ=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
J·uoL- -pn--J=--k-oLJ¡
Lnr -pn--J_p·Lnr-=.Lnr·M-r!-·unJ.-pn--J/¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_-JPHr··¡
Market Info
© 2000·2010, |eta0uotes Software Corp.
467
··mm=··mm-¨.-L·uL-r-J -pn--J = ¨-.-rnLnj·-pn--J_p·Lnr--¨ p·Lnr-¨¡
.·mm-nr.··mm·¡
·
Market Info
© 2000·2010, |eta0uotes Software Corp.
468
SymboIInfoStrIng
Feturns the correspondIng property of a specIfIed symbol. There are 2 varIants of the functIon.
1. ÌmmedIately returns the property value.
-rnLnj ¯ymo·LPnr·¯rnLnj.
-rnLnj n-ma, // ¯ymo·L
Lnr pr.p_ij // PJ-nrLrL-n pn·p-nrL--
·¡
2. Feturns true or false, dependIng on the success of a functIon. Ìf successful, the value of the
property Is placed In a foster varIables passed by reference the last parameter.
o··L ¯ymo·LPnr·¯rnLnj.
-rnLnj n-ma, // ¯ymo·L
Lnr pr.p_ij, // PJ-nrLrL-n pn·p-nrL--
-rnLnjs·:rinj_v-r // |-n- .- ---um- r!- pn·p-nry v-Lu-
·¡
Parameters
n-ma
[In] Symbol name.
pr.p_ij
[In] ÌdentIfIer of a symbol property. The value can be one of the values of the
ENU|_SY|8DL_ÌNFD_STFÌNC enumeratIon.
·:rinj_v-r
[out] 7arIable of the strIng type receIvIng the value of the requested property.
Peturn VaIue
The value of strIng type.
Market Info
© 2000·2010, |eta0uotes Software Corp.
469
SymboIInfoTIck
The functIon returns current prIces of a specIfIed symbol In a varIable of the |qlTIck type.
o··L ¯ymo·LPnr·rL·k.
-rnLnj ·ymo.l, // -ymo·L n-m-
M¬LrL·ks :i·r // n-r-n-n·- r· - -rnu·run-
·¡
Parameters
·ymo.l
[In] Symbol name.
o..r/¹
[out] LInk to the structure of the |qlTIck type, to whIch the current prIces and tIme of the last
prIce update wIll be placed.
Peturn VaIue
The functIon returns true If successful, otherwIse returns false.
Market Info
© 2000·2010, |eta0uotes Software Corp.
470
SymboIInfoSessIonDuote
Allows receIvIng tIme of begInnIng and end of the specIfIed quotIng sessIons for a specIfIed symbol
and weekday..
o··L ¯ymo·LPnr·¯---L·n,u·r-.
-rnLnj n-ma, // -ymo·L n-m-
IHJM_¯A1_J¯_WII· j-y_.f_vaar, // J-y ·r r!- .--k
uLnr ·a··i.n_injax, // ----L·n LnJ-x
J-r-rLm-s fr.m, // rLm- ·r r!- ----L·n o-jLnnLnj
J-r-rLm-s :. // rLm- ·r r!- ----L·n -nJ
·¡
Parameters
n-ma
[In] Symbol name.
F:.M_DÁ:_¯F_VFFK
[In] 0ay of the week, value of enumeratIon ENU|_0AY_DF_WEEK.
:in:
[In] DrdInal number of a sessIon, whose begInnIng and end tIme we want to receIve. ÌndexIng of
sessIons starts wIth 0.
fr.m
[out] SessIon begInnIng tIme In seconds from 00 hours 00 mInutes, In the returned value date
should be Ignored.
:.
[out] SessIon end tIme In seconds from 00 hours 00 mInutes, In the returned value date should be
Ignored.
Peturn VaIue
Ìf data for the specIfIed sessIon, symbol and day of the week are receIved, returns true, otherwIse
returns false.
See aIso
Symbol PropertIes, TImeToStruct, 0ata Structures
Market Info
© 2000·2010, |eta0uotes Software Corp.
471
SymboIInfoSessIonTrade
Allows receIvIng tIme of begInnIng and end of the specIfIed tradIng sessIons for a specIfIed symbol
and weekday..
o··L ¯ymo·LPnr·¯---L·nrn-J-.
-rnLnj n-ma, // -ymo·L n-m-
IHJM_¯A1_J¯_WII· j-y_.f_vaar, // J-y ·r r!- .--k
uLnr ·a··i.n_injax, // ----L·n LnJ-x
J-r-rLm-s fr.m, // ----L·n o-jLnnLnj rLm-
J-r-rLm-s :. // ----L·n -nJ rLm-
·¡
Parameters
n-ma
[In] Symbol name.
F:.M_DÁ:_¯F_VFFK
[In] 0ay of the week, value of enumeratIon ENU|_0AY_DF_WEEK.
:in:
[In] DrdInal number of a sessIon, whose begInnIng and end tIme we want to receIve. ÌndexIng of
sessIons starts wIth 0.
fr.m
[out] SessIon begInnIng tIme In seconds from 00 hours 00 mInutes, In the returned value date
should be Ignored.
:.
[out] SessIon end tIme In seconds from 00 hours 00 mInutes, In the returned value date should be
Ignored.
Peturn vaIue
Ìf data for the specIfIed sessIon, symbol and day of the week are receIved, returns true, otherwIse
returns false.
See aIso
Symbol PropertIes, TImeToStruct, 0ata Structures
Market Info
© 2000·2010, |eta0uotes Software Corp.
472
harketßookAdd
ProvIdes openIng of 0epth of |arket for a selected symbol, and subscrIbes for receIvIng notIfIcatIons
of the 0D| changes.
o··L M-nk-rз·kAJJ.
-rnLnj ·ymo.l // -ymo·L
·¡
Parameters
·ymo.l
[In] The name of a symbol, whose 0epth of |arket Is to be used In the Expert AdvIsor or scrIpt.
Peturn VaIue
The true value If opened successfully, otherwIse false.
Note
Normally, thIs functIon must be called from the DnÌnIt() functIon or In the class constructor. To
handle IncomIng alerts, In the Expert AdvIsor program must contaIn the functIon voId Dn8ookEvent
(strIngE symbol).
See aIso
Structure of 0epth of |arket, Structures and Classes
Market Info
© 2000·2010, |eta0uotes Software Corp.
473
harketßookPeIease
ProvIdes closIng of 0epth of |arket for a selected symbol, and cancels the subscrIptIon for receIvIng
notIfIcatIons of the 0D| changes.
o··L M-nk-rз·k--L----.
-rnLnj ·ymo.l // -ymo·L
·¡
Parameters
·ymo.l
[In] Symbol name.
Peturn VaIue
The true value If closed successfully, otherwIse false.
Note
Normally, thIs functIon must be called from the Dn0eInIt() functIon, If the correspondIng
|arket8ookAdd() functIon has been called In the DnÌnIt() functIon. Dr It must be called from the
class destructor, If the correspondIng |arket8ookAdd() functIon has been called from the class
constructor.
See aIso
Structure of 0epth of |arket, Structures and Classes
Market Info
© 2000·2010, |eta0uotes Software Corp.
474
harketßookCet
Feturns a structure array |ql8ookÌnfo contaInIng records of the 0epth of |arket of a specIfIed
symbol.
o··L M-nk-rз·kJ-r.
-rnLnj ·ymo.l, // -ymo·L
M¬Lз·kPnr·s o..r/¹ // n-r-n-n·- r· -n -nn-y
·¡
Parameters
·ymo.l
[In] Symbol name.
o..r/¹
[In] Feference to an array of 0epth of |arket records. The array can be pre·allocated for a
suffIcIent number of records. Ìf a dynamIc array hasn't been pre·allocated In the operatIng
memory, the clIent termInal wIll dIstrIbute the array Itself.
Peturn VaIue
Feturns true In case of success, otherwIse false.
Note
The 0epth of |arket must be pre·opened by the |arket8ookAdd() functIon.
ExampIe:
M¬Lз·kPnr· pnL·-Ann-y¯`¡
o··L j-rз·k=M-nk-rз·kJ-r.HJHH,pnL·-Ann-y·¡
Lr.j-rз·k·

Lnr -Lz-=Ann-y¯Lz-.pnL·-Ann-y·¡
-nLnr.¨M-nk-rз·kPnr· r·n ¨,¯ymo·L.··¡
r·n.Lnr L=¨¡L<-Lz-¡L--·

-nLnr.L-¨.¨,pnL·-Ann-y¯L`.pnL·-
-¨ V·Lum- = ¨-pnL·-Ann-y¯L`.v·Lum-,
¨ ryp- = ¨,pnL·-Ann-y¯L`.ryp-·¡
·
·
-L--

-nLnr.¨.·uLJ n·r j-r ··nr-nr- ·r r!- -ymo·L ¯JM ¨,¯ymo·L.··¡
·
See aIso
Structure of 0epth of |arket, Structures and Classes
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
475
Access to TImeserIes and IndIcator 0ata
These are functIons for workIng wIth tImeserIes and IndIcators. A tImeserIes dIffers from the usual
data array by Its reverse orderIng · elements of tImeserIes are Indexed from the end of an array to Its
begIn (from the most recent data to the oldest ones). To copy the tIme·serIes values and IndIcator
data, It's recommended to use dynamIc arrays only, because copyIng functIons are desIgned to allocate
the necessary sIze of arrays that receIve values.
There Is an Important exceptIon to thIs rule: If tImeserIes and IndIcator values need to be copIed
often, for example at each call of DnTIck() In Expert AdvIsors or at each call of DnCalculate() In
IndIcators, In thIs case one should better use statIcally dIstrIbuted arrays, because operatIons of
memory aIIocatIon for dynamIc arrays requIre addItIonaI tIme, and thIs wIll have effect durIng
testIng and optImIzatIon.
When usIng functIons accessIng tImeserIes and IndIcator values, IndexIng dIrectIon should be taken
Into account. ThIs Is descrIbed In sectIon ÌndexIng dIrectIon In arrays and tImeserIes.
Access to IndIcator and tImeserIes data Is Implemented IrrespectIve of the fact whether the requested
data are ready (the so called asynchronous access). ThIs Is crItIcally Important for the calculatIon of
custom IndIcator, so If there are no data, functIons of Copy...() type ImmedIately return an error.
However, when accessIng form Expert AdvIsors and scrIpts, several attempts to receIve data are
made In a small pause, whIch Is aImed at provIdIng some tIme necessary to download requIred
tImeserIes of to calculate IndIcator values.
The DrganIzIng 0ata Access sectIon descrIbes detaIls of receIvIng, storIng and requestIng prIce data In
the |etaTrader 5 clIent termInal.
Ìt Is hIstorIcally accepted that an access to the prIce data In an array Is performed from the end of the
data. PhysIcally, the new data are always wrItten at the array end, but the Index of the array Is always
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
476
equal to zero. The 0 Index In the tImeserIes array denotes data of the current bar, I.e. the bar that
corresponds to the unfInIshed tIme Interval In thIs tImeframe.
A tImeframe Is the tIme perIod, durIng whIch a sIngle prIce bar Is formed. There are 21 predefIned
standard tImeframes.
FunctIon ActIon
SerIesÌnfoÌnteger Feturns InformatIon about the state of
hIstorIcal data.
8ars Feturns the number of bars the hIstory for a
specIfIed symbol and perIod.
8arsCalculated Feturns the number of calculated data In an
IndIcator buffer or ·1 In the case of error (data
hasn't been calculated yet).
ÌndIcatorFelease Femove the IndIcator handle and release the
calculatIon block of the IndIcator, If It no one
else enjoys.
ÌndIcatorCreate Feturns the handle to the specIfIed technIcal
IndIcator created by an array of type
parameters |qlParam.
Copy8uffer Cets data of a specIfIed buffer from a specIfIed
IndIcator Into an array.
CopyFates Cets hIstory data of the Fates structure for a
specIfIed symbol and perIod Into an array.
CopyTIme Cets hIstory data on bar openIng tIme for a
specIfIed symbol and perIod Into an array.
CopyDpen Cets hIstory data on bar openIng prIce for a
specIfIed symbol and perIod Into an array.
CopyHIgh Cets hIstory data on maxImal bar prIce for a
specIfIed symbol and perIod Into an array.
CopyLow Cets hIstory data on mInImal bar prIce for a
specIfIed symbol and perIod Into an array.
CopyClose Cets hIstory data on bar closIng prIce for a
specIfIed symbol and perIod Into an array.
CopyTIck7olume Cets hIstory data on tIck volumes for a
specIfIed symbol and perIod Into an array.
CopyFeal7olume Cets hIstory data on trade volumes for a
specIfIed symbol and perIod Into an array.
CopySpread Cets hIstory data on spreads for a specIfIed
symbol and perIod Into an array.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
477
0espIte the fact that by usIng the ArraySetAsSerIes() functIon It Is possIble to set up In arrays access
to elements lIke that In tImeserIes, It should be remembered that the array elements are physIcally
stored In one and the same order · only IndexIng dIrectIon changes. To demonstrate thIs fact let's
perform an example:
J-r-rLm- rLm-A-¯-nL--¯`¡
//--- --r -··--- r· r!- -nn-y LLk- r· - rLm---nL--
Ann-y¯-rA-¯-nL--.rLm-A-¯-nL--,rnu-·¡
----rH--rInn·n.·¡
Lnr ··pL-J=.·pyrLm-.HJHH,¨,¨,!¨,rLm-A-¯-nL--·¡
Lr.··pL-J<=¨·

-nLnr.¨r!- ··py ·p-n-rL·n ·r r!- ·p-n rLm- v-Lu-- r·n L--r !¨ o-n- !-- r-LL-J¨·¡
n-runn¡
·
-nLnr.¨rLm-.unn-nr =¨,rLm-.unn-nr.··¡
-nLnr.¨Ann-y¯Lz-.rLm-· =¨,Ann-y¯Lz-.rLm-A-¯-nL--··¡
Lnr -Lz-=Ann-y¯Lz-.rLm-A-¯-nL--·¡
r·n.Lnr L=¨¡L<-Lz-¡L--·

-nLnr.¨rLm-A-¯-nL--¯¨-L-¨` =¨,rLm-A-¯-nL--¯L`·¡
·
J-r-rLm- Ann-yH·r¯-nL--¯`¡
Ann-y¯-rA-¯-nL--.Ann-yH·r¯-nL--,r-L--·¡
----rH--rInn·n.·¡
··pL-J=.·pyrLm-.HJHH,¨,¨,!¨,Ann-yH·r¯-nL--·¡
Lr.··pL-J<=¨·

-nLnr.¨r!- ··py ·p-n-rL·n ·r r!- ·p-n rLm- v-Lu-- r·n L--r !¨ o-n- !-- r-LL-J¨·¡
n-runn¡
·
-Lz-=Ann-y¯Lz-.Ann-yH·r¯-nL--·¡
r·n.Lnr L=-Lz--!¡L=¨¡L--·

-nLnr.¨Ann-yH·r¯-nL--¯¨-L-¨` =¨,Ann-yH·r¯-nL--¯L`·¡
·
As a result we wIll get the output lIke thIs:
rLm-.unn-nr = `¨¨-.¨¯.!! !1.!¯.``
Ann-y¯Lz-.rLm-· = !¨
rLm-A-¯-nL--¯¨` = `¨¨-.¨¯.!! !1.¨¨.¨¨
rLm-A-¯-nL--¯!` = `¨¨-.¨¯.!! !`.¨¨.¨¨
rLm-A-¯-nL--¯`` = `¨¨-.¨¯.!! !`.¨¨.¨¨
rLm-A-¯-nL--¯`` = `¨¨-.¨¯.!! !!.¨¨.¨¨
rLm-A-¯-nL--¯1` = `¨¨-.¨¯.!! !¨.¨¨.¨¨
rLm-A-¯-nL--¯¯` = `¨¨-.¨¯.!! ¨-.¨¨.¨¨
rLm-A-¯-nL--¯¯` = `¨¨-.¨¯.!! ¨-.¨¨.¨¨
rLm-A-¯-nL--¯¯` = `¨¨-.¨¯.!! ¨¯.¨¨.¨¨
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
478
rLm-A-¯-nL--¯-` = `¨¨-.¨¯.!! ¨¯.¨¨.¨¨
rLm-A-¯-nL--¯-` = `¨¨-.¨¯.!! ¨¯.¨¨.¨¨
Ann-yH·r¯-nL--¯-` = `¨¨-.¨¯.!! !1.¨¨.¨¨
Ann-yH·r¯-nL--¯-` = `¨¨-.¨¯.!! !`.¨¨.¨¨
Ann-yH·r¯-nL--¯¯` = `¨¨-.¨¯.!! !`.¨¨.¨¨
Ann-yH·r¯-nL--¯¯` = `¨¨-.¨¯.!! !!.¨¨.¨¨
Ann-yH·r¯-nL--¯¯` = `¨¨-.¨¯.!! !¨.¨¨.¨¨
Ann-yH·r¯-nL--¯1` = `¨¨-.¨¯.!! ¨-.¨¨.¨¨
Ann-yH·r¯-nL--¯`` = `¨¨-.¨¯.!! ¨-.¨¨.¨¨
Ann-yH·r¯-nL--¯`` = `¨¨-.¨¯.!! ¨¯.¨¨.¨¨
Ann-yH·r¯-nL--¯!` = `¨¨-.¨¯.!! ¨¯.¨¨.¨¨
Ann-yH·r¯-nL--¯¨` = `¨¨-.¨¯.!! ¨¯.¨¨.¨¨
As we see from the output, as the Index of TImeAsSerIes array Increases, the tIme value of the Index
decreases, I.e. we move from the present to the past. For the common array ArrayNotSerIes the result
Is dIfferent · as Index grows, we move from past to present.
See AIso
ArrayÌs0ynamIc, ArrayCetAsSerIes, ArraySetAsSerIes, ArrayÌsSerIes
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
479
IndexIng 0IrectIon In Arrays, ßuffers and TImeserIes
The default IndexIng of all arrays and IndIcator buffers Is left to rIght. The Index of the fIrst element
Is always equal to zero. Thus, the very fIrst element of an array or IndIcator buffer wIth Index 0 Is by
default on the extreme left posItIon, whIle the last element Is on the extreme rIght posItIon.
An IndIcator buffer Is a dynamIc array of type double, whose sIze Is managed by the clIent termInals,
so that It always corresponds to the number of bars the IndIcator Is calculated on. A usual dynamIc
array of type double Is assIgned as an IndIcator buffer usIng the SetÌndex8uffer() functIon. ÌndIcator
buffers do not requIre settIng of theIr sIze usIng functIon ArrayFesIze() · thIs wIll be done by the
executIng system of the termInal.
TImeserIes are arrays wIth reverse IndexIng, I.e. the fIrst element of a tImeserIes Is In the extreme
rIght posItIon, and the last element Is In the extreme left posItIon. TImeserIes beIng used for storIng
hIstory prIce data and contaIn the tIme InformatIon, we can say that the newest data are placed In the
extreme rIght posItIon of the tImeserIes, whIle the oldest data are In the extreme left posItIon.
So the tImeserIes element wIth Index 0 contaIns the InformatIon about the latest quote of a symbol. Ìf
a tImeserIes contaIns data on a daIly tImeframe, data of the current yet uncompleted day are located
on the zero posItIon, and the posItIon wIth Index 1 contaIns yesterday data.
ChangIng the IndexIng 0IrectIon
FunctIon ArraySetAsSerIes() allows changIng the method of accessIng elements of a dynamIc array; the
physIcal order of data storIng In the computer memory Is not changed at that. ThIs functIon sImply
changes the method of addressIng array elements, so when copyIng one array to another usIng
functIon ArrayCopy(), the contents of the recIpIent array wIll not depend on the IndexIng dIrectIon In
the source array.
0IrectIon of IndexIng cannot be changed for statIcally dIstrIbuted arrays. Even If an array was passed
as a parameter to a functIon, attempts to change the IndexIng dIrectIon InsIde thIs functIon wIll brIng
no effect.
For IndIcator buffers, lIke for usual arrays, IndexIng dIrectIon can also be set as backward (lIke In
tImeserIes), I.e. reference to the zero posItIon In the IndIcator buffer wIll mean reference to the last
value on the correspondIng IndIcator buffer and thIs wIll correspond to the value of the IndIcator on
the latest bar. StIll, the physIcal locatIon of IndIcator bars wIll be unchanged.
PeceIvIng PrIce 0ata In IndIcators
Each custom IndIcator must necessarIly contaIn the DnCalculate() functIon, to whIch prIce data
requIred for calculatIng values In IndIcator buffers are passed. ÌndexIng dIrectIon In these passed
arrays can be found out usIng functIon ArrayCetAsSerIes().
Arrays passed to the functIon reflect prIce data, I.e. these arrays have the sIgn of a tImeserIes and
functIon ArrayÌsSerIes() wIll return true when checkIng these arrays. However, In any case IndexIng
dIrectIon should be checked only by functIon ArrayCetAsSerIes().
Ìn order not to be dependent on default values, ArraySetAsSerIes() should be uncondItIonally called for
the arrays you are goIng to work wIth, and set the requIred dIrectIon.
PeceIvIng PrIce 0ata and IndIcator VaIues
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
480
0efault IndexIng dIrectIon of all arrays In Expert AdvIsors, IndIcators and scrIpts Is left·to·rIght. Ìf
necessary, In any mql5 program you can request tImeserIes values on any symbol and tImeframe, as
well as values of IndIcators calculated on any symbol and tImeframe.
Use functIons Copy...() for these purposes:
Copy8uffer - copy values of an IndIcator buffer to an array of double type;
CopyFates - copy prIce hIstory to an array of structures |qlFates;
CopyTIme - copy TIme values to an array of datetIme type;
CopyDpen - copy Dpen values to an array of double type;
CopyHIgh - copy HIgh values to an array of double type;
CopyLow - copy Low values to an array of double type;
CopyClose - copy Close values to an array of double type;
CopyTIck7olume - copy tIck volumes to an array of long type;
CopyFeal7olume - copy equIty volumes to a long type array;
CopySpread - copy the spread hIstory to an array of Int type;
All these functIons work In a sImIlar way. Let's consIder the data obtaInIng mechanIsm on the example
of Copy8uffer(). Ìt Is ImplIed that the IndexIng dIrectIon of requested data Is that of tImeserIes, and
the posItIon wIth Index 0 (zero) stores data of the current yet uncompleted bar. Ìn order to get access
to these data we need to copy the necessary volume of data Into the recIpIent array, e.g. Into array
bµffer.
When copyIng we need to specIfy the startIng posItIon In the source array, startIng from whIch data
wIll be copIed to the recIpIent array. Ìn case of success, the specIfIed number of elements wIll be
copIed to the recIpIent array from the source array (from the IndIcator buffer In thIs case).
ÌrrespectIve of the IndexIng value set In the recIpIent array, copyIng Is always performed as Is shown
In the above fIgure.
ExampIe:
Lnpur Lnr p-n=!¨¡ // p-nL·J ·r r!- -xp·n-nr
Lnr m-_!-nJL-¡ // LnJL·-r·n !-nJL-
//--------------------------------------------------------------------
// Ixp-nr LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr JnPnLr.·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
481

//---
m-_!-nJL-=LMA._¯ymo·L,¨,p-n,¨,MJ¯I_IMA,--P.I_.HJ¯I·¡
//---
n-runn.¨·¡
·
//--------------------------------------------------------------------
// Ixp-nr rL·k run·rL·n
//--------------------------------------------------------------------
v·LJ JnrL·k.·

//---
J·uoL- -m-¯!¨`¡
Lnr ··pL-J=.·pyÐurr-n.m-_!-nJL-,// LnJL·-r·n !-nJL-
¨, // LnJ-x ·r r!- LnJL·-r·n ourr-n
¨, // -r-nrLnj p·-LrL·n r· ··py rn·m
!¨, // numo-n ·r v-Lu-- r·n ··pyLnj
-m- // v-Lu- n-·-LvLnj -nn-y
·¡
Lr.··pL-J<¨· n-runn¡
// .... runr!-n ··J-
·
See aIso
DrganIzIng 0ata Access
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
482
DrganIzIng 0ata Access
Ìn thIs sectIon questIons connected wIth obtaInIng, storIng and requestIng prIce data (tImeserIes) are
consIdered.
PeceIvIng 0ata from a Trade Server
8efore prIce data become avaIlable In the |etaTrader 5 termInal, they must be receIved and
processed. To receIve data, connectIon to the |etaTrader 5 trade server must be establIshed. 0ata
are receIved In the form of packed blocks of mInute bars from the server upon the request of a
termInal.
The mechanIsm of server reference for data doesn't depend on how the request has been InItIated · by
a user when navIgatIng In a chart or In a program way In the |0L5 language.
StorIng IntermedIate 0ata
0ata receIved from a server are automatIcally unpacked and saved In the HCC IntermedIate formate.
0ata on each symbol are wrItten Into a separate folder: termìncl_dìrectory\bases\server_ncme
\hIstory\symbol_ncme. For example, data on EUFUS0 receIved from the |eta0uotes·0emo server wIll
be stored In termìncl_dìrectory\bases\|eta0uotes·0emo\hIstory\EUFUS0\.
0ata are wrItten Into fIles wIth .hcc extensIon. Each fIle stores data of mInute bars for one year. For
example, the fIle named 2009.hcc In the EUFUS0 folder contaIns mInute bars of EUFUS0 for year
2009. These fIles are used for preparIng prIce data for all tImeframes and are not Intended for dIrect
access.
DbtaInIng 0ata on a Necessary TImeframe out of IntermedIate 0ata
ÌntermedIate HCC fIles are used as the data source for buIldIng prIce data for requested tImeframes In
the HC format. 0ata of HC format are tImeserIes that are maxImally prepared for a quIck access.
They are created upon a request of a chart or a mql5 program. The volume of data should not exceed
the value of the ¨|ax bars In charts¨ charts. 0ata are stored for further usIng In fIles wIth hc
extensIon.
To save resources, data on a tImeframe are stored and saved In FA| only If necessary. Ìf not called
long, they are released form FA| and saved Into a fIle. For each tImeframe, data are prepared
regardless of whether there are ready data for other tImeframes or not. Fules of formIng and
accessIng data are the same for all tImeframes. Ìt means, despIte the fact that the unIt data stored In
HCC Is one mInute, the avaIlabIlIty of HCC data doesn't mean the avaIlabIlIty of data on |1 tImeframe
as HC In the same volume.
FeceIpt of new data from a server calls automatIc update of used prIce data In HC format of all
tImeframes. Ìt also leads to the recalculatIon of all IndIcators that ImplIcItly use them as Input data for
calculatIons.
Parameter "hax bars In chart"
The ¨|ax bars In charts¨ parameter restrIcts number of bars In HC format avaIlable to charts,
IndIcators and mql5 programs. ThIs Is valId for all avaIlable tImeframes and serves, fIrst of all, to
save computer resources.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
483
When settIng a large value of thIs parameter, It should be remembered, that If deep hIstory prIce data
for small tImeframes are avaIlable, memory used for storIng tImeserIes and IndIcator buffers can
become hundreds of megabytes and reach the FA| restrIctIon for the clIent termInal program (2Cb for
J2·bIt applIcatIons of |S WIndows).
Change of the ¨|ax bars In charts¨ comes Into effect after the clIent termInal Is restarted. Change of
thIs parameter causes neIther automatIc referrIng to a server for addItIonal data, nor formIng of
addItIonal bars of tImeserIes. AddItIonal prIce data are requested from the server, and tImeserIes are
updated takIng Into account the new lImItatIon, In case of eIther chart scroll to the area wIth no data,
or when data are requested by a mql5 program.
7olume of data requested from the server corresponds to the requIred number of bars of thIs
tImeframe wIth the ¨|ax bars In charts¨ parameter taken Into account. The restrIctIon set by thIs
parameter Is not strIct, and In some cases the number of avaIlable bars for a tImeframe can be a lIttle
more than the current parameter value.
0ata AvaIIabIIIty
Presence of data on HCC format or even In the prepared for usIng HC format does not always denote
the absolute avaIlabIlIty If these data to be shown In a chart or used In mql5 programs.
When accessIng to prIce data or IndIcator values from a mql5 program It should be remembered that
theIr avaIlabIlIty In a certaIn moment of tIme or startIng from a certaIn moment of tIme Is not
guaranteed. Ìt Is connected wIth the fact that wIth the purpose of savIng resources, the full copy of
data necessary for a mql5 program Isn't stored In |etaTrader 5; only dIrect access to the termInal
data base Is gIven.
The prIce hIstory for all tImeframes Is buIlt from common data of HCC format, and any update of data
from a server leads to the update of data for all tImeframes and to the recalculatIon of IndIcators. 0ue
to thIs access to data can be closed, even If these data were avaIlable a moment ago.
SynchronIzatIon of the TermInaI 0ata and Server 0ata
SInce a mql5 program can call data fro any symbol and tImeframe, there Is a possIbIlIty that data of a
necessary tImeserIes are not formed yet In the termInal or the necessary prIce data aren't
synchronIzed wIth the trade server. Ìn thIs case It's hard to predIct the latency tIme.
AlgorIthms usIng latency cycles are not the best solutIon. The only exceptIon In thIs case are scrIpts,
because they do not have any alternatIve algorIthm choIce due to not havIng event handlIng. For
custom IndIcators such algorIthms, as well as as any other latency cycles are strongly not
recommended, because they lead to termInatIon of calculatIon of all IndIcators and any other handlIng
of prIce data of the symbol.
For Expert AdvIsors and IndIcators, It Is better to use the even model of handlIng. Ìf durIng handlIng
of DnTIck() or DnCalculate() event, data receIpt for the requIred tImeserIes faIled, you should exIt the
event handler, relyIng on the access avaIlabIlIty durIng the next call of the handler.
ExampIe of a ScrIpt for AddIng HIstory
Let's consIder the example of a scrIpt that executes a request to receIve hIstory for the selected
symbol from a trade server. The scrIpt Is Intended for runnIng In a chart of a selected symbol;
tImeframe doesn't matter, because, as It was mentIoned above, prIce data are receIved from a trade
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
484
server as packed one mInute data, from whIch any predefIned tImeserIes Is constructed then.
WrIte all actIons concernIng data receIpt as a separate functIon CheckLoadHIstory(symbol, tImeframe,
start_date):
Lnr .!-·kH·-J|L-r·ny.-rnLnj -ymo·L,IHJM_rPMI¯-AMI¯ p-nL·J,J-r-rLm- -r-nr_J-r-·

·
The CheckLoadHIstory() functIon Is desIgned as a unIversal functIon that can be called from any
program (Expert AdvIsor, scrIpt or IndIcator); and therefore It requIres three Input parameters:
symbol name, perIod and start date to IndIcate the begInnIng of prIce hIstory you need.
Ìnsert necessary checks Into the functIon code before requestIng the mIssIng hIstory. FIrst of all, we
should make sure that the symbol name and perIod value are correct:
Lr.-ymo·L==HJHH -ymo·L==¨¨· -ymo·L=¯ymo·L.·¡
Lr.p-nL·J==-I-PJ¯_.J--IHr· p-nL·J=--nL·J.·¡
Then let's make sure that the symbol Is avaIlable In the |arketWatch wIndow, I.e., the hIstory for the
symbol wIll be avaIlable when sendIng a request to a trade server. Ìf there Is no such a symbol In
|arketWatch, add It usIng the SymbolSelect() functIon.
Lr..¯ymo·LPnr·Pnr-j-n.-ymo·L,¯1MÐJH_¯IHI.r··

Lr.J-rH--rInn·n.·==I--_MA-·Ir_JH·HJWH_¯1MÐJH· n-runn.-!·¡
¯ymo·L¯-L-·r.-ymo·L,rnu-·¡
·
Now we should receIve the start date of the avaIlable hIstory for the IndIcated symbol/perIod paIr.
Perhaps, the value of the Input parameter startdate, passed to CheckLoadHIstory(), Is wIthIn the
avaIlable hIstory; then request to a trade server Is not needed. Ìn order to obtaIn the very fIrst date
for the symbol·perIod as of the moment, the SerIesÌnfoÌnteger() functIon wIth the SEFÌES_FÌFST0ATE
modIfIer Is used.
¯-nL--Pnr·Pnr-j-n.-ymo·L,p-nL·J,¯I-PI¯_¯P-¯r¯ArI,rLn-r_J-r-·¡
Lr.rLn-r_J-r-¨ ss rLn-r_J-r-<=-r-nr_J-r-· n-runn.!·¡
The next Important check Is checkIng the type of the program, from whIch the functIon Is called.
Note, sendIng request to update the tImeserIes wIth the same perIod as that of the IndIcator, that
calls the update, Is undesIrable. The undesIrabIlIty of requestIng data on the same symbol·perIod as
that of the IndIcator Is condItIoned by the fact that update of hIstory data Is performed In the same
thread where the IndIcator operates. So the possIbIlIty of clInch occurrence Is hIgh. To check thIs use
the |0L5ÌnfoÌnteger() functIon wIth the |0L5_PFDCFA|_TYPE modIfIer.
Lr.M,H¯Pnr·Pnr-j-n.M,H¯_--JJ-AM_r1-I·==--JJ-AM_PH¯P.ArJ- ss --nL·J.·==p-nL·J ss ¯ymo·L.·==-ymo·L·
n-runn.-1·¡
Ìf all the checks have been passed successfully, make the last attempt to d wIthout referrIng to the
trade server. FIrst let's fInd out the start date, for whIch mInute data In HCC format are avaIlable.
Fequest thIs value usIng the SerIesÌnfoÌnteger() functIon wIth the SEFÌES_TEF|ÌNAL_FÌFST0ATE
modIfIer and agaIn compare It to the value of the start_date parameter.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
485
Lr.¯-nL--Pnr·Pnr-j-n.-ymo·L,-I-PJ¯_M!,¯I-PI¯_rI-MPHAH_¯P-¯r¯ArI,rLn-r_J-r-··

//--- r!-n- L- L·-J-J J-r- r· ouLLJ rLm---nL--
Lr.rLn-r_J-r-¨·

//--- r·n·- rLm---nL-- ouLLJ
.·pyrLm-.-ymo·L,p-nL·J,rLn-r_J-r----nL·J¯-··nJ-.p-nL·J·,!,rLm--·¡
//--- ·!-·k J-r-
Lr.¯-nL--Pnr·Pnr-j-n.-ymo·L,p-nL·J,¯I-PI¯_¯P-¯r¯ArI,rLn-r_J-r-··
Lr.rLn-r_J-r-¨ ss rLn-r_J-r-<=-r-nr_J-r-· n-runn.`·¡
·
·
Ìf after all the checks the executIon thread Is stIll In the body of the CheckLoadHIstory() functIon, It
means there Is a necessIty to request the mIssIng prIce data from a trade server. FIrst, return the
value of ¨|ax bars In chart¨ usIng the TermInalÌnfoÌnteger() functIon:
Lnr m-x_o-n-=r-nmLn-LPnr·Pnr-j-n.rI-MPHAH_MAxÐA-¯·¡
We'll need It to prevent requestIng extra data. Then fInd the very fIrst date In the symbol hIstory on
the trade server (regardless of the perIod) usIng already known functIon SerIesÌnfoÌnteger() wIth the
SEFÌES_SEF7EF_FÌFST0ATE modIfIer.
J-r-rLm- rLn-r_--nv-n_J-r-=¨¡
.!LL-..¯-nL--Pnr·Pnr-j-n.-ymo·L,-I-PJ¯_M!,¯I-PI¯_¯I-VI-_¯P-¯r¯ArI,rLn-r_--nv-n_J-r-· ss .P-¯r·pp-J.··
¯L--p.¯·¡
SInce the request Is an asynchronous operatIon, the functIon Is called In the cycle wIth a small delay of
5 mIllIseconds untIl the fIrst_server_date varIable receIves a value, or the cycle executIon Is
termInated by a user (ÌsStopped() wIll return trµe In thIs case). Let's IndIcate a correct value of the
start date, startIng from whIch we request prIce data from a trade server.
Lr.rLn-r_--nv-n_J-r--r-nr_J-r-· -r-nr_J-r-=rLn-r_--nv-n_J-r-¡
Lr.rLn-r_J-r-¨ ss rLn-r_J-r-<rLn-r_--nv-n_J-r-·
-nLnr.¨W-nnLnj. rLn-r --nv-n J-r- ¨,rLn-r_--nv-n_J-r-,¨ r·n ¨,
-ymo·L,¨ J·-- n·r m-r·! r· rLn-r --nL-- J-r- ¨,rLn-r_J-r-·¡
Ìf the start date fìrst_server_dcte of the server Is lower than the start date fìrst_dcte of the symbol In
HCC format, the correspondIng entry wIll be output In the journal.
Now we are ready to make a request to a trade server askIng for mIssIng prIce data. |ake the request
In the form of a cycle and start fIllIng out Its body:
.!LL-..P-¯r·pp-J.··

//!. .-Lr r·n -yn·!n·nLz-rL·n o-r.--n r!- n--ouLLr rLm---nL-- -nJ Lnr-nm-JL-r- !L-r·ny -- ||.
//`. n-·-Lv- r!- ·unn-nr numo-n ·r o-n- n r!L- rLm---nL--
// Lr o-n- L- L-nj-n r!-n M-x_o-n-_Ln_·!-nr, .- ·-n -xLr, .·nk L- ·v-n
//`. ·or-Ln r!- -r-nr J-r- rLn-r_J-r- Ln r!- n--ouLLr rLm---nL-- -nJ ··mp-n- Lr r· -r-nr_J-r-
// Lr rLn-r_J-r- L- L·.-n r!-n -r-nr_J-r-, .- ·-n -xLr, .·nk L- ·v-n
//1. n-¬u--r rn·m - --nv-n - n-. p-nr ·r !L-r·ny - !¨¨ o-n- -r-nrLnj rn·m L--r -v-LL-oL- o-n numo-n-J 'o-n-'
·
The fIrst three poInts are Implemented by already known means.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
486
.!LL-..P-¯r·pp-J.··

//--- !..-Lr rLLL rLm---nL-- n--ouLLJ pn··--- L- ·v-n
.!LL-..¯-nL--Pnr·Pnr-j-n.-ymo·L,p-nL·J,¯I-PI¯_¯1H.-JHP¯I¯· ss .P-¯r·pp-J.··
¯L--p.¯·¡
//--- `.n-¬u--r !·. m-ny o-n- .- !-v-
Lnr o-n-=Ð-n-.-ymo·L,p-nL·J·¡
Lr.o-n-¨·

//--- o-n- m·n- r!-n ·-n o- Jn-.n Ln r!- ·!-nr, -xLr
Lr.o-n-=m-x_o-n-· n-runn.-`·¡
//--- `. n-runn r!- ·unn-nr -r-nr J-r- Ln r!- rLm---nL--
Lr.¯-nL--Pnr·Pnr-j-n.-ymo·L,p-nL·J,¯I-PI¯_¯P-¯r¯ArI,rLn-r_J-r-··
// -r-nr J-r- .-- --nLL-n r!-n r!-r n-¬u--r-J, r--k ··mpL-r-J
Lr.rLn-r_J-r-¨ ss rLn-r_J-r-<=-r-nr_J-r-· n-runn.¨·¡
·
//1. --¬u--r rn·m - --nv-n - n-. p-nr ·r !L-r·ny - !¨¨ o-n- -r-nrLnj rn·m L--r -v-LL-oL- o-n numo-n-J 'o-n-'
·
The last fourth poInt Is left · requestIng hIstory. We can't refer to a server dIrectly, but any Copy·
functIon automatIcally InItIates request sendIng to a server, If the hIstory In HCC format Is not
enough. SInce the tIme of the very fIrst start date In the fìrst_dcte varIable Is the sImple and natural
crIterIon to evaluate the request executIon degree, then the easIest way Is to use the CopyTIme()
functIon.
When callIng functIons that copy any data from tImeserIes, It should be noted that the stcrt parameter
(number of the bar, startIng from whIch prIce data should be coped) must always be wIthIn the
avaIlable termInal hIstory. Ìf you have only 100 bars, It meanIngless to try copyIng J00 bars startIng
from the bar wIth the Index 500. Such a request wIll be understood as an erroneous and won't be
handled, I.e. no addItIonal hIstory wIll be loaded from a trade server.
That's why we'll copy by 100 bars startIng from the bar wIth the bcrs Index. ThIs wIll provIde the
smooth loadIng of mIssIng hIstory from a trade server. Actually a lIttle more than the requested 100
bars wIll be loaded, whIle server sends oversIzed hIstory.
Lnr ··pL-J=.·pyrLm-.-ymo·L,p-nL·J,o-n-,!¨¨,rLm--·¡
After the copyIng operatIon, we should analyze the number of copIed elements. Ìf the attempt faIls,
then value of the copìed wIll be equal to null and the value of the faIl_cnt counter wIll be Increased by
1. After 100 faIlIng attempts, the operatIon of the functIon wIll be stopped.
Lnr r-LL_·nr=¨¡
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
487
...
Lnr ··pL-J=.·pyrLm-.-ymo·L,p-nL·J,o-n-,!¨¨,rLm--·¡
Lr.··pL-J¨·

//--- ·!-·k J-r-
Lr.rLm--¯¨`<=-r-nr_J-r-· n-runn.¨·¡ // r!- ··pL-J v-Lu- L- -m-LL-n, n--Jy
Lr.o-n--··pL-J=m-x_o-n-· n-runn.-`·¡ // o-n- -n- m·n- r!-n ·-n o- Jn-.n Ln r!- ·!-nr, n--Jy
r-LL_·nr=¨¡
·
-L--

//--- n· m·n- r!-n !¨¨ r-LLLnj -rr-mpr- Ln -u··---L·n
r-LL_·nr--¡
Lr.r-LL_·nr=!¨¨· n-runn.-¯·¡
¯L--p.!¨·¡
·
So, not only correct handlIng of the current sItuatIon at each moment of executIon Is Implemented In
the functIon, but also the termInatIon code Is returned, that can be handled after callIng the
CheckLoadHIstory() functIon for gettIng addItIonal InformatIon. For example, thIs way:
Lnr n--=.!-·kH·-J|L-r·ny.PnpH·-J-J¯ymo·L,PnpH·-J-J--nL·J,Pnp¯r-nr¯-r-·¡
-.Lr·!.n--·

·--- -! . -nLnr.¨Jnkn·.n -ymo·L ¨,PnpH·-J-J¯ymo·L·¡ on--k¡
·--- -` . -nLnr.¨M·n- n-¬u--r-J o-n- r!-n ·-n o- Jn-.n Ln r!- ·!-nr¨·¡ on--k¡
·--- -` . -nLnr.¨Ix-·urL·n -r·pp-J oy u--n¨·¡ on--k¡
·--- -1 . -nLnr.¨PnJL·-r·n mu-rn'r L·-J Lr- ·.n J-r-¨·¡ on--k¡
·--- -¯ . -nLnr.¨H·-JLnj r-LL-J¨·¡ on--k¡
·--- ¨ . -nLnr.¨ALL J-r- L·-J-J¨·¡ on--k¡
·--- ! . -nLnr.¨ALn--Jy -v-LL-oL- J-r- Ln rLm---nL-- -n- -n·uj!¨·¡ on--k¡
·--- ` . -nLnr.¨rLm---nL-- L- ouLLr rn·m -v-LL-oL- r-nmLn-L J-r-¨·¡ on--k¡
J-r-uLr . -nLnr.¨Ix-·urL·n n--uLr unJ-rLn-J¨·¡
·
The full code of the functIon can be found In the example of a scrIpt that shows the correct
organIzatIon of access to any data wIth the handlIng of request results.
Code:
//--------------------------------------------------------------------
// r--rH·-J|L-r·ny.m¬¯
// .·pynLj!r `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m¬L¯.··m
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨`¨
tpn·p-nry -·nLpr_-!·._Lnpur-
//--- Lnpur p-n-m-r-n-
Lnpur -rnLnj PnpH·-J-J¯ymo·L=¨H¯¯J¯¯¨¡ // ¯ymo·L r· o- L·-J
Lnpur IHJM_rPMI¯-AMI¯ PnpH·-J-J--nL·J=-I-PJ¯_|!¡ // --nL·J r· o- L·-J
Lnpur J-r-rLm- Pnp¯r-nr¯-r-=¯'`¨¨¯.¨!.¨!'¡ // ¯r-nr J-r-
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
488
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

-nLnr.¨¯r-nr L·-J¨,PnpH·-J-J¯ymo·L-¨,¨-J-r--nL·JH-m-.PnpH·-J-J--nL·J·,¨rn·m¨,Pnp¯r-nr¯-r-·¡
//---
Lnr n--=.!-·kH·-J|L-r·ny.PnpH·-J-J¯ymo·L,PnpH·-J-J--nL·J,Pnp¯r-nr¯-r-·¡
-.Lr·!.n--·

·--- -! . -nLnr.¨Jnkn·.n -ymo·L ¨,PnpH·-J-J¯ymo·L·¡ on--k¡
·--- -` . -nLnr.¨--¬u--r-J o-n- m·n- r!-n m-x o-n- Ln ·!-nr¨·¡ on--k¡
·--- -` . -nLnr.¨-n·jn-m .-- -r·pp-J¨·¡ on--k¡
·--- -1 . -nLnr.¨PnJL·-r·n -!·uLJn'r L·-J Lr- ·.n J-r-¨·¡ on--k¡
·--- -¯ . -nLnr.¨H·-J r-LL-J¨·¡ on--k¡
·--- ¨ . -nLnr.¨H·-J-J J·¨·¡ on--k¡
·--- ! . -nLnr.¨H·-J-J pn-vL·u-Ly¨·¡ on--k¡
·--- ` . -nLnr.¨H·-J-J pn-vL·u-Ly -nJ ouLLr¨·¡ on--k¡
J-r-uLr . -nLnr.¨Jnkn·.n n--uLr¨·¡
·
//---
J-r-rLm- rLn-r_J-r-¡
¯-nL--Pnr·Pnr-j-n.PnpH·-J-J¯ymo·L,PnpH·-J-J--nL·J,¯I-PI¯_¯P-¯r¯ArI,rLn-r_J-r-·¡
Lnr o-n-=Ð-n-.PnpH·-J-J¯ymo·L,PnpH·-J-J--nL·J·¡
-nLnr.¨¯Ln-r J-r- ¨,rLn-r_J-r-,¨ - ¨,o-n-,¨ o-n-¨·¡
//---
·
//--------------------------------------------------------------------
//
//--------------------------------------------------------------------
Lnr .!-·kH·-J|L-r·ny.-rnLnj -ymo·L,IHJM_rPMI¯-AMI¯ p-nL·J,J-r-rLm- -r-nr_J-r-·

J-r-rLm- rLn-r_J-r-=¨¡
J-r-rLm- rLm--¯!¨¨`¡
//--- ·!-·k -ymo·L s p-nL·J
Lr.-ymo·L==HJHH -ymo·L==¨¨· -ymo·L=¯ymo·L.·¡
Lr.p-nL·J==-I-PJ¯_.J--IHr· p-nL·J=--nL·J.·¡
//--- ·!-·k Lr -ymo·L L- --L-·r-J Ln r!- M-nk-rW-r·!
Lr..¯ymo·LPnr·Pnr-j-n.-ymo·L,¯1MÐJH_¯IHI.r··

Lr.J-rH--rInn·n.·==I--_MA-·Ir_JH·HJWH_¯1MÐJH· n-runn.-!·¡
¯ymo·L¯-L-·r.-ymo·L,rnu-·¡
·
//--- ·!-·k Lr J-r- L- pn---nr
¯-nL--Pnr·Pnr-j-n.-ymo·L,p-nL·J,¯I-PI¯_¯P-¯r¯ArI,rLn-r_J-r-·¡
Lr.rLn-r_J-r-¨ ss rLn-r_J-r-<=-r-nr_J-r-· n-runn.!·¡
//--- J·n'r --k r·n L·-J ·r Lr- ·.n J-r- Lr Lr L- -n LnJL·-r·n
Lr.M,H¯Pnr·Pnr-j-n.M,H¯_--JJ-AM_r1-I·==--JJ-AM_PH¯P.ArJ- ss --nL·J.·==p-nL·J ss ¯ymo·L.·==-ymo·L·
n-runn.-1·¡
//--- --··nJ -rr-mpr
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
489
Lr.¯-nL--Pnr·Pnr-j-n.-ymo·L,-I-PJ¯_M!,¯I-PI¯_rI-MPHAH_¯P-¯r¯ArI,rLn-r_J-r-··

//--- r!-n- L- L·-J-J J-r- r· ouLLJ rLm---nL--
Lr.rLn-r_J-r-¨·

//--- r·n·- rLm---nL-- ouLLJ
.·pyrLm-.-ymo·L,p-nL·J,rLn-r_J-r----nL·J¯-··nJ-.p-nL·J·,!,rLm--·¡
//--- ·!-·k J-r-
Lr.¯-nL--Pnr·Pnr-j-n.-ymo·L,p-nL·J,¯I-PI¯_¯P-¯r¯ArI,rLn-r_J-r-··
Lr.rLn-r_J-r-¨ ss rLn-r_J-r-<=-r-nr_J-r-· n-runn.`·¡
·
·
//--- m-x o-n- Ln ·!-nr rn·m r-nmLn-L ·prL·n-
Lnr m-x_o-n-=r-nmLn-LPnr·Pnr-j-n.rI-MPHAH_MAxÐA-¯·¡
//--- L·-J -ymo·L !L-r·ny Lnr·
J-r-rLm- rLn-r_--nv-n_J-r-=¨¡
.!LL-..¯-nL--Pnr·Pnr-j-n.-ymo·L,-I-PJ¯_M!,¯I-PI¯_¯I-VI-_¯P-¯r¯ArI,rLn-r_--nv-n_J-r-· ss .P-¯r·pp-J.··
¯L--p.¯·¡
//--- rLx -r-nr J-r- r·n L·-JLnj
Lr.rLn-r_--nv-n_J-r--r-nr_J-r-· -r-nr_J-r-=rLn-r_--nv-n_J-r-¡
Lr.rLn-r_J-r-¨ ss rLn-r_J-r-<rLn-r_--nv-n_J-r-·
-nLnr.¨W-nnLnj. rLn-r --nv-n J-r- ¨,rLn-r_--nv-n_J-r-,¨ r·n ¨,-ymo·L,
¨ J·-- n·r m-r·! r· rLn-r --nL-- J-r- ¨,rLn-r_J-r-·¡
//--- L·-J J-r- -r-p oy -r-p
Lnr r-LL_·nr=¨¡
.!LL-..P-¯r·pp-J.··

//--- .-Lr r·n rLm---nL-- ouLLJ
.!LL-..¯-nL--Pnr·Pnr-j-n.-ymo·L,p-nL·J,¯I-PI¯_¯1H.-JHP¯I¯· ss .P-¯r·pp-J.··
¯L--p.¯·¡
//--- --k r·n ouLLr o-n-
Lnr o-n-=Ð-n-.-ymo·L,p-nL·J·¡
Lr.o-n-¨·

Lr.o-n-=m-x_o-n-· n-runn.-`·¡
//--- --k r·n rLn-r J-r-
Lr.¯-nL--Pnr·Pnr-j-n.-ymo·L,p-nL·J,¯I-PI¯_¯P-¯r¯ArI,rLn-r_J-r-··
Lr.rLn-r_J-r-¨ ss rLn-r_J-r-<=-r-nr_J-r-· n-runn.¨·¡
·
//--- ··pyLnj ·r n-xr p-nr r·n·-- J-r- L·-JLnj
Lnr ··pL-J=.·pyrLm-.-ymo·L,p-nL·J,o-n-,!¨¨,rLm--·¡
Lr.··pL-J¨·

//--- ·!-·k r·n J-r-
Lr.rLm--¯¨`<=-r-nr_J-r-· n-runn.¨·¡
Lr.o-n--··pL-J=m-x_o-n-· n-runn.-`·¡
r-LL_·nr=¨¡
·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
490
-L--

//--- n· m·n- r!-n !¨¨ r-LL-J -rr-mpr-
r-LL_·nr--¡
Lr.r-LL_·nr=!¨¨· n-runn.-¯·¡
¯L--p.!¨·¡
·
·
//--- -r·pp-J
n-runn.-`·¡
·
//--------------------------------------------------------------------
// n-runn- -rnLnj v-Lu- ·r r!- p-nL·J
//--------------------------------------------------------------------
-rnLnj J-r--nL·JH-m-.IHJM_rPMI¯-AMI¯ p-nL·J·

Lr.p-nL·J==-I-PJ¯_.J--IHr· p-nL·J=--nL·J.·¡
//---
-.Lr·!.p-nL·J·

·--- -I-PJ¯_M!. n-runn.¨M!¨·¡
·--- -I-PJ¯_M`. n-runn.¨M`¨·¡
·--- -I-PJ¯_M`. n-runn.¨M`¨·¡
·--- -I-PJ¯_M1. n-runn.¨M1¨·¡
·--- -I-PJ¯_M¯. n-runn.¨M¯¨·¡
·--- -I-PJ¯_M¯. n-runn.¨M¯¨·¡
·--- -I-PJ¯_M!¨. n-runn.¨M!¨¨·¡
·--- -I-PJ¯_M!`. n-runn.¨M!`¨·¡
·--- -I-PJ¯_M!¯. n-runn.¨M!¯¨·¡
·--- -I-PJ¯_M`¨. n-runn.¨M`¨¨·¡
·--- -I-PJ¯_M`¨. n-runn.¨M`¨¨·¡
·--- -I-PJ¯_|!. n-runn.¨|!¨·¡
·--- -I-PJ¯_|`. n-runn.¨|`¨·¡
·--- -I-PJ¯_|`. n-runn.¨|`¨·¡
·--- -I-PJ¯_|1. n-runn.¨|1¨·¡
·--- -I-PJ¯_|¯. n-runn.¨|¯¨·¡
·--- -I-PJ¯_|-. n-runn.¨|-¨·¡
·--- -I-PJ¯_|!`. n-runn.¨|!`¨·¡
·--- -I-PJ¯_¯!. n-runn.¨¯-LLy¨·¡
·--- -I-PJ¯_W!. n-runn.¨W--kLy¨·¡
·--- -I-PJ¯_MH!. n-runn.¨M·nr!Ly¨·¡
·
//---
n-runn.¨unkn·.n p-nL·J¨·¡
·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
491
SerIesInfoInteger
Feturns InformatIon about the state of hIstorIcal data. There are 2 varIants of functIon calls.
0IrectIy returns the property vaIue.
L·nj ¯-nL--Pnr·Pnr-j-n.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
IHJM_¯I-PI¯_PH¯J_PHrIJI- pr.p_ij, // pn·p-nry LJ-nrLrL-n
·¡
Peturns true or faIse dependIng on the success of the functIon run.
o··L ¯-nL--Pnr·Pnr-j-n.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
IHJM_¯I-PI¯_PH¯J_PHrIJI- pr.p_ij, // pn·p-nry P¯
L·njs l.nj_v-r // v-nL-oL- r·n j-rrLnj Lnr·
·¡
Parameters
·ymo.l_n-ma
[In] Symbol name.
:imafr-ma
[In] PerIod.
pr.p_ij
[In] ÌdentIfIer of the requested property, value of the ENU|_SEFÌES_ÌNFD_ÌNTECEF enumeratIon.
l.nj_v-r
[out] 7arIable to whIch the value of the requested property Is placed.
Peturn VaIue
Ìn the fIrst case, It returns value of the long type.
For the second case, It returns true, If the specIfIed property Is avaIlable and It's value has been
placed Into long_var varIable, otherwIse It returns false. For more detaIls about an error, call
CetLastError().
ExampIe:
v·LJ Jn¯r-nr.·

//---
-nLnr.¨r·r-L numo-n ·r o-n- r·n r!- -ymo·L-p-nL·J -r r!L- m·m-nr = ¨,
¯-nL--Pnr·Pnr-j-n.¯ymo·L.·,¨,¯I-PI¯_ÐA-¯_.JJHr··¡
-nLnr.¨r!- rLn-r J-r- r·n r!- -ymo·L-p-nL·J -r r!L- m·m-nr = ¨,
.J-r-rLm-·¯-nL--Pnr·Pnr-j-n.¯ymo·L.·,¨,¯I-PI¯_¯P-¯r¯ArI··¡
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
492
-nLnr.¨r!- rLn-r J-r- Ln r!- !L-r·ny r·n r!- -ymo·L-p-nL·J ·n r!- --nv-n = ¨,
.J-r-rLm-·¯-nL--Pnr·Pnr-j-n.¯ymo·L.·,¨,¯I-PI¯_¯I-VI-_¯P-¯r¯ArI··¡
-nLnr.¨¯ymo·L J-r- -n- -yn·!n·nLz-J = ¨,
.o··L·¯-nL--Pnr·Pnr-j-n.¯ymo·L.·,¨,¯I-PI¯_¯1H.-JHP¯I¯··¡
·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
493
ßars
Feturns the number of bars count In the hIstory for a specIfIed symbol and perIod. There are 2
varIants of functIons calls.
Pequest aII of the hIstory bars
Lnr Ð-n-.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma // p-nL·J
·¡
Pequest the hIstory bars for the seIected tIme IntervaI
Lnr Ð-n-.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima // -nJ J-r- -nJ rLm-
·¡
Parameters
·ymo.l_n-ma
[In] Symbol name.
:imafr-ma
[In] PerIod.
·:-r:_:ima
[In] 8ar tIme correspondIng to the fIrst element.
·:.p_:ima
[In] 8ar tIme correspondIng to the last element.
Peturn VaIue
Ìf the start_tIme and stop_tIme parameters are defIned, the functIon returns the number of bars In
the specIfIed tIme Interval, otherwIse It returns the total number of bars.
Note
Ìf data for the tImeserIes wIth specIfIed parameters are not formed In the termInal by the tIme of
the 8ars() functIon call, or data of the tImeserIes are not synchronIzed wIth a trade server by the
moment of the functIon call, the functIon returns a zero value.
SampIe:
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
494
Lnr o-n-=Ð-n-._¯ymo·L,_--nL·J·¡
Lr.o-n-¨·

-nLnr.¨Humo-n ·r o-n- Ln r!- r-nmLn-L !L-r·ny r·n r!- -ymo·L-p-nL·J -r r!- m·m-nr = ¨,o-n-·¡
·
-L-- //n· -v-LL-oL- o-n-

//--- J-r- ·n r!- -ymo·L mLj!r o- n·r -yn·!n·nLz-J .Lr! J-r- ·n r!- --nv-n
o··L -yn·!n·nLz-J=r-L--¡
//--- L··p ··unr-n
Lnr -rr-mpr-=¨¡
// m-k- ¯ -rr-mpr- r· .-Lr r·n -yn·!n·nLz-rL·n
.!LL-.-rr-mpr-<¯·

Lr.¯-nL--Pnr·Pnr-j-n.¯ymo·L.·,¨,¯I-PI¯_¯1H.-JHP¯I¯··

//--- -yn·!n·nLz-rL·n J·n-, -xLr
-yn·!n·nLz-J=rnu-¡
on--k¡
·
//--- Ln·n---- r!- ··unr-n
-rr-mpr---¡
//--- .-Lr !¨ mLLLL--··nJ- rLLL r!- n--r Lr-n-rL·n
¯L--p.!¨·¡
·
//--- -xLr r!- L··p -rr-n -yn·!n·nLz-rL·n
Lr.-yn·!n·nLz-J·

-nLnr.¨Humo-n ·r o-n- Ln r!- r-nmLn-L !L-r·ny r·n r!- -ymo·L-p-nL·J -r r!- m·m-nr = ¨,o-n-·¡
-nLnr.¨r!- rLn-r J-r- Ln r!- r-nmLn-L !L-r·ny r·n r!- -ymo·L-p-nL·J -r r!- m·m-nr = ¨,
.J-r-rLm-·¯-nL--Pnr·Pnr-j-n.¯ymo·L.·,¨,¯I-PI¯_¯P-¯r¯ArI··¡
-nLnr.¨r!- rLn-r J-r- Ln r!- !L-r·ny r·n r!- -ymo·L ·n r!- --nv-n = ¨,
.J-r-rLm-·¯-nL--Pnr·Pnr-j-n.¯ymo·L.·,¨,¯I-PI¯_¯I-VI-_¯P-¯r¯ArI··¡
·
//--- -yn·!n·nLz-rL·n ·r J-r- JLJn'r !-pp-n
-L--

-nLnr.¨¯-LL-J r· j-r numo-n ·r o-n- r·n ¨,_¯ymo·L·¡
·
·
See aIso
Event ProcessIng FunctIons
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
495
ßarsCaIcuIated
Feturns the number of calculated data for the specIfIed IndIcator.
Lnr Ð-n-.-L·uL-r-J.
Lnr inji·-:.r_n-njla, // LnJL·-r·n !-nJL-
·¡
Parameters
inji·-:.r_n-njla
[In] The IndIcator handle, returned by the correspondIng IndIcator functIon.
Peturn VaIue
Feturns the amount of calculated data In the IndIcator buffer or ·1 In the case of error (data not
calculated yet)
Note
The functIon Is useful when It's necessary to get the IndIcator data ImmedIately after Its creatIon
(IndIcator handle Is avaIlable).
ExampIe:
v·LJ Jn¯r-nr.·

J·uoL- Jp-¯`¡
//--- --r rLm---nL-- ·nJ-nLnj r·n r!- r!- -nn-y-
Ann-y¯-rA-¯-nL--.Jp-,rnu-·¡
//--- ·n--r- !-nJL- r·n r!- ¯n-·r-L PnJL·-r·n
Lnr ¯n-·r-L-|-nJL-=L¯n-·r-L-.HJHH,¨·¡
//--- n---r r!- -nn·n ··J-
----rH--rInn·n.·¡
//--- rny r· ··py r!- LnJL·-r·n v-Lu--
Lnr L,··pL-J=.·pyÐurr-n.¯n-·r-L-|-nJL-,¨,¨,!¨¨¨,Jp-·¡
Lr.··pL-J<=¨·

¯L--p.¯¨·¡
r·n.L=¨¡L<!¨¨¡L--·

Lr.Ð-n-.-L·uL-r-J.¯n-·r-L-|-nJL-·¨·
on--k¡
¯L--p.¯¨·¡
·
··pL-J=.·pyÐurr-n.¯n-·r-L-|-nJL-,¨,¨,!¨¨¨,Jp-·¡
Lr.··pL-J<=¨·

-nLnr.¨¯-LL-J r· ··py upp-n rn-·r-L-. Inn·n = ¨,J-rH--rInn·n.·,
¨L = ¨,L,¨ ··pL-J = ¨,··pL-J·¡
n-runn¡
·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
496
-L--
-nLnr.¨Jpp-n rn-·r-L- ··pL-J¨,
¨L = ¨,L,¨ ··pL-J = ¨,··pL-J·¡
·
-L-- -nLnr.¨Jpp-n rn-·r-L- ··pL-J. Ann-y¯Lz- = ¨,Ann-y¯Lz-.Jp-··¡
·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
497
IndIcatorCreate
The functIon returns the handle of a specIfIed technIcal IndIcator created based on the array of
parameters of |qlParam type.
Lnr PnJL·-r·n.n--r-.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // rLm-rn-m-
IHJM_PH¯P.ArJ- inji·-:.r_ij, // LnJL·-r·n ryp- rn·m r!- -num-n-rL·n IHJM_PH¯P.ArJ-
Lnr p-r-ma:ar·_·n:=`, // numo-n ·r p-n-m-r-n-
··n-r M¬L--n-ms p-r-ma:ar·_-rr-y/¹=:.LL, // -nn-y ·r p-n-m-r-n-
·¡
Parameters
·ymo.l
[In] Name of a symbol, on data of whIch the IndIcator Is calculated. NULL means the current
symbol.
pari.j
[In] The value of the tImeframe can be one of values of the ENU|_TÌ|EFFA|ES enumeratIon, 0
means the current tImeframe.
inji·-:.r_ij
[In] ÌndIcator type, can be one of values of the ENU|_ÌN0ÌCATDF enumeratIon.
p-r-ma:ar·_·n:
[In] The number of parameters passed In the parameters_array[] array. The array elements have a
specIal structure type |qlParam. 8y default, zero · parameters are not passed. Ìf you specIfy a
non·zero number of parameters, the parameter pcrcmeters_crrcy Is oblIgatory. You can pass no
more than 256 parameters.
p-r-ma:ar·_-rr-y/¹=:.LL
[In] An array of |qlParam type, whose elements contaIn the type and value of each Input
parameter of a technIcal IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
Note
Ìf the IndIcator handle of ÌN0_CUSTD| type Is created, the type fIeld of the fIrst element of the
array of Input parameters pcrcmeters_crrcy must have the TYPE_STFÌNC value of the
ENU|_0ATATYPE enumeratIon, and the strìn¤_vclµe fIeld of the fIrst element must contaIn the
name of the custom IndIcator. The custom IndIcator must be compIled (fIle wIth EX5 extensIon) and
located In the dIrectory |0L5/ÌndIcators of the clIent termInal or In a subdIrectory.
Ìf the fIrst form of the call Is used In a custom IndIcator, you can addItIonally IndIcate as the last
parameter on what data It wIll be calculated when passIng Input parameters. Ìf the ¨Apply to¨
parameter Is not specIfIed explIcItly, the default calculatIon Is based on the PFÌCE_CLDSE values.
ExampIe:
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
498
v·LJ Jn¯r-nr.·

M¬L--n-m p-n-m-¯`¡
Lnr !_MA,!_MA.¯¡
//--- ·n--r- LMA.¨IJ-J¯¯¨,-I-PJ¯_M!¯,-,¨,MJ¯I_IMA,--P.I_.HJ¯I·¡
Ann-y---Lz-.p-n-m-,1·¡
//--- --r m-_p-nL·J
p-n-m-¯¨`.ryp- =r1-I_PHr¡
p-n-m-¯¨`.Lnr-j-n_v-Lu-=-¡
//--- --r m-_-!Lrr
p-n-m-¯!`.ryp- =r1-I_PHr¡
p-n-m-¯!`.Lnr-j-n_v-Lu-=¨¡
//--- --r m-_m-r!·J
p-n-m-¯``.ryp- =r1-I_PHr¡
p-n-m-¯``.Lnr-j-n_v-Lu-=MJ¯I_IMA¡
//--- --r -ppLL-J_pnL·-
p-n-m-¯``.ryp- =r1-I_PHr¡
p-n-m-¯``.Lnr-j-n_v-Lu-=--P.I_.HJ¯I¡
//--- ·n--r- MA
!_MA=PnJL·-r·n.n--r-.¨IJ-J¯¯¨,-I-PJ¯_M!¯,PH¯_MA,1,p-n-m-·¡
//--- ·n--r- LMA.¯.¨IJ-J¯¯¨,-I-PJ¯_M!¯,!`,`¯,-,!_MA·¡
Ann-y---Lz-.p-n-m-,1·¡
//--- --r r--r m-_p-nL·J
p-n-m-¯¨`.ryp- =r1-I_PHr¡
p-n-m-¯¨`.Lnr-j-n_v-Lu-=!`¡
//--- --r -L·. m-_p-nL·J
p-n-m-¯!`.ryp- =r1-I_PHr¡
p-n-m-¯!`.Lnr-j-n_v-Lu-=`¯¡
//--- --r -m··r! p-nL·J r·n JLrr-n-n·-
p-n-m-¯``.ryp- =r1-I_PHr¡
p-n-m-¯``.Lnr-j-n_v-Lu-=-¡
//--- --r LnJL·-r·n !-nJL- -- -ppLL-J_pnL·-
p-n-m-¯``.ryp- =r1-I_PHr¡
p-n-m-¯``.Lnr-j-n_v-Lu-=!_MA¡
//--- ·n--r- MA.¯ o---J ·n m·vLnj -v-n-j-
!_MA.¯=PnJL·-r·n.n--r-.¨IJ-J¯¯¨,-I-PJ¯_M!¯,PH¯_MA.¯,1,p-n-m-·¡
//--- u-- LnJL·-r·n-
//--- . . .
//--- n-L---- LnJL·-r·n- .rLn-r !_MA.¯·
PnJL·-r·n--L----.!_MA.¯·¡
PnJL·-r·n--L----.!_MA·¡
·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
499
IndIcatorPeIease
The functIon removes an IndIcator handle and release the calculatIon block of the IndIcator, If It's not
used by anyone else.
o··L PnJL·-r·n--L----.
Lnr inji·-:.r_n-njla, // LnJL·-r·n !-nJL-
·¡
Peturned vaIue
Feturns true In case of success, otherwIse returns false.
Note
The functIon allows removIng an IndIcator handle, If It's no longer needed, thus savIng memory. The
handle Is removed ImmedIately, the calculatIon block Is deleted In some tIme (If It's not called
anymore).
ExampIe:
//--------------------------------------------------------------------
// r--r_PnJL·-r·n--L----.m¬¯
// .·pynLj!r `¨!¨, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m¬L¯.··m
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨!¨, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨¨¨
//--- Lnpur p-n-m-r-n-
Lnpur Lnr MA_--nL·J=!¯¡
Lnpur Lnr MA_-!Lrr=¨¡
Lnpur IHJM_MA_MIr|J¯ MA_-m··r!=MJ¯I_¯MA¡
Lnpur IHJM_A--HPI¯_--P.I pnL·-=--P.I_.HJ¯I¡
//--- .LLL -r·n- LnJL·-r·n !-nJL-
Lnr MA_!-nJL-=PHVAHP¯_|AH¯HI¡
//--------------------------------------------------------------------
// Ixp-nr LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr JnPnLr.·

//--- ·n--r- LnJL·-r·n !-nJL-
MA_!-nJL-=LMA.¯ymo·L.·,¨,MA_--nL·J,MA_-!Lrr,MA_-m··r!,--P.I_.HJ¯I·¡
//--- J-L-r- jL·o-L v-nL-oL-
Lr.JL·o-LV-nL-oL-.!-·k.¨MA_v-Lu-¨··
JL·o-LV-nL-oL-¯-L.¨MA_v-Lu-¨·¡
//---
n-runn.¨·¡
·
//--------------------------------------------------------------------
// Ixp-nr rL·k run·rL·n
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
500
//--------------------------------------------------------------------
v·LJ JnrL·k.·

//--- Lr r!- jL·o-L v-nL-oL- v-Lu- J·-- n·r -xL-r
Lr..JL·o-LV-nL-oL-.!-·k.¨MA_v-Lu-¨··

//--- ·or-Ln r!- LnJL·-r·n v-Lu- Ln r!- L--r r.· o-n-
Lr.MA_!-nJL-.=PHVAHP¯_|AH¯HI·

//--- Jyn-mL· -nn-y r·n r!- LnJL·-r·n v-Lu--
J·uoL- v-Lu--¯`¡
Lr..·pyÐurr-n.MA_!-nJL-,¨,¨,`,v-Lu--·==` ss v-Lu--¯¨`.=IM-r1_VAHJI·

//--- n-m-mo-n Ln r!- jL·o-L v-nL-oL- v-Lu- ·n r!- L--r our ·n- o-n
Lr.JL·o-LV-nL-oL-¯-r.¨MA_v-Lu-¨,v-Lu--¯¨`··

//--- rn-- r!- !-nJL- ·r r!- LnJL·-r·n
Lr..PnJL·-r·n--L----.MA_!-nJL-··
-nLnr.¨PnJL·-r·n--L----.· r-LL-J. Inn·n ¨,J-rH--rInn·n.··¡
-L-- MA_!-nJL-=PHVAHP¯_|AH¯HI¡
·
-L--
-nLnr.¨JL·o-LV-nL-oL-¯-r r-LL-J. Inn·n ¨,J-rH--rInn·n.··¡
·
·
·
//---
·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
501
Copyßuffer
Cets data of a specIfIed buffer of a certaIn IndIcator In the necessary quantIty.
CountIng of elements of copIed data (IndIcator buffer wIth the Index buffer_num) from the startIng
posItIon Is performed from the present to the past, I.e., startIng posItIon of 0 means the current bar
(IndIcator value for the current bar).
When copyIng the yet unknown amount of data, It Is recommended to use a dynamIc array as a buffer
[] recIpIent buffer, because the Copy8uffer() functIon trIes to allocate the sIze of the receIvIng array
to the sIze of the copIed data. Ìf an IndIcator buffer (array that Is pre·allocated for storIng IndIcator
values by the SetÌndex8ufer() functIon) Is used as the buffer[] recIpIent array, partIal copyIng Is
allowed. An example can be found In the Awesome_DscIllator.mql5 custom IndIcator In the standard
termInal package.
Ìf you need to make a partIal copy of the IndIcator values Into another array (non·IndIcator buffer),
you should use an IntermedIate array, to whIch the desIred number Is copIed. After that conduct the
element·wIse copyIng of the requIred number of values Into the requIred places If a receIvIng array
from thIs IntermedIate one.
Ìf you know the amount of data you need to copy, It should better be done to a statIcally allocated
buffer, In order to prevent the allocatIon of excessIve memory.
No matter what Is the property of the target array · as_serIes=true or as_serIes=false. 0ata wIll be
copIed so that the oldest element wIll be located at the start of the physIcal memory allocated for the
array. There are J varIants of functIon calls.
CaII by the fIrst posItIon and the number of requIred eIements
Lnr .·pyÐurr-n.
Lnr inji·-:.r_n-njla, // LnJL·-r·n !-nJL-
Lnr o:ffar_n:m, // LnJL·-r·n ourr-n numo-n
Lnr ·:-r:_p.·, // -r-nr p·-LrL·n
Lnr ·.:n:, // -m·unr r· ··py
J·uoL- o:ffar/¹ // r-nj-r -nn-y r· ··py
·¡
CaII by the start date and the number of requIred eIements
Lnr .·pyÐurr-n.
Lnr inji·-:.r_n-njla, // LnJL·-r·n !-nJL-
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
502
Lnr o:ffar_n:m, // LnJL·-r·n ourr-n numo-n
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
Lnr ·.:n:, // -m·unr r· ··py
J·uoL- o:ffar/¹ // r-nj-r -nn-y r· ··py
·¡
CaII by the start and end dates of a requIred tIme IntervaI
Lnr .·pyÐurr-n.
Lnr inji·-:.r_n-njla, // LnJL·-r·n !-nJL-
Lnr o:ffar_n:m, // LnJL·-r·n ourr-n numo-n
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima, // -nJ J-r- -nJ rLm-
J·uoL- o:ffar/¹ // r-nj-r -nn-y r· ··py
·¡
Parameters
inji·-:.r_n-njla
[In] The IndIcator handle, returned by the correspondIng IndIcator functIon.
o:ffar_n:m
[In] The IndIcator buffer number.
·:-r:_p.·
[In] The posItIon of the fIrst element to copy.
·.:n:
[In] 0ata count to copy.
·:-r:_:ima
[In] 8ar tIme, correspondIng to the fIrst element.
·:.p_:ima
[In] 8ar tIme, correspondIng to the last element.
o:ffar/¹
[out] Array of double type.
Peturn VaIue
Feturns the copIed data count or ·1 In case of an error.
Note
Ìf the whole Interval of requested data Is out of the avaIlable data on the server, the functIon
returns ·1. Ìf data outsIde TEF|ÌNAL_|AX8AFS (maxImal number of bars on the chart) Is
requested, the functIon wIll also return ·1.
When requestIng data from the IndIcator, If requested tImeserIes are not yet buIlt or they need to
be downloaded from the server, the functIon wIll ImmedIately return ·1, but the process of
downloadIng/buIldIng wIll be InItIated.
When requestIng data from an Expert AdvIsor or scrIpt, downloadIng from the server wIll be
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
503
InItIated, If the termInal does not have these data locally, or buIldIng of a requIred tImeserIes wIll
start, If data can be buIlt from the local hIstory but they are not ready yet. The functIon wIll return
the amount of data that wIll be ready by the moment of tImeout expIratIon, but hIstory downloadIng
wIll contInue, and at the next sImIlar request the functIon wIll return more data.
When requestIng data In a specIfIed range of dates, only data from thIs Interval wIll be returned.
The Interval Is set and counted up to seconds. Ìt means, the open tIme of any bar, for whIch value
Is returned (volume, spread, value on the IndIcator buffer, prIces Dpen, HIgh, Low, Close or open
tIme TIme) Is always wIthIn the requested Interval.
Thus, If the current day Is Saturday, at the attempt to copy data on a week tImeframe specIfyIng
stcrt_tìme=Lcst_Tµesdcy and stop_tìme=Lcst_Frìdcy the functIon wIll return 0, because the open
tIme on a week tImeframe Is always Sunday, but one week bar does not fall Into the specIfIed
Interval.
Ìf you need to return value correspondIng to the current uncompleted bar, you can use the fIrst form
of call specIfyIng stcrt_pos=0 and coµnt=1.
ExampIe:
//--------------------------------------------------------------------
// r--r.·pyÐurr-n`.m¬¯
// .·pynLj!r `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m¬L¯.··m
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨¨¨
tpn·p-nry LnJL·-r·n_--p-n-r-_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- !
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r MA
tpn·p-nry LnJL·-r·n_L-o-L! ¨MA¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n! --J
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! !
//--- Lnpur p-n-m-r-n-
Lnpur o··L A-¯-nL--=rnu-¡
Lnpur Lnr p-nL·J=!¯¡
Lnpur IHJM_MA_MIr|J¯ -m··rM·J-=MJ¯I_IMA¡
Lnpur IHJM_A--HPI¯_--P.I pnL·-=--P.I_.HJ¯I¡
Lnpur Lnr -!Lrr=¨¡
//--- LnJL·-r·n ourr-n-
J·uoL- MAÐurr-n¯`¡
Lnr m-_!-nJL-¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr JnPnLr.·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
504

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,MAÐurr-n,PH¯P.ArJ-_¯ArA·¡
-nLnr.¨--n-m-r-n A-¯-nL-- = ¨,A-¯-nL--·¡
-nLnr.¨PnJL·-r·n ourr-n -rr-n ¯-rPnJ-xÐurr-n.· L- - rLm---nL-- = ¨,
Ann-yJ-rA-¯-nL--.MAÐurr-n··¡
//--- --r -!·nr LnJL·-r·n n-m-
PnJL·-r·n¯-r¯rnLnj.PH¯P.ArJ-_¯|J-rHAMI,¨MA.¨-p-nL·J-¨·¨-A-¯-nL--·¡
//--- --r A-¯-nL--.J-p-nJ-- rn·m Lnpur p-n-m-r-n·
Ann-y¯-rA-¯-nL--.MAÐurr-n,A-¯-nL--·¡
-nLnr.¨PnJL·-r·n ourr-n -rr-n Ann-y¯-rA-¯-nL--.MAÐurr-n,rnu-·¡ L- - rLm---nL-- = ¨,
Ann-yJ-rA-¯-nL--.MAÐurr-n··¡
//---
m-_!-nJL-=LMA.¯ymo·L.·,¨,p-nL·J,-!Lrr,-m··rM·J-,pnL·-·¡
n-runn.¨·¡
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm- srLm-¯`,
··n-r J·uoL- s·p-n¯`,
··n-r J·uoL- s!Lj!¯`,
··n-r J·uoL- sL·.¯`,
··n-r J·uoL- s·L·--¯`,
··n-r L·nj srL·k_v·Lum-¯`,
··n-r L·nj sv·Lum-¯`,
··n-r Lnr s-pn--J¯`·

//--- ·!-·k Lr -LL J-r- ·-L·uL-r-J
Lr.Ð-n-.-L·uL-r-J.m-_!-nJL-·<n-r--_r·r-L· n-runn.¨·¡
//--- .- ·-n ··py n·r -LL J-r-
Lnr r·_··py¡
Lr.pn-v_·-L·uL-r-Jn-r--_r·r-L pn-v_·-L·uL-r-J<=¨· r·_··py=n-r--_r·r-L¡
-L--

r·_··py=n-r--_r·r-L-pn-v_·-L·uL-r-J¡
//--- L--r v-Lu- L- -L.-y- ··pL-J
r·_··py--¡
·
//--- rny r· ··py
Lr..·pyÐurr-n.m-_!-nJL-,¨,¨,r·_··py,MAÐurr-n·<=¨· n-runn.¨·¡
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
//--------------------------------------------------------------------
The above example Illustrates how an IndIcator buffer Is fIlled out wIth the values of another IndIcator
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
505
buffer from the IndIcator on the same symbol/perIod.
See aIso
PropertIes of Custom ÌndIcators, SetÌndex8uffer
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
506
CopyPates
Cets hIstory data of |qlFates structure of a specIfIed symbol·perIod In specIfIed quantIty Into the
rates_array array. The elements orderIng of the copIed data Is from present to the past, I.e., startIng
posItIon of 0 means the current bar.
When copyIng the yet unknown amount of data, It Is recommended to use dynamIc array as a target
array, because If the requested data count Is less (or more) than the length of the target array,
functIon trIes to reallocate the memory so that the requested data fIt entIrely.
Ìf you know the amount of data you need to copy, It should better be done to a statIcally allocated
buffer, In order to prevent the allocatIon of excessIve memory.
No matter what Is the property of the target array · as_serIes=true or as_serIes=false. 0ata wIll be
copIed so that the oldest element wIll be located at the start of the physIcal memory allocated for the
array. There are J varIants of functIon calls.
CaII by the fIrst posItIon and the number of requIred eIements
Lnr .·py--r--.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
Lnr ·:-r:_p.·, // -r-nr p·-LrL·n
Lnr ·.:n:, // J-r- ··unr r· ··py
M¬L--r-- r-:a·_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
CaII by the start date and the number of requIred eIements
Lnr .·py--r--.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
Lnr ·.:n:, // J-r- ··unr r· ··py
M¬L--r-- r-:a·_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
CaII by the start and end dates of a requIred tIme IntervaI
Lnr .·py--r--.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
507
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima, // -nJ J-r- -nJ rLm-
M¬L--r-- r-:a·_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
Parameters
·ymo.l_n-ma
[In] Symbol name.
:imafr-ma
[In] PerIod.
·:-r:_:ima
[In] 8ar tIme for the fIrst element to copy.
·:-r:_p.·
[In] The start posItIon for the fIrst element to copy.
·.:n:
[In] 0ata count to copy.
·:.p_:ima
[In] 8ar tIme, correspondIng to the last element to copy.
r-:a·_-rr-y/¹
[out] Array of |qlFates type.
Peturn VaIue
Feturns the number of copIed elements or ·1 In case of an error.
Note
Ìf the whole Interval of requested data Is out of the avaIlable data on the server, the functIon
returns ·1. Ìf data outsIde TEF|ÌNAL_|AX8AFS (maxImal number of bars on the chart) Is
requested, the functIon wIll also return ·1.
When requestIng data from the IndIcator, If requested tImeserIes are not yet buIlt or they need to
be downloaded from the server, the functIon wIll ImmedIately return ·1, but the process of
downloadIng/buIldIng wIll be InItIated.
When requestIng data from an Expert AdvIsor or scrIpt, downloadIng from the server wIll be
InItIated, If the termInal does not have these data locally, or buIldIng of a requIred tImeserIes wIll
start, If data can be buIlt from the local hIstory but they are not ready yet. The functIon wIll return
the amount of data that wIll be ready by the moment of tImeout expIratIon, but hIstory downloadIng
wIll contInue, and at the next sImIlar request the functIon wIll return more data.
When requestIng data In a specIfIed range of dates, only data from thIs Interval wIll be returned.
The Interval Is set and counted up to seconds. Ìt means, the open tIme of any bar, for whIch value
Is returned (volume, spread, value on the IndIcator buffer, prIces Dpen, HIgh, Low, Close or open
tIme TIme) Is always wIthIn the requested Interval.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
508
Thus, If the current day Is Saturday, at the attempt to copy data on a week tImeframe specIfyIng
stcrt_tìme=Lcst_Tµesdcy and stop_tìme=Lcst_Frìdcy the functIon wIll return 0, because the open
tIme on a week tImeframe Is always Sunday, but one week bar does not fall Into the specIfIed
Interval.
Ìf you need to return value correspondIng to the current uncompleted bar, you can use the fIrst form
of call specIfyIng stcrt_pos=0 and coµnt=1.
ExampIe:
v·LJ Jn¯r-nr.·

//---
M¬L--r-- n-r--¯`¡
Ann-y¯-rA-¯-nL--.n-r--,rnu-·¡
Lnr ··pL-J=.·py--r--.¯ymo·L.·,¨,¨,!¨¨,n-r--·¡
Lr.··pL-J¨·

-nLnr.¨Ð-n- ··pL-J. ¨-··pL-J·¡
-rnLnj r·nm-r=¨·p-n = `J, !Lj! = `J, L·. = `J, ·L·-- = `J, v·Lum- = `J¨¡
-rnLnj ·ur¡
Lnr -Lz-=rmLn.··pL-J,!¨·¡
r·n.Lnr L=¨¡L<-Lz-¡L--·

·ur=L-¨.¨-rLm-r·¯rnLnj.n-r--¯L`.rLm-·¡
·ur=·ur-¨ ¨-¯rnLnj¯·nm-r.r·nm-r,
n-r--¯L`.·p-n,
n-r--¯L`.!Lj!,
n-r--¯L`.L·.,
n-r--¯L`.·L·--,
n-r--¯L`.rL·k_v·Lum-·¡
-nLnr.·ur·¡
·
·
-L-- -nLnr.¨¯-LL-J r· j-r !L-r·ny J-r- r·n r!- -ymo·L ¨,¯ymo·L.··¡
·
See aIso
Structures and Classes, TImeToStrIng, StrIngFormat
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
509
CopyTIme
The functIon gets to tIme_array hIstory data of bar openIng tIme for the specIfIed symbol·perIod paIr
In the specIfIed quantIty. Ìt should be noted that elements orderIng Is from present to past, I.e.,
startIng posItIon of 0 means the current bar.
When copyIng the yet unknown amount of data, It Is recommended to use dynamIc array as a target
array, because If the requested data count Is less (or more) than the length of the target array,
functIon trIes to reallocate the memory so that the requested data fIt entIrely.
Ìf you know the amount of data you need to copy, It should better be done to a statIcally allocated
buffer, In order to prevent the allocatIon of excessIve memory.
No matter what Is the property of the target array · as_serIes=true or as_serIes=false. 0ata wIll be
copIed so that the oldest element wIll be located at the start of the physIcal memory allocated for the
array. There are J varIants of functIon calls.
CaII by the fIrst posItIon and the number of requIred eIements
Lnr .·pyrLm-.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
Lnr ·:-r:_p.·, // -r-nr p·-LrL·n
Lnr ·.:n:, // J-r- ··unr r· ··py
J-r-rLm- :ima_-rr-y/¹ // r-nj-r -nn-y r· ··py ·p-n rLm--
·¡
CaII by the start date and the number of requIred eIements
Lnr .·pyrLm-.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
Lnr ·.:n:, // J-r- ··unr r· ··py
J-r-rLm- :ima_-rr-y/¹ // r-nj-r -nn-y r· ··py ·p-n rLm--
·¡
CaII by the start and end dates of a requIred tIme IntervaI
Lnr .·pyrLm-.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
510
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima, // -r·p J-r- -nJ rLm-
J-r-rLm- :ima_-rr-y/¹ // r-nj-r -nn-y r· ··py ·p-n rLm--
·¡
Parameters
·ymo.l_n-ma
[In] Symbol name.
:imafr-ma
[In] PerIod.
·:-r:_p.·
[In] The start posItIon for the fIrst element to copy.
·.:n:
[In] 0ata count to copy.
·:-r:_:ima
[In] The start tIme for the fIrst element to copy.
·:.p_:ima
[In] 8ar tIme correspondIng to the last element to copy.
:ima_-rr-y/¹
[out] Array of datetIme type.
Peturn VaIue
Feturns the copIed data count or ·1 In case of an error.
Note
Ìf the whole Interval of requested data Is out of the avaIlable data on the server, the functIon
returns ·1. Ìf data outsIde TEF|ÌNAL_|AX8AFS (maxImal number of bars on the chart) Is
requested, the functIon wIll also return ·1.
When requestIng data from the IndIcator, If requested tImeserIes are not yet buIlt or they need to
be downloaded from the server, the functIon wIll ImmedIately return ·1, but the process of
downloadIng/buIldIng wIll be InItIated.
When requestIng data from an Expert AdvIsor or scrIpt, downloadIng from the server wIll be
InItIated, If the termInal does not have these data locally, or buIldIng of a requIred tImeserIes wIll
start, If data can be buIlt from the local hIstory but they are not ready yet. The functIon wIll return
the amount of data that wIll be ready by the moment of tImeout expIratIon, but hIstory downloadIng
wIll contInue, and at the next sImIlar request the functIon wIll return more data.
When requestIng data In a specIfIed range of dates, only data from thIs Interval wIll be returned.
The Interval Is set and counted up to seconds. Ìt means, the open tIme of any bar, for whIch value
Is returned (volume, spread, value on the IndIcator buffer, prIces Dpen, HIgh, Low, Close or open
tIme TIme) Is always wIthIn the requested Interval.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
511
Thus, If the current day Is Saturday, at the attempt to copy data on a week tImeframe specIfyIng
stcrt_tìme=Lcst_Tµesdcy and stop_tìme=Lcst_Frìdcy the functIon wIll return 0, because the open
tIme on a week tImeframe Is always Sunday, but one week bar does not fall Into the specIfIed
Interval.
Ìf you need to return value correspondIng to the current uncompleted bar, you can use the fIrst form
of call specIfyIng stcrt_pos=0 and coµnt=1.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
512
CopyDpen
The functIon gets Into open_array the hIstory data of bar open prIces for the selected symbol·perIod
paIr In the specIfIed quantIty. Ìt should be noted that elements orderIng Is from present to past, I.e.,
startIng posItIon of 0 means the current bar.
When copyIng the yet unknown amount of data, It Is recommended to use dynamIc array as a target
array, because If the requested data count Is less (or more) than the length of the target array,
functIon trIes to reallocate the memory so that the requested data fIt entIrely.
Ìf you know the amount of data you need to copy, It should better be done to a statIcally allocated
buffer, In order to prevent the allocatIon of excessIve memory.
No matter what Is the property of the target array · as_serIes=true or as_serIes=false. 0ata wIll be
copIed so that the oldest element wIll be located at the start of the physIcal memory allocated for the
array. There are J varIants of functIon calls.
CaII by the fIrst posItIon and the number of requIred eIements
Lnr .·pyJp-n.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
Lnr ·:-r:_p.·, // -r-nr p·-LrL·n
Lnr ·.:n:, // J-r- ··unr r· ··py
J·uoL- .pan_-rr-y/¹ // r-nj-r -nn-y r· ··py ·p-n pnL·--
·¡
CaII by the start date and the number of requIred eIements
Lnr .·pyJp-n.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
Lnr ·.:n:, // J-r- ··unr r· ··py
J·uoL- .pan_-rr-y/¹ // r-nj-r -nn-y r·n o-n ·p-n pnL·--
·¡
CaII by the start and end dates of a requIred tIme IntervaI
Lnr .·pyJp-n.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
513
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima, // -r·p J-r- -nJ rLm-
J·uoL- .pan_-rr-y/¹ // r-nj-r -nn-y r·n o-n ·p-n v-Lu--
·¡
Parameters
·ymo.l_n-ma
[In] Symbol name.
:imafr-ma
[In] PerIod.
·:-r:_p.·
[In] The start posItIon for the fIrst element to copy.
·.:n:
[In] 0ata count to copy.
·:-r:_:ima
[In] The start tIme for the fIrst element to copy.
·:.p_:ima
[In] The start tIme for the last element to copy.
.pan_-rr-y/¹
[out] Array of double type.
Peturn VaIue
Feturns the number of element In the array or ·1 In case of an error.
Note
Ìf the whole Interval of requested data Is out of the avaIlable data on the server, the functIon
returns ·1. Ìf data outsIde TEF|ÌNAL_|AX8AFS (maxImal number of bars on the chart) Is
requested, the functIon wIll also return ·1.
When requestIng data from the IndIcator, If requested tImeserIes are not yet buIlt or they need to
be downloaded from the server, the functIon wIll ImmedIately return ·1, but the process of
downloadIng/buIldIng wIll be InItIated.
When requestIng data from an Expert AdvIsor or scrIpt, downloadIng from the server wIll be
InItIated, If the termInal does not have these data locally, or buIldIng of a requIred tImeserIes wIll
start, If data can be buIlt from the local hIstory but they are not ready yet. The functIon wIll return
the amount of data that wIll be ready by the moment of tImeout expIratIon, but hIstory downloadIng
wIll contInue, and at the next sImIlar request the functIon wIll return more data.
When requestIng data In a specIfIed range of dates, only data from thIs Interval wIll be returned.
The Interval Is set and counted up to seconds. Ìt means, the open tIme of any bar, for whIch value
Is returned (volume, spread, value on the IndIcator buffer, prIces Dpen, HIgh, Low, Close or open
tIme TIme) Is always wIthIn the requested Interval.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
514
Thus, If the current day Is Saturday, at the attempt to copy data on a week tImeframe specIfyIng
stcrt_tìme=Lcst_Tµesdcy and stop_tìme=Lcst_Frìdcy the functIon wIll return 0, because the open
tIme on a week tImeframe Is always Sunday, but one week bar does not fall Into the specIfIed
Interval.
Ìf you need to return value correspondIng to the current uncompleted bar, you can use the fIrst form
of call specIfyIng stcrt_pos=0 and coµnt=1.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
515
CopyHIgh
The functIon gets Into hIgh_array the hIstory data of hIghest bar prIces for the selected symbol·perIod
paIr In the specIfIed quantIty. Ìt should be noted that elements orderIng Is from present to past, I.e.,
startIng posItIon of 0 means the current bar.
When copyIng the yet unknown amount of data, It Is recommended to use dynamIc array as a target
array, because If the requested data count Is less (or more) than the length of the target array,
functIon trIes to reallocate the memory so that the requested data fIt entIrely.
Ìf you know the amount of data you need to copy, It should better be done to a statIcally allocated
buffer, In order to prevent the allocatIon of excessIve memory.
No matter what Is the property of the target array · as_serIes=true or as_serIes=false. 0ata wIll be
copIed so that the oldest element wIll be located at the start of the physIcal memory allocated for the
array. There are J varIants of functIon calls.
CaII by the fIrst posItIon and the number of requIred eIements
Lnr .·py|Lj!.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
Lnr ·:-r:_p.·, // -r-nr p·-LrL·n
Lnr ·.:n:, // J-r- ··unr r· ··py
J·uoL- nijn_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
CaII by the start date and the number of requIred eIements
Lnr .·py|Lj!.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
Lnr ·.:n:, // J-r- ··unr r· ··py
J·uoL- nijn_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
CaII by the start and end dates of a requIred tIme IntervaI
Lnr .·py|Lj!.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
516
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima, // -r·p J-r- -nJ rLm-
J·uoL- nijn_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
Parameters
·ymo.l_n-ma
[In] Symbol name.
:imafr-ma
[In] PerIod.
·:-r:_p.·
[In] The start posItIon for the fIrst element to copy.
·.:n:
[In] 0ata count to copy.
·:-r:_:ima
[In] The start tIme for the fIrst element to copy.
·:.p_:ima
[In] 8ar tIme, correspondIng to the last element to copy.
nijn_-rr-y/¹
[out] Array of double type.
Peturn VaIue
Feturns the copIed data count or ·1 In case of an error.
Note
Ìf the whole Interval of requested data Is out of the avaIlable data on the server, the functIon
returns ·1. Ìf data outsIde TEF|ÌNAL_|AX8AFS (maxImal number of bars on the chart) Is
requested, the functIon wIll also return ·1.
When requestIng data from the IndIcator, If requested tImeserIes are not yet buIlt or they need to
be downloaded from the server, the functIon wIll ImmedIately return ·1, but the process of
downloadIng/buIldIng wIll be InItIated.
When requestIng data from an Expert AdvIsor or scrIpt, downloadIng from the server wIll be
InItIated, If the termInal does not have these data locally, or buIldIng of a requIred tImeserIes wIll
start, If data can be buIlt from the local hIstory but they are not ready yet. The functIon wIll return
the amount of data that wIll be ready by the moment of tImeout expIratIon, but hIstory downloadIng
wIll contInue, and at the next sImIlar request the functIon wIll return more data.
When requestIng data In a specIfIed range of dates, only data from thIs Interval wIll be returned.
The Interval Is set and counted up to seconds. Ìt means, the open tIme of any bar, for whIch value
Is returned (volume, spread, value on the IndIcator buffer, prIces Dpen, HIgh, Low, Close or open
tIme TIme) Is always wIthIn the requested Interval.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
517
Thus, If the current day Is Saturday, at the attempt to copy data on a week tImeframe specIfyIng
stcrt_tìme=Lcst_Tµesdcy and stop_tìme=Lcst_Frìdcy the functIon wIll return 0, because the open
tIme on a week tImeframe Is always Sunday, but one week bar does not fall Into the specIfIed
Interval.
Ìf you need to return value correspondIng to the current uncompleted bar, you can use the fIrst form
of call specIfyIng stcrt_pos=0 and coµnt=1.
ExampIe:
tpn·p-nry ··pynLj!r ¨`¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨¨¨
tpn·p-nry J--·nLprL·n ¨An -x-mpL- r·n ·urpur ·r r!- |Lj!¯L` -nJ H·.¯L`¨
tpn·p-nry J--·nLprL·n ¨r·n - n-nJ·m ·!·--n o-n-¨
J·uoL- |Lj!¯`,H·.¯`¡
//--------------------------------------------------------------------
// J-r H·. r·n -p-·LrL-J o-n LnJ-x
//--------------------------------------------------------------------
J·uoL- LH·..-rnLnj -ymo·L,IHJM_rPMI¯-AMI¯ rLm-rn-m-,Lnr LnJ-x·

J·uoL- L·.=¨¡
Ann-y¯-rA-¯-nL--.H·.,rnu-·¡
Lnr ··pL-J=.·pyH·..-ymo·L,rLm-rn-m-,¨,Ð-n-.-ymo·L,rLm-rn-m-·,H·.·¡
Lr.··pL-J¨ ss LnJ-x<··pL-J· L·.=H·.¯LnJ-x`¡
n-runn.L·.·¡
·
//--------------------------------------------------------------------
// J-r r!- |Lj! r·n -p-·LrL-J o-n LnJ-x
//--------------------------------------------------------------------
J·uoL- L|Lj!.-rnLnj -ymo·L,IHJM_rPMI¯-AMI¯ rLm-rn-m-,Lnr LnJ-x·

J·uoL- !Lj!=¨¡
Ann-y¯-rA-¯-nL--.|Lj!,rnu-·¡
Lnr ··pL-J=.·py|Lj!.-ymo·L,rLm-rn-m-,¨,Ð-n-.-ymo·L,rLm-rn-m-·,|Lj!·¡
Lr.··pL-J¨ ss LnJ-x<··pL-J· !Lj!=|Lj!¯LnJ-x`¡
n-runn.!Lj!·¡
·
//--------------------------------------------------------------------
// Ixp-nr rL·k run·rL·n
//--------------------------------------------------------------------
v·LJ JnrL·k.·

//--- -r --·! rL·k .- ·urpur r!- |Lj! -nJ H·. v-Lu-- r·n r!- o-n .Lr! LnJ-x,
//--- -¬u-L ·r r!- rL·k --··nJ
J-r-rLm- r=rLm-.unn-nr.·¡
Lnr --·=r`¯¨¡
pnLnrr.¨|Lj!¯`J` = `J H·.¯`J` = `J¨,
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
518
--·,L|Lj!.¯ymo·L.·,¨,--··,
--·,LH·..¯ymo·L.·,¨,--···¡
·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
519
CopyLow
The functIon gets Into low_array the hIstory data of mInImal bar prIces for the selected symbol·perIod
paIr In the specIfIed quantIty. Ìt should be noted that elements orderIng Is from present to past, I.e.,
startIng posItIon of 0 means the current bar.
When copyIng the yet unknown amount of data, It Is recommended to use dynamIc array as a target
array, because If the requested data count Is less (or more) than the length of the target array,
functIon trIes to reallocate the memory so that the requested data fIt entIrely.
Ìf you know the amount of data you need to copy, It should better be done to a statIcally allocated
buffer, In order to prevent the allocatIon of excessIve memory.
No matter what Is the property of the target array · as_serIes=true or as_serIes=false. 0ata wIll be
copIed so that the oldest element wIll be located at the start of the physIcal memory allocated for the
array. There are J varIants of functIon calls.
CaII by the fIrst posItIon and the number of requIred eIements
Lnr .·pyH·..
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
Lnr ·:-r:_p.·, // -r-nr p·-LrL·n
Lnr ·.:n:, // J-r- ··unr r· ··py
J·uoL- l.v_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
CaII by the start date and the number of requIred eIements
Lnr .·pyH·..
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
Lnr ·.:n:, // J-r- ··unr r· ··py
J·uoL- l.v_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
CaII by the start and end dates of a requIred tIme IntervaI
Lnr .·pyH·..
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
520
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima, // -r·p J-r- -nJ rLm-
J·uoL- l.v_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
Parameters
·ymo.l_n-ma
[In] Symbol.
:imafr-ma
[In] PerIod.
·:-r:_p.·
[In] The start posItIon for the fIrst element to copy.
·.:n:
[In] 0ata count to copy.
·:-r:_:ima
[In] 8ar tIme, correspondIng to the fIrst element to copy.
·:.p_:ima
[In] 8ar tIme, correspondIng to the last element to copy.
l.v_-rr-y/¹
[out] Array of double type.
Peturn VaIue
Feturns the copIed data count or ·1 In case of an error.
Note
Ìf the whole Interval of requested data Is out of the avaIlable data on the server, the functIon
returns ·1. Ìf data outsIde TEF|ÌNAL_|AX8AFS (maxImal number of bars on the chart) Is
requested, the functIon wIll also return ·1.
When requestIng data from the IndIcator, If requested tImeserIes are not yet buIlt or they need to
be downloaded from the server, the functIon wIll ImmedIately return ·1, but the process of
downloadIng/buIldIng wIll be InItIated.
When requestIng data from an Expert AdvIsor or scrIpt, downloadIng from the server wIll be
InItIated, If the termInal does not have these data locally, or buIldIng of a requIred tImeserIes wIll
start, If data can be buIlt from the local hIstory but they are not ready yet. The functIon wIll return
the amount of data that wIll be ready by the moment of tImeout expIratIon, but hIstory downloadIng
wIll contInue, and at the next sImIlar request the functIon wIll return more data.
When requestIng data In a specIfIed range of dates, only data from thIs Interval wIll be returned.
The Interval Is set and counted up to seconds. Ìt means, the open tIme of any bar, for whIch value
Is returned (volume, spread, value on the IndIcator buffer, prIces Dpen, HIgh, Low, Close or open
tIme TIme) Is always wIthIn the requested Interval.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
521
Thus, If the current day Is Saturday, at the attempt to copy data on a week tImeframe specIfyIng
stcrt_tìme=Lcst_Tµesdcy and stop_tìme=Lcst_Frìdcy the functIon wIll return 0, because the open
tIme on a week tImeframe Is always Sunday, but one week bar does not fall Into the specIfIed
Interval.
Ìf you need to return value correspondIng to the current uncompleted bar, you can use the fIrst form
of call specIfyIng stcrt_pos=0 and coµnt=1.
See aIso
CopyHIgh
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
522
CopyCIose
The functIon gets Into close_array the hIstory data of bar close prIces for the selected symbol·perIod
paIr In the specIfIed quantIty. Ìt should be noted that elements orderIng Is from present to past, I.e.,
startIng posItIon of 0 means the current bar.
When copyIng the yet unknown amount of data, It Is recommended to use dynamIc array as a target
array, because If the requested data count Is less (or more) than the length of the target array,
functIon trIes to reallocate the memory so that the requested data fIt entIrely.
Ìf you know the amount of data you need to copy, It should better be done to a statIcally allocated
buffer, In order to prevent the allocatIon of excessIve memory.
No matter what Is the property of the target array · as_serIes=true or as_serIes=false. 0ata wIll be
copIed so that the oldest element wIll be located at the start of the physIcal memory allocated for the
array. There are J varIants of functIon calls.
CaII by the fIrst posItIon and the number of requIred eIements
Lnr .·py.L·--.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
Lnr ·:-r:_p.·, // -r-nr p·-LrL·n
Lnr ·.:n:, // J-r- ··unr r· ··py
J·uoL- ·l.·a_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
CaII by the start date and the number of requIred eIements
Lnr .·py.L·--.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
Lnr ·.:n:, // J-r- ··unr r· ··py
J·uoL- ·l.·a_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
CaII by the start and end dates of a requIred tIme IntervaI
Lnr .·py.L·--.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
523
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima, // -r·p J-r- -nJ rLm-
J·uoL- ·l.·a_-rr-y/¹ // r-nj-r -nn-y r· ··py
·¡
Parameters
·ymo.l_n-ma
[In] Symbol name.
:imafr-ma
[In] PerIod.
·:-r:_p.·
[In] The start posItIon for the fIrst element to copy.
·.:n:
[In] 0ata count to copy.
·:-r:_:ima
[In] The start tIme for the fIrst element to copy.
·:.p_:ima
[In] 8ar tIme, correspondIng to the last element to copy.
·l.·a_-rr-y/¹
[out] Array of double type.
Peturn VaIue
Feturns the copIed data count or ·1 In case of an error.
Note
Ìf the whole Interval of requested data Is out of the avaIlable data on the server, the functIon
returns ·1. Ìf data outsIde TEF|ÌNAL_|AX8AFS (maxImal number of bars on the chart) Is
requested, the functIon wIll also return ·1.
When requestIng data from the IndIcator, If requested tImeserIes are not yet buIlt or they need to
be downloaded from the server, the functIon wIll ImmedIately return ·1, but the process of
downloadIng/buIldIng wIll be InItIated.
When requestIng data from an Expert AdvIsor or scrIpt, downloadIng from the server wIll be
InItIated, If the termInal does not have these data locally, or buIldIng of a requIred tImeserIes wIll
start, If data can be buIlt from the local hIstory but they are not ready yet. The functIon wIll return
the amount of data that wIll be ready by the moment of tImeout expIratIon, but hIstory downloadIng
wIll contInue, and at the next sImIlar request the functIon wIll return more data.
When requestIng data In a specIfIed range of dates, only data from thIs Interval wIll be returned.
The Interval Is set and counted up to seconds. Ìt means, the open tIme of any bar, for whIch value
Is returned (volume, spread, value on the IndIcator buffer, prIces Dpen, HIgh, Low, Close or open
tIme TIme) Is always wIthIn the requested Interval.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
524
Thus, If the current day Is Saturday, at the attempt to copy data on a week tImeframe specIfyIng
stcrt_tìme=Lcst_Tµesdcy and stop_tìme=Lcst_Frìdcy the functIon wIll return 0, because the open
tIme on a week tImeframe Is always Sunday, but one week bar does not fall Into the specIfIed
Interval.
Ìf you need to return value correspondIng to the current uncompleted bar, you can use the fIrst form
of call specIfyIng stcrt_pos=0 and coµnt=1.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
525
CopyTIckVoIume
The functIon gets Into volume_array the hIstory data of tIck volumes for the selected symbol·perIod
paIr In the specIfIed quantIty. Ìt should be noted that elements orderIng Is from present to past, I.e.,
startIng posItIon of 0 means the current bar.
When copyIng the yet unknown amount of data, It Is recommended to use dynamIc array as a target
array, because If the requested data count Is less (or more) than the length of the target array,
functIon trIes to reallocate the memory so that the requested data fIt entIrely.
Ìf you know the amount of data you need to copy, It should better be done to a statIcally allocated
buffer, In order to prevent the allocatIon of excessIve memory.
No matter what Is the property of the target array · as_serIes=true or as_serIes=false. 0ata wIll be
copIed so that the oldest element wIll be located at the start of the physIcal memory allocated for the
array. There are J varIants of functIon calls.
CaII by the fIrst posItIon and the number of requIred eIements
Lnr .·pyrL·kV·Lum-.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
Lnr ·:-r:_p.·, // -r-nr p·-LrL·n
Lnr ·.:n:, // J-r- ··unr r· ··py
L·nj v.l:ma_-rr-y/¹ // r-nj-r -nn-y r·n rL·k v·Lum--
·¡
CaII by the start date and the number of requIred eIements
Lnr .·pyrL·kV·Lum-.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
Lnr ·.:n:, // J-r- ··unr r· ··py
L·nj v.l:ma_-rr-y/¹ // r-nj-r -nn-y r·n rL·k v·Lum--
·¡
CaII by the start and end dates of a requIred tIme IntervaI
Lnr .·pyrL·kV·Lum-.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
526
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima, // -r·p J-r- -nJ rLm-
L·nj v.l:ma_-rr-y/¹ // r-nj-r -nn-y r·n rL·k v·Lum--
·¡
Parameters
·ymo.l_n-ma
[In] Symbol name.
:imafr-ma
[In] PerIod.
·:-r:_p.·
[In] The start posItIon for the fIrst element to copy.
·.:n:
[In] 0ata count to copy.
·:-r:_:ima
[In] The start tIme for the fIrst element to copy.
·:.p_:ima
[In] 8ar tIme, correspondIng to the last element to copy..
v.l:ma_-rr-y/¹
[out] Array of long type.
Peturn VaIue
Feturns the copIed data count or ·1 In case of an error.
Note
Ìf the whole Interval of requested data Is out of the avaIlable data on the server, the functIon
returns ·1. Ìf data outsIde TEF|ÌNAL_|AX8AFS (maxImal number of bars on the chart) Is
requested, the functIon wIll also return ·1.
When requestIng data from the IndIcator, If requested tImeserIes are not yet buIlt or they need to
be downloaded from the server, the functIon wIll ImmedIately return ·1, but the process of
downloadIng/buIldIng wIll be InItIated.
When requestIng data from an Expert AdvIsor or scrIpt, downloadIng from the server wIll be
InItIated, If the termInal does not have these data locally, or buIldIng of a requIred tImeserIes wIll
start, If data can be buIlt from the local hIstory but they are not ready yet. The functIon wIll return
the amount of data that wIll be ready by the moment of tImeout expIratIon, but hIstory downloadIng
wIll contInue, and at the next sImIlar request the functIon wIll return more data.
When requestIng data In a specIfIed range of dates, only data from thIs Interval wIll be returned.
The Interval Is set and counted up to seconds. Ìt means, the open tIme of any bar, for whIch value
Is returned (volume, spread, value on the IndIcator buffer, prIces Dpen, HIgh, Low, Close or open
tIme TIme) Is always wIthIn the requested Interval.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
527
Thus, If the current day Is Saturday, at the attempt to copy data on a week tImeframe specIfyIng
stcrt_tìme=Lcst_Tµesdcy and stop_tìme=Lcst_Frìdcy the functIon wIll return 0, because the open
tIme on a week tImeframe Is always Sunday, but one week bar does not fall Into the specIfIed
Interval.
Ìf you need to return value correspondIng to the current uncompleted bar, you can use the fIrst form
of call specIfyIng stcrt_pos=0 and coµnt=1.
ExampIe:
tpn·p-nry LnJL·-r·n_--p-n-r-_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- !
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r rL·kV·Lum-
tpn·p-nry LnJL·-r·n_L-o-L! ¨rL·kV·Lum-¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_|P¯rJJ-AM
tpn·p-nry LnJL·-r·n_··L·n! .'!1`,!--,!`-'
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! !
//--- Lnpur p-n-m-r-n-
Lnpur Lnr o-n-=`¨¨¨¡
//--- LnJL·-r·n ourr-n-
J·uoL- rL·kV·Lum-Ðurr-n¯`¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,rL·kV·Lum-Ðurr-n,PH¯P.ArJ-_¯ArA·¡
PnJL·-r·n¯-rPnr-j-n.PH¯P.ArJ-_¯PJPr¯,¨·¡
//---
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm- srLm-¯`,
··n-r J·uoL- s·p-n¯`,
··n-r J·uoL- s!Lj!¯`,
··n-r J·uoL- sL·.¯`,
··n-r J·uoL- s·L·--¯`,
··n-r L·nj srL·k_v·Lum-¯`,
··n-r L·nj sv·Lum-¯`,
··n-r Lnr s-pn--J¯`·

//---
Lr.pn-v_·-L·uL-r-J==¨·

Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
528
L·nj rLm---nL--¯`¡
Ann-y¯-rA-¯-nL--.rLm---nL--,rnu-·¡
Lnr pnL·--=.·pyrL·kV·Lum-.¯ymo·L.·,¨,¨,o-n-,rLm---nL--·¡
r·n.Lnr L=¨¡L<n-r--_r·r-L-pnL·--¡L--· rL·kV·Lum-Ðurr-n¯L`=¨.¨¡
r·n.Lnr L=¨¡L<pnL·--¡L--· rL·kV·Lum-Ðurr-n¯n-r--_r·r-L-!-L`=rLm---nL--¯pnL·---!-L`¡
-nLnr.¨W- !-v- n-·-Lv-J r!- r·LL·.Lnj numo-n ·r rL·kV·Lum- v-Lu--. ¨-pnL·--·¡
·
-L--

L·nj rLm---nL--¯`¡
Lnr pnL·--=.·pyrL·kV·Lum-.¯ymo·L.·,¨,¨,!,rLm---nL--·¡
rL·kV·Lum-Ðurr-n¯n-r--_r·r-L-!`=rLm---nL--¯¨`¡
·
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
529
CopyPeaIVoIume
The functIon gets Into volume_array the hIstory data of trade volumes for the selected symbol·perIod
paIr In the specIfIed quantIty. Ìt should be noted that elements orderIng Is from present to past, I.e.,
startIng posItIon of 0 means the current bar.
When copyIng the yet unknown amount of data, It Is recommended to use dynamIc array as a target
array, because If the requested data count Is less (or more) than the length of the target array,
functIon trIes to reallocate the memory so that the requested data fIt entIrely.
Ìf you know the amount of data you need to copy, It should better be done to a statIcally allocated
buffer, In order to prevent the allocatIon of excessIve memory.
No matter what Is the property of the target array · as_serIes=true or as_serIes=false. 0ata wIll be
copIed so that the oldest element wIll be located at the start of the physIcal memory allocated for the
array. There are J varIants of functIon calls.
CaII by the fIrst posItIon and the number of requIred eIements
Lnr .·py---LV·Lum-.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
Lnr ·:-r:_p.·, // -r-nr p·-LrL·n
Lnr ·.:n:, // J-r- ··unr r· ··py
L·nj v.l:ma_-rr-y/¹ // r-nj-r -nn-y r·n v·Lum-- v-Lu--
·¡
CaII by the start date and the number of requIred eIements
Lnr .·py---LV·Lum-.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
Lnr ·.:n:, // J-r- ··unr r· ··py
L·nj v.l:ma_-rr-y/¹ // r-nj-r -nn-y r·n v·Lum-- v-Lu--
·¡
CaII by the start and end dates of a requIred tIme IntervaI
Lnr .·py---LV·Lum-.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
530
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima, // -r·p J-r- -nJ rLm-
L·nj v.l:ma_-rr-y/¹ // r-nj-r -nn-y r·n v·Lum-- v-Lu--
·¡
Parameters
·ymo.l_n-ma
[In] Symbol name.
:imafr-ma
[In] PerIod.
·:-r:_p.·
[In] The start posItIon for the fIrst element to copy.
·.:n:
[In] 0ata count to copy.
·:-r:_:ima
[In] The start tIme for the fIrst element to copy.
·:.p_:ima
[In] 8ar tIme, correspondIng to the last element to copy.
v.l:ma_-rr-y/¹
[out] Array of long type.
Peturn VaIue
Feturns the copIed data count or ·1 In the case of error.
Note
Ìf the whole Interval of requested data Is out of the avaIlable data on the server, the functIon
returns ·1. Ìf data outsIde TEF|ÌNAL_|AX8AFS (maxImal number of bars on the chart) Is
requested, the functIon wIll also return ·1.
When requestIng data from the IndIcator, If requested tImeserIes are not yet buIlt or they need to
be downloaded from the server, the functIon wIll ImmedIately return ·1, but the process of
downloadIng/buIldIng wIll be InItIated.
When requestIng data from an Expert AdvIsor or scrIpt, downloadIng from the server wIll be
InItIated, If the termInal does not have these data locally, or buIldIng of a requIred tImeserIes wIll
start, If data can be buIlt from the local hIstory but they are not ready yet. The functIon wIll return
the amount of data that wIll be ready by the moment of tImeout expIratIon, but hIstory downloadIng
wIll contInue, and at the next sImIlar request the functIon wIll return more data.
When requestIng data In a specIfIed range of dates, only data from thIs Interval wIll be returned.
The Interval Is set and counted up to seconds. Ìt means, the open tIme of any bar, for whIch value
Is returned (volume, spread, value on the IndIcator buffer, prIces Dpen, HIgh, Low, Close or open
tIme TIme) Is always wIthIn the requested Interval.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
531
Thus, If the current day Is Saturday, at the attempt to copy data on a week tImeframe specIfyIng
stcrt_tìme=Lcst_Tµesdcy and stop_tìme=Lcst_Frìdcy the functIon wIll return 0, because the open
tIme on a week tImeframe Is always Sunday, but one week bar does not fall Into the specIfIed
Interval.
Ìf you need to return value correspondIng to the current uncompleted bar, you can use the fIrst form
of call specIfyIng stcrt_pos=0 and coµnt=1.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
532
CopySpread
The functIon gets Into spread_array the hIstory data of spread values for the selected symbol·perIod
paIr In the specIfIed quantIty. Ìt should be noted that elements orderIng Is from present to past, I.e.,
startIng posItIon of 0 means the current bar.
When copyIng the yet unknown amount of data, It Is recommended to use dynamIc array as a target
array, because If the requested data count Is less (or more) than the length of the target array,
functIon trIes to reallocate the memory so that the requested data fIt entIrely.
Ìf you know the amount of data you need to copy, It should better be done to a statIcally allocated
buffer, In order to prevent the allocatIon of excessIve memory.
No matter what Is the property of the target array · as_serIes=true or as_serIes=false. 0ata wIll be
copIed so that the oldest element wIll be located at the start of the physIcal memory allocated for the
array. There are J varIants of functIon calls.
CaII by the fIrst posItIon and the number of requIred eIements
Lnr .·py¯pn--J.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
Lnr ·:-r:_p.·, // -r-nr p·-LrL·n
Lnr ·.:n:, // J-r- ··unr r· ··py
Lnr ·pra-j_-rr-y/¹ // r-nj-r -nn-y r·n -pn--J v-Lu--
·¡
CaII by the start date and the number of requIred eIements
Lnr .·py¯pn--J.
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
Lnr ·.:n:, // J-r- ··unr r· ··py
Lnr ·pra-j_-rr-y/¹ // r-nj-r -nn-y r·n -pn--J v-Lu--
·¡
CaII by the start and end dates of a requIred tIme IntervaI
Lnr .·py¯pn--J.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
533
-rnLnj ·ymo.l_n-ma, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma, // p-nL·J
J-r-rLm- ·:-r:_:ima, // -r-nr J-r- -nJ rLm-
J-r-rLm- ·:.p_:ima, // -r·p J-r- -nJ rLm-
Lnr ·pra-j_-rr-y/¹ // r-nj-r -nn-y r·n -pn--J v-Lu--
·¡
Parameters
·ymo.l_n-ma
[In] Symbol name.
:imafr-ma
[In] PerIod.
·:-r:_p.·
[In] The start posItIon for the fIrst element to copy.
·.:n:
[In] 0ata count to copy.
·:-r:_:ima
[In] The start tIme for the fIrst element to copy.
·:.p_:ima
[In] 8ar tIme, correspondIng to the last element to copy.
·pra-j_-rr-y/¹
[out] Array of Int type.
Peturn VaIue
Feturns the copIed data count or ·1 In case of an error.
Note
Ìf the whole Interval of requested data Is out of the avaIlable data on the server, the functIon
returns ·1. Ìf data outsIde TEF|ÌNAL_|AX8AFS (maxImal number of bars on the chart) Is
requested, the functIon wIll also return ·1.
When requestIng data from the IndIcator, If requested tImeserIes are not yet buIlt or they need to
be downloaded from the server, the functIon wIll ImmedIately return ·1, but the process of
downloadIng/buIldIng wIll be InItIated.
When requestIng data from an Expert AdvIsor or scrIpt, downloadIng from the server wIll be
InItIated, If the termInal does not have these data locally, or buIldIng of a requIred tImeserIes wIll
start, If data can be buIlt from the local hIstory but they are not ready yet. The functIon wIll return
the amount of data that wIll be ready by the moment of tImeout expIratIon, but hIstory downloadIng
wIll contInue, and at the next sImIlar request the functIon wIll return more data.
When requestIng data In a specIfIed range of dates, only data from thIs Interval wIll be returned.
The Interval Is set and counted up to seconds. Ìt means, the open tIme of any bar, for whIch value
Is returned (volume, spread, value on the IndIcator buffer, prIces Dpen, HIgh, Low, Close or open
tIme TIme) Is always wIthIn the requested Interval.
Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
534
Thus, If the current day Is Saturday, at the attempt to copy data on a week tImeframe specIfyIng
stcrt_tìme=Lcst_Tµesdcy and stop_tìme=Lcst_Frìdcy the functIon wIll return 0, because the open
tIme on a week tImeframe Is always Sunday, but one week bar does not fall Into the specIfIed
Interval.
Ìf you need to return value correspondIng to the current uncompleted bar, you can use the fIrst form
of call specIfyIng stcrt_pos=0 and coµnt=1.
ExampIe:
tpn·p-nry LnJL·-r·n_--p-n-r-_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- !
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r ¯pn--J
tpn·p-nry LnJL·-r·n_L-o-L! ¨¯pn--J¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_|P¯rJJ-AM
tpn·p-nry LnJL·-r·n_··L·n! --J
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! !
//--- Lnpur p-n-m-r-n-
Lnpur Lnr o-n-=`¨¨¨¡
//--- LnJL·-r·n ourr-n-
J·uoL- ¯pn--JÐurr-n¯`¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,¯pn--JÐurr-n,PH¯P.ArJ-_¯ArA·¡
PnJL·-r·n¯-rPnr-j-n.PH¯P.ArJ-_¯PJPr¯,¨·¡
//---
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm- srLm-¯`,
··n-r J·uoL- s·p-n¯`,
··n-r J·uoL- s!Lj!¯`,
··n-r J·uoL- sL·.¯`,
··n-r J·uoL- s·L·--¯`,
··n-r L·nj srL·k_v·Lum-¯`,
··n-r L·nj sv·Lum-¯`,
··n-r Lnr s-pn--J¯`·

//---
Lr.pn-v_·-L·uL-r-J==¨·

Timeseries and Indicators Access
© 2000·2010, |eta0uotes Software Corp.
535
Lnr -pn--J_Lnr¯`¡
Ann-y¯-rA-¯-nL--.-pn--J_Lnr,rnu-·¡
Lnr -pn--J-=.·py¯pn--J.¯ymo·L.·,¨,¨,o-n-,-pn--J_Lnr·¡
-nLnr.¨W- !-v- n-·-Lv-J r!- r·LL·.Lnj numo-n ·r ¯pn--J v-Lu--. ¨,-pn--J-·¡
r·n .Lnr L=¨¡L<-pn--J-¡L--·

¯pn--JÐurr-n¯n-r--_r·r-L-!-L`=-pn--J_Lnr¯L`¡
Lr.L<=`¨· -nLnr.¨-pn--J¯¨-L-¨` = ¨,-pn--J_Lnr¯L`·¡
·
·
-L--

J·uoL- A-k,ÐLJ¡
A-k=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_A¯··¡
ÐLJ=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
.·mm-nr.¨A-k = ¨,A-k,¨ ÐLJ = ¨,ÐLJ·¡
¯pn--JÐurr-n¯n-r--_r·r-L-!`=.A-k-ÐLJ·/-·Lnr.·¡
·
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
536
Chart DperatIons
These are functIons for workIng wIth charts. All chart operatIons are allowed In Expert AdvIsors and
scrIpts only.
FunctIon ActIon
ChartApplyTemplate ApplIes a specIfIc template from a specIfIed fIle
to the chart
ChartWIndowFInd Feturns the number of a subwIndow where an
IndIcator Is drawn
ChartDpen Dpens a new chart wIth the specIfIed symbol
and perIod
ChartClose Closes the specIfIed chart
ChartFIrst Feturns the Ì0 of the fIrst chart of the clIent
termInal
ChartNext Feturns the chart Ì0 of the chart next to the
specIfIed one
ChartSymbol Feturns the symbol name of the specIfIed chart
ChartPerIod Feturns the perIod value of the specIfIed chart
ChartFedraw Calls a forced redrawIng of a specIfIed chart
ChartSet0ouble Sets the double value for a correspondIng
property of the specIfIed chart
ChartSetÌnteger Sets the Integer value (datetIme, Int, color,
bool or char) for a correspondIng property of
the specIfIed chart
ChartSetStrIng Sets the strIng valuefor a correspondIng
property of the specIfIed chart
ChartCet0ouble Feturns the double value property of the
specIfIed chart
ChartCetÌnteger Feturns the Integer value property of the
specIfIed chart
ChartCetStrIng Feturns the strIng value property of the
specIfIed chart
ChartNavIgate Performs shIft of the specIfIed chart by the
specIfIed number of bars relatIve to the
specIfIed posItIon In the chart
ChartÌ0 Feturns the Ì0 of the current chart.
ChartÌndIcatorAdd Adds an IndIcator wIth the specIfIed handle Into
a specIfIed chart wIndow.
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
537
ChartWIndowDn0ropped Feturns the number (Index) of the chart
subwIndow, the Expert AdvIsor or scrIpt has
been dropped to
ChartPrIceDn0ropped Feturns the prIce coordInate of the chart poInt,
the Expert AdvIsor or scrIpt has been dropped
to
ChartTImeDn0ropped Feturns the tIme coordInate of the chart poInt,
the Expert AdvIsor or scrIpt has been dropped
to
ChartXDn0ropped Feturns the X coordInate of the chart poInt, the
Expert AdvIsor or scrIpt has been dropped to
ChartYDn0ropped Feturns the Y coordInate of the chart poInt, the
Expert AdvIsor or scrIpt has been dropped to
ChartSetSymbolPerIod Changes the symbol value and a perIod of the
specIfIed chart.
ChartScreenShot ProvIdes a screenshot of the chart of Its current
state In a gIf format
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
538
ChartAppIyTempIate
ApplIes a specIfIc template from a specIfIed fIle to the chart.
o··L .!-nrAppLyr-mpL-r-.
L·nj ·n-r:_ij, // .!-nr P¯
··n-r -rnLnj filan-ma // r-mpL-r- rLL- n-m-
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
filan-ma
[In] The name of the fIle contaInIng the template. The fIle Is searched In ¨|0L5\FIles¨ folder.
Peturn VaIue
Ìf a template Is applIed successfully, the functIon returns true, otherwIse false. To get an
InformatIon about the error, call the CetLastError() functIon.
Note
The Expert AdvIsor wIll be unloaded and won't be able to contInue operatIng In case of successful
loadIng of a new template to the chart It Is attached to.
ExampIe:
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//--- H-r'- ·p-n -nJ rny r· -ppLy 'my_r-mpL-r-.rpL' r-mpL-r-
Lr...!-nrAppLyr-mpL-r-.¨,¨my_r-mpL-r-¨··

//--- Pr un-oL- r· -ppLy r-mpL-r-, r!-n
-nLnr.¨Jn-oL- r· -ppLy 'my_r-mpL-r-', -nn·n ¨,J-rH--rInn·n.··¡
----rH--rInn·n.·¡
//--- H-r'- ---n·! |u-r 'my_r-mpL-r-' rLL-, .Lr!·ur 'rpL' -xr-n-L·n
Lr.¯LL-P-IxL-r.¨my_r-mpL-r-¨··
-nLnr.¨¯LL- 'my_r-mpL-r-' -xL-r-, our 'my_r-mpL-r-.rpL' rLL- L- n--J-J¨·¡
-L--
-nLnr.¨'my_r-mpL-r-.rpL' rLL- L- n·r r·unJ Ln ¨
-r-nmLn-LPnr·¯rnLnj.rI-MPHAH_-Ar|·
-¨\\M,H¯\\¯LL--¨·¡
//--- H·. L-r'- n-runn ··nn-·r rLL-n-m- .Lr! 'rpL' -xr-n-L·n
Lr..!-nrAppLyr-mpL-r-.¨,¨my_r-mpL-r-.rpL¨··
-nLnr.¨'my_r-mpL-r-.rpL' -u··---ruLLy -ppLL-J ¨·¡
-L--
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
539
-nLnr.¨Jn-oL- r· -ppLy 'my_r-mpL-r-.rpL', -nn·n ¨,J-rH--rInn·n.··¡
·
-L--

//--- r-mpL-r- L- -r·n-J Ln rLL- .Lr!·ur -xr-n-L·n
-nLnr.¨'my_r-mpL-r-' -u··---ruLLy -ppLL-J - rLL- .Lr!·ur -xr-n-L·n¨·¡
·
·
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
540
ChartWIndowFInd
The functIon returns the number of a subwIndow where an IndIcator Is drawn. There are 2 varIants of
the functIon.
1. The functIon searches In the IndIcated chart for the subwIndow wIth the specIfIed ¨short name¨ of
the IndIcator (the short name Is dIsplayed In the left top part of the subwIndow), and It returns the
subwIndow number In case of success.
Lnr .!-nrWLnJ·.¯LnJ.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj inji·-:.r_·n.r:n-ma // -!·nr LnJL·-r·n n-m-, --- PH¯P.ArJ-_¯|J-rHAMI
2. The functIon must be called from a custom IndIcator. Ìt returns the number of the subwIndow where
the IndIcator Is workIng.
Lnr .!-nrWLnJ·.¯LnJ.·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 denotes the current chart.
inji·-:.r_·n.r:n-ma
[In] Short name of the IndIcator.
Peturn VaIue
SubwIndow number In case of success. Ìn case of faIlure the functIon returns ·1.
Note
Ìf the second varIant of the functIon (wIthout parameters) Is called from a scrIpt or Expert AdvIsor,
the functIon returns ·1.
ExapmIe:
tpn·p-nry -·nLpr_-!·._Lnpur-
//--- Lnpur p-n-m-r-n-
Lnpur -rnLnj -!·nrn-m-=¨MA.¯.!`,`¯,-·¨¡
//--------------------------------------------------------------------
// n-runn- numo-n ·r r!- ·!-nr .LnJ·. .Lr! r!L- LnJL·-r·n
//--------------------------------------------------------------------
Lnr J-rPnJL·-r·n¯uoWLnJ·.Humo-n.L·nj ·!-nrP¯=¨,-rnLnj -!·nr_n-m-=¨¨·

Lnr .LnJ·.=-!¡
//---
Lr..IHJM_--JJ-AM_r1-I·M,H¯Pnr·Pnr-j-n.M,H¯_--JJ-AM_r1-I·==--JJ-AM_PH¯P.ArJ-·

//--- r!- run·rL·n L- ·-LL-J rn·m r!- LnJL·-r·n, n-m- L- n·r n-¬uLn-J
.LnJ·.=.!-nrWLnJ·.¯LnJ.·¡
·
-L--
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
541

//--- r!- run·rL·n L- ·-LL-J rn·m -n Ixp-nr AJvL-·n ·n -·nLpr
.LnJ·.=.!-nrWLnJ·.¯LnJ.¨,-!·nr_n-m-·¡
Lr..LnJ·.==-!· -nLnr.__¯JH.rPJH__-¨.·. Inn·n = ¨,J-rH--rInn·n.··¡
·
//---
n-runn..LnJ·.·¡
·
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//---
Lnr .LnJ·.=J-rPnJL·-r·n¯uoWLnJ·.Humo-n.¨,-!·nrn-m-·¡
Lr..LnJ·..=-!·
-nLnr.¨PnJL·-r·n ¨--!·nrn-m--¨ L- Ln r!- .LnJ·. t¨-.-rnLnj·.LnJ·.·¡
-L--
-nLnr.¨PnJL·-r·n ¨--!·nrn-m--¨ L- n·r r·unJ. .LnJ·. = ¨-.-rnLnj·.LnJ·.·¡
·
See aIso
DbjectCreate(), DbjectFInd()
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
542
ChartDpen
Dpens a new chart wIth the specIfIed symbol and perIod.
L·nj .!-nrJp-n.
-rnLnj ·ymo.l, // ¯ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j // --nL·J
·¡
Parameters
·ymo.l
[In] Chart symbol. NULL means the symbol of the current chart (the Expert AdvIsor Is attached
to).
pari.j
[In] Chart perIod (tImeframe). Can be one of the ENU|_TÌ|EFFA|ES values. 0 means the current
chart perIod.
Peturn VaIue
Ìf successful, It returns the opened chart Ì0. DtherwIse returns 0.
Note
The maxImum possIble number of sImultaneously open charts In the termInal can't exceed the
CHAFTS_|AX value.
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
543
ChartFIrst
Feturns the Ì0 of the fIrst chart of the clIent termInal.
L·nj .!-nr¯Ln-r.·¡
Peturn VaIue
Chart Ì0.
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
544
ChartNext
Feturns the chart Ì0 of the chart next to the specIfIed one.
L·nj .!-nrH-xr.
L·nj ·n-r:_ij // .!-nr P¯
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 does not mean the current chart. 0 means ¨return the fIrst chart Ì0¨.
Peturn VaIue
Chart Ì0. Ìf thIs Is the end of the chart lIst, It returns ·1.
ExampIe:
//--- v-nL-oL-- r·n ·!-nr P¯
L·nj ·unn.!-nr,pn-v.!-nr=.!-nr¯Ln-r.·¡
Lnr L=¨,LLmLr=!¨¨¡
-nLnr.¨.!-nr¯Ln-r =¨,.!-nr¯ymo·L.pn-v.!-nr·,¨ P¯ =¨,pn-v.!-nr·¡
.!LL-.L<LLmLr·// W- !-v- ·-nr-LnLy n·r m·n- r!-n !¨¨ ·p-n ·!-nr-

·unn.!-nr=.!-nrH-xr.pn-v.!-nr·¡ // J-r r!- n-. ·!-nr P¯ oy u-Lnj r!- pn-vL·u- ·!-nr P¯
Lr.·unn.!-nr<¨· on--k¡ // |-v- n--·!-J r!- -nJ ·r r!- ·!-nr LL-r
-nLnr.L,.!-nr¯ymo·L.·unn.!-nr·,¨ P¯ =¨,·unn.!-nr·¡
pn-v.!-nr=·unn.!-nr¡// L-r'- --v- r!- ·unn-nr ·!-nr P¯ r·n r!- .!-nrH-xr.·
L--¡// ¯· n·r r·nj-r r· Ln·n---- r!- ··unr-n
·
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
545
ChartCIose
Closes the specIfIed chart.
o··L .!-nr.L·--.
L·nj ·n-r:_ij=` // .!-nr P¯
·¡
Parameters
·n-r:_ij=`
[In] Chart Ì0. 0 means the current chart.
Peturn VaIue
Ìf successful, returns true, otherwIse false.
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
546
ChartSymboI
Feturns the symbol name for the specIfIed chart.
-rnLnj .!-nr¯ymo·L.
L·nj ·n-r:_ij=` // .!-nr P¯
·¡
Parameters
·n-r:_ij=`
[In] Chart Ì0. 0 means the current chart.
Peturn VaIue
Ìf chart does not exIst, the result wIll be an empty strIng.
See aIso
ChartSetSymbolPerIod
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
547
ChartPerIod
Feturns the tImeframe perIod of specIfIed chart.
IHJM_rPMI¯-AMI¯ .!-nr--nL·J.
L·nj ·n-r:_ij=` // .!-nr P¯
·¡
Parameters
·n-r:_ij=`
[In] Chart Ì0. 0 means the current chart.
Peturn VaIue
The functIon returns one of the ENU|_TÌ|EFFA|ES values. Ìf chart does not exIst, It returns 0.
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
548
ChartPedraw
ThIs functIon calls a forced redrawIng of a specIfIed chart.
v·LJ .!-nr--Jn-..
L·nj ·n-r:_ij=` // .!-nr P¯
·¡
Parameters
·n-r:_ij=`
[In] Chart Ì0. 0 means the current chart.
Note
Usually It Is used after changIng the object propertIes.
See aIso
Dbjects functIons
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
549
ChartSet0oubIe
Sets a value for a correspondIng property of the specIfIed chart. Chart property should be of a double
type.
o··L .!-nr¯-r¯·uoL-.
L·nj ·n-r:_ij, // .!-nr P¯
Lnr pr.p_ij, // -n·p-nry P¯
J·uoL- v-l:a // V-Lu-
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
pr.p_ij
[In] Chart property Ì0. Can be one of the ENU|_CHAFT_PFDPEFTY_0DU8LE values (except the
read·only propertIes).
v-l:a
[In] Property value.
Peturn VaIue
Feturns true If successful, otherwIse returns false.
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
550
ChartSetInteger
Sets a value for a correspondIng property of the specIfIed chart. Chart property must be
datetIme,Int,color,boolorchar.
o··L .!-nr¯-rPnr-j-n.
L·nj ·n-r:_ij, // .!-nr P¯
Lnr pr.p_ij, // -n·p-nry P¯
L·nj v-l:a // V-Lu-
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
pr.p_ij
[In] Chart property Ì0. Ìt can be one of the ENU|_CHAFT_PFDPEFTY_ÌNTECEF value (except the
read·only propertIes).
v-l:a
[In] Property value.
Peturn VaIue
Feturns true If successful, otherwIse returns false.
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
551
ChartSetStrIng
Sets a value for a correspondIng property of the specIfIed chart. Chart property must be of the strIng
type.
o··L .!-nr¯-r¯rnLnj.
L·nj ·n-r:_ij, // .!-nr P¯
Lnr pr.p_ij, // -n·p-nry P¯
-rnLnj ·:r_v-l:a // V-Lu-
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
pr.p_ij
[In] Chart property Ì0. Ìt's value can be one of the ENU|_CHAFT_PFDPEFTY_STFÌNC values
(except the read·only propertIes).
·:r_v-l:a
[In] Property value strIng. StrIng length cannot exceed 2045 characters (extra characters wIll be
truncated).
Peturn VaIue
Feturns true If successful, otherwIse false.
Note
ChartSetStrIng can be used for a comment output on the chart Instead of the Comment functIon.
ExampIe:
v·LJ JnrL·k.·

//---
J·uoL- A-k,ÐLJ¡
Lnr ¯pn--J¡
A-k=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_A¯··¡
ÐLJ=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
¯pn--J=¯ymo·LPnr·Pnr-j-n.¯ymo·L.·,¯1MÐJH_¯--IA¯·¡
-rnLnj ··mm-nr=¯rnLnj¯·nm-r.¨-nLnrLnj pnL·--.\nA-k = `J\nÐLJ = `J\n¯pn--J = `J¨,
A-k,ÐLJ,¯pn--J·¡
.!-nr¯-r¯rnLnj.¨,.|A-r_.JMMIHr,··mm-nr·¡
·
See aIso
Comment, ChartCetStrIng
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
552
ChartCet0oubIe
Feturns the value of a correspondIng property of the specIfIed chart. Chart property must be of double
type. There are 2 varIants of th efunctIon calls.
1. Feturns the property value dIrectly.
J·uoL- .!-nrJ-r¯·uoL-.
L·nj ·n-r:_ij, // .!-nr P¯
Lnr pr.p_ij, // -n·p-nry P¯
Lnr ·:o_vinj.v=` // -uo.LnJ·. numo-n, Lr n-·----ny
·¡
2. Feturns true or false, dependIng on the success of a functIon. Ìf successful, the value of the
property Is placed In a target varIable double_var passed by reference.
o··L .!-nrJ-r¯·uoL-.
L·nj ·n-r:_ij, // .!-nr P¯
Lnr pr.p_ij, // -n·p-nry P¯
Lnr ·:o_vinj.v, // ¯uo.LnJ·. numo-n
J·uoL-sj.:ola_v-r // r-nj-r v-nL-oL- r·n r!- ·!-nr pn·p-nry
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
pr.p_ij
[In] Chart property Ì0. ThIs value can be one of the ENU|_CHAFT_PFDPEFTY_0DU8LE values.
·:o_vinj.v
[In] Number of the chart subwIndow. For the fIrst case, the default value Is 0 (maIn chart
wIndow). The most of the propertIes do not requIre a subwIndow number.
j.:ola_v-r
[out] Target varIable of double type for the requested property.
Peturn VaIue
The value of double type.
For the second call case It returns true If the specIfIed property Is avaIlable and Its value has been
placed Into double_var varIable, otherwIse returns false. To get an addItIonal InformatIon about the
error, It Is necessary to call the functIon CetLastError().
ExampIe:
v·LJ Jn¯r-nr.·

J·uoL- pnL·-MLn=.!-nrJ-r¯·uoL-.¨,.|A-r_--P.I_MPH,¨·¡
J·uoL- pnL·-M-x=.!-nrJ-r¯·uoL-.¨,.|A-r_--P.I_MAx,¨·¡
-nLnr.¨.|A-r_--P.I_MPH =¨,pnL·-MLn·¡
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
553
-nLnr.¨.|A-r_--P.I_MAx =¨,pnL·-M-x·¡
·
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
554
ChartCetInteger
Feturns the value of a correspondIng property of the specIfIed chart. Chart property must be of
datetIme,Intorbool type. There are 2 varIants of the functIon calls.
1. Feturns the property value dIrectly.
L·nj .!-nrJ-rPnr-j-n.
L·nj ·n-r:_ij, // .!-nr P¯
Lnr pr.p_ij, // -n·p-nry P¯
Lnr ·:o_vinj.v=` // -uo.LnJ·. numo-n, Lr n-·----ny
·¡
2. Feturns true or false, dependIng on the success of a functIon. Ìf successful, the value of the
property Is placed In a target varIable long_var passed by reference.
o··L .!-nrJ-rPnr-j-n.
L·nj ·n-r:_ij, // .!-nr P¯
Lnr pr.p_ij, // -n·p-nry P¯
Lnr ·:o_vinj.v, // -uo.LnJ·. numo-n
L·njs l.nj_v-r // r-nj-r v-nL-oL- r·n r!- pn·p-nry
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
pr.p_ij
[In] Chart property Ì0. ThIs value can be one of the ENU|_CHAFT_PFDPEFTY_ÌNTECEF values.
·:o_vinj.v
[In] Number of the chart subwIndow. For the fIrst case, the default value Is 0 (maIn chart
wIndow). The most of the propertIes do not requIre a subwIndow number.
l.nj_v-r
[out] Target varIable of long type for the requested property.
Peturn VaIue
The value of long type.
For the second call case It returns true If specIfIed property Is avaIlable and Its value has been
stored Into long_var varIable, otherwIse returns false. To get addItIonal InformatIon about the error
, It Is necessary to call the functIon CetLastError().
ExampIe:
v·LJ Jn¯r-nr.·

Lnr !-Lj!r=.!-nrJ-rPnr-j-n.¨,.|A-r_|IPJ|r_PH_-PxIH¯,¨·¡
Lnr .LJr!=.!-nrJ-rPnr-j-n.¨,.|A-r_WP¯r|_PH_-PxIH¯,¨·¡
-nLnr.¨.|A-r_|IPJ|r_PH_-PxIH¯ =¨,!-Lj!r,¨pLx-L-¨·¡
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
555
-nLnr.¨.|A-r_WP¯r|_PH_-PxIH¯ =¨,.LJr!,¨pLx-L-¨·¡
·
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
556
ChartCetStrIng
Feturns the value of a correspondIng property of the specIfIed chart. Chart property must be of strIng
type. There are 2 varIants of the functIon call.
1. Feturns the property value dIrectly.
-rnLnj .!-nrJ-r¯rnLnj.
L·nj ·n-r:_ij, // .!-nr P¯
Lnr pr.p_ij // -n·p-nry P¯
·¡
2. Feturns true or false, dependIng on the success of a functIon. Ìf successful, the value of the
property Is placed In a target varIable strIng_var passed by reference.
o··L .!-nrJ-r¯rnLnj.
L·nj ·n-r:_ij, // .!-nr P¯
Lnr pr.p_ij, // -n·p-nry P¯
-rnLnjs·:rinj_v-r // r-nj-r v-nL-oL- r·n r!- pn·p-nry
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
pr.p_ij
[In] Chart property Ì0. ThIs value can be one of the ENU|_CHAFT_PFDPEFTY_STFÌNC values.
·:rinj_v-r
[out] Target varIable of strIng type for the requested property.
Peturn VaIue
The value of strIng type.
For the second call case It returns true If the specIfIed property Is avaIlable and Its value has been
stored Into strIng_var varIable, otherwIse returns false. To get addItIonal InformatIon about the
error, It Is necessary to call the functIon CetLastError().
Note
ChartCetStrIng can be used for readIng comments plotted on the chart usIng the Comment or
ChartSetStrIng functIons.
ExampIe:
v·LJ Jn¯r-nr.·

.!-nr¯-r¯rnLnj.¨,.|A-r_.JMMIHr,¨r--r ··mm-nr.\n¯-··nJ LLn-.\nr!LnJ.¨·¡
.!-nr--Jn-..·¡
¯L--p.!¨¨¨·¡
-rnLnj ··mm=.!-nrJ-r¯rnLnj.¨,.|A-r_.JMMIHr·¡
-nLnr.··mm·¡
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
557
·
See aIso
Comment, ChartSetStrIng
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
558
ChartNavIgate
Performs shIft of the specIfIed chart by the specIfIed number of bars relatIve to the specIfIed posItIon
In the chart.
o··L .!-nrH-vLj-r-.
L·nj ·n-r:_ij, // .!-nr P¯
Lnr p.·i:i.n, // -·-LrL·n
Lnr ·nif:=` // ¯!Lrr v-Lu-
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
p.·i:i.n
[In] Chart posItIon to perform a shIft. Can be one of the ENU|_CHAFT_PDSÌTÌDN values.
·nif:=`
[In] Number of bars to shIft the chart. The posItIve value means the rIght shIft (to the end If the
chart), the negatIve value means the left shIft (to the chart begIn). The zero shIft can be used to
navIgate to chart begInnIng or end.
Peturn VaIue
Feturns true If successful, otherwIse returns false.
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
559
ChartI0
Feturns the Ì0 of the current chart.
L·nj .!-nrP¯.·¡
Peturn VaIue
7alue of long type.
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
560
ChartIndIcatorAdd
Adds an IndIcator wIth the specIfIed handle Into a specIfIed chart wIndow.
o··L .!-nrPnJL·-r·nAJJ.
L·nj ·n-r:_ij, // ·!-nr P¯
Lnr ·:o_vinj.v // numo-n ·r r!- -uo-.LnJ·.
Lnr inji·-:.r_n-njla // !-nJL- ·r r!- LnJL·-r·n
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
·:o_vinj.v
[In] The number of the chart sub·wIndow. 0 means the maIn chart wIndow. If the number of a
not·exIstIng wIndow Is specIfIed, a new wIndow wIll be created.
inji·-:.r_n-njla
[In] The handle of the IndIcator.
Peturn VaIue
The functIon returns true In case of success, otherwIse It returns false. Ìn order to obtaIn
InformatIon about the error, call the CetLastError() functIon.
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
561
ChartWIndowDn0ropped
Feturns the number (Index) of the chart subwIndow, the Expert AdvIsor or scrIpt has been dropped to.
0 means the maIn chart wIndow.
Lnr .!-nrWLnJ·.Jn¯n·pp-J.·¡
Peturn VaIue
7alue of Int type.
ExampIe:
Lnr myWLnJ·.=.!-nrWLnJ·.Jn¯n·pp-J.·¡
Lnr .LnJ·.-r·r-L=.!-nrJ-rPnr-j-n.¨,.|A-r_WPH¯JW¯_rJrAH·¡
-nLnr.¨¯·nLpr L- nunnLnj ·n r!- .LnJ·. t¨-myWLnJ·.-
¨. r·r-L .LnJ·.- ·n r!- ·!-nr ¨-.!-nr¯ymo·L.·-¨.¨,.LnJ·.-r·r-L·¡
See aIso
ChartPrIceDn0ropped, ChartTImeDn0ropped, ChartXDn0ropped, ChartYDn0ropped
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
562
ChartPrIceDn0ropped
Feturns the prIce coordInate correspondIng to the chart poInt, an Expert AdvIsor or scrIpt has been
dropped to.
J·uoL- .!-nr-nL·-Jn¯n·pp-J.·¡
Peturn VaIue
7alue of double type.
ExampIe:
J·uoL- p=.!-nr-nL·-Jn¯n·pp-J.·¡
-nLnr.¨.!-nr-nL·-Jn¯n·pp-J.· = ¨,p·¡
See aIso
ChartXDn0ropped, ChartYDn0ropped
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
563
ChartTImeDn0ropped
Feturns the tIme coordInate correspondIng to the chart poInt, an Expert AdvIsor or scrIpt has been
dropped to.
J-r-rLm- .!-nrrLm-Jn¯n·pp-J.·¡
Peturn VaIue
7alue of datetIme type.
ExampIe:
J-r-rLm- r=.!-nrrLm-Jn¯n·pp-J.·¡
-nLnr.¨¯·nLpr .-- Jn·pp-J ·n r!- ¨-r·¡
See aIso
ChartXDn0ropped, ChartYDn0ropped
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
564
ChartXDn0ropped
Feturns the X coordInate of the chart poInt, an Expert AdvIsor or scrIpt has been dropped to.
Lnr .!-nrxJn¯n·pp-J.·¡
Peturn VaIue
The X coordInate value.
Note
X axIs dIrectIon from left to rIght.
ExampIe:
Lnr x=.!-nrxJn¯n·pp-J.·¡
Lnr 1=.!-nr1Jn¯n·pp-J.·¡
-nLnr.¨.x,1· = .¨-x-¨,¨-1-¨·¨·¡
See aIso
ChartWIndowDn0ropped, ChartPrIceDn0ropped, ChartTImeDn0ropped
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
565
ChartYDn0ropped
Feturns the Y coordInateof the chart poInt, an Expert AdvIsor or scrIpt has been dropped to.
Lnr .!-nr1Jn¯n·pp-J.·¡
Peturn VaIue
The Y coordInate value.
Note
Y axIs dIrectIon from top to bottom.
See aIso
ChartWIndowDn0ropped, ChartPrIceDn0ropped, ChartTImeDn0ropped
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
566
ChartSetSymboIPerIod
Changes the symbol and perIod of the specIfIed chart. The functIon Is asynchronous, I.e. It sends the
command and does not waIt for Its executIon completIon.
o··L .!-nr¯-r¯ymo·L--nL·J.
L·nj ·n-r:_ij, // .!-nr P¯
-rnLnj ·ymo.l, // ¯ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j // --nL·J
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
·ymo.l
[In] Chart symbol. NULL value means the current chart symbol (Expert AdvIsor Is attached to)
pari.j
[In] Chart perIod (tImeframe). Can be one of the ENU|_TÌ|EFFA|ES values. 0 means the current
chart perIod.
Peturn VaIue
Feturns true If successful, otherwIse false.
Note
The symbol/perIod change leads to the re·InItIalIzatIon of the Expert AdvIsor, attached to a chart.
See aIso
ChartSymbol, ChartPerIod
Chart Operations
© 2000·2010, |eta0uotes Software Corp.
567
ChartScreenShot
The functIon provIdes a screenshot of the chart In Its current state In a gIf format.
o··L .!-nr¯·n--n¯!·r.
L·nj ·n-r:_ij, // .!-nr P¯
-rnLnj filan-ma, // ¯ymo·L n-m-
Lnr vij:n, // WLJr!
Lnr naijn:, // |-Lj!r
IHJM_AHPJH_MJ¯I -lijn_m.ja=ÁLFJ:_RFJH. // ALLjnm-nr ryp-
·¡
Parameters
·n-r:_ij
[In] Chart Ì0. 0 means the current chart.
filan-ma
[In] Screenshot fIle name. Cannot exceed 6J characters. Screenshot fIles are placed In the
dIrectory \ FIles.
vij:n
[In] Screenshot wIdth In pIxels.
naijn:
[In] Screenshot heIght In pIxels.
-lijn_m.ja=ÁLFJ:_RFJH.
[In] Dutput mode of a narrow screenshot. ALÌCN_FÌCHT means alIgn to the rIght margIn (the
output from the end). ALÌCN_LEFT means Left justIfy.
Peturn VaIue
Feturns true If successful, otherwIse false.
Note
Ìf you need to take a screenshot from a chart from a certaIn posItIon, fIrst It's necessary to posItIon
the graph usIng the ChartNavIgate() functIon. Ìf the horIzontal sIze of the screenshot Is smaller than
the chart wIndow, eIther the rIght part of the chart wIndow, or Its left part Is output, dependIng on
the alIgn_mode settIngs.
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
568
Trade FunctIons
ThIs Is the group of functIons Intended for managIng tradIng actIvItIes.
TradIng functIons can be used In Expert AdvIsors and scrIpts. TradIng functIons can be called only If In
the propertIes of the Expert AdvIsor or scrIpt the ¨Allow lIve tradIng¨ checkbox Is enabled.
FunctIon ActIon
DrderCalc|argIn Calculates the margIn requIred for the specIfIed
order type, In the deposIt currency
DrderCalcProfIt Calculates the profIt based on the parameters
passed, In the deposIt currency
DrderCheck Checks If there are enough funds to execute
the requIred trade operatIon.
DrderSend Sends trade requests to a server
PosItIonsTotal Feturns the number of open posItIons
PosItIonCetSymbol Feturns the symbol correspondIng to the open
posItIon
PosItIonSelect Chooses an open posItIon for further workIng
wIth It
PosItIonCet0ouble Feturns the requested property of an open
posItIon (double)
PosItIonCetÌnteger Feturns the requested property of an open
posItIon (datetIme or Int)
PosItIonCetStrIng Feturns the requested property of an open
posItIon (strIng)
DrdersTotal Feturns the number of orders
DrderCetTIcket Feturn the tIcket of a correspondIng order
DrderSelect Selects a order for further workIng wIth It
DrderCet0ouble Feturns the requested property of the order
(double)
DrderCetÌnteger Feturns the requested property of the order
(datetIme or Int)
DrderCetStrIng Feturns the requested property of the order
(strIng)
HIstorySelect FetrIeves the hIstory of transactIons and orders
for the specIfIed perIod of the server tIme
HIstorySelect8yPosItIon Fequests the hIstory of deals wIth a specIfIed
posItIon IdentIfIer.
HIstoryDrderSelect Selects an order In the hIstory for further
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
569
workIng wIth It
HIstoryDrdersTotal Feturns the number of orders In the hIstory
HIstoryDrderCetTIcket Feturn order tIcket of a correspondIng order In
the hIstory
HIstoryDrderCet0ouble Feturns the requested property of an order In
the hIstory of (double)
HIstoryDrderCetÌnteger Feturns the requested property of an order In
the hIstory (datetIme or Int)
HIstoryDrderCetStrIng Feturns the requested property of an order In
the hIstory of (strIng)
HIstory0ealSelect Selects a deal In the hIstory for further callIng It
through approprIate functIons
HIstory0ealsTotal Feturns the number of deals In the hIstory
HIstory0ealCetTIcket Feturns a tIcket of a correspondIng deal In the
hIstory
HIstory0ealCet0ouble Feturns the requested property of a deal In the
hIstory (double)
HIstory0ealCetÌnteger Feturns the requested property of a deal In the
hIstory (datetIme or Int)
HIstory0ealCetStrIng Feturns the requested property of a deal In the
hIstory (strIng)
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
570
DrderCaIchargIn
The functIon calculates the margIn requIred for the specIfIed order type, on the current account, In
the current market envIronment not takIng Into account current pendIng orders and open posItIons. Ìt
allows the evaluatIon of margIn for the trade operatIon planned. The value Is returned In the account
currency.
o··L JnJ-n.-L·M-njLn.
IHJM_J-¯I-_r1-I -·:i.n, // ryp- ·r ·nJ-n
-rnLnj ·ymo.l, // -ymo·L n-m-
J·uoL- v.l:ma, // v·Lum-
J·uoL- pri·a, // ·p-n pnL·-
J·uoL-s m-rjin // v-Lu- r·n ·or-LnLnj r!- m-njLn v-Lu-
·¡
Parameters
-·:i.n
[In] The order type, can be one of the valued of the ENU|_DF0EF_TYPE enumeratIon.
·ymo.l
[In] Symbol name.
v.l:ma
[In] 7olume of the trade operatIon.
pri·a
[In] Dpen prIce.
m-rjin
[out] The varIable, to whIch the value of the requIred margIn wIll be wrItten In case the functIon
Is successfully executed. The calculatIon Is performed as If there were no pendIng orders and open
posItIons on the current account. The margIn value depends on many factors, and can dIffer In
dIfferent market envIronments.
Peturn VaIue
The functIon returns true In case of success; otherwIse It returns false. Ìn order to obtaIn
InformatIon about the error, call the CetLastError() functIon.
See aIso
DrderSend(), Drder PropertIes, Trade DperatIon Types
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
571
DrderCaIcProfIt
The functIon calculates the profIt for the current account, In the current market condItIons, based on
the parameters passed. The functIon Is used for pre·evaluatIon of the result of a trade operatIon. The
value Is returned In the account currency.
o··L JnJ-n.-L·-n·rLr.
IHJM_J-¯I-_r1-I -·:i.n, // ryp- ·r r!- ·nJ-n .J-¯I-_r1-I_ÐJ1 ·n J-¯I-_r1-I_¯IHH·
-rnLnj ·ymo.l, // -ymo·L n-m-
J·uoL- v.l:ma, // v·Lum-
J·uoL- pri·a_.pan, // ·p-n pnL·-
J·uoL- pri·a_·l.·a, // ·L·-- pnL·-
J·uoL-s pr.fi: // v-nL-oL- r·n ·or-LnLnj r!- pn·rLr v-Lu-
·¡
Parameters
-·:i.n
[In] Type of the order, can be one of the two values of the ENU|_DF0EF_TYPE enumeratIon:
DF0EF_TYPE_8UY or DF0EF_TYPE_SELL.
·ymo.l
[In] Symbol name.
v.l:ma
[In] 7olume of the trade operatIon.
pri·a_.pan
[In] Dpen prIce.
pri·a_·l.·a
[In] Close prIce.
pr.fi:
[out] The varIable, to whIch the calculated value of the profIt wIll be wrItten In case the functIon
Is successfully executed. The estImated profIt value depends on many factors, and can dIffer In
dIfferent market envIronments.
Peturn VaIue
The functIon returns true In case of success; otherwIse It returns false. Ìf an InvalId order type Is
specIfIed, the functIon wIll return false. Ìn order to obtaIn InformatIon about the error, call
CetLastError().
See aIso
DrderSend(), Drder PropertIes, Trade DperatIon Types
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
572
DrderCheck
The DrderCheck() functIon checks If there are enough money to execute a requIred trade operatIon.
The check results are placed tothe fIelds of the |qlTradeCheckFesult structure.
o··L JnJ-n.!-·k.
M¬Lrn-J---¬u--rs raj:a·:, // n-¬u--r -rnu·run-
M¬Lrn-J-.!-·k---uLrs ra·:l: // n--uLr -rnu·run-
·¡
Parameters
raj:a·:
[In] PoInter to the structure of the |qlTradeFequest type, whIch descrIbes the requIred trade
actIon.
ra·:l:
[In,out] PoInter to the structure of the |qlTradeCheckFesult type, to whIch the check result wIll
be placed.
Peturn VaIue
Ìf funds are not enough for the operatIon, or parameters are fIlled out Incorrectly, the functIon
returns false. Ìn case of a successful basIc check of structures (check of poInters), It returns true -
thIs Is not an IndIcatIon that the requested trade operatIon Is sure to be successfuIIy executed.
For a more detaIled descrIptIon of the functIon executIon result, analyze the fIelds of the resµlt
structure.
Ìn order to obtaIn InformatIon about the error, call the CetLastError() functIon.
See aIso
DrderSend(), Trade DperatIon Types, Trade Fequest Structure, Structure of Fequest Check Fesults,
Structure of a Trade Fequest Fesult
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
573
DrderSend
The DrderSend() functIon Is used for executIng trade operatIons by sendIng requests to a trade
server.
o··L JnJ-n¯-nJ.
M¬Lrn-J---¬u--rs raj:a·:, // ¬u-ny -rnu·run-
M¬Lrn-J----uLrs ra·:l: // -rnu·run- ·r r!- -n-.-n
·¡
Parameters
raj:a·:
[In] PoInter to a structure of |qlTradeFequest type descrIbIng the trade actIvIty of the clIent.
ra·:l:
[In,out] PoInter to a structure of |qlTradeFesult type descrIbIng the result of trade operatIon In
case of a successful completIon (If true Is returned).
Peturn VaIue
Ìn case of a successful basIc check of structures (Index checkIng) returns true - thIs Is not a sIgn of
successfuI executIon of a trade operatIon. For a more detaIled descrIptIon of the functIon
executIon result, analyze the fIelds of resµlt structure.
Note
The trade requests go through several stages of checkIng on a trade server. FIrst of all, It checks If
all the requIred fIelds of the reqµest parameter are fIlled out correctly. Ìf there are no errors, the
server accepts the order for further processIng. Ìf the order Is successfully accepted by the trade
server, the DrderSend() functIon returns true.
Ìt Is recommended to check the request before sendIng It to a trade server. To check requests, use
the DrderCheck() functIon. Ìt checks If there are enough funds to execute the trade operatIon, and
returns many useful parameters In the results of trade request checkIng:
return code contaInIng InformatIon about errors In the checked request;
balance value that wIll appear after the trade operatIon Is executed;
equIty value that wIll appear after the trade operatIon Is executed;
floatIng poInt value that wIll appear after the trade operatIon Is executed;
margIn requIred for the trade operatIon;
amount of free equIty that wIll remaIn after the executIon of the trade operatIon;
the margIn level that wIll be set after the trade operatIon Is executed;
comment to the reply code, error descrIptIon.
Ìt should be noted when placIng a market order that the successful completIon of the DrderSend()
method operatIon does not always mean a successful deal completIon. Check In the returned result
structure resµlt the retcode value contaInIng trade server return code, and values of decl or order
fIeld dependIng on the type of operatIon.
Each accepted order Is stored on the trade server awaItIng processIng untIl one of the condItIons for
Its executIon occurs:
expIratIon,
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
574
appearance of an opposIte request,
order executIon when the executIon prIce appears,
a request to cancel the order Is receIved.
At the moment of the order processIng, the trade server sends to the termInal a message about the
occurrence of the Trade event, whIch can be processed by the DnTrade() functIon.
ExampIe:
//--- v-Lu- r·n J-¯I-_MAJP.
Lnpur L·nj ·nJ-n_m-jL·=¯¯¯¯¯¡
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//--- m-k- -un- r!-r r!- -···unr L- J-m·
Lr.A···unrPnr·Pnr-j-n.A..JJHr_r-A¯I_MJ¯I·==A..JJHr_r-A¯I_MJ¯I_-IAH·

AL-nr.¨¯·nLpr ·p-n-rL·n L- n·r -LL·.-J ·n - LLv- -···unr.¨·¡
n-runn¡
·
//--- pL-·- ·n J-L-r- ·nJ-n
Lr.J-rJnJ-n-r·r-LÐyM-jL·.·nJ-n_m-jL··==¨·

//--- n· ·unn-nr ·nJ-n- - pL-·- -n ·nJ-n
Lnr n--=¯-nJ--nJ·m--nJLnjJnJ-n.·nJ-n_m-jL··¡
-nLnr.¨--runn ··J- ·r r!- rn-J- --nv-n ¨,n--·¡
·
-L-- // r!-n- -n- ·nJ-n- - J-L-r- ·nJ-n-

¯-L-r-ALLJnJ-n-ÐyM-jL·.·nJ-n_m-jL··¡
·
·
//--------------------------------------------------------------------
// n-·-Lv- r!- ·unn-nr numo-n ·r ·nJ-n- .Lr! -p-·LrL-J J-¯I-_MAJP.
//--------------------------------------------------------------------
Lnr J-rJnJ-n-r·r-LÐyM-jL·.L·nj ··n-r m-jL·_numo-n·

L·nj ·nJ-n_rL·k-r¡
Lnr r·r-L=¨¡
//--- --L-·rL·n r!n·uj! r!- -nrLn- !L-r·ny
|L-r·ny¯-L-·r.¨,rLm-.unn-nr.··¡
//--- j· r!n·uj! -LL p-nJLnj ·nJ-n-
r·n.Lnr L=¨¡L<JnJ-n-r·r-L.·¡L--·
Lr.·nJ-n_rL·k-r=JnJ-nJ-rrL·k-r.L··
Lr.m-jL·_numo-n==JnJ-nJ-rPnr-j-n.J-¯I-_MAJP.·· r·r-L--¡
//---
n-runn.r·r-L·¡
·
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
575
//--------------------------------------------------------------------
// J-L-r-- -LL p-nJLnj ·nJ-n- .Lr! -p-·LrL-J J-¯I-_MAJP.
//--------------------------------------------------------------------
v·LJ ¯-L-r-ALLJnJ-n-ÐyM-jL·.L·nj ··n-r m-jL·_numo-n·

L·nj ·nJ-n_rL·k-r¡
Lnr r·r-L=¨¡
//--- --L-·rL·n r!n·uj! r!- -nrLn- !L-r·ny
|L-r·ny¯-L-·r.¨,rLm-.unn-nr.··¡
//--- j· r!n·uj! -LL p-nJLnj ·nJ-n-
r·n.Lnr L=JnJ-n-r·r-L.·-!¡L=¨¡L--·
Lr.·nJ-n_rL·k-r=JnJ-nJ-rrL·k-r.L··
//--- ·nJ-n .Lr! -ppn·pnL-r- J-¯I-_MAJP.
Lr.m-jL·_numo-n==JnJ-nJ-rPnr-j-n.J-¯I-_MAJP.··

M¬Lrn-J----uLr n--uLr¡
M¬Lrn-J---¬u--r n-¬u--r¡
n-¬u--r.·nJ-n=·nJ-n_rL·k-r¡
n-¬u--r.-·rL·n=r-A¯I_A.rPJH_-IMJVI¡
JnJ-n¯-nJ.n-¬u--r,n--uLr·¡
//--- .nLr- r!- --nv-n n-pLy r· L·j
-nLnr.__¯JH.rPJH__,¨. ¨,n--uLr.··mm-nr,¨ n-pLy ··J- ¨,n--uLr.n-r··J-·¡
·
//---
·
//--------------------------------------------------------------------
// --r - p-nJLnj ·nJ-n Ln - n-nJ·m .-y
//--------------------------------------------------------------------
Lnr ¯-nJ--nJ·m--nJLnjJnJ-n.L·nj ··n-r m-jL·_numo-n·

//--- pn-p-n- - n-¬u--r
M¬Lrn-J---¬u--r n-¬u--r¡
n-¬u--r.-·rL·n=r-A¯I_A.rPJH_-IH¯PHJ¡ // --rrLnj - p-nJLnj ·nJ-n
n-¬u--r.m-jL·=m-jL·_numo-n¡ // J-¯I-_MAJP.
n-¬u--r.-ymo·L=_¯ymo·L¡ // -ymo·L
n-¬u--r.v·Lum-=¨.!¡ // v·Lum- Ln ¨.! L·r-
n-¬u--r.-L=¨¡ // ¯r·p H·-- L- n·r -p-·LrL-J
n-¬u--r.rp=¨¡ // r-k- -n·rLr L- n·r -p-·LrL-J
n-¬u--r.J-vL-rL·n=¯¡ // J-vL-rL·n Ln ¯ p·Lnr-
//--- r·nm r!- ·nJ-n ryp-
n-¬u--r.ryp-=J-r--nJ·mryp-.·¡ // ·nJ-n ryp-
//--- r·nm r!- pnL·- r·n r!- p-nJLnj ·nJ-n
n-¬u--r.pnL·-=J-r--nJ·m-nL·-.n-¬u--r.ryp-·¡ // ·p-n pnL·-
//--- --nJ - rn-J- n-¬u--r
M¬Lrn-J----uLr n--uLr¡
JnJ-n¯-nJ.n-¬u--r,n--uLr·¡
//--- .nLr- r!- --nv-n n-pLy r· L·j
-nLnr.__¯JH.rPJH__,¨.¨,n--uLr.··mm-nr·¡
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
576
Lr.n--uLr.n-r··J-==!¨¨!¯· -nLnr.n--uLr.oLJ,n--uLr.--k,n--uLr.pnL·-·¡
//--- n-runn ··J- ·r r!- rn-J- --nv-n n-pLy
n-runn n--uLr.n-r··J-¡
·
//--------------------------------------------------------------------
// n-runn ryp- ·r - p-nJLnj ·nJ-n Ln - n-nJ·m .-y
//--------------------------------------------------------------------
IHJM_J-¯I-_r1-I J-r--nJ·mryp-.·

Lnr r=M-r!--nJ.·`1¡
//--- ¨<=r<1
-.Lr·!.r·

·---.¨·.n-runn.J-¯I-_r1-I_ÐJ1_HPMPr·¡
·---.!·.n-runn.J-¯I-_r1-I_¯IHH_HPMPr·¡
·---.`·.n-runn.J-¯I-_r1-I_ÐJ1_¯rJ-·¡
·---.`·.n-runn.J-¯I-_r1-I_¯IHH_¯rJ-·¡
·
//--- Ln··nn-·r v-Lu-
n-runn.W-JHJ_VAHJI·¡
//---
·
//--------------------------------------------------------------------
// n-runn pnL·- Ln - n-nJ·m .-y
//--------------------------------------------------------------------
J·uoL- J-r--nJ·m-nL·-.IHJM_J-¯I-_r1-I ryp-·

Lnr r=.Lnr·ryp-¡
//--- -r·p L-v-L- r·n r!- -ymo·L
Lnr JL-r-n·-=.Lnr·¯ymo·LPnr·Pnr-j-n._¯ymo·L,¯1MÐJH_r-A¯I_¯rJ-¯_HIVIH·¡
//--- n-·-Lv- J-r- ·r r!- L--r rL·k
M¬LrL·k L--r_rL·k¡
¯ymo·LPnr·rL·k._¯ymo·L,L--r_rL·k·¡
//--- ·-L·uL-r- pnL·- -···nJLnj r· r!- ryp-
J·uoL- pnL·-¡
Lr.r==` r==¯· // J-¯I-_r1-I_ÐJ1_HPMPr ·n J-¯I-_r1-I_¯IHH_¯rJ-

pnL·-=L--r_rL·k.oLJ¡ // J-p-nr rn·m pnL·- ÐLJ
pnL·-=pnL·--.JL-r-n·--.M-r!--nJ.·`!¨··¯··_-·Lnr¡
·
-L-- // J-¯I-_r1-I_¯IHH_HPMPr ·n J-¯I-_r1-I_ÐJ1_¯rJ-

pnL·-=L--r_rL·k.--k¡ // J-p-nr rn·m pnL·- A-k
pnL·-=pnL·--.JL-r-n·--.M-r!--nJ.·`!¨··¯··_-·Lnr¡
·
n-runn.pnL·-·¡
·
See aIso
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
577
Trade DperatIon Types, Trade Fequest Structure, Structure of Fequest Check Fesults, Structure of a
Trade Fequest Fesult
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
578
PosItIonsTotaI
Feturns the number of open posItIons.
Lnr -·-LrL·n-r·r-L.·¡
Peturn VaIue
7alue of Int type.
Note
For each symbol, at any gIven moment of tIme, only one posItIon can be open, whIch Is the result of
one or more deals. 0o not confuse current pendIng orders wIth posItIons, whIch are also dIsplayed
on the ¨Trade¨ tab of the ¨Toolbox¨ of the clIent termInal.
The total number of posItIons on a trade account cannot exceed the total number of fInancIal
Instruments.
See aIso
PosItIonCetSymbol(), PosItIonSelect(), PosItIon PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
579
PosItIonCetSymboI
Feturns the symbol correspondIng to the open posItIon and automatIcally selects the posItIon for
further workIng wIth It usIng functIons PosItIonCet0ouble, PosItIonCetÌnteger, PosItIonCetStrIng.
-rnLnj -·-LrL·nJ-r¯ymo·L.
Lnr injax // Humo-n Ln r!- LL-r ·r p·-LrL·n-
·¡
Parameters
injax
[In] Number of the posItIon In the lIst of open posItIons.
Peturn VaIue
7alue of the strIng type. Ìf the posItIon was not found, an empty strIng wIll be returned. To get an
error code, call the CetLastError() functIon.
Note
For each symbol, at any gIven moment of tIme, only one posItIon can be open, whIch Is the result of
one or more deals. 0o not confuse current pendIng orders wIth posItIons, whIch are also dIsplayed
on the ¨Trade¨ tab of the ¨Toolbox¨ of the clIent termInal.
The total number of posItIons on a trade account cannot exceed the total number of fInancIal
Instruments.
See aIso
PosItIonsTotal(), PosItIonSelect(), PosItIon PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
580
PosItIonSeIect
Chooses an open posItIon for further workIng wIth It. Feturns true If the functIon Is successfully
completed. Feturns false In case of faIlure. To obtaIn InformatIon about the error, call CetLastError().
o··L -·-LrL·n¯-L-·r.
-rnLnj ·ymo.l // ¯ymo·L n-m-
·¡
Parameters
·ymo.l
[In] Name of the fInancIal securIty.
Peturn VaIue
7alue of the bool type.
Note
For each symbol, at any gIven moment of tIme, only one posItIon can be open, whIch Is the result of
one or more deals. 0o not confuse posItIons wIth current pendIng orders, whIch are also dIsplayed
on the ¨Trade¨ tab of the ¨Toolbox¨ of the clIent termInal.
FunctIon PosItIonSelect() copIes data about a posItIon Into the program envIronment, and further
calls of PosItIonCet0ouble(), PosItIonCetÌnteger() and PosItIonCetStrIng() return the earlIer copIed
data. ThIs means that the posItIon Itself may no longer exIst (or It's volume, dIrectIon, etc. has
changed), but data of thIs posItIon stIll can be obtaIned. To ensure receIpt of fresh data about a
posItIon, It Is recommended to call PosItIonSelect() rIght before referrIng to them.
See aIso
PosItIonCetSymbol(), PosItIonsTotal(), PosItIon PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
581
PosItIonCet0oubIe
The functIon returns the requested property of an open posItIon, pre·selected usIng PosItIonCetSymbol
or PosItIonSelect. The posItIon property must be of the double type. There are 2 varIants of the
functIon.
1. ÌmmedIately returns the property value.
J·uoL- -·-LrL·nJ-r¯·uoL-.
IHJM_-J¯PrPJH_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of the functIon executIon. Ìf successful, the value
of the property Is placed In a receIvIng varIables passed by reference by the last parameter.
o··L -·-LrL·nJ-r¯·uoL-.
IHJM_-J¯PrPJH_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
J·uoL-s j.:ola_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of a posItIon property. The value can be one of the values of the
ENU|_PDSÌTÌDN_PFDPEFTY_0DU8LE enumeratIon.
j.:ola_v-r
[out] 7arIable of the double type, acceptIng the value of the requested property.
Peturn VaIue
7alue of the double type. Ìf the functIon faIls, 0 Is returned.
Note
For each symbol, at any gIven moment of tIme, only one posItIon can be open, whIch Is the result of
one or more deals. 0o not confuse posItIons wIth current pendIng orders, whIch are also dIsplayed
on the ¨Trade¨ tab of the ¨Toolbox¨ of the clIent termInal.
To ensure receIpt of fresh data about a posItIon, It Is recommended to call PosItIonSelect() rIght
before referrIng to them.
See aIso
PosItIonCetSymbol(), PosItIonSelect(), PosItIon PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
582
PosItIonCetInteger
The functIon returns the requested property of an open posItIon, pre·selected usIng PosItIonCetSymbol
or PosItIonSelect. The posItIon property should be of datetIme, Int type. There are 2 varIants of the
functIon.
1. ÌmmedIately returns the property value.
L·nj -·-LrL·nJ-rPnr-j-n.
IHJM_-J¯PrPJH_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of the functIon executIon. Ìf successful, the value
of the property Is placed In a receIvIng varIables passed by reference by the last parameter.
o··L -·-LrL·nJ-rPnr-j-n.
IHJM_-J¯PrPJH_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
L·njs l.nj_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of a posItIon property. The value can be one of the values of the
ENU|_PDSÌTÌDN_PFDPEFTY_ÌNTECEF enumeratIon.
l.nj_v-r
[out] 7arIable of the long type acceptIng the value of the requested property.
Peturn VaIue
7alue of the long type. Ìf the functIon faIls, 0 Is returned.
Note
For each symbol, at any gIven moment of tIme, only one posItIon can be open, whIch Is the result of
one or more deals. 0o not confuse posItIons wIth current pendIng orders, whIch are also dIsplayed
on the ¨Trade¨ tab of the ¨Toolbox¨ of the clIent termInal.
To ensure receIpt of fresh data about a posItIon, It Is recommended to call PosItIonSelect() rIght
before referrIng to them.
See aIso
PosItIonCetSymbol(), PosItIonSelect(), PosItIon PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
583
PosItIonCetStrIng
The functIon returns the requested property of an open posItIon, pre·selected usIng PosItIonCetSymbol
or PosItIonSelect. The posItIon property should be of the strIng type. There are 2 varIants of the
functIon.
1. ÌmmedIately returns the property value.
-rnLnj -·-LrL·nJ-r¯rnLnj.
IHJM_-J¯PrPJH_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of the functIon executIon. Ìf successful, the value
of the property Is placed In a receIvIng varIables passed by reference by the last parameter.
o··L -·-LrL·nJ-r¯rnLnj.
IHJM_-J¯PrPJH_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
-rnLnjs ·:rinj_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of a posItIon property. The value can be one of the values of the
ENU|_PDSÌTÌDN_PFDPEFTY_STFÌNC enumeratIon.
·:rinj_v-r
[out] 7arIable of the strIng type acceptIng the value of the requested property.
Peturn VaIue
7alue of the strIng type. Ìf the functIon faIls, an empty strIng Is returned.
Note
For each symbol, at any gIven moment of tIme, only one posItIon can be open, whIch Is the result of
one or more deals. 0o not confuse posItIons wIth current pendIng orders, whIch are also dIsplayed
on the ¨Trade¨ tab of the ¨Toolbox¨ of the clIent termInal.
To ensure receIpt of fresh data about a posItIon, It Is recommended to call PosItIonSelect() rIght
before referrIng to them.
See aIso
PosItIonCetSymbol(), PosItIonSelect(), PosItIon PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
584
DrdersTotaI
Feturns the number of current orders.
Lnr JnJ-n-r·r-L.·¡
Peturn VaIue
7alue of the Int type.
Note
0o not confuse current pendIng orders wIth posItIons, whIch are also dIsplayed on the ¨Trade¨ tab of
the ¨Toolbox¨ of the clIent termInal. An order Is a request to conduct a transactIon, whIle a posItIon
Is a result of one or more deals.
For each symbol, at any gIven moment of tIme, only one posItIon can be open, whIle there can be
several pendIng orders for the same symbol.
See aIso
DrderSelect(), DrderCetTIcket(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
585
DrderCetTIcket
Feturns tIcket of a correspondIng order automatIcally selects the order for further workIng wIth It
usIng functIons.
uL·nj JnJ-nJ-rrL·k-r.
Lnr injax // Humo-n Ln r!- LL-r ·r ·nJ-n-
·¡
Parameters
injax
[In] Number of an order In the lIst of current orders.
Peturn VaIue
7alue of the ulong type. Ìf the functIon faIls, 0 Is returned.
Note
0o not confuse current pendIng orders wIth posItIons, whIch are also dIsplayed on the ¨Trade¨ tab of
the ¨Toolbox¨ of the clIent termInal. An order Is a request to conduct a transactIon, whIle a posItIon
Is a result of one or more deals.
For each symbol, at any gIven moment of tIme, only one posItIon can be open, whIle there can be
several pendIng orders for the same symbol.
FunctIon DrderCetTIcket() copIes data about an order Into the program envIronment, and further
calls of DrderCet0ouble(), DrderCetÌnteger(), DrderCetStrIng() return the earlIer copIed data. ThIs
means that the order Itself may no longer exIst (or Its open prIce, Stop Loss/Take ProfIt levels or
expIratIon has changed), but data of thIs order stIll can be obtaIned. To ensure receIpt of fresh data
about an order, It Is recommended to call DrderCetTIcket() rIght before referrIng to them.
ExampIe:
v·LJ Jn¯r-nr.·

J-r-rLm- rn·m=¨¡
J-r-rLm- r·=rLm-.unn-nr.·¡
//--- n-¬u--r r!- -nrLn- !L-r·ny
|L-r·ny¯-L-·r.rn·m,r··¡
//--- v-nL-oL-- r·n n-runnLnj v-Lu-- rn·m ·nJ-n pn·p-nrL--
uL·nj rL·k-r¡
J·uoL- ·p-n_pnL·-¡
J·uoL- LnLrL-L_v·Lum-¡
J-r-rLm- rLm-_--rup¡
-rnLnj -ymo·L¡
-rnLnj ryp-¡
L·nj ·nJ-n_m-jL·¡
//--- numo-n ·r ·unn-nr p-nJLnj ·nJ-n-
uLnr r·r-L=JnJ-n-r·r-L.·¡
//--- j· r!n·uj! ·nJ-n- Ln - L··p
r·n.uLnr L=¨¡L<r·r-L¡L--·
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
586

//--- n-runn ·nJ-n rL·k-r oy Lr- p·-LrL·n Ln r!- LL-r
Lr.rL·k-r=JnJ-nJ-rrL·k-r.L··

//--- n-runn ·nJ-n pn·p-nrL--
·p-n_pnL·-= JnJ-nJ-r¯·uoL-.J-¯I-_--P.I_J-IH·¡
rLm-_--rup= JnJ-nJ-rPnr-j-n.J-¯I-_rPMI_¯IrJ-·¡
-ymo·L= JnJ-nJ-r¯rnLnj.J-¯I-_¯1MÐJH·¡
·nJ-n_m-jL·= JnJ-nJ-rPnr-j-n.J-¯I-_MAJP.·¡
p·-LrL·nP¯ = JnJ-nJ-rPnr-j-n.J-¯I-_-J¯PrPJH_P¯·¡
LnLrL-L_v·Lum-= JnJ-nJ-r¯·uoL-.J-¯I-_VJHJMI_PHPrPAH·¡
ryp-=J-rJnJ-nryp-.JnJ-nJ-rPnr-j-n.J-¯I-_r1-I··¡
//--- pn-p-n- -nJ -!·. Lnr·nm-rL·n -o·ur r!- ·nJ-n
pnLnrr.¨trL·k-r `J `- `J `- -r `J .-- --r up -r `-¨,
rL·k-r, // ·nJ-n rL·k-r
ryp-, // ryp-
LnLrL-L_v·Lum-, // pL-·-J v·Lum-
-ymo·L, // -ymo·L
·p-n_pnL·-, // -p-·LrL-J ·p-n pnL·-
rLm-r·¯rnLnj.rLm-_--rup·// rLm- ·r ·nJ-n pL-·Lnj
·¡
·
·
//---
·
//--------------------------------------------------------------------
// n-runn- r!- -rnLnj n-m- ·r r!- ·nJ-n ryp-
//--------------------------------------------------------------------
-rnLnj J-rJnJ-nryp-.L·nj ryp-·

-rnLnj -rn_ryp-=¨unkn·.n ·p-n-rL·n¨¡
-.Lr·!.ryp-·

·--- .J-¯I-_r1-I_ÐJ1·. n-runn.¨ouy¨·¡
·--- .J-¯I-_r1-I_¯IHH·. n-runn.¨--LL¨·¡
·--- .J-¯I-_r1-I_ÐJ1_HPMPr·. n-runn.¨ouy LLmLr¨·¡
·--- .J-¯I-_r1-I_¯IHH_HPMPr·. n-runn.¨--LL LLmLr¨·¡
·--- .J-¯I-_r1-I_ÐJ1_¯rJ-·. n-runn.¨ouy -r·p¨·¡
·--- .J-¯I-_r1-I_¯IHH_¯rJ-·. n-runn.¨--LL -r·p¨·¡
·--- .J-¯I-_r1-I_ÐJ1_¯rJ-_HPMPr·. n-runn.¨ouy -r·p LLmLr¨·¡
·--- .J-¯I-_r1-I_¯IHH_¯rJ-_HPMPr·.n-runn.¨--LL -r·p LLmLr¨·¡
·
n-runn.-rn_ryp-·¡
·
See aIso
DrdersTotal(), DrderSelect(), DrderCetÌnteger()
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
587
DrderSeIect
Selects an order to work wIth. Feturns true If the functIon has been successfully completed. Feturns
false If the functIon completIon has faIled. For more InformatIon about an error call CetLastError().
o··L JnJ-n¯-L-·r.
uL·nj :i·ra: // JnJ-n rL·k-r
·¡
Parameters
:i·ra:
[In] Drder tIcket.
Peturn VaIue
7alue of the bool type.
Note
0o not confuse current pendIng orders wIth posItIons, whIch are also dIsplayed on the ¨Trade¨ tab of
the ¨Toolbox¨ of the clIent termInal. For each symbol, at any gIven moment of tIme, only one
posItIon can be open, whIle there can be several pendIng orders for the same symbol.
FunctIon DrderSelect() copIes data about an order Into the program envIronment, and further calls
of DrderCet0ouble(), DrderCetÌnteger(), DrderCetStrIng() return the earlIer copIed data. ThIs
means that the order Itself may no longer exIst (or Its open prIce, Stop Loss/Take ProfIt levels or
expIratIon has changed), but data of thIs order stIll can be obtaIned. To ensure receIpt of fresh data
about an order, It Is recommended to call DrderSelect() rIght before referrIng to them.
See aIso
DrderCetÌnteger(), DrderCet0ouble(), DrderCetStrIng(), DrderCalcProfIt(), DrderCetTIcket(), Drder
PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
588
DrderCet0oubIe
Feturns the requested property of an order, pre·selected usIng DrderCetTIcket or DrderSelect. The
order property must be of the double type. There are 2 varIants of the functIon.
1. ÌmmedIately returns the property value.
J·uoL- JnJ-nJ-r¯·uoL-.
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of a functIon. Ìf successful, the value of the
property Is placed In a target varIable passed by reference by the last parameter.
o··L JnJ-nJ-r¯·uoL-.
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
J·uoL-s j.:ola_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of the order property. The value can be one of the values of the
ENU|_DF0EF_PFDPEFTY_0DU8LE enumeratIon.
j.:ola_v-r
[out] 7arIable of the double type that accepts the value of the requested property.
Peturn VaIue
7alue of the double type. Ìf the functIon faIls, 0 Is returned.
Note
0o not confuse current pendIng orders wIth posItIons, whIch are also dIsplayed on the ¨Trade¨ tab of
the ¨Toolbox¨ of the clIent termInal. For each symbol, at any gIven moment of tIme, only one
posItIon can be open, whIle there can be several pendIng orders for the same symbol.
To ensure receIpt of fresh data about an order, It Is recommended to call DrderSelect() rIght before
referrIng to them.
See aIso
DrdersTotal(), DrderCetTIcket(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
589
DrderCetInteger
Feturns the requested order property, pre·selected usIng DrderCetTIcket or DrderSelect. Drder
property must be of the datetIme, Int type. There are 2 varIants of the functIon.
1. ÌmmedIately returns the property value.
L·nj JnJ-nJ-rPnr-j-n.
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false dependIng on the success of the functIon. Ìf successful, the value of the
property Is placed Into a target varIable passed by reference by the last parameter.
o··L JnJ-nJ-rPnr-j-n.
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
L·njs l.nj_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of the order property. The value can be one of the values of the
ENU|_DF0EF_PFDPEFTY_ÌNTECEF enumeratIon.
l.nj_v-r
[out] 7arIable of the long type that accepts the value of the requested property.
Peturn VaIue
7alue of the long type. Ìf the functIon faIls, 0 Is returned.
Note
0o not confuse current pendIng orders wIth posItIons, whIch are also dIsplayed on the ¨Trade¨ tab of
the ¨Toolbox¨ of the clIent termInal. For each symbol, at any gIven moment of tIme, only one
posItIon can be open, whIle there can be several pendIng orders for the same symbol.
To ensure receIpt of fresh data about an order, It Is recommended to call DrderSelect() rIght before
referrIng to them.
See aIso
DrdersTotal(), DrderCetTIcket(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
590
DrderCetStrIng
Feturns the requested order property, pre·selected usIng DrderCetTIcket or DrderSelect. The order
property must be of the strIng type. There are 2 varIants of the functIon.
1. ÌmmedIately returns the property value.
-rnLnj JnJ-nJ-r¯rnLnj.
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of the functIon. Ìf successful, the value of the
property Is placed Into a target varIable passed by reference by the last parameter.
o··L JnJ-nJ-r¯rnLnj.
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
-rnLnjs ·:rinj_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
pr.par:y_ij
[In] ÌdentIfIer of the order property. The value can be one of the values of the
ENU|_DF0EF_PFDPEFTY_STFÌNC enumeratIon.
·:rinj_v-r
[out] 7arIable of the strIng type that accepts the value of the requested property.
Peturn VaIue
7alue of the strIng type.
Note
0o not confuse current pendIng orders wIth posItIons, whIch are also dIsplayed on the ¨Trade¨ tab of
the ¨Toolbox¨ of the clIent termInal. For each symbol, at any gIven moment of tIme, only one
posItIon can be open, whIle there can be several pendIng orders for the same symbol.
To ensure receIpt of fresh data about an order, It Is recommended to call DrderSelect() rIght before
referrIng to them.
See aIso
DrdersTotal(), DrderCetTIcket(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
591
HIstorySeIect
FetrIeves the hIstory of deals and orders for the specIfIed perIod of server tIme.
o··L |L-r·ny¯-L-·r.
J-r-rLm- fr.m_j-:a, // ¯n·m J-r-
J-r-rLm- :._j-:a // r· J-r-
·¡
Parameters
fr.m_j-:a
[In] Start date of the request.
:._j-:a
[In] End date of the request request.
Peturn VaIue
Ìt returns true If successful, otherwIse returns false.
Note
HIstorySelect() creates a lIst of orders and a lIst of trades In a mql5·program, for further referrIng
to the lIst elements usIng correspondIng functIons. The deals lIst sIze can be returned usIng the
HIstory0ealsTotal() functIon; the sIze of the lIst of orders In the hIstory can be obtaIned usIng
HIstoryDrdersTotal(). SelectIon In the lIst of orders should be better performed by
HIstoryDrderCetTIcket(), for Items In the lIst of deals HIstory0ealCetTIcket() suIts better.
After usIng HIstoryDrderSelect(), the lIst of hIstory orders avaIlable to the mql5 program Is reset
and fIlled agaIn by the found order, If the search of an order by the tIcket has been completed
successfully. The same applIes to the lIst of deals avaIlable to the mql5 program · It Is reset by
HIstory0ealSelect() and fIlled agaIn In case of a successful receIpt of a deal by tIcket number.
ExampIe:
v·LJ Jn¯r-nr.·

··L·n Ðuy.·L·n =ÐLu-¡
··L·n ¯-LL.·L·n=--J¡
//--- n-¬u--r rn-J- !L-r·ny
|L-r·ny¯-L-·r.¨,rLm-.unn-nr.··¡
//--- ·n--r- ·o|-·r-
-rnLnj n-m-¡
uLnr r·r-L=|L-r·ny¯--L-r·r-L.·¡
uL·nj rL·k-r=¨¡
J·uoL- pnL·-¡
J·uoL- pn·rLr¡
J-r-rLm- rLm-¡
-rnLnj -ymo·L¡
L·nj ryp-¡
L·nj -nrny¡
//--- r·n -LL J--L-
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
592
r·n.uLnr L=¨¡L<r·r-L¡L--·

//--- rny r· j-r J--L- rL·k-r
Lr.rL·k-r=|L-r·ny¯--LJ-rrL·k-r.L··

//--- j-r J--L- pn·p-nrL--
pnL·- =|L-r·ny¯--LJ-r¯·uoL-.rL·k-r,¯IAH_--P.I·¡
rLm- =|L-r·ny¯--LJ-rPnr-j-n.rL·k-r,¯IAH_rPMI·¡
-ymo·L=|L-r·ny¯--LJ-r¯rnLnj.rL·k-r,¯IAH_¯1MÐJH·¡
ryp- =|L-r·ny¯--LJ-rPnr-j-n.rL·k-r,¯IAH_r1-I·¡
-nrny =|L-r·ny¯--LJ-rPnr-j-n.rL·k-r,¯IAH_IHr-1·¡
pn·rLr=|L-r·ny¯--LJ-r¯·uoL-.rL·k-r,¯IAH_--J¯Pr·¡
//--- ·nLy r·n ·unn-nr -ymo·L
Lr.pnL·- ss rLm- ss -ymo·L==¯ymo·L.··

//--- ·n--r- pnL·- ·o|-·r
n-m-=¨rn-J-|L-r·ny_¯--L_¨--rnLnj.rL·k-r·¡
Lr.-nrny· Jo|-·r.n--r-.¨,n-m-,JЯ_A--JW_-PJ|r_--P.I,¨,rLm-,pnL·-,¨,¨·¡
-L-- Jo|-·r.n--r-.¨,n-m-,JЯ_A--JW_HI¯r_--P.I,¨,rLm-,pnL·-,¨,¨·¡
//--- --r ·o|-·r pn·p-nrL--
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_¯IHI.rAÐHI,¨·¡
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_ÐA.·,¨·¡
Jo|-·r¯-rPnr-j-n.¨,n-m-,JЯ--J-_.JHJ-,ryp-.Ðuy.·L·n.¯-LL.·L·n·¡
Lr.pn·rLr.=¨· Jo|-·r¯-r¯rnLnj.¨,n-m-,JЯ--J-_rIxr,¨-n·rLr. ¨--rnLnj.pn·rLr··¡
·
·
·
//--- -ppLy ·n ·!-nr
.!-nr--Jn-..·¡
·
See aIso
HIstoryDrderSelect(), HIstory0ealSelect()
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
593
HIstorySeIectßyPosItIon
FetrIeves the hIstory of deals and orders havIng the specIfIed posItIon IdentIfIer.
o··L |L-r·ny¯-L-·rÐy-·-LrL·n.
L·nj p.·i:i.n_ij // p·-LrL·n LJ-nrLrL-n - -J¯PrPJH_P¯IHrP¯PI-
·¡
Parameters
p.·i:i.n_ij
[In] PosItIon IdentIfIer that Is set to every executed order and every deal.
Peturn VaIue
Ìt returns true If successful, otherwIse returns false.
Note
0o not confuse orders of a tradIng hIstory wIth current pendIng orders that appear on the ¨Trade¨
tab of the ¨Toolbox¨ bar. The lIst of orders that were canceled or have led to a transactIon, can be
vIewed In the ¨HIstory¨ tab of ¨Toolbox¨ of the clIent termInal.
HIstorySelect8yPosItIon() creates In a mql5 program a lIst of orders and a lIst of deals wIth a
specIfIed posItIon IdentIfIer for further reference to the elements of the lIst usIng the approprIate
functIons. To know the sIze of the lIst of deals, use functIon HIstory0ealsTotal(), the sIze of the lIst
of orders In the hIstory can be obtaIned usIng HIstoryDrdersTotal(). To run through elements of the
orders lIst, use HIstoryDrderCetTIcket(), for elements of the deals lIst · HIstory0ealCetTIcket().
After usIng HIstoryDrderSelect(), lIst of hIstory orders avaIlable to the mql5 program Is reset and
fIlled agaIn wIth the found order, If search of an order by Its tIcket was successful. The same refers
to the lIst of deals avaIlable to the mql5 program · It Is reset by functIon HIstory0ealSelect() and Is
fIlled out agaIn If a deal was found successfully by the tIcket number.
See aIso
HIstorySelect(), HIstoryDrderCetTIcket(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
594
HIstoryDrderSeIect
Selects an order from the hIstory for further callIng It through approprIate functIons. Ìt returns true If
the functIon has been successfully completed. Feturns false If the functIon has faIled. For more detaIls
on error call CetLastError().
o··L |L-r·nyJnJ-n¯-L-·r.
uL·nj :i·ra: // JnJ-n rL·k-r
·¡
Parameters
:i·ra:
[In] Drder tIcket.
Peturn VaIue
Feturns true If successful, otherwIse false.
Note
0o not confuse orders of a tradIng hIstory wIth current pendIng orders that appear on the ¨Trade¨
tab of the ¨Toolbox¨ bar. The lIst of orders that were canceled or have led to a transactIon, can be
vIewed In the ¨HIstory¨ tab of ¨Toolbox¨ of the clIent termInal.
HIstoryDrderSelect() clears In a mql5·program the lIst of orders from a hIstory, avaIlable for calls,
and copIes to It a sIngle order, If the executIon of HIstoryDrderSelect () has been completed
successfully. Ìf you need to go through all deals selected by HIstorySelect(), you should better use
HIstoryDrderCetTIcket().
See aIso
HIstorySelect(), HIstoryDrderCetTIcket(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
595
HIstoryDrdersTotaI
Feturns the number of orders In the hIstory. PrIor to callIng HIstoryDrdersTotal(), fIrst It Is necessary
to receIve the hIstory of deals and orders usIng the HIstorySelect() or HIstorySelect8yPosItIon()
functIon.
Lnr |L-r·nyJnJ-n-r·r-L.·¡
Peturn VaIue
7alue of the Int type.
Note
0o not confuse orders of a tradIng hIstory wIth current pendIng orders that appear on the ¨Trade¨
tab of the ¨Toolbox¨ bar. The lIst of orders that were canceled or have led to a transactIon, can be
vIewed In the ¨HIstory¨ tab of ¨Toolbox¨ of the clIent termInal.
See aIso
HIstorySelect(), HIstoryDrderSelect(), HIstoryDrderCetTIcket(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
596
HIstoryDrderCetTIcket
Feturn the tIcket of a correspondIng order In the hIstory. PrIor to callIng HIstoryDrderCetTIcket(),
fIrst It Is necessary to receIve the hIstory of deals and orders usIng the HIstorySelect() or
HIstorySelect8yPosItIon() functIon.
uL·nj |L-r·nyJnJ-nJ-rrL·k-r.
Lnr injax // Humo-n Ln r!- LL-r ·r ·nJ-n-
·¡
Parameters
injax
[In] Number of the order In the lIst of orders.
Peturn VaIue
7alue of the ulong type.
Note
0o not confuse orders of a tradIng hIstory wIth current pendIng orders that appear on the ¨Trade¨
tab of the ¨Toolbox¨ bar. The lIst of orders that were canceled or have led to a transactIon, can be
vIewed In the ¨HIstory¨ tab of ¨Toolbox¨ of the clIent termInal.
HIstoryDrderCetTIcket() not only returns the tIcket of an order In hIstory, but also selects It for
future callIng It usIng HIstoryDrderCet0ouble(), HIstoryDrderCetÌnteger and HIstoryDrderCetStrIng.
Thus, HIstoryDrderSelect() selects an order for the specIfIed tIcket, whIle HIstory0ealCetTIcket()
selects an order by Its number In the lIst of orders In hIstory.
ExampIe:
v·LJ Jn¯r-nr.·

J-r-rLm- rn·m=¨¡
J-r-rLm- r·=rLm-.unn-nr.·¡
//--- n-¬u--r r!- -nrLn- !L-r·ny
|L-r·ny¯-L-·r.rn·m,r··¡
//--- v-nL-oL-- r·n n-runnLnj v-Lu-- rn·m ·nJ-n pn·p-nrL--
uL·nj rL·k-r¡
J·uoL- ·p-n_pnL·-¡
J·uoL- LnLrL-L_v·Lum-¡
J-r-rLm- rLm-_--rup¡
J-r-rLm- rLm-_J·n-¡
-rnLnj -ymo·L¡
-rnLnj ryp-¡
L·nj ·nJ-n_m-jL·¡
L·nj p·-LrL·nP¯¡
//--- numo-n ·r ·unn-nr p-nJLnj ·nJ-n-
uLnr r·r-L=|L-r·nyJnJ-n-r·r-L.·¡
//--- j· r!n·uj! ·nJ-n- Ln - L··p
r·n.uLnr L=¨¡L<r·r-L¡L--·
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
597

//--- n-runn ·nJ-n rL·k-r oy Lr- p·-LrL·n Ln r!- LL-r
Lr.rL·k-r=|L-r·nyJnJ-nJ-rrL·k-r.L··

//--- n-runn ·nJ-n pn·p-nrL--
·p-n_pnL·-= |L-r·nyJnJ-nJ-r¯·uoL-.rL·k-r,J-¯I-_--P.I_J-IH·¡
rLm-_--rup= |L-r·nyJnJ-nJ-rPnr-j-n.rL·k-r,J-¯I-_rPMI_¯IrJ-·¡
rLm-_J·n-= |L-r·nyJnJ-nJ-rPnr-j-n.rL·k-r,J-¯I-_rPMI_¯JHI·¡
-ymo·L= |L-r·nyJnJ-nJ-r¯rnLnj.rL·k-r,J-¯I-_¯1MÐJH·¡
·nJ-n_m-jL·= |L-r·nyJnJ-nJ-rPnr-j-n.rL·k-r,J-¯I-_MAJP.·¡
p·-LrL·nP¯ = |L-r·nyJnJ-nJ-rPnr-j-n.rL·k-r,J-¯I-_-J¯PrPJH_P¯·¡
LnLrL-L_v·Lum-= |L-r·nyJnJ-nJ-r¯·uoL-.rL·k-r,J-¯I-_VJHJMI_PHPrPAH·¡
ryp-=J-rJnJ-nryp-.|L-r·nyJnJ-nJ-rPnr-j-n.rL·k-r,J-¯I-_r1-I··¡
//--- pn-p-n- -nJ -!·. Lnr·nm-rL·n -o·ur r!- ·nJ-n
pnLnrr.¨trL·k-r `J `- `J `- -r `J .-- --r up -r `- = J·n- -r `-, p·- P¯=`J¨,
rL·k-r, // ·nJ-n rL·k-r
ryp-, // ryp-
LnLrL-L_v·Lum-, // pL-·-J v·Lum-
-ymo·L, // -ymo·L
·p-n_pnL·-, // -p-·LrL-J ·p-n pnL·-
rLm-r·¯rnLnj.rLm-_--rup·,// rLm- ·r ·nJ-n pL-·Lnj
rLm-r·¯rnLnj.rLm-_J·n-·, // rLm- ·r ·nJ-n -x-·urL·n ·n J-L-rL·n
p·-LrL·nP¯ // P¯ ·r - p·-LrL·n , r· .!L·! r!- J--L ·r r!- ·nJ-n L- Ln·LuJ-J
·¡
·
·
//---
·
//--------------------------------------------------------------------
// n-runn- r!- -rnLnj n-m- ·r r!- ·nJ-n ryp-
//--------------------------------------------------------------------
-rnLnj J-rJnJ-nryp-.L·nj ryp-·

-rnLnj -rn_ryp-=¨unkn·.n ·p-n-rL·n¨¡
-.Lr·!.ryp-·

·--- .J-¯I-_r1-I_ÐJ1·. n-runn.¨ouy¨·¡
·--- .J-¯I-_r1-I_¯IHH·. n-runn.¨--LL¨·¡
·--- .J-¯I-_r1-I_ÐJ1_HPMPr·. n-runn.¨ouy LLmLr¨·¡
·--- .J-¯I-_r1-I_¯IHH_HPMPr·. n-runn.¨--LL LLmLr¨·¡
·--- .J-¯I-_r1-I_ÐJ1_¯rJ-·. n-runn.¨ouy -r·p¨·¡
·--- .J-¯I-_r1-I_¯IHH_¯rJ-·. n-runn.¨--LL -r·p¨·¡
·--- .J-¯I-_r1-I_ÐJ1_¯rJ-_HPMPr·. n-runn.¨ouy -r·p LLmLr¨·¡
·--- .J-¯I-_r1-I_¯IHH_¯rJ-_HPMPr·.n-runn.¨--LL -r·p LLmLr¨·¡
·
n-runn.-rn_ryp-·¡
·
See aIso
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
598
HIstorySelect(), HIstoryDrdersTotal(), HIstoryDrderSelect(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
599
HIstoryDrderCet0oubIe
Feturns the requested order property. The order property must be of the double type. There are 2
varIants of the functIon.
1. ÌmmedIately returns the property value.
J·uoL- |L-r·nyJnJ-nJ-r¯·uoL-.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of the functIon. Ìf successful, the value of the
property Is placed Into a target varIable passed by reference by the last parameter.
o··L |L-r·nyJnJ-nJ-r¯·uoL-.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
J·uoL-s j.:ola_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
:i·ra:_n:moar
[In] Drder tIcket.
pr.par:y_ij
[In] ÌdentIfIer of the order property. The value can be one of the values of the
ENU|_DF0EF_PFDPEFTY_0DU8LE enumeratIon.
j.:ola_v-r
[out] 7arIable of the double type that accepts the value of the requested property.
Peturn VaIue
7alue of the double type.
Note
0o not confuse orders of a tradIng hIstory wIth current pendIng orders that appear on the ¨Trade¨
tab of the ¨Toolbox¨ bar. The lIst of orders that were canceled or have led to a transactIon, can be
vIewed In the ¨HIstory¨ tab of ¨Toolbox¨ of the clIent termInal.
See aIso
HIstorySelect(), HIstoryDrdersTotal(), HIstoryDrderSelect(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
600
HIstoryDrderCetInteger
Feturns the requested property of an order. The order property must be of datetIme, Int type. There
are 2 varIants of the functIon.
1. ÌmmedIately returns the property value.
L·nj |L-r·nyJnJ-nJ-rPnr-j-n.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of the functIon. Ìf successful, the value of the
property Is placed Into a target varIable passed by reference by the last parameter.
o··L |L-r·nyJnJ-nJ-rPnr-j-n.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
L·njs l.nj_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
:i·ra:_n:moar
[In] Drder tIcket.
pr.par:y_ij
[In] ÌdentIfIer of the order property. The value can be one of the values of the
ENU|_DF0EF_PFDPEFTY_ÌNTECEF enumeratIon.
l.nj_v-r
[out] 7arIable of the long type that accepts the value of the requested property.
Peturn VaIue
7alue of the long type.
Note
0o not confuse orders of a tradIng hIstory wIth current pendIng orders that appear on the ¨Trade¨
tab of the ¨Toolbox¨ bar. The lIst of orders that were canceled or have led to a transactIon, can be
vIewed In the ¨HIstory¨ tab of ¨Toolbox¨ of the clIent termInal.
See aIso
HIstorySelect(), HIstoryDrdersTotal(), HIstoryDrderSelect(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
601
HIstoryDrderCetStrIng
Feturns the requested property of an order. The order property must be of the strIng type. There are
2 varIants of the functIon.
1. ÌmmedIately returns the property value.
-rnLnj |L-r·nyJnJ-nJ-r¯rnLnj.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of the functIon. Ìf successful, the value of the
property Is placed Into a target varIable passed by reference by the last parameter.
o··L |L-r·nyJnJ-nJ-r¯rnLnj.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_J-¯I-_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
-rnLnjs ·:rinj_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
:i·ra:_n:moar
[In] Drder tIcket.
pr.par:y_ij
[In] ÌdentIfIer of the order property. The value can be one of the values of the
ENU|_DF0EF_PFDPEFTY_STFÌNC enumeratIon.
·:rinj_v-r
[out] 7arIable of the strIng type.
Peturn VaIue
7alue of the strIng type.
Note
0o not confuse orders of a tradIng hIstory wIth current pendIng orders that appear on the ¨Trade¨
tab of the ¨Toolbox¨ bar. The lIst of orders that were canceled or have led to a transactIon, can be
vIewed In the ¨HIstory¨ tab of ¨Toolbox¨ of the clIent termInal.
See aIso
HIstorySelect(), HIstoryDrdersTotal(), HIstoryDrderSelect(), Drder PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
602
HIstory0eaISeIect
Selects a deal In the hIstory for further callIng It through approprIate functIons. Ìt returns true If the
functIon has been successfully completed. Feturns false If the functIon has faIled. For more detaIls on
error call CetLastError().
o··L |L-r·ny¯--L¯-L-·r.
uL·nj :i·ra: // ¯--L rL·k-r
·¡
Parameters
:i·ra:
[In] 0eal tIcket.
Peturn VaIue
Feturns true If successful, otherwIse false.
Note
0o not confuse orders, deals and posItIons. Each deal Is the result of the executIon of an order,
each posItIon Is the summary result of one or more deals.
HIstory0ealSelect() clears In a mql5·program the lIst of deals avaIlable for reference, and copIes the
sIngle deal, If the the executIon of HIstory0ealSelect() has been completed successfully. Ìf you need
to go through all deals selected by the HIstorySelect() functIon, you should better use
HIstory0ealCetTIcket().
See aIso
HIstorySelect(), HIstory0ealCetTIcket(), 0eal PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
603
HIstory0eaIsTotaI
Feturns the number of deal In hIstory. PrIor to callIng HIstory0ealsTotal(), fIrst It Is necessary to
receIve the hIstory of deals and orders usIng the HIstorySelect() or HIstorySelect8yPosItIon() functIon.
Lnr |L-r·ny¯--L-r·r-L.·¡
Peturn VaIue
7alue of the Int type.
Note
0o not confuse orders, deals and posItIons. Each deal Is the result of the executIon of an order,
each posItIon Is the summary result of one or more deals.
See aIso
HIstorySelect(), HIstory0ealCetTIcket(), 0eal PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
604
HIstory0eaICetTIcket
The functIon selects a deal for further processIng and returns the deal tIcket In hIstory. PrIor to callIng
HIstory0ealCetTIcket(), fIrst It Is necessary to receIve the hIstory of deals and orders usIng the
HIstorySelect() or HIstorySelect8yPosItIon() functIon.
uL·nj |L-r·ny¯--LJ-rrL·k-r.
Lnr injax // rL·k-r J--L
·¡
Parameters
injax
[In] Number of a deal In the lIst of deals
Peturn VaIue
7alue of the ulong type.
Note
0o not confuse orders, deals and posItIons. Each deal Is the result of the executIon of an order,
each posItIon Is the summary result of one or more deals.
HIstory0ealCetTIcket() not only returns the tIcket of a deal In hIstory, but also selects It to further
refer to by means of HIstory0ealCet0ouble(), HIstory0ealCetÌnteger() and HIstory0ealCetStrIng().
Thus, HIstory0ealSelect() selects a deal for the specIfIed tIcket, whIle HIstory0ealCetTIcket()
selects a deal by Its number In the lIst of deals In hIstory.
ExampIe:
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
605
v·LJ Jn¯r-nr.·

uL·nj J--L_rL·k-r¡ // J--L rL·k-r
uL·nj ·nJ-n_rL·k-r¡ // rL·k-r ·r r!- ·nJ-n r!- J--L .-- -x-·ur-J ·n
J-r-rLm- rn-n--·rL·n_rLm-¡ // rLm- ·r - J--L -x-·urL·n
L·nj J--L_ryp- ¡ // ryp- ·r - rn-J- ·p-n-rL·n
L·nj p·-LrL·n_P¯¡ // p·-LrL·n P¯
-rnLnj J--L_J--·nLprL·n¡ // ·p-n-rL·n J--·nLprL·n
J·uoL- v·Lum-¡ // ·p-n-rL·n v·Lum-
-rnLnj -ymo·L¡ // -ymo·L ·r r!- J--L
//--- --r r!- -r-nr -nJ -nJ J-r- r· n-¬u--r r!- !L-r·ny ·r J--L-
J-r-rLm- rn·m_J-r-=¨¡ // rn·m r!- v-ny o-jLnnLnj
J-r-rLm- r·_J-r-=rLm-.unn-nr.·¡// rLLL r!- ·unn-nr m·m-nr
//--- n-¬u--r r!- !L-r·ny ·r J--L- Ln r!- -p-·LrL-J p-nL·J
|L-r·ny¯-L-·r.rn·m_J-r-,r·_J-r-·¡
//--- r·r-L numo-n Ln r!- LL-r ·r J--L-
Lnr J--L-=|L-r·ny¯--L-r·r-L.·¡
//--- n·. pn··--- --·! rn-J-
r·n.Lnr L=¨¡L<J--L-¡L--·

J--L_rL·k-r= |L-r·ny¯--LJ-rrL·k-r.L·¡
v·Lum-= |L-r·ny¯--LJ-r¯·uoL-.J--L_rL·k-r,¯IAH_VJHJMI·¡
rn-n--·rL·n_rLm-=.J-r-rLm-·|L-r·ny¯--LJ-rPnr-j-n.J--L_rL·k-r,¯IAH_rPMI·¡
·nJ-n_rL·k-r= |L-r·ny¯--LJ-rPnr-j-n.J--L_rL·k-r,¯IAH_J-¯I-·¡
J--L_ryp-= |L-r·ny¯--LJ-rPnr-j-n.J--L_rL·k-r,¯IAH_r1-I·¡
-ymo·L= |L-r·ny¯--LJ-r¯rnLnj.J--L_rL·k-r,¯IAH_¯1MÐJH·¡
p·-LrL·n_P¯= |L-r·ny¯--LJ-rPnr-j-n.J--L_rL·k-r,¯IAH_-J¯PrPJH_P¯·¡
J--L_J--·nLprL·n= J-r¯--L¯--·nLprL·n.J--L_ryp-,v·Lum-,-ymo·L,·nJ-n_rL·k-r,p·-LrL·n_P¯·¡
//--- p-nr·nm rLn- r·nm-rrLnj r·n r!- J--L numo-n
-rnLnj pnLnr_LnJ-x=¯rnLnj¯·nm-r.¨` `J¨,L·¡
//--- -!·. Lnr·nm-rL·n ·n r!- J--L
-nLnr.pnLnr_LnJ-x-¨. J--L t¨,J--L_rL·k-r,¨ -r ¨,rn-n--·rL·n_rLm-,J--L_J--·nLprL·n·¡
·
·
//--------------------------------------------------------------------
// n-runn- r!- -rnLnj J--·nLprL·n ·r r!- ·p-n-rL·n
//--------------------------------------------------------------------
-rnLnj J-r¯--L¯--·nLprL·n.L·nj J--L_ryp-,J·uoL- v·Lum-,-rnLnj -ymo·L,L·nj rL·k-r,L·nj p·-_P¯·

-rnLnj J--·n¡
//---
-.Lr·!.J--L_ryp-·

·--- ¯IAH_r1-I_ÐAHAH.I. n-runn .¨o-L-n·-¨·¡
·--- ¯IAH_r1-I_.-I¯Pr. n-runn .¨·n-JLr¨·¡
·--- ¯IAH_r1-I_.|A-JI. n-runn .¨·!-nj-¨·¡
·--- ¯IAH_r1-I_.J--I.rPJH. n-runn .¨··nn-·rL·n¨·¡
·--- ¯IAH_r1-I_ÐJ1. J--·n=¨ouy¨¡ on--k¡
·--- ¯IAH_r1-I_¯IHH. J--·n=¨--LL¨¡ on--k¡
·
J--·n=¯rnLnj¯·nm-r.¨`- `J `- .·nJ-n t`J, p·-LrL·n P¯ `J·¨,
J--·n, // ·unn-nr J--·nLprL·n
v·Lum-, // J--L v·Lum-
-ymo·L, // J--L -ymo·L
rL·k-r, // rL·k-r ·r r!- ·nJ-n r!-r ·-u--J r!- J--L
p·-_P¯ // P¯ ·r - p·-LrL·n, Ln .!L·! r!- J--L L- Ln·LuJ-J
·¡
n-runn.J--·n·¡
//---
·
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
606
See aIso
HIstorySelect(), HIstory0ealsTotal(), HIstory0ealSelect(), 0eal PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
607
HIstory0eaICet0oubIe
Feturns the requested property of a deal. The deal property must be of the double type. There are 2
varIants of the functIon.
1. ÌmmedIately returns the property value.
J·uoL- |L-r·ny¯--LJ-r¯·uoL-.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_¯IAH_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of the functIon. Ìf successful, the value of the
property Is placed Into a target varIable passed by reference by the last parameter.
o··L |L-r·ny¯--LJ-r¯·uoL-.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_¯IAH_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
J·uoL-s j.:ola_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
:i·ra:_n:moar
[In] 0eal tIcket.
pr.par:y_ij
[In] ÌdentIfIer of a deal property. The value can be one of the values of the
ENU|_0EAL_PFDPEFTY_0DU8LE enumeratIon.
j.:ola_v-r
[out] 7arIable of the double type that accepts the value of the requested property.
Peturn VaIue
7alue of the double type.
Note
0o not confuse orders, deals and posItIons. Each deal Is the result of the executIon of an order,
each posItIon Is the summary result of one or more deals.
See aIso
HIstorySelect(), HIstory0ealsTotal(), HIstory0ealSelect(), 0eal PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
608
HIstory0eaICetInteger
Feturns the requested property of a deal. The deal property must be of the datetIme, Int type. There
are 2 varIants of the functIon.
1. ÌmmedIately returns the property value.
L·nj |L-r·ny¯--LJ-rPnr-j-n.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_¯IAH_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of the functIon. Ìf successful, the value of the
property Is placed Into a target varIable passed by reference by the last parameter.
o··L |L-r·ny¯--LJ-rPnr-j-n.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_¯IAH_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
L·njs l.nj_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
:i·ra:_n:moar
[In] Trade tIcket.
pr.par:y_ij
[In] ÌdentIfIer of the deal property. The value can be one of the values of the
ENU|_0EAL_PFDPEFTY_ÌNTECEF enumeratIon.
l.nj_v-r
[out] 7arIable of the long type that accepts the value of the requested property.
Peturn VaIue
7alue of the long type.
Note
0o not confuse orders, deals and posItIons. Each deal Is the result of the executIon of an order,
each posItIon Is the summary result of one or more deals.
See aIso
HIstorySelect(), HIstory0ealsTotal(), HIstory0ealSelect(), 0eal PropertIes
Trade Functions
© 2000·2010, |eta0uotes Software Corp.
609
HIstory0eaICetStrIng
Feturns the requested property of a deal. The deal property must be of the strIng type. There are 2
varIants of the functIon.
1. ÌmmedIately returns the property value.
-rnLnj |L-r·ny¯--LJ-r¯rnLnj.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_¯IAH_--J-I-r1 pr.par:y_ij // -n·p-nry LJ-nrLrL-n
·¡
2. Feturns true or false, dependIng on the success of the functIon. Ìf successful, the value of the
property Is placed Into a target varIable passed by reference by the last parameter.
o··L |L-r·ny¯--LJ-r¯rnLnj.
uL·nj :i·ra:_n:moar, // rL·k-r
IHJM_¯IAH_--J-I-r1 pr.par:y_ij, // -n·p-nry LJ-nrLrL-n
-rnLnjs ·:rinj_v-r // |-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
:i·ra:_n:moar
[In] 0eal tIcket.
pr.par:y_ij
[In] ÌdentIfIer of the deal property. The value can be one of the values of the
ENU|_0EAL_PFDPEFTY_STFÌNC enumeratIon.
·:rinj_v-r
[out] 7arIable of the strIng type that accepts the value of the requested property.
Peturn VaIue
7alue of the strIng type.
Note
0o not confuse orders, deals and posItIons. Each deal Is the result of the executIon of an order,
each posItIon Is the summary result of one or more deals.
See aIso
HIstorySelect(), HIstory0ealsTotal(), HIstory0ealSelect(), 0eal PropertIes
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
610
CIobaI VarIabIes of the CIIent TermInaI
There Is a group set of functIons for workIng wIth global varIables.
Clobal varIables of the clIent termInal should not be mIxed up wIth varIables declared In the global
scope of the mql5 program.
Clobal varIables are kept In the clIent termInal wIthIn 4 weeks sInce the last access, then they wIll be
deleted automatIcally. An access to a global varIable Is not only settIng of a new value, but readIng of
the global varIable value, as well.
Clobal varIables of the clIent termInal are accessIble sImultaneously from all mql5 programs launched
In the clIent termInal.
FunctIon ActIon
Clobal7arIableCheck Checks the exIstence of a global varIable wIth
the specIfIed name
Clobal7arIableTIme Feturns tIme of the last accessIng the global
varIable
Clobal7arIable0el 0eletes a global varIable
Clobal7arIableCet Feturns the value of a global varIable
Clobal7arIableName Feturns the name of a global varIable by It's
ordInal number In the lIst of global varIables
Clobal7arIableSet Sets the new value to a global varIable
Clobal7arIablesFlush ForcIbly saves contents of all global varIables to
a dIsk
Clobal7arIableTemp Sets the new value to a global varIable, that
exIsts only In the current sessIon of the
termInal
Clobal7arIableSetDnCondItIon Sets the new value of the exIstIng global
varIable by condItIon
Clobal7arIables0eleteAll 0eletes global varIables wIth the specIfIed
prefIx In theIr names
Clobal7arIablesTotal Feturns the total number of global varIables
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
611
CIobaIVarIabIeCheck
Checks the exIstence of a global varIable wIth the specIfIed name
o··L JL·o-LV-nL-oL-.!-·k.
-rnLnj n-ma // JL·o-L v-nL-oL- n-m-
·¡
Parameters
n-ma
[In] Clobal varIable name.
Peturn VaIue
Feturns true, If the global varIable exIsts, otherwIse returns false.
Clobal varIables exIst In the clIent termInal durIng 4 weeks sInce theIr last use, then they are
automatIcally deleted.
See aIso
Clobal7arIableTIme()
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
612
CIobaIVarIabIeTIme
Feturns the tIme when the global varIable was last accessed.
J-r-rLm- JL·o-LV-nL-oL-rLm-.
-rnLnj n-ma // n-m-
·¡
Parameters
n-ma
[In] Name of the global varIable.
Peturn VaIue
The functIon returns tIme of last accessIng the specIfIed global varIable. CallIng a varIable to obtaIn
value Is also consIdered as an access to It. Ìn order to obtaIn error detaIls, call the CetLastError()
functIon.
Note
Clobal varIables exIst In the clIent termInal durIng 4 weeks sInce they were called last. After that
they are automatIc ally deleted.
See aIso
Clobal7arIableCheck()
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
613
CIobaIVarIabIe0eI
0eletes a global varIable from the clIent termInal.
o··L JL·o-LV-nL-oL-¯-L.
-rnLnj n-ma // JL·o-L v-nL-oL- n-m-
·¡
Parameters
n-ma
[In] Clobal varIable name.
Peturn VaIue
Ìf successful, the functIon returns true, otherwIse It returns false. To obtaIn an InformatIon about
the error It Is necessary to call the functIon CetLastError().
Note
Clobal varIables exIst In the clIent termInal durIng 4 weeks sInce theIr last use, then they are
automatIcally deleted.
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
614
CIobaIVarIabIeCet
Feturns the value of an exIstIng global varIable of the clIent termInal. There are 2 varIants of the
functIon.
1. ÌmmedIately returns the value of the global varIable.
J·uoL- JL·o-LV-nL-oL-J-r.
-rnLnj n-ma // JL·o-L v-nL-oL- n-m-
·¡
2. Feturns true or false dependIng on the success of the functIon run. Ìf successful, the global
varIable of the clIent termInal Is placed In a varIable passed by reference In the second parameter.
o··L JL·o-LV-nL-oL-J-r.
-rnLnj n-ma, // JL·o-L v-nL-oL- n-m-
J·uoL-sj.:ola_v-r // r!L- v-nL-oL- .LLL ··nr-Ln r!- v-Lu- ·r r!- jL·o-L v-nL-oL-
·¡
Parameters
n-ma
[In] Clobal varIable name.
j.:ola_v-r
[out] Target varIable of the double type, whIch accepts the value stored In a the global varIable of
the clIent termInal.
Peturn VaIue
The value of the exIstIng global varIable or 0 In case of an error. For more detaIls about the error,
call CetLastError().
Note
Clobal varIables exIst In the clIent termInal durIng 4 weeks sInce theIr last use, then they are
automatIcally deleted.
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
615
CIobaIVarIabIeName
Feturns the name of a global varIable by It's ordInal number.
-rnLnj JL·o-LV-nL-oL-H-m-.
Lnr injax // JL·o-L v-nL-oL- numo-n Ln r!- LL-r ·r jL·o-L v-nL-oL--
·¡
Parameters
injax
[In] Sequence number In the lIst of global varIables. Ìt should be greater than or equal to 0 and
less than Clobal7arIablesTotal().
Peturn VaIue
Clobal varIable name by It's ordInal number In the lIst of global varIables. For more detaIls about the
error, call CetLastError().
Note
Clobal varIables exIst In the clIent termInal durIng 4 weeks sInce theIr last use, then they are
automatIcally deleted.
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
616
CIobaIVarIabIeSet
Sets a new value for a global varIable. Ìf the varIable does not exIst, the system creates a new global
varIable.
J-r-rLm- JL·o-LV-nL-oL-¯-r.
-rnLnj n-ma, // JL·o-L v-nL-oL- n-m-
J·uoL- v-l:a // V-Lu- r· --r
·¡
Parameters
n-ma
[In] Clobal varIable name.
v-l:a
[In] The new numerIcal value.
Peturn VaIue
Ìf successful, the functIon returns the last modIfIcatIon tIme, otherwIse 0. For more detaIls about
the error, call CetLastError().
Note
Clobal varIables exIst In the clIent termInal durIng 4 weeks sInce theIr last use, then they are
automatIcally deleted.
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
617
CIobaIVarIabIesFIush
ForcIbly saves contents of all global varIables to a dIsk.
v·LJ JL·o-LV-nL-oL--¯Lu-!.·¡
Peturn VaIue
No return value.
Note
The termInal wrItes all the global varIables when the work Is over, but data can be lost at a sudden
computer operatIon faIlure. ThIs functIon allows Independently controllIng the process of savIng
global varIables In case of contIngency.
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
618
CIobaIVarIabIeTemp
The functIon attempts to create a temporary global varIable. Ìf the varIable doesn't exIst, the system
creates a new temporary global varIable.
o··L JL·o-LV-nL-oL-r-mp.
-rnLnj n-ma // JL·o-L v-nL-oL- n-m-
·¡
Parameters
n-ma
[In] The name of a temporary global varIable.
Peturn VaIue
Ìf successful, the functIon returns true, otherwIse · false. For detaIls about the error, to call
CetLastError().
Note
Temporary global varIables exIst only whIle the clIent termInal Is runnIng; after the termInal
shutdown they are automatIcally deleted. Note that durIng the executIon of Clobal7arIablesFlush()
temporary global varIables are not wrItten to a dIsk.
After a temporary global varIable has been created, It can be accessed and modIfIed the same as
global varIable of the clIent termInal.
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
619
CIobaIVarIabIeSetDnCondItIon
Sets the new value of the exIstIng global varIable If the current value equals to the thIrd parameter
check_value. Ìf there Is no global varIable, the functIon wIll generate an error
EFF_CLD8AL7AFÌA8LE_NDT_FDUN0 (4501) and return false.
o··L JL·o-LV-nL-oL-¯-rJn.·nJLrL·n.
-rnLnj n-ma, // JL·o-L v-nL-oL- n-m-
J·uoL- v-l:a, // H-. v-Lu- r·n v-nL-oL- Lr ··nJLrL·n L- rnu-
J·uoL- ·na·r_v-l:a // .!-·k v-Lu- ··nJLrL·n
·¡
Parameters
n-ma
[In] The name of a global varIable.
v-l:a
[In] New value.
·na·r_v-l:a
[In] The value to check the current value of the global varIable.
Peturn VaIue
Ìf successful, the functIon returns true, otherwIse It returns false. For detaIls about the error call
CetLastError(). Ìf the current value of the global varIable Is dIfferent from check_value, the
functIon returns false.
Note
FunctIon provIdes atomIc access to the global varIable, so It can be used for provIdIng of a
semaphore at InteractIon of several Expert AdvIsors workIng sImultaneously wIthIn one clIent
termInal.
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
620
CIobaIVarIabIes0eIeteAII
0eletes global varIables of the clIent termInal.
Lnr JL·o-LV-nL-oL--¯-L-r-ALL.
-rnLnj prafix_n-ma=:.LL, // ALL jL·o-L v-nL-oL-- .Lr! n-m-- o-jLnnLnj .Lr! r!- pn-rLx
J-r-rLm- limi:_j-:-=` // ALL jL·o-L v-nL-oL-- r!-r .-n- ·!-nj-J o-r·n- r!L- J-r-
·¡
Parameters
prafix_n-ma=:.LL
[In] Name prefIx global varIables to remove. Ìf you specIfy a prefIx NULL or empty strIng, then all
varIables that meet the data crIterIon wIll be deleted.
limi:_j-:-=`
[In] 0ate to select global varIables by the tIme of theIr last modIfIcatIon. The functIon removes
global varIables, whIch were changed before thIs date. Ìf the parameter Is zero, then all varIables
that meet the fIrst crIterIon (prefIx) are deleted.
Peturn VaIue
The number of deleted varIables.
Note
Ìf both optIons are equal to zero (prefIx_name = NULL and lImIt_data = 0), then functIon deletes all
global varIables of the termInal. Ìf both parameters are specIfIed, then It deletes global varIables
correspondIng to both parameters.
Clobal varIables exIst In the clIent termInal durIng 4 weeks sInce theIr last use, then they are
automatIcally deleted.
GIobaI VariabIes of the TerminaI
© 2000·2010, |eta0uotes Software Corp.
621
CIobaIVarIabIesTotaI
Feturns the total number of global varIables of the clIent termInal.
Lnr JL·o-LV-nL-oL--r·r-L.·¡
Peturn VaIue
Number of global varIables.
Note
Clobal varIables exIst In the clIent termInal durIng 4 weeks sInce theIr last use, then they are
automatIcally deleted. Call of a global varIable Is not only settIng a new value, but also readIng the
value of the global varIable.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
622
FIIe FunctIons
ThIs Is a group of functIons for workIng wIth fIles.
There are two dIrectorIes (wIth subdIrectorIes) In whIch workIng fIles can be located:
termInal_path\|0L5\FÌLES\ (In the termInal menu select to vIew ¨FIle¨ · ¨Dpen the data dIrectory¨);
the common folder for all the termInals Installed on a computer · usually located In the dIrectory C:
\0ocuments and SettIngs\All Users\ApplIcatIon 0ata\|eta0uotes\TermInal\Common\.
There Is a program method to obtaIn names of these catalogs usIng the TermInalÌnfoStrIng() functIon,
usIng the ENU|_TEF|ÌNAL_ÌNFD_STFÌNC enumeratIons:
//--- ¯·LJ-n r!-r -r·n-- r!- r-nmLn-L J-r-
-rnLnj r-nmLn-L_J-r-_p-r!=r-nmLn-LPnr·¯rnLnj.rI-MPHAH_¯ArA_-Ar|·¡
//--- .·mm·n r·LJ-n r·n -LL ·LL-nr r-nmLn-L-
-rnLnj ··mm·n_J-r-_p-r!=r-nmLn-LPnr·¯rnLnj.rI-MPHAH_.JMMJH¯ArA_-Ar|·¡
Work wIth fIles from other dIrectorIes Is prohIbIted.
FunctIon ActIon
FIleFIndFIrst Starts the search of fIles In a dIrectory In
accordance wIth the specIfIed fIlter
FIleFIndNext ContInues the search started by the
FIleFIndFIrst() functIon
FIleFIndClose Closes search handle
FIleDpen Dpens a fIle wIth a specIfIed name and flag
FIle0elete 0eletes a specIfIed fIle
FIleFlush WrItes to a dIsk all data remaInIng In the
Input/output fIle buffer
FIleÌsEndIng 0efInes the end of a fIle In the process of
readIng
FIleÌsLIneEndIng 0efInes the end of a lIne In a text fIle In the
process of readIng
FIleClose Closes a prevIously opened fIle
FIleÌsExIst Checks the exIstence of a fIle
FIleCopy CopIes the orIgInal fIle from a local or shared
folder to another fIle
FIle|ove |oves or renames a fIle
FIleFeadArray Feads arrays of any type except for strIng from
the fIle of the 8ÌN type
FIleFead8ool Feads from the fIle of the CS7 type a strIng
from the current posItIon tIll a delImIter (or tIll
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
623
the end of a text lIne) and converts the read
strIng to a value of bool type
FIleFead0atetIme Feads from the fIle of the CS7 type a strIng of
one of the formats: ¨YYYY.||.00 HH:|Ì:SS¨,
¨YYYY.||.00¨ or ¨HH:|Ì:SS¨ · and converts It
Into a datetIme value
FIleFead0ouble Feads a double value from the current posItIon
of the fIle poInter
FIleFeadFloat Feads a float value from the current posItIon of
the fIle poInter
FIleFeadÌnteger Feads Int, short or char value from the current
posItIon of the fIle poInter
FIleFeadLong Feads a long type value from the current
posItIon of the fIle poInter
FIleFeadNumber Feads from the fIle of the CS7 type a strIng
from the current posItIon tIll a delImIter (or tIl
the end of a text lIne) and converts the read
strIng Into double value
FIleFeadStrIng Feads a strIng from the current posItIon of a
fIle poInter from a fIle
FIleFeadStruct Feads from a bInary fIle contents Into a
structure passed as a parameter, from the
current posItIon of the fIle poInter
FIleSeek |oves the posItIon of the fIle poInter by a
specIfIed number of bytes relatIve to the
specIfIed posItIon
FIleSIze Feturns the sIze of a correspondIng open fIle
FIleTell Feturns the current posItIon of the fIle poInter
of a correspondIng open fIle
FIleWrIte WrItes data to a fIle of CS7 or TXT type
FIleWrIteArray WrItes arrays of any type except for strIng Into
a fIle of 8ÌN type
FIleWrIte0ouble WrItes value of the double type from the
current posItIon of a fIle poInter Into a bInary
fIle
FIleWrIteFloat WrItes value of the float type from the current
posItIon of a fIle poInter Into a bInary fIle
FIleWrIteÌnteger WrItes value of the Int type from the current
posItIon of a fIle poInter Into a bInary fIle
FIleWrIteLong WrItes value of the long type from the current
posItIon of a fIle poInter Into a bInary fIle
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
624
FIleWrIteStrIng WrItes the value of a strIng parameter Into a
8ÌN or TXT fIle startIng from the current
posItIon of the fIle poInter
FIleWrIteStruct WrItes the contents of a structure passed as a
parameter Into a bInary fIle, startIng from the
current posItIon of the fIle poInter
FolderCreate
Folder0elete Femoves a selected dIrectory. Ìf the folder Is
not empty, then It can't be removed
FolderClean 0eletes all fIles In the specIfIed folder
Ìf the fIle Is opened for wrItIng usIng FIleDpen(), all subfolders specIfIed In the path wIll be created If
there are no such ones.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
625
FIIeFIndFIrst
The functIon starts the search of fIles In a dIrectory In accordance wIth the specIfIed fIlter.
L·nj ¯LL-¯LnJ¯Ln-r.
-rnLnj fila_fil:ar, // ¯rnLnj - ---n·! rLLr-n
-rnLnjs ra::rnaj_filan-ma, // H-m- ·r r!- rLL- r·unJ
Lnr ·.mm.n_fl-j // ¯-rLn-- r!- ---n·!
·¡
Parameters
fila_fil:ar
[In] Search fIlter. A subdIrectory (or sequence of nested subdIrectorIes) relatIve to the \FIles
dIrectory, In whIch fIles should be searched for, can be specIfIed In the fIlter.
ra::rnaj_filan-ma
[out] The returned parameter, where, In case of success, the name of the fIrst found fIle Is
placed.
·.mm.n_fl-j
[In] Flag determInIng the locatIon of the fIle. Ìf common_flag = FÌLE_CD||DN, then the fIle Is
located In a shared folder for all clIent termInals. DtherwIse, the fIle Is located In a local folder.
Peturn VaIue
Feturns handle of the object searched, whIch should be used for further sortIng of fIles by the
FIleFIndNext() functIon, or ÌN7ALÌ0_HAN0LE when there Is no fIle correspondIng to the fIlter (In the
partIcular case · when the dIrectory Is empty). After searchIng handle must be closed usIng the
FIleFIndClose() functIon.
ExampIe:
v·LJ Jn¯r-nr.·

-rnLnj rLL-n-m-¡
//---
Lnr r·unJ=¯LL-¯LnJ¯Ln-r.¨·.·¨,rLL-n-m-·¡
Lr.r·unJ.=PHVAHP¯_|AH¯HI·
-nLnr.¨¯LL-¯LnJ¯Ln-r n-runn-J ¨,rLL-n-m-·¡
-L--

-nLnr.¨¯LL-- n·r r·unJ... .·nrLnu- ---n·! Ln .·mm·n¨·¡
r·unJ=¯LL-¯LnJ¯Ln-r.¨·.·¨,rLL-n-m-,¯PHI_.JMMJH·¡
Lr.r·unJ.=PHVAHP¯_|AH¯HI·
-nLnr.¨¯LL-¯LnJ¯Ln-r Ln .·mm·n n-runn-J ¨,rLL-n-m-·¡
·
·
See aIso
FIleFIndNext, FIleFIndClose
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
626
FIIeFIndNext
The functIon contInues the search started by FIleFIndFIrst().
o··L ¯LL-¯LnJH-xr.
L·nj ·a-r·n_n-njla, // ¯--n·! !-nJL-
-rnLnjs ra::rnaj_filan-ma // H-m- ·r r!- rLL- r·unJ
·¡
Parameters
·a-r·n_n-njla
[In] Search handle, retrIeved by FIleFIndFIrst().
ra::rnaj_filan-ma
[out] The name of the next fIle or dIrectory found.
Peturn VaIue
Ìf successful returns true, otherwIse false.
ExampIe:
v·LJ Jn¯r-nr.·

-rnLnj rLL-n-m-¡
Lnr L=¨¡
//---
Lnr ---n·!=¯LL-¯LnJ¯Ln-r.¨·.·¨,rLL-n-m-·¡
Lr.---n·!.=PHVAHP¯_|AH¯HI·

-nLnr.¨¯LL-¯LnJ¯Ln-r n-runn-J ¨,rLL-n-m-·¡
.!LL-.¯LL-¯LnJH-xr.---n·!,rLL-n-m-··

L--¡
-nLnr.L,¨.¨,rLL-n-m-·¡
·
¯LL-¯LnJ.L·--.rLL-n-m-·¡
·
-L--
-nLnr.¨¯LL-- n·r r·unJ...¨·¡
·
See aIso
FIleFIndFIrst, FIleFIndClose
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
627
FIIeFIndCIose
The functIon closes the search handle.
v·LJ ¯LL-¯LnJ.L·--.
L·nj ·a-r·n_n-njla // ¯--n·! !-nJL-
·¡
Parameters
·a-r·n_n-njla
[In] Search handle, retrIeved by FIleFIndFIrst().
Peturn VaIue
No value returned.
Note
FunctIon must be called to free up system resources.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
628
FIIeIsExIst
Checks the exIstence of a fIle.
o··L ¯LL-P-IxL-r.
-rnLnj fila_n-ma, // ¯LL- n-m-
Lnr ·.mm.n_fl-j=` // ¯--n·! -n--
·¡
Parameters
fila_n-ma
[In] The name of the fIle beIng checked
·.mm.n_fl-j=`
[In] Flag determInIng the locatIon of the fIle. Ìf common_flag = FÌLE_CD||DN, then the fIle Is
located In a shared folder for all clIent termInals. DtherwIse, the fIle Is located In a local folder.
Peturn VaIue
Feturns true, If the specIfIed fIle exIsts.
Note
Ìf common_flag = FÌLE_CD||DN, then the functIon looks for the fIle In a shared folder for all clIent
termInals, otherwIse the functIon looks for a fIle In a local folder (|0L5 \ FIles or |0L5 \ Tester \
FIles In the case of testIng).
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
629
FIIeDpen
The functIon opens the fIle wIth the specIfIed name and flag.
Lnr ¯LL-Jp-n.
-rnLnj fila_n-ma, // ¯LL- n-m-
Lnr .pan_fl-j·, // .·moLn-rL·n ·r rL-j-
-!·nr jalimi:ar='·:' // ¯-LLmLr-n
uLnr ·.jap-ja=¯P_Á¯P // .·J- p-j-
·¡
Parameters
fila_n-ma
[In] The name of the fIle can contaIn subfolders. Ìf the fIle Is opened for wrItIng, these subfolders
wIll be created If there are no such ones.
.pan_fl-j·
[In] combInatIon of flags determInIng the operatIon mode for the fIle. The flags are defIned as
follows:
FÌLE_FEA0 fIle Is opened for readIng
FÌLE_WFÌTE fIle Is opened for wrItIng
FÌLE_8ÌN bInary read·wrIte mode (no conversIon from a strIng and to a strIng)
FÌLE_CS7 fIle of csv type (all recorded Items are converted to the strIngs of unIcode or ansI type,
and are separated by a delImIter)
FÌLE_TXT a sImple text fIle (the same as csv, but the delImIter Is not taken Into account)
FÌLE_ANSÌ lInes of ANSÌ type (sIngle·byte symbols)
FÌLE_UNÌCD0E lInes of UNÌCD0E type (double·byte characters)
FÌLE_SHAFE_FEA0 shared readIng from several programs
FÌLE_SHAFE_WFÌTE shared wrItIng from several programs
FÌLE_CD||DN locatIon of the fIle In a shared folder for all clIent termInals
jalimi:ar='·:'
[In] value to be used as a separator In txt or csv·fIle. Ìf the csv·fIle delImIter Is not specIfIed, It
defaults to a tab. Ìf the txt·fIle delImIter Is not specIfIed, then no separator Is used. Ìf the
separator Is clearly set to 0, then no separator Is used.
·.jap-ja=¯P_Á¯P
[In] The value of the code page. For the most·used code pages provIde approprIate constants.
Peturn VaIue
Ìf a fIle has been opened successfully, the functIon returns the fIle handle, whIch Is then used to
access the fIle data. Ìn case of faIlure returns ÌN7ALÌ0_HAN0LE.
Note
The fIle Is opened In the folder of the clIent termInal In the subfolder |0L5\fIles (or |0L5
\tester\fIles In case of testIng). Ìf FÌLE_CD||DN Is specIfIed among flags, the fIle Is opened In a
shared folder for all |etaTrader 5 clIent termInals.
ExampIe:
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
630
//--------------------------------------------------------------------
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·

//--- Ln··nn-·r rLL- ·p-nLnj m-r!·J
-rnLnj r-nmLn-L_J-r-_p-r!=r-nmLn-LPnr·¯rnLnj.rI-MPHAH_¯ArA_-Ar|·¡
-rnLnj rLL-n-m-=r-nmLn-L_J-r-_p-r!-¨\\M,H¯\\¯LL--\\¨-¨rn-·r-L-.·-v¨¡
Lnr rLL-!-nJL-=¯LL-Jp-n.rLL-n-m-,¯PHI_W-PrI¯PHI_.¯V·¡
Lr.rLL-!-nJL-<¨·

-nLnr.¨¯-LL-J r· ·p-n r!- rLL- oy r!- -o-·Lur- p-r! ¨·¡
-nLnr.¨Inn·n ··J- ¨,J-rH--rInn·n.··¡
·
//--- ··nn-·r .-y ·r .·nkLnj Ln r!- ¨rLL- --nJo·x¨
----rH--rInn·n.·¡
rLL-!-nJL-=¯LL-Jp-n.¨rn-·r-L-.·-v¨,¯PHI_W-PrI¯PHI_.¯V·¡
Lr.rLL-!-nJL-.=PHVAHP¯_|AH¯HI·

¯LL-WnLr-.rLL-!-nJL-,rLm-.unn-nr.·,¯ymo·L.·,-I-PJ¯_.J--IHr·¡
¯LL-.L·--.rLL-!-nJL-·¡
-nLnr.¨¯LL-Jp-n J·¨·¡
·
-L-- -nLnr.¨Jp-n-rL·n ¯LL-Jp-n r-LL-J, -nn·n ¨,J-rH--rInn·n.··¡
//--- -n·r!-n -x-mpL- .Lr! r!- ·n--rL·n ·r -n -n·L·--J JLn-·r·ny Ln M,H¯\¯LL--\
-rnLnj -uor·LJ-n=¨-----n·!¨¡
rLL-!-nJL-=¯LL-Jp-n.-uor·LJ-n-¨\\rn-·r-L-.rxr¨,¯PHI_W-PrI¯PHI_.¯V·¡
Lr.rLL-!-nJL-.=PHVAHP¯_|AH¯HI·

¯LL-WnLr-.rLL-!-nJL-,rLm-.unn-nr.·,¯ymo·L.·,-I-PJ¯_.J--IHr·¡
¯LL-.L·--.rLL-!-nJL-·¡
-nLnr.¨r!- rLL- m·-r o- ·n--r-J Ln r!- r·LJ-n ¨-r-nmLn-L_J-r-_p-r!-¨\\¨--uor·LJ-n·¡
·
-L-- -nLnr.¨¯LL- ·p-n r-LL-J, -nn·n ¨,J-rH--rInn·n.··¡
·
See aIso
FIleFIndFIrst, FolderCreate, FIle openIng flags
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
631
FIIeCIose
Close the fIle prevIously opened by FIleDpen().
v·LJ ¯LL-.L·--.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
No value returned.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
632
FIIeCopy
The functIon copIes the orIgInal fIle from a local or shared folder to another fIle.
o··L ¯LL-.·py.
-rnLnj ·r·_filan-ma, // H-m- ·r - -·un·- rLL-
Lnr ·.mm.n_fl-j, // H··-rL·n
-rnLnj j·:_filan-ma, // H-m- ·r r!- J--rLn-rL·n rLL-
Lnr m.ja_fl-j· // A··--- m·J-
·¡
Parameters
·r·_filan-ma
[In] FIle name to copy.
·.mm.n_fl-j
[In] Flag determInIng the locatIon of the fIle. Ìf common_flag = FÌLE_CD||DN, then the fIle Is
located In a shared folder for all clIent termInals. DtherwIse, the fIle Is located In a local folder.
j·:_filan-ma
[In] Fesult fIle name.
m.ja_fl-j·
[In] Access flags. The parameter can contaIn only 2 flags: FÌLE_FEWFÌTE and/or FÌLE_CD||DN ·
other flags are Ignored. Ìf the fIle already exIsts, and the FÌLE_FEWFÌTE flag hasn't been
specIfIed, then the fIle wIll not be rewrItten, and the functIon wIll return false.
Peturn VaIue
Ìn case of faIlure the functIon returns false.
Note
Ìf the new fIle already exIsts, the copy wIll be made dependIng on the avaIlabIlIty of the
FÌLE_FEWFÌTE flag In the mode_flags parameter.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
633
FIIe0eIete
0eletes the specIfIed fIle In a local folder of the clIent termInal.
o··L ¯LL-¯-L-r-.
-rnLnj fila_n-ma // ¯LL- n-m- r· J-L-r-
Lnr ·.mm.n_fl-j=` // H··-rL·n ·r r!- rLL- r· J-L-r-
·¡
Parameters
fila_n-ma
[In] FIle name.
·.mm.n_fl-j=`
[In] Flag determInIng the fIle locatIon. Ìf common_flag = FÌLE_CD||DN, then the fIle Is located In
a shared folder for all clIent termInals. DtherwIse, the fIle Is located In a local folder.
Peturn VaIue
Ìn case of faIlure the functIon returns false.
Note
0eletes the specIfIed fIle from a local folder of the clIent termInal (|0L5\fIles or |0L5\tester\fIles
In case of testIng). Ìf common_flag = FÌLE_CD||DN, then the functIon removes the fIle from the
shared folder for all clIent termInals.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
634
FIIehove
|oves a fIle from a local or shared folder to another folder.
o··L ¯LL-M·v-.
-rnLnj ·r·_filan-ma, // ¯LL- n-m- r·n r!- m·v- ·p-n-rL·n
Lnr ·.mm.n_fl-j, // H··-rL·n
-rnLnj j·:_filan-ma, // H-m- ·r r!- J--rLn-rL·n rLL-
Lnr m.ja_fl-j· // A··--- m·J-
·¡
Parameters
·r·_filan-ma
[In] FIle name to move/rename.
·.mm.n_fl-j
[In] Flag determInIng the locatIon of the fIle. Ìf common_flag = FÌLE_CD||DN, then the fIle Is
located In a shared folder for all clIent termInals. DtherwIse, the fIle Is located In a local folder.
j·:_filan-ma
[In] FIle name after operatIon
m.ja_fl-j·
[In] Access flags. The parameter can contaIn only 2 flags: FÌLE_FEWFÌTE and/or FÌLE_CD||DN ·
other flags are Ignored. Ìf the fIle already exIsts and the FÌLE_FEWFÌTE flag Isn't specIfIed, the
fIle wIll not be rewrItten, and the functIon wIll return false.
Peturn VaIue
Ìn case of faIlure the functIon returns false.
Note
Ìf the new fIle already exIsts, the copy wIll be made dependIng on the avaIlabIlIty of the
FÌLE_FEWFÌTE flag In the mode_flags parameter.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
635
FIIeFIush
WrItes to a dIsk all data remaInIng In the Input/output fIle buffer.
v·LJ ¯LL-¯Lu-!.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
No value returned.
Note
FunctIon FIleFlush () must be called between the operatIons of readIng from a fIle and wrIte to a
fIle.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
636
FIIeIsEndIng
0efInes the end of a fIle In the process of readIng.
o··L ¯LL-P-InJLnj.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
The functIon returns true If the fIle end has been reached In the process of readIng or movIng of the
fIle poInter.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
637
FIIeIsLIneEndIng
0efInes the lIne end In a text fIle In the process of readIng.
o··L ¯LL-P-HLn-InJLnj.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
Feturns true If In the process of readIng txt or csv·fIle reached the end of the lIne (the characters
CF·LF).
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
638
FIIePeadArray
Feads from a fIle of 8ÌN type arrays of any type except strIng (may be an array of structures, not
contaInIng strIngs, and dynamIc arrays
uLnr ¯LL----JAnn-y.
Lnr fila_n-njla // ¯LL- !-nJL-
v·LJ -rr-y/¹, // Ann-y r· n-··nJ
Lnr ·:-r:_i:am=`, // -r-nr -nn-y p·-LrL·n r· .nLr-
Lnr i:am·_·.:n:=VH¯LF_ÁRRÁ: // ··unr r· n--J
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
-rr-y/¹
[out] An array where the data wIll be loaded.
·:-r:_i:am=`
[In] Start posItIon to wrIte to the array.
i:am·_·.:n:=VH¯LF_ÁRRÁ:
[In] Number of elements to read. 8y default, reads the entIre array (cnt=WHDLE_AFFAY).
Peturn VaIue
Number of elements read.
Note
StrIng array can be read only from the fIle of TXT type. Ìf necessary, the functIon trIes to Increase
the sIze of the array.
See aIso
7arIables
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
639
FIIePeadßooI
Feads from the fIle of CS7 type strIng from the current posItIon to a delImIter (or tIll the end of the
text lIne) and converts the read strIng to a bool type value.
o··L ¯LL----Jз·L.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
LIne read may be set to ¨true¨, ¨false¨ or the symbolIc representatIon of Integers ¨0¨ or ¨1¨. A
nonzero value Is converted to a logIcal true. The functIon returns the converted value.
See aIso
Type bool
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
640
FIIePead0atetIme
Feads from the fIle of CS7 type a strIng of one of the formats: ¨YYYY.||.00 HH:|Ì:SS¨, ¨YYYY.||.
00¨ or ¨HH:|Ì:SS¨ · and converts It Into a value of datetIme type.
J-r-rLm- ¯LL----J¯-r-rLm-.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
The value of datetIme type.
See aIso
Type datetIme, StrIngToTIme, TImeToStrIng
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
641
FIIePead0oubIe
Feads a double·precIsIon floatIng poInt number (double) from the current posItIon of the bInary fIle.
J·uoL- ¯LL----J¯·uoL-.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
The value of double type.
Note
For more detaIls about the error, call CetLastError().
See aIso
Feal types (double, float), StrIngTo0ouble, 0oubleToStrIng
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
642
FIIePeadFIoat
Feads the sIngle·precIsIon floatIng poInt number (float) from the current posItIon of the bInary fIle.
rL·-r ¯LL----J¯L·-r.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
The value of float type.
Note
For more detaIls about the error, call CetLastError().
See aIso
Feal types (double, float), FIleFead0ouble
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
643
FIIePeadInteger
The functIon reads Int, short or char value from the current posItIon of the fIle poInter dependIng on the
length specIfIed In bytes.
Lnr ¯LL----JPnr-j-n.
Lnr fila_n-njla // ¯LL- !-nJL-
Lnr ·iza=F:._/ÁL.F // ¯Lz- ·r -n Lnr-j-n Ln oyr--
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
·iza=F:._/ÁL.F
[In] Number of bytes (up to 4 InclusIve), that should be wrItten. The correspondIng constants are
provIded: CHAF_7ALUE = 1, SHDFT_7ALUE = 2 and ÌNT_7ALUE = 4, so the functIon can read the
whole value of char, short or Int type.
Peturn VaIue
The value of Int type. SInce the Int type value Is returned, It can be converted to any Integer,
sIgned or unsIgned value. FIle poInter Is moved by the number of bytes of the read Integer type.
See aIso
ÌntegerToStrIng, StrIngToÌnteger, Ìnteger types
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
644
FIIePeadLong
The functIon reads an Integer of long type (8 bytes) from the current posItIon of the bInary fIle.
L·nj ¯LL----JH·nj.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
The value of long type.
See aIso
Ìnteger types, FIleFeadÌnteger
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
645
FIIePeadNumber
The functIon reads from the CS7 fIle a strIng from the current posItIon tIll a separator (or tIll the end
of a text strIng) and converts the read strIng to a value of double type.
J·uoL- ¯LL----JHumo-n.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
The value of double type.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
646
FIIePeadStrIng
The functIon reads from a strIng from the current posItIon of a fIle poInter In a fIle.
-rnLnj ¯LL----J¯rnLnj.
Lnr fila_n-njla // ¯LL- !-nJL-
Lnr ·iza=-. // H-njr! ·r r!- -rnLnj
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
·iza=-.
[In] Number of characters to read.
Peturn VaIue
LIne read (strIng).
Note
When readIng from a bIn·fIle. the length of a strIng to read must be specIfIed. When readIng from a
txt·fIle the strIng length Is not requIred, and the strIng wIll be read from the current posItIon to the
lIne feed character ¨\r\n¨. When readIng from a csv·fIle, the strIng length Isn't requIred also, the
strIng wIll be read from the current posItIon tIll the nearest delImIter or tIll the text strIng end
character.
Ìf the fIle Is opened wIth FÌLE_ANSÌ flag, then the lIne read Is converted to UnIcode.
See aIso
Type strIng, 0ata ConversIon
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
647
FIIePeadStruct
The functIon reads contents Into a structure passed as a parameter from a bIn·fIle, startIng wIth the
current posItIon of the fIle poInter.
uLnr ¯LL----J¯rnu·r.
Lnr fila_n-njla // ¯LL- !-nJL-
-ny_-LmpL-_-rnu·r ·:r_.o¬a·:, // r-nj-r -rnu·run- r· n--J r·
Lnr ·iza=-. // -rnu·run- -Lz- Ln oyr--
·¡
Parameters
fila_n-njla
[In] FIle descrIptor of an open bIn·fIle.
·:r_.o¬a·:
[out] The object of thIs structure. The structure should not contaIn strIngs, dynamIc arrays or
vIrtual functIons.
·iza=-.
[In] Number of bytes that should be read. Ìf sIze Is not specIfIed or the IndIcated value Is greater
than the sIze of the structure, the exact sIze of the specIfIed structure Is used.
Peturn VaIue
Ìf successful the functIon returns the number of bytes read. FIle poInter Is moved by the same
number of bytes.
See aIso
Structures and classes
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
648
FIIeSeek
The functIon moves the posItIon of the fIle poInter by a specIfIed number of bytes relatIve to the
specIfIed posItIon.
v·LJ ¯LL-¯--k.
L·nj fila_n-njla // ¯LL- !-nJL-
Lnr .ff·a:, // Pn oyr--
IHJM_¯PHI_-J¯PrPJH .rijin // -·-LrL·n r·n n-r-n-n·-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
.ff·a:
[In] The shIft In bytes (may take a negatIve value).
.rijin
[In] The startIng poInt for the dIsplacement. Can be one of values of ENU|_FÌLE_PDSÌTÌDN.
Peturn VaIue
No value returned.
Note
Ìf the executIon of the FIleSeek() functIon results In a negatIve shIft (goIng beyond the ¨level
boundary¨ of the fIle), the fIle poInter wIll be set to the fIle begInnIng.
Ìf a posItIon Is set beyond the ¨rIght boundary¨ of the fIle (larger than the fIle sIze), the next wrItIng
to the fIle wIll be performed not from the end of the fIle, but from the posItIon set. Ìn thIs case
IndefInIte values wIll be wrItten for the prevIous fIle end and the posItIon set.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
649
FIIeSIze
The functIon returns the fIle sIze In bytes.
uL·nj ¯LL-¯Lz-.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
The value of type Int.
Note
To obtaIn InformatIon about the error call CetLastError().
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
650
FIIeTeII
The fIle returns the current posItIon of the fIle poInter of an open fIle.
uL·nj ¯LL-r-LL.
Lnr fila_n-njla // ¯LL- !-nJL-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
Peturn VaIue
Current posItIon of the fIle descrIptor In bytes from the begInnIng of the fIle.
Note
To obtaIn InformatIon about the error call CetLastError().
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
651
FIIeWrIte
The functIon Is Intended for wrItIng of data Into a CS7 fIle, delImIter beIng Inserted automatIcally
unless It Is equal to 0. After wrItIng Into the fIle, the lIne end character ¨\r\n¨ wIll be added.
uLnr ¯LL-WnLr-.
Lnr fila_n-njla // ¯LL- !-nJL-
... // HL-r ·r n-··nJ-J p-n-m-r-n-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
...
[In] The lIst of parameters separated by commas, to wrIte to the fIle. The number of wrItten
parameters can be up to 6J.
Peturn VaIue
Number of bytes wrItten.
Note
Numbers wIll be converted Into a text at output (see the PrInt() functIon). 0ata of the double type
are output wIth the accuracy of 16 dIgIts after the decImal poInt, and the data can be dIsplayed
eIther In tradItIonal or In scIentIfIc format · dependIng on whIch format wIll be the most compact.
The data of the float type are shown wIth 5 dIgIts after the decImal poInt. To output real numbers
wIth dIfferent precIsIon or In a clearly specIfIed format, use 0oubleToStrIng().
Numbers of the bool type are dIsplayed as ¨true¨ or ¨false¨ strIngs. Numbers of the datetIme type
are dIsplayed as ¨YYYY.||.00 HH:|Ì:SS¨.
See aIso
Comment, PrInt, StrIngFormat
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
652
FIIeWrIteArray
The functIon wrItes arrays of any type except for strIng to a 8ÌN fIle (can be an array of structures not
contaInIng strIngs or dynamIc arrays).
Lnr ¯LL-WnLr-Ann-y.
Lnr fila_n-njla // ¯LL- !-nJL-
v·LJ -rr-y/¹, // Ann-y
Lnr ·:-r:_i:am=`, // ¯r-nr LnJ-x Ln r!- -nn-y
Lnr i:am·_·.:n:=VH¯LF_ÁRRÁ: // Humo-n ·r -L-m-nr-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
-rr-y/¹
[out] Array for recordIng.
·:-r:_i:am=`
[In] ÌnItIal Index In the array (number of the fIrst recorded element).
i:am·_·.:n:=VH¯LF_ÁRRÁ:
[In] Number of Items to record (WHDLE_AFFAY means that records all Items startIng wIth the
number start_Item untIl the end of the array).
Peturn VaIue
Number of recorded Items.
Note
StrIng array can be recorded In a TXT fIle. Ìn thIs case, strIngs are automatIcally ended by the lIne
end characters ¨\r\n¨. 0ependIng on the fIle type ANSÌ or UNÌCD0E, strIngs are eIther converted to
ansI·encodIng or not.
See aIso
7arIables
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
653
FIIeWrIte0oubIe
The functIon wrItes the value of a double parameter to a fIle, startIng from the current posItIon of the
fIle poInter.
uLnr ¯LL-WnLr-¯·uoL-.
Lnr fila_n-njla // ¯LL- !-nJL-
J·uoL- jv-l:a // V-Lu- r· .nLr-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
jv-l:a
[In] The value of double type.
Peturn VaIue
Ìf successful the functIon returns the number of bytes wrItten (In thIs case sIzeof(double)=8). The
fIle poInter Is shIfted by the same number of bytes.
See aIso
Feal types (double, float)
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
654
FIIeWrIteFIoat
The functIon wrItes the value of the float parameter to a bIn·fIle, startIng from the current posItIon of
the fIle poInter.
uLnr ¯LL-WnLr-¯L·-r.
Lnr fila_n-njla // ¯LL- !-nJL-
rL·-r fv-l:a // V-Lu- r· o- .nLrr-n
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
fv-l:a
[In] The value of float type.
Peturn VaIue
Ìf successful the functIon returns the number of bytes wrItten (In thIs case sIzeof(float)=4). The fIle
poInter Is shIfted by the same number of bytes.
See aIso
Feal types (double, float), FIleWrIte0ouble
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
655
FIIeWrIteInteger
The functIon wrItes the value of the Int parameter to a bIn·fIle, startIng from the current posItIon of
the fIle poInter.
uLnr ¯LL-WnLr-Pnr-j-n.
Lnr fila_n-njla // ¯LL- !-nJL-
Lnr iv-l:a, // V-Lu- r· o- .nLrr-n
Lnr ·iza=F:._/ÁL.F // ¯Lz- Ln oyr--
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
iv-l:a
[In] Ìnteger value.
·iza=F:._/ÁL.F
[In] Number of bytes (up to 4 InclusIve), that should be wrItten. The correspondIng constants are
provIded: CHAF_7ALUE=1, SHDFT_7ALUE=2 and ÌNT_7ALUE=4, so the functIon can wrIte the
Integer value of char, uchar, short, ushort, Int, or uInt type.
Peturn VaIue
Ìf successful the functIon returns the number of bytes wrItten. The fIle poInter Is shIfted by the
same number of bytes.
See aIso
ÌntegerToStrIng, StrIngToÌnteger, Ìnteger types
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
656
FIIeWrIteLong
The functIon wrItes the value of the long·type parameter to a bIn·fIle, startIng from the current
posItIon of the fIle poInter.
uLnr ¯LL-WnLr-H·nj.
Lnr fila_n-njla // ¯LL- !-nJL-
L·nj lv-l:a // V-Lu- r· o- .nLrr-n
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
lv-l:a
[In] 7alue of type long.
Peturn VaIue
Ìf successful the functIon returns the number of bytes wrItten (In thIs case sIzeof(long)=8). The fIle
poInter Is shIfted by the same number of bytes.
See aIso
Ìnteger types, FIleWrIteÌnteger
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
657
FIIeWrIteStrIng
The functIon wrItes the value of a strIng·type parameter Into a 8ÌN or TXT fIle startIng from the
current posItIon of the fIle poInter. When wrItIng to a TXT fIle: If there Is a symbol In the strIng '\n'
(LF) wIthout prevIous character '\r' (CF), then before '\n' the mIssIng '\r' Is added.
uLnr ¯LL-WnLr-¯rnLnj.
Lnr fila_n-njla // ¯LL- !-nJL-
-rnLnj ·v-l:a, // -rnLnj r· .nLr-
Lnr ·iza=-. // numo-n ·r -ymo·L-
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
·v-l:a
[In] StrIng.
·iza=-.
[In] The number of characters that you want to wrIte. ThIs optIon Is needed for wrItIng a strIng
Into a 8ÌN fIle. Ìf the sIze Is not specIfIed, then the entIre strIng wIthout the traIler 0 Is wrItten. Ìf
you specIfy a sIze smaller than the length of the strIng, then a part of the strIng wIthout the traIler
0 Is wrItten. Ìf you specIfy a sIze greater than the length of the strIng, the strIng Is fIlled by the
approprIate number of zeros. For fIles of TXT type, thIs parameter Is Ignored and the strIng Is
wrItten entIrely.
Peturn VaIue
Ìf successful the functIon returns the number of bytes wrItten. The fIle poInter Is shIfted by the
same number of bytes.
Note
Note that when wrItIng to a fIle opened by the FÌLE_UNÌCD0E flag (or wIthout a flag FÌLE_ANSÌ),
then the number of bytes wrItten wIll be twIce as large as the number of strIng characters wrItten.
When recordIng to a fIle opened wIth the FÌLE_ANSÌ flag, the number of bytes wrItten wIll coIncIde
wIth the number of strIng characters wrItten.
See aIso
Type strIng, StrIngFormat
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
658
FIIeWrIteStruct
The functIon wrItes Into a bIn·fIle contents of a structure passed as a parameter, startIng from the
current posItIon of the fIle poInter.
uLnr ¯LL-WnLr-¯rnu·r.
Lnr fila_n-njla // ¯LL- !-nJL-
-ny_-LmpL-_-rnu·r ·:r_.o¬a·:·, // LLnk r· -n ·o|-·r
Lnr ·iza=-. // -Lz- r· o- .nLrr-n Ln oyr--
·¡
Parameters
fila_n-njla
[In] FIle descrIptor returned by FIleDpen().
·:r_.o¬a·:·
[In] Feference to the object of thIs structure. The structure should not contaIn strIngs, dynamIc
arrays or vIrtual functIons.
·iza=-.
[In] Number of bytes that you want to record. Ìf sIze Is not specIfIed or the specIfIed number of
bytes Is greater than the sIze of the structure, the entIre structure Is wrItten.
Peturn VaIue
Ìf successful the functIon returns the number of bytes wrItten. The fIle poInter Is shIfted by the
same number of bytes.
See aIso
Structures and classes
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
659
FoIderCreate
The functIon creates a dIrectory In the FIles dIrectory (dependIng on the value of common_flag).
o··L ¯·LJ-n.n--r-.
-rnLnj f.ljar_n-ma, // ¯rnLnj .Lr! r!- n-m- ·r r!- n-. r·LJ-n
Lnr ·.mm.n_fl-j=` // ¯··p-
·¡
Parameters
f.ljar_n-ma
[In] The name of the dIrectory you want to create. ContaIns the full path to the folder.
·.mm.n_fl-j=`
[In] Flag determInIng the locatIon of the dIrectory. Ìf common_flag=FÌLE_CD||DN, then the
dIrectory Is In the shared folder for all clIent termInals. DtherwIse, the dIrectory Is In a local folder
(|0L5\fIles or |0L5\tester\fIles In case of testIng).
Peturn VaIue
Feturns true If successful, otherwIse · false.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
660
FoIder0eIete
The functIon removes the specIfIed dIrectory. Ìf the folder Is not empty, then It can't be removed.
o··L ¯·LJ-n¯-L-r-.
-rnLnj f.ljar_n-ma, // ¯rnLnj .Lr! r!- n-m- ·r r!- r·LJ-n r· J-L-r-
Lnr ·.mm.n_fl-j=` // ¯··p-
·¡
Parameters
f.ljar_n-ma
[In] The name of the dIrectory you want to delete. ContaIns the full path to the folder.
·.mm.n_fl-j=`
[In] Flag determInIng the locatIon of the dIrectory. Ìf common_flag=FÌLE_CD||DN, then the
dIrectory Is In the shared folder for all clIent termInals. DtherwIse, the dIrectory Is In a local folder
(|0L5\fIles or |0L5\tester\fIles In the case of testIng).
Peturn VaIue
Feturns true If successful, otherwIse false.
Note
Ìf the dIrectory contaIns at least one fIle and/or subdIrectory, then thIs dIrectory can't be deleted, It
must be cleared fIrst. FolderClean() Is used to clear a folder of all Its fIles or subfolders.
FiIe Functions
© 2000·2010, |eta0uotes Software Corp.
661
FoIderCIean
The functIon deletes all fIles In a specIfIed folder.
o··L ¯·LJ-n.L--n.
-rnLnj f.ljar_n-ma, // ¯rnLnj .Lr! r!- n-m- ·r r!- J-L-r-J r·LJ-n
Lnr ·.mm.n_fl-j=` // ¯··p-
·¡
Parameters
f.ljar_n-ma
[In] The name of the dIrectory where you want to delete all fIles. ContaIns the full path to the
folder.
·.mm.n_fl-j=`
[In] Flag determInIng the locatIon of the dIrectory. Ìf common_flag = FÌLE_CD||DN, then the
dIrectory Is In the shared folder for all clIent termInals. DtherwIse, the dIrectory Is In a local folder
(|0L5\fIles or |0L5\tester\fIles In case of testIng).
Peturn VaIue
Feturns true If successful, otherwIse false.
Note
ThIs functIon should be used wIth cautIon, sInce all the fIles and all subdIrectorIes are deleted
IrretrIevably.
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
662
Custom IndIcators
ThIs Is the group functIons used In the creatIon of custom IndIcators. These functIons can't be used
when wrItIng Expert AdvIsors and ScrIpts.
FunctIon ActIon
SetÌndex8uffer 8Inds the specIfIed IndIcator buffer wIth one·
dImensIonal dynamIc array of the double type
ÌndIcatorSet0ouble Sets the value of an IndIcator property of the
double type
ÌndIcatorSetÌnteger Sets the value of an IndIcator property of the
Int type
ÌndIcatorSetStrIng Sets the value of an IndIcator property of the
strIng type
PlotÌndexSet0ouble Sets the value of an IndIcator lIne property of
the type double
PlotÌndexSetÌnteger Sets the value of an IndIcator lIne property of
the Int type
PlotÌndexSetStrIng Sets the value of an IndIcator lIne property of
the strIng type
PlotÌndexCetÌnteger Feturns the value of an IndIcator lIne property
of the Integer type
All the necessary calculatIons of a custom IndIcator must be placed In the predetermIned functIon
DnCalculate(). Ìf you use a short form of the DnCalculate() functIon call, lIke
Lnr Jn.-L·uL-r- .··n-r Lnr n-r--_r·r-L, ··n-r Lnr pn-v_·-L·uL-r-J, ··n-r Lnr o-jLn, ··n-r J·uoL-s pnL·-¯`·
then the rctes_totcl varIable contaIns the value of the total number of elements of the prIce[] array,
passed as an Input parameter for calculatIng IndIcator values.
Parameter prev_cclcµlcted Is the result of the executIon of DnCalculate() at the prevIous call; It allows
organIzIng a savIng algorIthm for calculatIng IndIcator values. For example, If the current value
rates_total = 1000, prev_calculated = 999, then perhaps It's enough to make calculatIons only for one
value of each IndIcator buffer.
Ìf the InformatIon about the sIze of the Input array prIce would have been unavaIlable, then It would
lead to the necessIty to make calculatIons for 1000 values of each IndIcator buffer. At the fIrst call of
DnCalculate() value prev_calculated = 0. Ìf the prIce[] array has changed somehow, then In thIs case
prev_calculated Is also equal to 0.
The be¤ìn parameter shows the number of InItIal values of the prIce array, whIch don't contaIn data
for calculatIon. For example, If values of Accelerator DscIllator (for whIch the fIrst J7 values aren't
calculated) were used as an Input parameter, then begIn = J7. For example, let's consIder a sImple
IndIcator:
tpn·p-nry LnJL·-r·n_·!-nr_.LnJ·.
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
663
tpn·p-nry LnJL·-r·n_ourr-n- !
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r H-o-L!
tpn·p-nry LnJL·-r·n_L-o-L! ¨H-o-L!¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n! --J
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! !
//--- LnJL·-r·n ourr-n-
J·uoL- H-o-L!Ðurr-n¯`¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,H-o-L!Ðurr-n,PH¯P.ArJ-_¯ArA·¡
//---
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r Lnr o-jLn,
··n-r J·uoL- spnL·-¯`·

//---
-nLnr.¨o-jLn = ¨,o-jLn,¨ pn-v_·-L·uL-r-J = ¨,pn-v_·-L·uL-r-J,¨ n-r--_r·r-L = ¨,n-r--_r·r-L·¡
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
0rag It from the ¨NavIgator¨ wIndow to the wIndow of the Accelerator DscIllator IndIcator and we
IndIcate that calculatIons wIll be made based on the values of the prevIous IndIcator:
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
664
As a result, the fIrst call of DnCalculate() the value of prev_calculated wIll be equal to zero, and In
further calls It wIll be equal to the rates_total value (untIl the number of bars on the prIce chart
Increases).
The value of the begIn parameter wIll be exactly equal to the number of InItIal bars, for whIch the
values of the Accelerator IndIcator aren't calculated accordIng to the logIc of thIs IndIcator. Ìf we look
at the source code of the custom IndIcator Accelerator.mq5, we'll see the followIng lInes In the DnÌnIt()
functIon:
//--- --r- rLn-r o-n rn·m .!-r LnJ-x .LLL o- Jn-.n
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_¯-AW_ÐIJPH,`¯·¡
UsIng the functIon PlotÌndexSetÌnteger(0, PLDT_0FAW_8ECÌN, empty_fIrst_values), we set the
number of non·exIstIng fIrst values In the zero IndIcator array of a custom IndIcator, whIch we don't
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
665
need to accept for calculatIon (empty_fIrst_values). Thus, we have mechanIsms to:
1.
set the number of InItIal values of an IndIcator, whIch shouldn't be used for calculatIons In another
custom IndIcator;
2.
get InformatIon on the number of fIrst values to be Ignored when you call another custom IndIcator,
wIthout goIng Into the logIc of Its calculatIons.
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
666
ConnectIon between IndIcator PropertIes and CorrespondIng
FunctIons
Every custom IndIcator has numerous propertIes, some of whIch are oblIgatory and are always
posItIoned at the begInnIng of descrIptIon. They are the followIng propertIes:
IndIcatIon of a wIndow to plot the IndIcator - IndIcator_separate_wIndow or IndIcator_chart_wIndow;
number of IndIcator buffers - IndIcator_buffers;
number of plots of the IndIcator - IndIcator_plots.
Also there are other propertIes that can be set both through preprocessor dIrectIves and through
functIons Intended for custom IndIcator creatIon. These propertIes and correspondIng functIons are
descrIbed In the followIng table.
0IrectIves for propertIes of
IndIcator subwIndow
FunctIons of IndIcatorSet...
() type
0escrIptIon of the adjusted
property of the subwIndow
IndIcator_mInImum ÌndIcatorSet0ouble(
ÌN0ÌCATDF_|ÌNÌ|U|,
d|ax7alue)
|InImal value of the vertIcal
axIs
IndIcator_maxImum ÌndIcatorSet0ouble(
ÌN0ÌCATDF_|AXÌ|U|,
d|In7alue)
|axImal value of the vertIcal
axIs
IndIcator_levelN ÌndIcatorSet0ouble(
ÌN0ÌCATDF_LE7EL7ALUE, N·1,
nLevel7alue)
7ertIcal axIs value for N level
no preprocessor dIrectIve ÌndIcatorSetStrIng(
ÌN0ÌCATDF_LE7ELTEXT, N·1,
sLevelName)
Name of a dIsplayed level
IndIcator_levelcolor ÌndIcatorSetÌnteger(
ÌN0ÌCATDF_LE7ELCDLDF, N·
1, nLevelColor)
Color of N level
IndIcator_levelwIdth ÌndIcatorSetÌnteger(
ÌN0ÌCATDF_LE7ELWÌ0TH, N·
1, nLevelWIdth)
LIne wIdth for N level
IndIcator_levelstyle ÌndIcatorSetÌnteger(
ÌN0ÌCATDF_LE7ELSTYLE, N·1,
nLevelStyle)
LIne style for N level
0IrectIves for pIottIng
propertIes
FunctIons of
PIotIndexSet...() type
0escrIptIon of the adjusted
property of a pIot
IndIcator_labelN PlotÌndexSetStrIng(N·1,
PLDT_LA8EL,sLabel)
Short name of the number N
plot. Ìt Is dIsplayed In
0ataWIndow and In the pop·up
tooltIp when poIntIng the
mouse cursor over It
IndIcator_colorN PlotÌndexSetÌnteger(N·1, LIne color for N plot
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
667
PLDT_LÌNE_CDLDF, nColor)
IndIcator_styleN PlotÌndexSetÌnteger(N·1,
PLDT_LÌNE_STYLE, nType)
LIne style for N plot
IndIcator_typeN PlotÌndexSetÌnteger(N·1,
PLDT_0FAW_TYPE, nType)
LIne type for N plot
IndIcator_wIdthN PlotÌndexSetÌnteger(N·1,
PLDT_LÌNE_WÌ0TH, nWIdth)
LIne wIdth for N plot
Common IndIcator
propertIes
FunctIons of IndIcatorSet...
() type
0escrIptIon
no preprocessor dIrectIve ÌndIcatorSetStrIng(
ÌN0ÌCATDF_SHDFTNA|E,
sShortName)
Sets the convenIent short
name of the IndIcator that wIll
be dIsplayed In the lIst of
IndIcators (opened In the
termInal by pressIng CtrI+I).
no preprocessor dIrectIve ÌndIcatorSetÌnteger(
ÌN0ÌCATDF_0ÌCÌTS, n0IgIts)
Sets requIred accuracy of
dIsplay of IndIcator values ·
number of decImal places
no preprocessor dIrectIve ÌndIcatorSetÌnteger(
ÌN0ÌCATDF_LE7ELS, nLevels)
Sets number of levels In the
IndIcator wIndow
IndIcator_applIed_prIce No functIon, the property can
be set only by the
preprocessor dIrectIve.
0efault prIce type used for the
IndIcator calculatIon. Ìt Is
specIfIed when necessary, only
If DnCalculate() of the fIrst
type Is used.
The property value can also be
set from the dIalog of
IndIcator propertIes In the
¨Parameters¨ tab · ¨Apply to¨.
Ìt should be noted that numeratIon of levels and plots In preprocessor terms starts wIth one, whIle
numeratIon of the same propertIes at usIng functIons starts wIth zero, I.e. the IndIcated value must
be by 1 less than that IndIcated for #property.
There are several dIrectIves, for whIch there are no correspondIng functIons:
0IrectIve 0escrIptIon
IndIcator_chart_wIndow ÌndIcator Is dIsplayed In the maIn wIndow
IndIcator_separate_wIndow ÌndIcator Is dIsplayed In a separate subwIndow
IndIcator_buffers Number of requIred IndIcator buffers
IndIcator_plots Number of plots In the IndIcator
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
668
SetIndexßuffer
The functIon bInds a specIfIed IndIcator buffer wIth one·dImensIonal dynamIc array of the double type
announced at the global level.
o··L ¯-rPnJ-xÐurr-n.
Lnr injax, // ourr-n LnJ-x
J·uoL- o:ffar/¹, // -nn-y
IHJM_PH¯IxÐJ¯¯I-_r1-I j-:-_:ypa // .!-r .LLL o- -r·n-J
·¡
Parameters
injax
[In] Number of the IndIcator buffer. The numberIng starts wIth 0. The number must be less than
the value declared In #propertyIndIcator_buffers.
o:ffar/¹
[In] An array declared In the custom IndIcator program.
j-:-_:ypa
[In] Type of data stored In the IndIcator array. 8y default It Is ÌN0ÌCATDF_0ATA (values of the
calculated IndIcator). Ìt may also take the value of ÌN0ÌCATDF_CDLDF_ÌN0EX; In thIs case thIs
buffer Is used for storIng color Indexes for the prevIous IndIcator buffer. You can specIfy up to 64
colors In the #propertyIndIcator_colorN lIne. The ÌN0ÌCATDF_CALCULATÌDNS value means that the
buffer Is used In IntermedIate calculatIons of the IndIcator and Is not Intended for drawIng.
Peturn VaIue
Ìf successful, returns true, otherwIse · false.
Note
After bIndIng, the dynamIc array buffer[] wIll be Indexed as In common arrays, even If the IndexIng
of tImeserIes Is pre·Installed for the bound array. Ìf you want to change the order of access to
elements of the IndIcator array, use the ArraySetAsSerIes() functIon after bIndIng the array usIng
the SetIndexßuffer() functIon. Please note that you can't change the sIze for dynamIc arrays set as
IndIcator buffers by the functIon SetÌndex8uffer(). For IndIcator buffers, all operatIons of sIze
changes are performed by the executIng sub·system of the termInal.
ExampIe:
//--------------------------------------------------------------------
// r--r.·pyÐurr-n!.m¬¯
// .·pynLj!r `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m¬L¯.··m
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨¨¨
tpn·p-nry LnJL·-r·n_--p-n-r-_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- !
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
669
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r MA
tpn·p-nry LnJL·-r·n_L-o-L! ¨MA¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n! --J
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! !
//--- Lnpur p-n-m-r-n-
Lnpur o··L A-¯-nL--=rnu-¡
Lnpur Lnr p-nL·J=!¯¡
Lnpur IHJM_MA_MIr|J¯ -m··rM·J-=MJ¯I_IMA¡
Lnpur IHJM_A--HPI¯_--P.I pnL·-=--P.I_.HJ¯I¡
Lnpur Lnr -!Lrr=¨¡
//--- LnJL·-r·n ourr-n-
J·uoL- MAÐurr-n¯`¡
Lnr m-_!-nJL-¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
Lr.A-¯-nL--· Ann-y¯-rA-¯-nL--.MAÐurr-n,rnu-·¡
-nLnr.¨PnJL·-r·n ourr-n L- rLm---nL-- = ¨,Ann-yJ-rA-¯-nL--.MAÐurr-n··¡
¯-rPnJ-xÐurr-n.¨,MAÐurr-n,PH¯P.ArJ-_¯ArA·¡
-nLnr.¨PnJL·-r·n ourr-n -rr-n ¯-rPnJ-xÐurr-n.· L- rLm---nL-- = ¨,
Ann-yJ-rA-¯-nL--.MAÐurr-n··¡

//--- ·!-nj- r!- ·n-Jn ·r -··---Lnj -L-m-nr- ·r r!- LnJL·-r·n ourr-n
Ann-y¯-rA-¯-nL--.MAÐurr-n,A-¯-nL--·¡

PnJL·-r·n¯-r¯rnLnj.PH¯P.ArJ-_¯|J-rHAMI,¨MA.¨-p-nL·J-¨·¨-A-¯-nL--·¡
//---
m-_!-nJL-=LMA.¯ymo·L.·,¨,p-nL·J,-!Lrr,-m··rM·J-,pnL·-·¡
n-runn.¨·¡
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm- srLm-¯`,
··n-r J·uoL- s·p-n¯`,
··n-r J·uoL- s!Lj!¯`,
··n-r J·uoL- sL·.¯`,
··n-r J·uoL- s·L·--¯`,
··n-r L·nj srL·k_v·Lum-¯`,
··n-r L·nj sv·Lum-¯`,
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
670
··n-r Lnr s-pn--J¯`·

//--- .·py r!- v-Lu-- ·r r!- m·vLnj -v-n-j- Ln r!- ourr-n MAÐurr-n
Lnr ··pL-J=.·pyÐurr-n.m-_!-nJL-,¨,¨,n-r--_r·r-L,MAÐurr-n·¡
-nLnr.¨MAÐurr-n¯¨` = ¨,MAÐurr-n¯¨`·¡// ¯-p-nJLnj ·n r!- v-Lu- A-¯-nL--
// WLLL n-·-Lv- - v-ny ·LJ v-Lu-
// Jn r·n r!- ·unn-nr unrLnL-!-J o-n
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
//--------------------------------------------------------------------
See aIso
PropertIes custom IndIcators, Access to tImeserIes and IndIcators
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
671
IndIcatorSet0oubIe
The functIon sets the value of the correspondIng IndIcator property. Property of the IndIcator should
be of the double type. There are 2 varIants of the functIon.
CaII IndIcatIng IdentIfIer of the property.
o··L PnJL·-r·n¯-r¯·uoL-.
Lnr pr.p_ij, // LJ-nrLrL-n
J·uoL- pr.p_v-l:a // v-Lu- r· o- --r
·¡
CaII IndIcatIng the IdentIfIer and modIfIer of the property.
o··L PnJL·-r·n¯-r¯·uoL-.
Lnr pr.p_ij, // LJ-nrLrL-n
Lnr pr.p_m.jifiar, // m·JLrL-n
J·uoL- pr.p_v-l:a // v-Lu- r· o- --r
·
Parameters
pr.p_ij
[In] The value can be one of the values of the ENU|_CUSTD|ÌN0_PFDPEFTY_0DU8LE
enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. Dnly level propertIes requIre a modIfIer.
pr.p_v-l:a
[In] The value of the property.
Peturn VaIue
Ìf successful, returns true, otherwIse · false.
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
672
IndIcatorSetInteger
The functIon sets the value of the correspondIng IndIcator property. The property must be of Int or
color type. There are 2 varIants of the functIon.
CaII IndIcatIng IdentIfIer of the property.
o··L PnJL·-r·n¯-rPnr-j-n.
Lnr pr.p_ij, // LJ-nrLrL-n
Lnr pr.p_v-l:a // v-Lu- r· o- --r
·¡
CaII IndIcatIng the IdentIfIer and modIfIer of the property.
o··L PnJL·-r·n¯-rPnr-j-n.
Lnr pr.p_ij, // LJ-nrLrL-n
Lnr pr.p_m.jifiar, // m·JLrL-n
Lnr pr.p_v-l:a // v-Lu- r· o- --r
·
Parameters
pr.p_ij
[In] The value can be one of the values of the ENU|_CUSTD|ÌN0_PFDPEFTY_ÌNTECEF
enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. Dnly level propertIes requIre a modIfIer.
pr.p_v-l:a
[In] The value of the property.
Peturn VaIue
Ìf successful, returns true, otherwIse · false.
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
673
IndIcatorSetStrIng
The functIon sets the value of a correspondIng IndIcator property. The IndIcator property must be of
the strIng type. There are 2 varIants of the functIon.
CaII IndIcatIng IdentIfIer of the property.
o··L PnJL·-r·n¯-r¯rnLnj.
Lnr pr.p_ij, // LJ-nrLrL-n
-rnLnj pr.p_v-l:a // v-Lu- r· o- --r
·¡
CaII IndIcatIng the IdentIfIer and modIfIer of the property.
o··L PnJL·-r·n¯-r¯rnLnj.
Lnr pr.p_ij, // LJ-nrLrL-n
Lnr pr.p_m.jifiar, // m·JLrL-n
-rnLnj pr.p_v-l:a // v-Lu- r· o- --r
·
Parameters
pr.p_ij
[In] The value can be one of the values of the ENU|_CUSTD|ÌN0_PFDPEFTY_STFÌNC
enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. Dnly level propertIes requIre a modIfIer.
pr.p_v-l:a
[In] The value of the property.
Peturn VaIue
Ìf successful, returns true, otherwIse · false.
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
674
PIotIndexSet0oubIe
The functIon sets the value of the correspondIng property of the correspondIng IndIcator lIne. The
IndIcator property must be of the double type.
o··L -L·rPnJ-x¯-r¯·uoL-.
Lnr pl.:_injax, // pL·rrLnj -ryL- LnJ-x
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
J·uoL- pr.p_v-l:a // v-Lu- r· o- --r
·¡
Parameters
pl.:_injax
[In] Ìndex of the graphIcal plottIng
pr.p_ij
[In] The value can be one of the values of the ENU|_PLDT_PFDPEFTY_0DU8LE enumeratIon.
pr.p_v-l:a
[In] The value of the property.
Peturn VaIue
Ìf successful, returns true, otherwIse false.
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
675
PIotIndexSetInteger
The functIon sets the value of the correspondIng property of the correspondIng IndIcator lIne. The
IndIcator property must be of the Int, char, bool or color type. There are 2 varIants of the functIon.
CaII IndIcatIng IdentIfIer of the property.
o··L -L·rPnJ-x¯-rPnr-j-n.
Lnr pl.:_injax, // pL·rrLnj -ryL- LnJ-x
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr pr.p_v-l:a // v-Lu- r· o- --r
·¡
CaII IndIcatIng the IdentIfIer and modIfIer of the property.
o··L -L·rPnJ-x¯-rPnr-j-n.
Lnr pl.:_injax, // pL·rrLnj -ryL- LnJ-x
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr pr.p_m.jifiar, // pn·p-nry m·JLrL-n
Lnr pr.p_v-l:a // v-Lu- r· o- --r
·
Parameters
pl.:_injax
[In] Ìndex of the graphIcal plottIng
pr.p_ij
[In] The value can be one of the values of the ENU|_PLDT_PFDPEFTY_ÌNTECEF enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. Dnly level propertIes requIre a modIfIer.
pr.p_v-l:a
[In] The value of the property.
Peturn VaIue
Ìf successful, returns true, otherwIse false.
ExampIe: an IndIcator that draws a three·color lIne. The color scheme changes every 5 tIcks.
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
676
tpn·p-nry LnJL·-r·n_·!-nr_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- `
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r .·L·nHLn-
tpn·p-nry LnJL·-r·n_L-o-L! ¨.·L·nHLn-¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_.JHJ-_HPHI
tpn·p-nry LnJL·-r·n_··L·n! --J,Jn--n,ÐLu-
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! `
//--- LnJL·-r·n ourr-n-
J·uoL- .·L·nHLn-Ðurr-n¯`¡
J·uoL- .·L·nÐurr-n¯`¡
Lnr MA_!-nJL-¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,.·L·nHLn-Ðurr-n,PH¯P.ArJ-_¯ArA·¡
¯-rPnJ-xÐurr-n.!,.·L·nÐurr-n,PH¯P.ArJ-_.JHJ-_PH¯Ix·¡
//--- j-r MA !-nJL-
MA_!-nJL-=LMA.¯ymo·L.·,¨,!¨,¨,MJ¯I_IMA,--P.I_.HJ¯I·¡
//---
·
//--------------------------------------------------------------------
// j-r ··L·n LnJ-x
//--------------------------------------------------------------------
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
677
Lnr j-rPnJ-xJr.·L·n.Lnr L·

Lnr |=L``¨¨¡
Lr.|<!¨¨· n-runn.¨·¡// rLn-r LnJ-x
Lr.|<`¨¨· n-runn.!·¡// --··nJ LnJ-x
n-runn.`·¡ // r!LnJ LnJ-x
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm- srLm-¯`,
··n-r J·uoL- s·p-n¯`,
··n-r J·uoL- s!Lj!¯`,
··n-r J·uoL- sL·.¯`,
··n-r J·uoL- s·L·--¯`,
··n-r L·nj srL·k_v·Lum-¯`,
··n-r L·nj sv·Lum-¯`,
··n-r Lnr s-pn--J¯`·

//---
-r-rL· Lnr rL·k-=¨,m·JLrL-J=¨¡
Lnr LLmLr¡
//--- rLn-r ·-L·uL-rL·n ·n numo-n ·r o-n- .-- ·!-nj-J
Lr.pn-v_·-L·uL-r-J==¨·

//--- ··py v-Lu-- ·r MA Lnr· LnJL·-r·n ourr-n .·L·nHLn-Ðurr-n
Lnr ··pL-J=.·pyÐurr-n.MA_!-nJL-,¨,¨,n-r--_r·r-L,.·L·nHLn-Ðurr-n·¡
Lr.··pL-J<=¨· n-runn.¨·¡// ··pyLnj r-LL-J - r!n·. -.-y
//--- n·. --r LLn- ··L·n r·n -v-ny o-n
r·n.Lnr L=¨¡L<n-r--_r·r-L¡L--·
.·L·nÐurr-n¯L`=j-rPnJ-xJr.·L·n.L·¡
·
-L--

//--- ··py v-Lu-- ·r MA Lnr· LnJL·-r·n ourr-n .·L·nHLn-Ðurr-n
Lnr ··pL-J=.·pyÐurr-n.MA_!-nJL-,¨,¨,n-r--_r·r-L,.·L·nHLn-Ðurr-n·¡
Lr.··pL-J<=¨· n-runn.¨·¡
rL·k---¡// rL·k- ··unrLnj
Lr.rL·k-=¯·//Lr'- rLm- r· ·!-nj- ··L·n -·!-m-

rL·k-=¨¡ // n---r ··unr-n
m·JLrL-J--¡ // ··unr-n ·r ··L·n ·!-nj--
Lr.m·JLrL-J=`·m·JLrL-J=¨¡// n---r ··unr-n
----rH--rInn·n.·¡
-.Lr·!.m·JLrL-J·
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
678

·--- ¨.// rLn-r ··L·n -·!-m-
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,¨,--J·¡
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,!,ÐLu-·¡
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,`,Jn--n·¡
-nLnr.¨.·L·n -·!-m- ¨-m·JLrL-J·¡
on--k¡
·--- !.// --··nJ ··L·n -·!-m-
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,¨,1-LL·.·¡
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,!,-Lnk·¡
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,`,HLj!r¯L-r-Jn-y·¡
-nLnr.¨.·L·n -·!-m- ¨-m·JLrL-J·¡
on--k¡
J-r-uLr.// r!LnJ ··L·n -·!-m-
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,¨,HLj!rJ·LJ-nn·J·¡
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,!,Jn·!LJ·¡
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,`,HLm-Jn--n·¡
-nLnr.¨.·L·n -·!-m- ¨-m·JLrL-J·¡
·
·
-L--

//--- --r -r-nr p·-LrL·n
LLmLr=pn-v_·-L·uL-r-J-!¡
//--- n·. .- --r LLn- ··L·n r·n -v-ny o-n
r·n.Lnr L=LLmLr¡L<n-r--_r·r-L¡L--·
.·L·nÐurr-n¯L`=j-rPnJ-xJr.·L·n.L·¡
·
·
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
//--------------------------------------------------------------------
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
679
PIotIndexSetStrIng
The functIon sets the value of the correspondIng property of the correspondIng IndIcator lIne. The
IndIcator property must be of the strIng type.
o··L -L·rPnJ-x¯-r¯rnLnj.
Lnr pl.:_injax, // pL·rrLnj -ryL- LnJ-x
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
-rnLnj pr.p_v-l:a // v-Lu- r· o- --r
·¡
Parameters
pl.:_injax
[In] Ìndex of graphIcal plot
pr.p_ij
[In] The value can be one of the values of the ENU|_PLDT_PFDPEFTY_STFÌNC enumeratIon.
pr.p_v-l:a
[In] The value of the property.
Peturn VaIue
Ìf successful, returns true, otherwIse false.
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
680
PIotIndexCetInteger
The functIon sets the value of the correspondIng property of the correspondIng IndIcator lIne. The
IndIcator property must be of the Int, color, bool or char type. There are 2 varIants of the functIon.
CaII IndIcatIng IdentIfIer of the property.
Lnr -L·rPnJ-xJ-rPnr-j-n.
Lnr pl.:_injax, // pL·rrLnj -ryL- LnJ-x
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
·¡
CaII IndIcatIng the IdentIfIer and modIfIer of the property.
Lnr -L·rPnJ-xJ-rPnr-j-n.
Lnr pl.:_injax, // pL·rrLnj LnJ-x
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr pr.p_m.jifiar // pn·p-nry m·JLrL-n
·
Parameters
pl.:_injax
[In] Ìndex of the graphIcal plottIng
pr.p_ij
[In] The value can be one of the values of the ENU|_PLDT_PFDPEFTY_ÌNTECEF enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. Dnly level propertIes requIre a modIfIer.
Note
FunctIon Is desIgned to extract the settIngs of drawIng of the approprIate IndIcator lIne. The
functIon works In tandem wIth the functIon PlotÌndexSetÌnteger to copy the drawIng propertIes of
one lIne to another.
ExampIe: an IndIcator that colors candles dependIng on the day of the week. Colors for each day are
set In a program way.
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
681
tpn·p-nry LnJL·-r·n_--p-n-r-_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- ¯
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r .·L·n.-nJL--
tpn·p-nry LnJL·-r·n_L-o-L! ¨.·L·n.-nJL--¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_.JHJ-_.AH¯HI¯
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! !
//--- LnJL·-r·n ourr-n-
J·uoL- Jp-nÐurr-n¯`¡
J·uoL- |Lj!Ðurr-n¯`¡
J·uoL- H·.Ðurr-n¯`¡
J·uoL- .L·--Ðurr-n¯`¡
J·uoL- .·L·n.-nJL--.·L·n-¯`¡
··L·n .·L·nJr¯-y¯¯`=.H-_HJHI,M-JLum¯L-r-ÐLu-,
¯-nkJ·LJ-nn·J,¯·n--rJn--n,ÐLu-VL·L-r,--J·¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,Jp-nÐurr-n,PH¯P.ArJ-_¯ArA·¡
¯-rPnJ-xÐurr-n.!,|Lj!Ðurr-n,PH¯P.ArJ-_¯ArA·¡
¯-rPnJ-xÐurr-n.`,H·.Ðurr-n,PH¯P.ArJ-_¯ArA·¡
¯-rPnJ-xÐurr-n.`,.L·--Ðurr-n,PH¯P.ArJ-_¯ArA·¡
¯-rPnJ-xÐurr-n.1,.·L·n.-nJL--.·L·n-,PH¯P.ArJ-_.JHJ-_PH¯Ix·¡
//--- --r numo-n ·r ··L·n- Ln ··L·n ourr-n
Custom Indicators
© 2000·2010, |eta0uotes Software Corp.
682
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_.JHJ-_PH¯IxI¯,¯·¡
//--- --r ··L·n- r·n ··L·n ourr-n
r·n.Lnr L=!¡L<¯¡L--·
-L·rPnJ-x¯-rPnr-j-n.¨,-HJr_HPHI_.JHJ-,L,.·L·nJr¯-y¯L`·¡
//--- --r -··un-·y
PnJL·-r·n¯-rPnr-j-n.PH¯P.ArJ-_¯PJPr¯,_¯LjLr-·¡
pnLnrr.¨W- !-v- `u ··L·n- ·r J-y-¨,-L·rPnJ-xJ-rPnr-j-n.¨,-HJr_.JHJ-_PH¯IxI¯··¡
//---
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm- srLm-¯`,
··n-r J·uoL- s·p-n¯`,
··n-r J·uoL- s!Lj!¯`,
··n-r J·uoL- sL·.¯`,
··n-r J·uoL- s·L·--¯`,
··n-r L·nj srL·k_v·Lum-¯`,
··n-r L·nj sv·Lum-¯`,
··n-r Lnr s-pn--J¯`·

//---
Lnr L¡
M¬L¯-r-rLm- r¡
//----
Lr.pn-v_·-L·uL-r-J==¨· L=¨¡
-L-- L=pn-v_·-L·uL-r-J-!¡
//----
.!LL-.L<n-r--_r·r-L·

Jp-nÐurr-n¯L`=·p-n¯L`¡
|Lj!Ðurr-n¯L`=!Lj!¯L`¡
H·.Ðurr-n¯L`=L·.¯L`¡
.L·--Ðurr-n¯L`=·L·--¯L`¡
//--- --r ··L·n r·n -v-ny ·-nJL-
rLm-r·¯rnu·r.rLm-¯L`,r·¡
.·L·n.-nJL--.·L·n-¯L`=r.J-y_·r_.--k¡
//---
L--¡
·
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
//--------------------------------------------------------------------
Object Functions
© 2000·2010, |eta0uotes Software Corp.
683
Dbject FunctIons
ThIs Is the group of functIons Intended for workIng wIth graphIc objects relatIng to any specIfIed
chart.
FunctIon ActIon
DbjectCreate Creates an object of the specIfIed type In a
specIfIed chart
DbjectName Feturns the name of an object of the
correspondIng type In the specIfIed chart
(specIfIed chart subwIndow)
Dbject0elete Femoves the object wIth the specIfIed name
from the specIfIed chart (from the specIfIed
chart subwIndow)
Dbjects0eleteAll Femoves all objects of the specIfIed type from
the specIfIed chart (from the specIfIed chart
subwIndow)
DbjectFInd Searches for an object wIth the specIfIed Ì0 by
the name
DbjectCetTIme8y7alue Feturns the tIme value for the specIfIed object
prIce value
DbjectCet7alue8yTIme Feturns the prIce value of an object for the
specIfIed tIme
Dbject|ove Changes the coordInates of the specIfIed object
anchor poInt
DbjectsTotal Feturns the number of objects of the specIfIed
type In the specIfIed chart (specIfIed chart
subwIndow)
DbjectCet0ouble Feturns the double value of the correspondIng
object property
DbjectCetÌnteger Feturns the Integer value of the correspondIng
object property
DbjectCetStrIng Feturns the strIng value of the correspondIng
object property
DbjectSet0ouble Sets the value of the correspondIng object
property
DbjectSetÌnteger Sets the value of the correspondIng object
property
DbjectSetStrIng Sets the value of the correspondIng object
property
Object Functions
© 2000·2010, |eta0uotes Software Corp.
684
Every graphIcal object should have a name unIque wIthIn one chart, IncludIng Its subwIndows.
ChangIng of a name of a graphIc object generates two events: event of deletIon of an object wIth the
old name, and event of creatIon of an object wIth a new name.
After an object Is created or an object property Is modIfIed It Is recommended to call the ChartFedraw
() functIon, whIch commands the clIent termInal to forcIbly draw a chart (and all vIsIble objects In It).
Object Functions
© 2000·2010, |eta0uotes Software Corp.
685
DbjectCreate
The functIon creates an object wIth the specIfIed name, type, and the InItIal coordInates In the
specIfIed chart subwIndow. 0urIng creatIon up to J0 coordInates can be specIfIed.
o··L Jo|-·r.n--r-.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr :ypa, // ·o|-·r ryp-
Lnr nvin, // .LnJ·. LnJ-x
J-r-rLm- :ima., // rLm- ·r r!- rLn-r -n·!·n p·Lnr
J·uoL- pri·a., // pnL·- ·r r!- rLn-r -n·!·n p·Lnr
...
J-r-rLm- :ima:=`, // rLm- ·r r!- H-r! -n·!·n p·Lnr
J·uoL- pri·a:=`, // pnL·- ·r r!- H-r! -n·!·n p·Lnr
...
J-r-rLm- :ima¨`=`, // rLm- ·r r!- `¨r! -n·!·n p·Lnr
J·uoL- pri·a¨`=` // pnL·- ·r r!- `¨r! -n·!·n p·Lnr
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of the object. The name must be unIque wIthIn a chart, IncludIng Its subwIndows.
:ypa
[In] Dbject type. The value can be one of the values of the ENU|_D8JECT enumeratIon.
nvin
[In] Number of the chart subwIndow. 0 means the maIn chart wIndow. The specIfIed subwIndow
must exIst, otherwIse the functIon returns false.
:ima.
[In] The tIme coordInate of the fIrst anchor.
pri·a.
[In] The prIce coordInate of the fIrst anchor poInt.
:ima:=`
[In] The tIme coordInate of the N·th anchor poInt.
pri·a:=`
[In] The prIce coordInate of the N·th anchor poInt.
:ima¨`=`
[In] The tIme coordInate of the thIrtIeth anchor poInt.
pri·a¨`=`
[In] The prIce coordInate of the thIrtIeth anchor poInt.
Object Functions
© 2000·2010, |eta0uotes Software Corp.
686
Peturn VaIue
Feturns true or false dependIng on whether the object Is created or not. To read more about the
error call CetLastError(). Ìf the object has been created already, the functIon trIes to change Its
coordInates.
Note
The numberIng of the chart subwIndows (If there are subwIndows wIth IndIcators In the chart) starts
wIth 1. The maIn chart wIndow of the chart Is and always has Index 0.
A large number of anchor poInts (to J0) provIdes for future use.At the same tIme lImIt only J0
possIble anchor poInts for the graphIcs due to the fact that when you call the number of parameters
must not exceed 64.
When an object Is renamed, two events are formed sImultaneously. These events can be handled In
an Expert AdvIsor or IndIcator by the DnChartEvent() functIon:
an event of deletIon of an object wIth the old name;
an event of creatIon of an object wIth a new name.
Object Functions
© 2000·2010, |eta0uotes Software Corp.
687
DbjectName
The functIon returns the name of the correspondIng object In the specIfIed chart, In the specIfIed
subwIndow, of the specIfIed type.
-rnLnj Jo|-·rH-m-.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
Lnr p.·, // numo-n Ln r!- LL-r ·r ·o|-·r-
Lnr nvin=-., // .LnJ·. LnJ-x
Lnr :ypa=-. // ·o|-·r ryp-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
p.·
[In] DrdInal number of the object accordIng to the specIfIed fIlter by the number and type of the
subwIndow.
nvin=-.
[In] Number of the chart subwIndow. 0 means the maIn chart wIndow, ·1 means all the
subwIndows of the chart, IncludIng the maIn wIndow.
:ypa=-.
[In] Type of the object. The value can be one of the values of the ENU|_D8JECT enumeratIon. ·1
means all types.
Peturn VaIue
Name of the object Is returned In case of success.
Note
When an object Is renamed, two events are formed sImultaneously. These events can be handled In
an Expert AdvIsor or IndIcator by the DnChartEvent() functIon:
an event of deletIon of an object wIth the old name;
an event of creatIon of an object wIth a new name.
Object Functions
© 2000·2010, |eta0uotes Software Corp.
688
Dbject0eIete
The functIon removes the object wIth the specIfIed name from the specIfIed chart.
o··L Jo|-·r¯-L-r-.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma // ·o|-·r n-m-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of object to be deleted.
Peturn VaIue
Feturns true If the removal was successful, otherwIse returns false. To read more about the error
call CetLastError().
Note
When an object Is renamed, two events are formed sImultaneously. These events can be handled In
an Expert AdvIsor or IndIcator by the DnChartEvent() functIon:
an event of deletIon of an object wIth the old name;
an event of creatIon of an object wIth a new name.
Object Functions
© 2000·2010, |eta0uotes Software Corp.
689
Dbjects0eIeteAII
Femoves all objects from the specIfIed chart, specIfIed chart subwIndow, of the specIfIed type.
Lnr Jo|-·r-¯-L-r-ALL.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
Lnr nvin=-., // .LnJ·. LnJ-x
Lnr :ypa=-. // ·o|-·r ryp-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
nvin=-.
[In] Number of the chart subwIndow. 0 means the maIn chart wIndow, ·1 means all the subwIndows
of the chart, IncludIng the maIn wIndow.
:ypa=-.
[In] Type of the object. The value can be one of the values of the ENU|_D8JECT enumeratIon. ·1
means all types.
Peturn VaIue
Feturns the number of deleted objects. To read more about the error call CetLastError().
Object Functions
© 2000·2010, |eta0uotes Software Corp.
690
DbjectFInd
The functIon searches for an object wIth the specIfIed name In the chart wIth the specIfIed Ì0.
Lnr Jo|-·r¯LnJ.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma // ·o|-·r n-m-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] The name of the searched object.
Peturn VaIue
Ìf successful the functIon returns the number of the subwIndow (0 means the maIn wIndow of the
chart), In whIch the object Is found. Ìf the object Is not found, the functIon returns a negatIve
number. To read more about the error call CetLastError().
Note
When an object Is renamed, two events are formed sImultaneously. These events can be handled In
an Expert AdvIsor or IndIcator by the DnChartEvent() functIon:
an event of deletIon of an object wIth the old name;
an event of creatIon of an object wIth a new name.
Object Functions
© 2000·2010, |eta0uotes Software Corp.
691
DbjectCetTImeßyVaIue
The functIon returns the tIme value for the specIfIed prIce value of the specIfIed object.
J-r-rLm- Jo|-·rJ-rrLm-ÐyV-Lu-.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
J·uoL- v-l:a, // -nL·-
Lnr lina_ij // HLn-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of the object.
v-l:a
[In] PrIce value.
lina_ij
[In] LIne IdentIfIer.
Peturn VaIue
The tIme value for the specIfIed prIce value of the specIfIed object.
Note
SInce the object can have several values In one prIce coordInate (ellIpse, trIangle, channels, etc.),
In thIs case, the lIne Ì0 must be specIfIed.
Object Functions
© 2000·2010, |eta0uotes Software Corp.
692
DbjectCetVaIueßyTIme
The functIon returns the prIce value for the specIfIed tIme value of the specIfIed object.
J·uoL- Jo|-·rJ-rV-Lu-ÐyrLm-.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
J-r-rLm- :ima, // rLm-
Lnr lina_ij // HLn-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of the object.
:ima
[In] TIme value.
lina_ij
[In] LIne Ì0.
Peturn VaIue
The prIce value for the specIfIed tIme value of the specIfIed object.
Note
SInce the object can have several values In one tIme coordInate (ellIpse, trIangle, channels, etc), In
thIs case, the lIne Ì0 must be specIfIed.
Object Functions
© 2000·2010, |eta0uotes Software Corp.
693
Dbjecthove
The functIon changes coordInates of the specIfIed anchor poInt of the object.
o··L Jo|-·rM·v-.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr p.in:_injax, // -n·!·n p·Lnr numo-n
J-r-rLm- :ima, // rLm-
J·uoL- pri·a // -nL·-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of the object.
p.in:_injax
[In] Ìndex of the anchor poInt. The number of anchor poInts depends on the type of object.
:ima
[In] TIme coordInate of the selected anchor poInt.
pri·a
[In] PrIce coordInate of the selected anchor poInt.
Peturn VaIue
Ìf successful, returns true, In case of faIlure returns false. To read more about the error call
CetLastError().
Object Functions
© 2000·2010, |eta0uotes Software Corp.
694
DbjectsTotaI
The functIon returns the number of objects In the specIfIed chart, specIfIed subwIndow, of the
specIfIed type.
Lnr Jo|-·r-r·r-L.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
Lnr nvin=-., // .LnJ·. LnJ-x
Lnr :ypa=-. // ·o|-·r ryp-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
nvin=-.
[In] Number of the chart subwIndow. 0 means the maIn chart wIndow, ·1 means all the
subwIndows of the chart, IncludIng the maIn wIndow.
:ypa=-.
[In] Type of the object. The value can be one of the values of the ENU|_D8JECT enumeratIon. ·1
means all types.
Peturn VaIue
The number of objects.
Object Functions
© 2000·2010, |eta0uotes Software Corp.
695
DbjectSet0oubIe
The functIon sets the value of the correspondIng object property. The object property must be of the
double type. There are 2 varIants of the functIon.
SettIng property vaIue, wIthout modIfIer
o··L Jo|-·r¯-r¯·uoL-.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry
J·uoL- pr.p_v-l:a // v-Lu-
·¡
SettIng a property vaIue IndIcatIng the modIfIer
o··L Jo|-·r¯-r¯·uoL-.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry
Lnr pr.p_m.jifiar, // m·JLrL-n
J·uoL- pr.p_v-l:a // v-Lu-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of the object.
pr.p_ij
[In] Ì0 of the object property. The value can be one of the values of the
ENU|_D8JECT_PFDPEFTY_0DU8LE enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. Ìt denotes the number of the level In FIbonaccI tools and
In the graphIcal object Andrew's pItchfork. The numeratIon of levels starts from zero.
pr.p_v-l:a
[In] The value of the property.
Peturn VaIue
Feturns true If the value Is successfully set to the property, otherwIse returns false. To read more
about the error call CetLastError().
ExampIe of creatIng a FIbonaccI object and addIng a new IeveI In It
// ¯·nLpr pn·jn-m -r-nr run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯r-nr.·
Object Functions
© 2000·2010, |eta0uotes Software Corp.
696

//--- -uxLLL-ny -nn-y-
J·uoL- !Lj!¯`,L·.¯`,pnL·-!,pnL·-`¡
J-r-rLm- rLm-¯`,rLm-!,rLm-`¡
//--- .·py r!- ·p-n pnL·-- - !¨¨ L-r--r o-n- -n- -n·uj!
Lnr ··pL-J=.·py|Lj!.¯ymo·L.·,¨,¨,!¨¨,!Lj!·¡
Lr.··pL-J<=¨·

-nLnr.¨¯-LL-J r· ··py r!- v-Lu-- ·r r!- |Lj! pnL·- --nL--¨·¡
n-runn¡
·
//--- .·py r!- ·L·-- pnL·- - !¨¨ L-r--r o-n- -n- -n·uj!
··pL-J=.·pyH·..¯ymo·L.·,¨,¨,!¨¨,L·.·¡
Lr.··pL-J<=¨·

-nLnr.¨¯-LL-J r· ··py r!- v-Lu-- ·r r!- H·. pnL·- --nL--¨·¡
n-runn¡
·
//--- .·py r!- ·p-n rLm- r·n r!- L--r !¨¨ o-n-
··pL-J=.·pyrLm-.¯ymo·L.·,¨,¨,!¨¨,rLm-·¡
Lr.··pL-J<=¨·

-nLnr.¨¯-LL-J r· ··py r!- v-Lu-- ·r r!- pnL·- --nL-- ·r rLm-¨·¡
n-runn¡
·
//--- Jnj-nLz- -··--- r· r!- ··pL-J J-r- -- r· rLm---nL-- - o-·k.-nJ-
Ann-y¯-rA-¯-nL--.!Lj!,rnu-·¡
Ann-y¯-rA-¯-nL--.L·.,rnu-·¡
Ann-y¯-rA-¯-nL--.rLm-,rnu-·¡
//--- .··nJLn-r-- ·r r!- rLn-r -n·!·n p·Lnr ·r r!- ¯Lo· ·o|-·r
pnL·-!=!Lj!¯¯¨`¡
rLm-!=rLm-¯¯¨`¡
//--- .··nJLn-r-- ·r r!- --··nJ -n·!·n p·Lnr ·r r!- ¯Lo· ·o|-·r
pnL·-`=L·.¯¯¨`¡
rLm-`=rLm-¯¯¨`¡
//--- rLm- r· ·n--r- r!- ¯Lo· ·o|-·r
o··L ·n--r-J=Jo|-·r.n--r-.¨,¨¯Lo·¨,JЯ_¯PÐJ,¨,rLm-!,pnL·-!,rLm-`,pnL·-`·¡
Lr.·n--r-J· // Pr r!- ·o|-·r L- ·n--r-J -u··---ruLLy

//--- --r r!- ··L·n ·r ¯Lo· L-v-L-
Jo|-·r¯-rPnr-j-n.¨,¨¯Lo·¨,JЯ--J-_HIVIH.JHJ-,ÐLu-·¡
//--- oy r!- .-y, !·. mu·! ¯Lo· L-v-L- J· .- !-v-.
Lnr L-v-L-=Jo|-·rJ-rPnr-j-n.¨,¨¯Lo·¨,JЯ--J-_HIVIH¯·¡
-nLnr.¨¯Lo· L-v-L- o-r·n- = ¨,L-v-L-·¡
//---·urpur r· r!- ¯·unn-L = numo-n ·r L-v-L.v-Lu- L-v-L_J--nLprL·n
r·n.Lnr L=¨¡L<L-v-L-¡L--·
Object Functions
© 2000·2010, |eta0uotes Software Corp.
697

-nLnr.L,¨. ¨,Jo|-·rJ-r¯·uoL-.¨,¨¯Lo·¨,JЯ--J-_HIVIHVAHJI,L·,
¨ ¨,Jo|-·rJ-r¯rnLnj.¨,¨¯Lo·¨,JЯ--J-_HIVIHrIxr,L··¡
·
//--- rny r· Ln·n---- r!- numo-n ·r L-v-L- p-n unLr
o··L m·JLrL-J=Jo|-·r¯-rPnr-j-n.¨,¨¯Lo·¨,JЯ--J-_HIVIH¯,L-v-L--!·¡
Lr..m·JLrL-J· // r-LL-J r· ·!-nj- r!- numo-n ·r L-v-L-

-nLnr.¨¯-LL-J r· ·!-nj- r!- numo-n ·r L-v-L- ·r ¯Lo·, -nn·n ¨,J-rH--rInn·n.··¡
·
//--- |u-r Lnr·nm
-nLnr.¨¯Lo· L-v-L- -rr-n = ¨,Jo|-·rJ-rPnr-j-n.¨,¨¯Lo·¨,JЯ--J-_HIVIH¯··¡
//--- --r - v-Lu- r·n - n-.Ly ·n--r-J L-v-L
o··L -JJ-J=Jo|-·r¯-r¯·uoL-.¨,¨¯Lo·¨,JЯ--J-_HIVIHVAHJI,L-v-L-,!``·¡
Lr.-JJ-J· // m-n-j-J r· --r - v-Lu- r·n r!- L-v-L

-nLnr.¨¯u··---ruLLy --r ·n- m·n- ¯Lo· L-v-L¨·¡
//--- AL-· J· n·r r·nj-r r· --r r!- L-v-L J--·nLprL·n
Jo|-·r¯-r¯rnLnj.¨,¨¯Lo·¨,JЯ--J-_HIVIHrIxr,L-v-L-,¨my L-v-L¨·¡
.!-nr--Jn-..¨·¡
//--- J-r r!- -·ru-L v-Lu- ·r r!- numo-n ·r L-v-L- Ln r!- ¯Lo· ·o|-·r
L-v-L-=Jo|-·rJ-rPnr-j-n.¨,¨¯Lo·¨,JЯ--J-_HIVIH¯·¡
-nLnr.¨¯Lo· L-v-L- -rr-n -JJLnj = ¨,L-v-L-·¡
//--- ·n·- -j-Ln ·urpur -LL L-v-L- - |u-r r· m-k- -un-
r·n.Lnr L=¨¡L<L-v-L-¡L--·

-nLnr.L,¨.¨,Jo|-·rJ-r¯·uoL-.¨,¨¯Lo·¨,JЯ--J-_HIVIHVAHJI,L·,
¨ ¨,Jo|-·rJ-r¯rnLnj.¨,¨¯Lo·¨,JЯ--J-_HIVIHrIxr,L··¡
·
·
-L-- // ¯-LL- Lr y·u rny r· Ln·n---- r!- numo-n ·r L-v-L- Ln r!- ¯Lo· ·o|-·r

-nLnr.¨¯-LL-J r· --r ·n- m·n- ¯Lo· L-v-L. Inn·n ¨,J-rH--rInn·n.··¡
·
·
·
See aIso
Dbject Types, Dbject PropertIes
Object Functions
© 2000·2010, |eta0uotes Software Corp.
698
DbjectSetInteger
The functIon sets the value of the correspondIng object property. The object property must be of the
datetIme,Int,color,boolorchar type. There are 2 varIants of the functIon.
SettIng property vaIue, wIthout modIfIer
o··L Jo|-·r¯-rPnr-j-n.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry
L·nj pr.p_v-l:a // v-Lu-
·¡
SettIng a property vaIue IndIcatIng the modIfIer
o··L Jo|-·r¯-rPnr-j-n.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry
Lnr pr.p_m.jifiar, // m·JLrL-n
L·nj pr.p_v-l:a // v-Lu-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of the object.
pr.p_ij
[In] Ì0 of the object property. The value can be one of the values of the
ENU|_D8JECT_PFDPEFTY_ÌNTECEF enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. Ìt denotes the number of the level In FIbonaccI tools and
In the graphIcal object Andrew's pItchfork. The numeratIon of levels starts from zero.
pr.p_v-l:a
[In] The value of the property.
Peturn VaIue
Feturns true If the value Is successfully set to the property, otherwIse returns false. To read more
about the error call CetLastError().
See aIso
Dbject Types, Dbject PropertIes
Object Functions
© 2000·2010, |eta0uotes Software Corp.
699
DbjectSetStrIng
The functIon sets the value of the correspondIng object property. The object property must be of the
strIng type. There are 2 varIants of the functIon.
SettIng property vaIue, wIthout modIfIer
o··L Jo|-·r¯-r¯rnLnj.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry
-rnLnj pr.p_v-l:a // v-Lu-
·¡
SettIng a property vaIue IndIcatIng the modIfIer
o··L Jo|-·r¯-r¯rnLnj.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry
Lnr pr.p_m.jifiar, // m·JLrL-n
-rnLnj pr.p_v-l:a // v-Lu-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of the object.
pr.p_ij
[In] Ì0 of the object property. The value can be one of the values of the
ENU|_D8JECT_PFDPEFTY_STFÌNC enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. Ìt denotes the number of the level In FIbonaccI tools and
In the graphIcal object Andrew's pItchfork. The numeratIon of levels starts from zero.
pr.p_v-l:a
[In] The value of the property.
Peturn VaIue
Feturns true If the value Is successfully set to the property, otherwIse returns false. To read more
about the error call CetLastError().
Note
When an object Is renamed, two events are formed sImultaneously. These events can be handled In
an Expert AdvIsor or IndIcator by the DnChartEvent() functIon:
an event of deletIon of an object wIth the old name;
Object Functions
© 2000·2010, |eta0uotes Software Corp.
700
an event of creatIon of an object wIth a new name.
Object Functions
© 2000·2010, |eta0uotes Software Corp.
701
DbjectCet0oubIe
The functIon returns the value of the correspondIng object property. The object property must be of
the double type. There are 2 varIants of the functIon.
1. ImmedIateIy returns the property vaIue.
J·uoL- Jo|-·rJ-r¯·uoL-.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr pr.p_m.jifiar=` // pn·p-nry m·JLrL-n, Lr n-¬uLn-J
·¡
2. Peturns true or faIse, dependIng on the success of the functIon. Ìf successful, the property
value Is placed to a receIvIng varIable passed by by reference by the last parameter.
o··L Jo|-·rJ-r¯·uoL-.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr pr.p_m.jifiar, // pn·p-nry m·JLrL-n
J·uoL-sj.:ola_v-r // !-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of the object.
pr.p_ij
[In] Ì0 of the object property. The value can be one of the values of the
ENU|_D8JECT_PFDPEFTY_0DU8LE enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. For the fIrst varIant, the default modIfIer value Is equal to
0. |ost propertIes do not requIre a modIfIer. Ìt denotes the number of the level In FIbonaccI tools
and In the graphIcal object Andrew's pItchfork. The numeratIon of levels starts from zero.
j.:ola_v-r
[out] 7arIable of the double type that receIved the value of the requested property.
Peturn VaIue
7alue of the double type for the fIrst callIng varIant.
For the second varIant the functIon returns true, If thIs property Is maIntaIned and the value has
been placed Into the double_var varIable, otherwIse returns false. To read more about the error call
CetLastError().
Object Functions
© 2000·2010, |eta0uotes Software Corp.
702
DbjectCetInteger
The functIon returns the value of the correspondIng object property. The object property must be of
the datetIme,Int,color,boolorchar type. There are 2 varIants of the functIon.
1. ImmedIateIy returns the property vaIue.
L·nj Jo|-·rJ-rPnr-j-n.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr pr.p_m.jifiar=` // pn·p-nry m·JLrL-n, Lr n-¬uLn-J
·¡
2. Peturns true or faIse, dependIng on the success of the functIon. Ìf successful, the property
value Is placed to a receIvIng varIable passed by by reference by the last parameter.
o··L Jo|-·rJ-rPnr-j-n.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr pr.p_m.jifiar, // pn·p-nry m·JLrL-n
L·njs l.nj_v-r // !-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of the object.
pr.p_ij
[In] Ì0 of the object property. The value can be one of the values of the
ENU|_D8JECT_PFDPEFTY_ÌNTECEF enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. For the fIrst varIant, the default modIfIer value Is equal to
0. |ost propertIes do not requIre a modIfIer. Ìt denotes the number of the level In FIbonaccI tools
and In the graphIcal object Andrew's pItchfork. The numeratIon of levels starts from zero.
l.nj_v-r
[out] 7arIable of the long type that receIves the value of the requested property.
Peturn VaIue
The long value for the fIrst callIng varIant.
For the second varIant the functIon returns true, If thIs property Is maIntaIned and the value has
been placed Into the long_var varIable, otherwIse returns false. To read more about the error call
CetLastError().
Object Functions
© 2000·2010, |eta0uotes Software Corp.
703
DbjectCetStrIng
The functIon returns the value of the correspondIng object property. The object property must be of
the strIng type. There are 2 varIants of the functIon.
1. ImmedIateIy returns the property vaIue.
-rnLnj Jo|-·rJ-r¯rnLnj.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr pr.p_m.jifiar=` // pn·p-nry m·JLrL-n, Lr n-¬uLn-J
·¡
2. Peturns true or faIse, dependIng on the success of the functIon. Ìf successful, the property
value Is placed to a receIvIng varIable passed by by reference by the last parameter.
o··L Jo|-·rJ-r¯rnLnj.
L·nj ·n-r:_ij, // ·!-nr LJ-nrLrL-n
-rnLnj n-ma, // ·o|-·r n-m-
Lnr pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr pr.p_m.jifiar, // pn·p-nry m·JLrL-n
-rnLnjs·:rinj_v-r // !-n- .- -··-pr r!- pn·p-nry v-Lu-
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
n-ma
[In] Name of the object.
pr.p_ij
[In] Ì0 of the object property. The value can be one of the values of the
ENU|_D8JECT_PFDPEFTY_STFÌNC enumeratIon.
pr.p_m.jifiar
[In] |odIfIer of the specIfIed property. For the fIrst varIant, the default modIfIer value Is equal to
0. |ost propertIes do not requIre a modIfIer. Ìt denotes the number of the level In FIbonaccI tools
and In the graphIcal object Andrew's pItchfork. The numeratIon of levels starts from zero.
·:rinj_v-r
[out] 7arIable of the strIng type that receIves the value of the requested propertIes.
Peturn VaIue
StrIng value for the fIrst versIon of the call.
For the second versIon of the call returns true, If thIs property Is maIntaIned and the value has been
placed Into the strIng_var varIable, otherwIse returns false. To read more about the error call
CetLastError().
Object Functions
© 2000·2010, |eta0uotes Software Corp.
704
Note
When an object Is renamed, two events are formed sImultaneously. These events can be handled In
an Expert AdvIsor or IndIcator by the DnChartEvent() functIon:
an event of deletIon of an object wIth the old name;
an event of creatIon of an object wIth a new name.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
705
TechnIcaI IndIcator FunctIons
All functIons lIke I|A, IAC, I|AC0, IÌchImoku etc. created a copy of the correspondIng technIcal
IndIcator In the global cache of the clIent termInal. Ìf a copy of the IndIcator wIth such parameters
already exIsts, the new copy Is not created, and the counter of references to the exIstIng copy
Increases.
These functIons return the handle of the approprIate copy of the IndIcator. Further, usIng thIs handle,
you can receIve data calculated by the correspondIng IndIcator. The correspondIng buffer data
(technIcal IndIcators contaIn calculated data In theIr Internal buffers, whIch can vary from 1 to 5,
dependIng on the IndIcator) can be copIed to a mql5·program usIng the Copy8uffer() functIon.
You can't refer to the IndIcator data rIght after It has been created, because calculatIon of IndIcator
values requIres some tIme, so It's better to create IndIcator handles In DnÌnIt(). FunctIon ICustom()
creates the correspondIng custom IndIcator, and returns Its handle In case It Is successfully create.
Custom IndIcators can contaIn up to 512 IndIcator buffers, the contents of whIch can also be obtaIned
by the Copy8uffer() functIon, usIng the obtaIned handle.
There Is a unIversal method for creatIng any technIcal IndIcator usIng the ÌndIcatorCreate() functIon.
ThIs functIon accepts the followIng data as Input parameters:
symbol name;
tImeframe;
type of the IndIcator to create;
number of Input parameters of the IndIcator;
an array of |qlParam type contaInIng all the necessary Input parameters.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note. Fepeated call of the IndIcator functIon wIth the same parameters wIthIn one mql5·program does
not lead to a multIple Increase of the reference counter; the counter wIll be Increased only once by 1.
However, It's recommended to get the IndIcators handles In functIon DnÌnIt() or In the class
constructor, and further use these handles In other functIons. The reference counter decreases when a
mql5·program Is deInItIalIzed.
All IndIcator functIons have at least 2 parameters · symbol and perIod. The NULL value of the symbol
means the current symbol, the 0 value of the perIod means the current tImeframe.
FunctIon Peturns the handIe of the IndIcator:
IAC Accelerator DscIllator
IA0 AccumulatIon/0IstrIbutIon
IA0X Average 0IrectIonal Ìndex
IA0XWIlder Average 0IrectIonal Ìndex by Welles WIlder
IAllIgator AllIgator
IA|A AdaptIve |ovIng Average
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
706
IAD Awesome DscIllator
IATF Average True Fange
I8earsPower 8ears Power
I8ands 8ollInger 8ands
I8ullsPower 8ulls Power
ICCÌ CommodIty Channel Ìndex
IChaIkIn ChaIkIn DscIllator
ICustom Custom IndIcator
I0E|A 0ouble ExponentIal |ovIng Average
I0e|arker 0e|arker
IEnvelopes Envelopes
IForce Force Ìndex
IFractals Fractals
IFFA|A Fractal AdaptIve |ovIng Average
ICator Cator DscIllator
IÌchImoku ÌchImoku KInko Hyo
I8W|FÌ |arket FacIlItatIon Ìndex by 8Ill WIllIams
I|omentum |omentum
I|FÌ |oney Flow Ìndex
I|A |ovIng Average
IDs|A |ovIng Average of DscIllator (|AC0 hIstogram)
I|AC0 |ovIng Averages Convergence·0Ivergence
ID87 Dn 8alance 7olume
ISAF ParabolIc Stop And Feverse System
IFSÌ FelatIve Strength Ìndex
IF7Ì FelatIve 7Igor Ìndex
IStd0ev Standard 0evIatIon
IStochastIc StochastIc DscIllator
ITE|A TrIple ExponentIal |ovIng Average
ITrIX TrIple ExponentIal |ovIng Averages DscIllator
IWPF WIllIams' Percent Fange
I7Ì0yA 7arIable Ìndex 0YnamIc Average
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
707
I7olumes 7olumes
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
708
IAC
The functIon creates Accelerator DscIllator In a global cache of the clIent termInal and returns Its
handle. Ìt has only one buffer.
Lnr LA..
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j // p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES enumeratIon values, 0 means
the current tImeframe.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
709
IA0
The functIon returns the handle of the AccumulatIon/0IstrIbutIon IndIcator. Ìt has only one buffer.
Lnr LA¯.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
IHJM_A--HPI¯_VJHJMI -ppliaj_v.l:ma // v·Lum- ryp- r·n ·-L·uL-rL·n
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES enumeratIon values, 0 means
the current tImeframe.
-ppliaj_v.l:ma
[In] The volume used. Can be any of ENU|_APPLÌE0_7DLU|E values.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
710
IA0X
The functIon returns the handle of the Average 0IrectIonal |ovement Ìndex IndIcator.
Lnr LA¯x.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr -jx_pari.j // -v-n-jLnj p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
-jx_pari.j
[In] PerIod to calculate the Index.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
The buffer numbers are the followIng: 0 · |AÌN_LÌNE, 1 · PLUS0Ì_LÌNE, 2 · |ÌNUS0Ì_LÌNE.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
711
IA0XWIIder
The functIon returns the handle of Average 0IrectIonal |ovement Ìndex by Welles WIlder.
Lnr LA¯xWLLJ-n.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr -jx_pari.j // -v-n-jLnj p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
-jx_pari.j
[In] PerIod to calculate the Index.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
The buffer numbers are the followIng: 0 · |AÌN_LÌNE, 1 · PLUS0Ì_LÌNE, 2 · |ÌNUS0Ì_LÌNE.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
712
IAIIIgator
The functIon returns the handle of the AllIgator IndIcator.
Lnr LALLLj-r·n.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr ¬-v_pari.j, // p-nL·J r·n r!- ·-L·uL-rL·n ·r |-.-
Lnr ¬-v_·nif:, // !·nLz·nr-L -!Lrr ·r |-.-
Lnr :aa:n_pari.j, // p-nL·J r·n r!- ·-L·uL-rL·n ·r r--r!
Lnr :aa:n_·nif:, // !·nLz·nr-L -!Lrr ·r r--r!
Lnr lip·_pari.j, // p-nL·J r·n r!- ·-L·uL-rL·n ·r LLp-
Lnr lip·_·nif:, // !·nLz·nr-L -!Lrr ·r LLp-
IHJM_MA_MIr|J¯ m-_ma:n.j, // ryp- ·r -m··r!Lnj
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
¬-v_pari.j
[In] AveragIng perIod for the blue lIne (AllIgator's Jaw)
¬-v_·nif:
[In] The shIft of the blue lIne relatIve to the prIce chart. Ìt should be remembered that the lIne
shIft Is only vIsual, and values In the IndIcator buffer are stored wIthout the shIft. When obtaInIng
buffer values usIng the Copy8uffer() functIon,the shIft value wIll have no effect.
:aa:n_pari.j
[In] AveragIng perIod for the red lIne (AllIgator's Teeth).
:aa:n_·nif:
[In] The shIft of the red lIne relatIve to the prIce chart. Ìt should be remembered that the lIne
shIft Is only vIsual, and values In the IndIcator buffer are stored wIthout the shIft. When obtaInIng
buffer values usIng the Copy8uffer() functIon,the shIft value wIll have no effect.
lip·_pari.j
[In] AveragIng perIod for the green lIne (AllIgator's lIps).
lip·_·nif:
[In] The shIft of the green lIne relatIve to the prIce chart. Ìt should be remembered that the lIne
shIft Is only vIsual, and values In the IndIcator buffer are stored wIthout the shIft. When obtaInIng
buffer values usIng the Copy8uffer() functIon,the shIft value wIll have no effect.
m-_ma:n.j
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
713
[In] The method of averagIng. Can be any of the ENU|_|A_|ETHD0 values.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
The buffer numbers are the followIng: 0 · CATDFJAW_LÌNE, 1 · CATDFTEETH_LÌNE, 2 ·
CATDFLÌPS_LÌNE.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
714
IAhA
The functIon returns the handle of the AdaptIve |ovIng Average IndIcator. Ìt has only one buffer.
Lnr LAMA.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr -m-_pari.j, // -v-n-j- p-nL·J r·n AMA
Lnr f-·:_m-_pari.j, // r--r MA p-nL·J
Lnr ·l.v_m-_pari.j, // -L·. MA p-nL·J
Lnr -m-_·nif:, // !·nLz·nr-L -!Lrr ·r r!- LnJL·-r·n
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r r!- pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
-m-_pari.j
[In] The calculatIon perIod, on whIch the effIcIency coeffIcIent Is calculated.
f-·:_m-_pari.j
[In] Fast perIod for the smoothIng coeffIcIent calculatIon for a rapId market.
·l.v_m-_pari.j
[In] Slow perIod for the smoothIng coeffIcIent calculatIon In the absence of trend.
-m-_·nif:
[In] ShIft of the IndIcator relatIve to the prIce chart.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
715
IAD
The functIon returns the handle of the Awesome oscIllator IndIcator. Ìt has only one buffer.
Lnr LAJ.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j // p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
716
IATP
The functIon returns the handle of the Average True Fange IndIcator. Ìt has only one buffer.
Lnr LAr-.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j // -v-n-jLnj p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] The value of the averagIng perIod for the IndIcator calculatIon.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
717
IßearsPower
The functIon returns the handle of the 8ears Power IndIcator. Ìt has only one buffer.
Lnr LÐ--n--·.-n.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] The value of the averagIng perIod for the IndIcator calculatIon.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
718
Ißands
The functIon returns the handle of the 8ollInger 8ands IndIcator.
Lnr LÐ-nJ-.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr o-nj·_pari.j, // p-nL·J r·n -v-n-j- LLn- ·-L·uL-rL·n
Lnr o-nj·_·nif:, // !·nLz·nr-L -!Lrr ·r r!- LnJL·-r·n
J·uoL- javi-:i.n, // numo-n ·r -r-nJ-nJ J-vL-rL·n-
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
o-nj·_pari.j
[In] The averagIng perIod of the maIn lIne of the IndIcator.
o-nj·_·nif:
[In] The shIft the IndIcator relatIve to the prIce chart. Ìt should be remembered that the lIne shIft
Is only vIsual, and values In the IndIcator buffer are stored wIthout the shIft. When obtaInIng
buffer values usIng the Copy8uffer() functIon,the shIft value wIll have no effect.
javi-:i.n
[In] 0evIatIon from the maIn lIne.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
The buffer numbers are the followIng: 0 · 8ASE_LÌNE, 1 · UPPEF_8AN0, 2 · LDWEF_8AN0
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
719
IßuIIsPower
The functIon returns the handle of the 8ulls Power IndIcator. Ìt has only one buffer.
Lnr LÐuLL--·.-n.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] The averagIng perIod for the IndIcator calculatIon.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
720
ICCI
The functIon returns the handle of the CommodIty Channel Ìndex IndIcator. Ìt has only one buffer.
Lnr L..P.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] The averagIng perIod for the IndIcator calculatIon.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
721
IChaIkIn
The functIon returns the handle of the ChaIkIn DscIllator IndIcator. Ìt has only one buffer.
Lnr L.!-LkLn.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr f-·:_m-_pari.j, // r--r p-nL·J
Lnr ·l.v_m-_pari.j, // -L·. p-nL·J
IHJM_MA_MIr|J¯ m-_ma:n.j, // -m··r!Lnj ryp-
IHJM_A--HPI¯_VJHJMI -ppliaj_pri·a // ryp- ·r v·Lum-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
f-·:_m-_pari.j
[In] Fast averagIng perIod for calculatIons.
·l.v_m-_pari.j
[In] Slow averagIng perIod for calculatIons.
m-_ma:n.j
[In] SmoothIng type. Can be one of the averagIng constants of ENU|_|A_|ETHD0.
-ppliaj_v.l:ma
[In] The volume used. Can be one of the constants of ENU|_APPLÌE0_7DLU|E.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
722
ICustom
The functIon returns the handle of a specIfIed custom IndIcator.
Lnr L.u-r·m.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
-rnLnj n-ma // r·LJ-n/·u-r·m LnJL·-r·n_n-m-
... // LL-r ·r LnJL·-r·n Lnpur p-n-m-r-n-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
n-ma
[In] The name of the custom IndIcator, wIth path relatIve to the root dIrectory of IndIcators
(|0L5/ÌndIcators/). Ìf an IndIcator Is located In a subdIrectory, for example, In |0L5/ÌndIcators/
ExampIes, Its name must be specIfIed lIke: ¨ExampIes\\IndIcator_name¨ (It Is necessary to use a
double slash Instead of the sIngle slash as a separator).
...
[In] Input·parameters of a custom IndIcator, separated by commas. Type and order of parameters
must match. Ìf there Is no parameters specIfIed, then default values wIll be used.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
A custom IndIcator must be compIled (wIth extensIon EX5) and located In the dIrectory |0L5/
ÌndIcators of the clIent termInal or Its subdIrectory.
Ìf the fIrst call form Is used In the IndIcator, then at the custom IndIcator start you can addItIonally
IndIcate data for calculatIon In Its ¨Parameters¨ tab. Ìf the ¨Apply to¨ parameter Is not selected
explIcItly, the default calculatIon Is based on the values of ¨Close¨ prIces.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
723
When you call a custom IndIcator from mql5·program, the ApplIed_PrIce parameter or a handle of
another IndIcator should be passed last, after all Input varIables of the custom IndIcator.
ExampIe:
tpn·p-nry LnJL·-r·n_--p-n-r-_.LnJ·.
tpn·p-nry LnJL·-r·n_ourr-n- !
tpn·p-nry LnJL·-r·n_pL·r- !
//---- pL·r H-o-L!
tpn·p-nry LnJL·-r·n_L-o-L! ¨H-o-L!¨
tpn·p-nry LnJL·-r·n_ryp-! ¯-AW_HPHI
tpn·p-nry LnJL·-r·n_··L·n! --J
tpn·p-nry LnJL·-r·n_-ryL-! ¯r1HI_¯JHP¯
tpn·p-nry LnJL·-r·n_.LJr!! !
//--- Lnpur p-n-m-r-n-
Lnpur Lnr MA_--nL·J=`!¡
Lnpur Lnr MA_¯!Lrr=¨¡
Lnpur IHJM_MA_MIr|J¯ MA_M-r!·J=MJ¯I_¯MA¡
//--- LnJL·-r·n ourr-n-
J·uoL- H-o-L!Ðurr-n¯`¡
//--- |-nJL- ·r r!- .u-r·m M·vLnj Av-n-j-.m¬¯ ·u-r·m LnJL·-r·n
Lnr MA_!-nJL-¡
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr JnPnLr.·

//--- LnJL·-r·n ourr-n- m-ppLnj
¯-rPnJ-xÐurr-n.¨,H-o-L!Ðurr-n,PH¯P.ArJ-_¯ArA·¡
----rH--rInn·n.·¡
MA_!-nJL-=L.u-r·m.HJHH,¨,¨.u-r·m M·vLnj Av-n-j-¨,
MA_--nL·J,
MA_¯!Lrr,
MA_M-r!·J,
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
724
--P.I_.HJ¯I // u-Lnj r!- ·L·-- pnL·--
·¡
-nLnr.¨MA_!-nJL- = ¨,MA_!-nJL-,¨ -nn·n = ¨,J-rH--rInn·n.··¡
//---
n-runn.¨·¡
·
//--------------------------------------------------------------------
// .u-r·m LnJL·-r·n Lr-n-rL·n run·rL·n
//--------------------------------------------------------------------
Lnr Jn.-L·uL-r-.··n-r Lnr n-r--_r·r-L,
··n-r Lnr pn-v_·-L·uL-r-J,
··n-r J-r-rLm- srLm-¯`,
··n-r J·uoL- s·p-n¯`,
··n-r J·uoL- s!Lj!¯`,
··n-r J·uoL- sL·.¯`,
··n-r J·uoL- s·L·--¯`,
··n-r L·nj srL·k_v·Lum-¯`,
··n-r L·nj sv·Lum-¯`,
··n-r Lnr s-pn--J¯`·

//--- .·py r!- v-Lu-- ·r r!- LnJL·-r·n .u-r·m M·vLnj Av-n-j- r· ·un LnJL·-r·n ourr-n
Lnr ··py=.·pyÐurr-n.MA_!-nJL-,¨,¨,n-r--_r·r-L,H-o-L!Ðurr-n·¡
-nLnr.¨··py = ¨,··py,¨ n-r--_r·r-L = ¨,n-r--_r·r-L·¡
//--- Pr ·un -rr-mpr !-- r-LL-J - --p·nr r!L-
Lr.··py<=¨·
-nLnr.¨An -rr-mpr r· j-r r!- v-Lu-- Lr .u-r·m M·vLnj Av-n-j- !-- r-LL-J¨·¡
//--- n-runn v-Lu- ·r pn-v_·-L·uL-r-J r·n n-xr ·-LL
n-runn.n-r--_r·r-L·¡
·
//--------------------------------------------------------------------
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
725
I0EhA
The functIon returns the handle of the 0ouble ExponentIal |ovIng Average IndIcator. Ìt has only one
buffer.
Lnr L¯IMA.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
Lnr m-_·nif:, // !·nLz·nr-L -!Lrr
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod (bars count) for calculatIons.
m-_·nif:
[In] ShIft of the IndIcator relatIve to the prIce chart.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
726
I0eharker
The functIon returns the handle of the 0e|arker IndIcator. Ìt has only one buffer.
Lnr L¯-M-nk-n.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j // -v-n-jLnj p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod (bars count) for calculatIons.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
727
IEnveIopes
The functIon returns the handle of the Envelopes IndIcator.
Lnr LInv-L·p--.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // p-nL·J r·n r!- -v-n-j- LLn- ·-L·uL-rL·n
Lnr m-_·nif:, // !·nLz·nr-L -!Lrr ·r r!- LnJL·-r·n
IHJM_MA_MIr|J¯ m-_ma:n.j, // ryp- ·r -m··r!Lnj
IHJM_A--HPI¯_--P.I -ppliaj_pri·a, // ryp- ·r pnL·- ·n !-nJL-
J·uoL- javi-:i.n // J-vL-rL·n ·r o·unJ-nL-- rn·m r!- mLJLLn- .Ln p-n·-nr-·
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod for the maIn lIne.
m-_·nif:
[In] The shIft of the IndIcator relatIve to the prIce chart. Ìt should be remembered that the lIne
shIft Is only vIsual, and values In the IndIcator buffer are stored wIthout the shIft. When obtaInIng
buffer values usIng the Copy8uffer() functIon,the shIft value wIll have no effect.
m-_ma:n.j
[In] SmoothIng type. Can be one of the values of ENU|_|A_|ETHD0.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
javi-:i.n
[In] The devIatIon from the maIn lIne (In percents).
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
The buffer numbers: 0 · UPPEF_LÌNE, 1 · LDWEF_LÌNE.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
728
IForce
The functIon returns the handle of the Force Ìndex IndIcator. Ìt has only one buffer.
Lnr L¯·n·-.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
IHJM_MA_MIr|J¯ m-_ma:n.j, // -m··r!Lnj ryp-
IHJM_A--HPI¯_VJHJMI -ppliaj_v.l:ma // v·Lum- ryp- r·n ·-L·uL-rL·n
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod for the IndIcator calculatIons.
m-_ma:n.j
[In] SmoothIng type. Can be one of the values of ENU|_|A_|ETHD0.
-ppliaj_v.l:ma
[In] The volume used. Can be one of the values of ENU|_APPLÌE0_7DLU|E.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
729
IFractaIs
The functIon returns the handle of the Fractals IndIcator.
Lnr L¯n-·r-L-.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j // p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
The buffer numbers are the followIng: 0 · UPPEF_LÌNE, 1 · LDWEF_LÌNE.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
730
IFrAhA
The functIon returns the handle of the Fractal AdaptIve |ovIng Average IndIcator. Ìt has only one
buffer.
Lnr L¯nAMA.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
Lnr m-_·nif:, // !·nLz·nr-L -!Lrr ·n r!- ·!-nr
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] PerIod (bars count) for the IndIcator calculatIons.
m-_·nif:
[In] ShIft of the IndIcator In the prIce chart.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
731
ICator
The functIon returns the handle of the Cator IndIcator. The DscIllator shows the dIfference between
the blue and red lInes of AllIgator (upper hIstogram) and dIfference between red and green lInes (lower
hIstogram).
Lnr LJ-r·n.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr ¬-v_pari.j, // p-nL·J r·n r!- ·-L·uL-rL·n ·r r!- |-.-
Lnr ¬-v_·nif:, // |-.- !·nLz·nr-L -!Lrr
Lnr :aa:n_pari.j, // p-nL·J r·n r!- ·-L·uL-rL·n ·r r!- r--r!
Lnr :aa:n_·nif:, // r--r! !·nLz·nr-L -!Lrr
Lnr lip·_pari.j, // p-nL·J r·n r!- ·-L·uL-rL·n ·r r!- LLp-
Lnr lip·_·nif:, // LLp- !·nLz·nr-L -!Lrr
IHJM_MA_MIr|J¯ m-_ma:n.j, // ryp- ·r -m··r!Lnj
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
¬-v_pari.j
[In] AveragIng perIod for the blue lIne (AllIgator's Jaw).
¬-v_·nif:
[In] The shIft of the blue lIne relatIve to the prIce chart. Ìt Isn't dIrectly connected wIth the vIsual
shIft of the IndIcator hIstogram.
:aa:n_pari.j
[In] AveragIng perIod for the red lIne (AllIgator's Teeth).
:aa:n_·nif:
[In] The shIft of the red lIne relatIve to the prIce chart. Ìt Isn't dIrectly connected wIth the vIsual
shIft of the IndIcator hIstogram.
lip·_pari.j
[In] AveragIng perIod for the green lIne (AllIgator's lIps).
lip·_·nif:
[In] The shIft of the green lIne relatIve to the prIce charts. Ìt Isn't dIrectly connected wIth the
vIsual shIft of the IndIcator hIstogram.
m-_ma:n.j
[In] SmoothIng type. Can be one of the values of ENU|_|A_|ETHD0.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
732
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
8uffer numbers: 0 · UPPEF_HÌSTDCFA|, 1 · color buffer of the upper hIstogram, 2 ·
LDWEF_HÌSTDCFA|, J · color buffer of the lower hIstogram.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
733
IIchImoku
The functIon returns the handle of the ÌchImoku KInko Hyo IndIcator.
Lnr LP·!Lm·ku.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr :anr-n_·an, // p-nL·J ·r r-nk-n---n
Lnr ri¬:n_·an, // p-nL·J ·r ·L|un---n
Lnr ·anr.:_·p-n_o // p-nL·J ·r ¯-nk·u ¯p-n Ð
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
:anr-n_·an
[In] AveragIng perIod for Tenkan Sen.
ri¬:n_·an
[In] AveragIng perIod for KIjun Sen.
·anr.:_·p-n_o
[In] AveragIng perIod for Senkou Span 8.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
The buffer numbers: 0 · TENKANSEN_LÌNE, 1 · KÌJUNSEN_LÌNE, 2 · SENKDUSPANA_LÌNE, J ·
SENKDUSPAN8_LÌNE, 4 · CHÌNKDUSPAN_LÌNE.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
734
IßWhFI
The functIon returns the handle of the |arket FacIlItatIon Ìndex IndIcator. Ìt has only one buffer.
Lnr LÐWM¯P.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
IHJM_A--HPI¯_VJHJMI -ppliaj_v.l:ma // v·Lum- ryp- r·n ·-L·uL-rL·n
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
-ppliaj_v.l:ma
[In] The volume used. Can be one of the constants of ENU|_APPLÌE0_7DLU|E.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
735
Ihomentum
The functIon returns the handle of the |omentum IndIcator. Ìt has only one buffer.
Lnr LM·m-nrum.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m.m_pari.j, // -v-n-jLnj p-nL·J
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m.m_pari.j
[In] AveragIng perIod (bars count) for the calculatIon of the prIce change.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
736
IhFI
The functIon returns the handle of the |oney Flow Ìndex IndIcator.
Lnr LM¯P.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
IHJM_A--HPI¯_VJHJMI -ppliaj_v.l:ma // v·Lum- ryp- r·n ·-L·uL-rL·n
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod (bars count) for the calculatIon.
-ppliaj_v.l:ma
[In] The volume used. Can be any of the ENU|_APPLÌE0_7DLU|E values.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
737
IhA
The functIon returns the handle of the |ovIng Average IndIcator. Ìt has only one buffer.
Lnr LMA.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
Lnr m-_·nif:, // !·nLz·nr-L -!Lrr
IHJM_MA_MIr|J¯ m-_ma:n.j, // -m··r!Lnj ryp-
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod for the calculatIon of the movIng average.
m-_·nif:
[In] ShIft of the IndIcator relatIve to the prIce chart.
m-_ma:n.j
[In] SmoothIng type. Can be one of the ENU|_|A_|ETHD0 values.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
738
IDshA
The functIon returns the handle of the |ovIng Average of DscIllator IndIcator. The Ds|A oscIllator
shows the dIfference between values of |AC0 and Its sIgnal lIne. Ìt has only one buffer.
Lnr LJ-MA.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr f-·:_am-_pari.j, // p-nL·J r·n ¯--r M·vLnj Av-n-j-
Lnr ·l.v_am-_pari.j, // p-nL·J r·n ¯L·. M·vLnj Av-n-j-
Lnr ·ijn-l_pari.j, // -v-n-jLnj p-nL·J r·n r!-Ln JLrr-n-n·-
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
f-·:_am-_pari.j
[In] PerIod for Fast |ovIng Average calculatIon.
·l.v_am-_pari.j
[In] PerIod for Slow |ovIng Average calculatIon.
·ijn-l_pari.j
[In] AveragIng perIod for sIgnal lIne calculatIon.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
Ìn some systems thIs oscIllator Is also known as |AC0 hIstogram.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
739
IhAC0
The functIon returns the handle of the |ovIng Averages Convergence/0Ivergence IndIcator. Ìn
systems where DslA Is called |AC0 HIstogram, thIs IndIcator Is shown as two lInes. Ìn the clIent
termInal the |ovIng Averages Convergence/0Ivergence looks lIke a hIstogram.
Lnr LMA.¯.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr f-·:_am-_pari.j, // p-nL·J r·n ¯--r -v-n-j- ·-L·uL-rL·n
Lnr ·l.v_am-_pari.j, // p-nL·J r·n ¯L·. -v-n-j- ·-L·uL-rL·n
Lnr ·ijn-l_pari.j, // p-nL·J r·n r!-Ln JLrr-n-n·- -v-n-jLnj
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
f-·:_am-_pari.j
[In] PerIod for Fast |ovIng Average calculatIon.
·l.v_am-_pari.j
[In] PerIod for Slow |ovIng Average calculatIon.
·ijn-l_pari.j
[In] PerIod for SIgnal lIne calculatIon.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
The buffer numbers are the followIng: 0 · |AÌN_LÌNE, 1 · SÌCNAL_LÌNE.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
740
IDßV
The functIon returns the handle of the Dn 8alance 7olume IndIcator. Ìt has only one buffer.
Lnr LJÐV.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
IHJM_A--HPI¯_VJHJMI -ppliaj_v.l:ma // v·Lum- ryp- r·n ·-L·uL-rL·n
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
-ppliaj_v.l:ma
[In] The volume used. Can be any of the ENU|_APPLÌE0_7DLU|E values.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
741
ISAP
The functIon returns the handle of the ParabolIc Stop and Feverse system IndIcator. Ìt has only one
buffer.
Lnr L¯A-.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
J·uoL- ·:ap, // -r-p Ln·n-m-nr
J·uoL- m-xim:m // m-xLm-L -r·p L-v-L
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
·:ap
[In] The stop level Increment, usually 0.02.
m-xim:m
[In] The maxImal stop level, usually 0.2.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
742
IPSI
The functIon returns the handle of the FelatIve Strength Ìndex IndIcator. Ìt has only one buffer.
Lnr L-¯P.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod for the FSÌ calculatIon.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
743
IPVI
The functIon returns the handle of the FelatIve 7Igor Ìndex IndIcator.
Lnr L-VP.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j // -v-n-jLnj p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod for the F7Ì calculatIon.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
The buffer numbers are the followIng: 0 · |AÌN_LÌNE, 1 · SÌCNAL_LÌNE.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
744
IStd0ev
The functIon returns the handle of the Standard 0evIatIon IndIcator. Ìt has only one buffer.
Lnr L¯rJ¯-v.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
Lnr m-_·nif:, // !·nLz·nr-L -!Lrr
IHJM_MA_MIr|J¯ m-_ma:n.j, // -m··r!Lnj ryp-
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod for the IndIcator calculatIons.
m-_·nif:
[In] ShIft of the IndIcator relatIve to the prIce chart.
m-_ma:n.j
[In] Type of averagIng. Can be any of the ENU|_|A_|ETHD0 values.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
745
IStochastIc
The functIon returns the handle of the StochastIc DscIllator IndIcator.
Lnr L¯r··!--rL·.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr Kpari.j, // ·-p-nL·J .numo-n ·r o-n- r·n ·-L·uL-rL·n-·
Lnr Dpari.j, // ¯-p-nL·J .p-nL·J ·r rLn-r -m··r!Lnj·
Lnr ·l.vinj, // rLn-L -m··r!Lnj
IHJM_MA_MIr|J¯ m-_ma:n.j, // ryp- ·r -m··r!Lnj
IHJM_¯rJ_--P.I pri·a_fialj // -r··!--rL· ·-L·uL-rL·n m-r!·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
Kpari.j
[In] AveragIng perIod (bars count) for the ºK lIne calculatIon.
Dpari.j
[In] AveragIng perIod (bars count) for the º0 lIne calculatIon.
·l.vinj
[In] SlowIng value.
m-_ma:n.j
[In] Type of averagIng. Can be any of the ENU|_|A_|ETHD0 values.
pri·a_fialj
[In] Parameter of prIce selectIon for calculatIons. Can be one of the ENU|_STD_PFÌCE values.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Note
The buffer numbers: 0 · |AÌN_LÌNE, 1 · SÌCNAL_LÌNE.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
746
ITEhA
The functIon returns the handle of the TrIple ExponentIal |ovIng Average IndIcator. Ìt has only one
buffer.
Lnr LrIMA.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
Lnr m-_·nif:, // !·nLz·nr-L -!Lrr ·r LnJL·-r·n
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod (bars count) for calculatIon.
m-_·nif:
[In] ShIft of IndIcator relatIve to the prIce chart.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
747
ITrIX
The functIon returns the handle of the TrIple ExponentIal |ovIng Averages DscIllator IndIcator. Ìt has
only one buffer.
Lnr LrnLx.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr m-_pari.j, // -v-n-jLnj p-nL·J
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
m-_pari.j
[In] AveragIng perIod (bars count) for calculatIons.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
748
IWPP
The functIon returns the handle of the Larry WIllIams' Percent Fange IndIcator. Ìt has only one buffer.
Lnr LW--.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr ·-l·_pari.j // -v-n-jLnj p-nL·J
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
·-l·_pari.j
[In] PerIod (bars count) for the IndIcator calculatIon.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
749
IVI0yA
The functIon returns the handle of the 7arIable Ìndex 0ynamIc Average IndIcator. Ìt has only one
buffer.
Lnr LVP¯yA.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
Lnr ·m._pari.j, // p-nL·J r·n .!-nJ- M·m-nrum
Lnr am-_pari.j, // IMA -m··r!Lnj p-nL·J
Lnr m-_·nif:, // !·nLz·nr-L -!Lrr ·n r!- pnL·- ·!-nr
IHJM_A--HPI¯_--P.I -ppliaj_pri·a // ryp- ·r pnL·- ·n !-nJL-
·¡
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
·m._pari.j
[In] PerIod (bars count) for the Chande |omentum DscIllator calculatIon.
am-_pari.j
[In] E|A perIod (bars count) for smoothIng factor calculatIon.
m-_·nif:
[In] ShIft of the IndIcator relatIve to the prIce chart.
-ppliaj_pri·a
[In] The prIce used. Can be any of the prIce constants ENU|_APPLÌE0_PFÌCE or a handle of
another IndIcator.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
TechnicaI Indicators
© 2000·2010, |eta0uotes Software Corp.
750
IVoIumes
The functIon returns the handle of the 7olumes IndIcator. Ìt has an only one buffer.
Lnr LV·Lum--.
-rnLnj ·ymo.l, // -ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // p-nL·J
IHJM_A--HPI¯_VJHJMI -ppliaj_v.l:ma // v·Lum- ryp- r·n ·-L·uL-rL·n
·
Parameters
·ymo.l
[In] The symbol name of the securIty, the data of whIch should be used to calculate the IndIcator.
The NULL value means the current symbol.
pari.j
[In] The value of the perIod can be one of the ENU|_TÌ|EFFA|ES values, 0 means the current
tImeframe.
-ppliaj_v.l:ma
[In] The volume used. Can be any of the ENU|_APPLÌE0_7DLU|E values.
Peturned vaIue
Feturns the handle of a specIfIed technIcal IndIcator, In case of faIlure returns ÌN7ALÌ0_HAN0LE.
The computer memory can be freed from an IndIcator that Is no more utIlIzed, usIng the
ÌndIcatorFelease() functIon, to whIch the IndIcator handle Is passed.
Working with events
© 2000·2010, |eta0uotes Software Corp.
751
Event FunctIons
ThIs group contaIns functIons for workIng wIth custom events and tImer events. 8esIdes thIs group,
there are specIal functIons for handlIng predefIned events.
FunctIon ActIon
EventSetTImer Starts the tImer event generator wIth the
specIfIed perIodIcIty for the current chart
EventKIllTImer Stops the generatIon of events by the tImer In
the current chart
EventChartCustom Cenerates a custom event for the specIfIed
chart
See aIso
Types of Chart Events
Working with events
© 2000·2010, |eta0uotes Software Corp.
752
EventSetTImer
The functIon IndIcates to the clIent termInal, that events from the tImer must be generated wIth the
specIfIed perIodIcIty for the chart, to whIch the Expert AdvIsor Is attached.
o··L Iv-nr¯-rrLm-n.
Lnr ·a·.nj· // numo-n ·r --··nJ-
·¡
Parameters
·a·.nj·
[In] Number of seconds that determIne the frequency of the tImer event occurrence.
Peturn VaIue
Ìn case of success returns true, otherwIse false. Ìn order to get an error code, the CetLastError()
functIon should be called.
Note
Normally, thIs functIon must be called from the DnÌnIt() functIon or from a class constructor. Ìn
order to handle events comIng from the tImer, the Expert AdvIsor must have the DnTImer()
functIon.
Every Expert AdvIsor, as well as every IndIcator works wIth Its own tImer and receIves events only
from It. As soon as a mql5 program stops operatIng, the tImer Is destroyed forcIbly If It was created
but hasn't been dIsabled by the EventKIllTImer() functIon.
For each program no more than one tImer can be run.
Working with events
© 2000·2010, |eta0uotes Software Corp.
753
EventKIIITImer
SpecIfIes the clIent termInal that Is necessary to stop the generatIon of events from TImer.
v·LJ Iv-nr·LLLrLm-n.·¡
Peturn VaIue
No return value.
Note
TypIcally, thIs functIon must be called from a functIon Dn0eInIt(), If the EventSetTImer() functIon
has been called from DnÌnIt(). ThIs functIon can also be called form the class destructor, If the
EventSetTImer() functIon has been called In the constructor of thIs class.
Every Expert AdvIsor, as well as every IndIcator works wIth Its own tImer and receIves events only
from It. As soon as a mql5 program stops operatIng, the tImer Is destroyed forcIbly If It was created
but hasn't been dIsabled by the EventKIllTImer() functIon
Working with events
© 2000·2010, |eta0uotes Software Corp.
754
EventChartCustom
The functIon generates a custom event for the specIfIed chart.
v·LJ Iv-nr.!-nr.u-r·m.
L·nj ·n-r:_ij, // LJ-nrLrL-n ·r r!- -v-nr n-·-LvLnj ·!-nr
u-!·nr ·:·:.m_avan:_ij, // -v-nr LJ-nrLrL-n
L·nj lp-r-m, // p-n-m-r-n ·r ryp- L·nj
J·uoL- jp-r-m, // p-n-m-r-n ·r ryp- J·uoL-
-rnLnj ·p-r-m // -rnLnj p-n-m-r-n ·r r!- -v-nr
·¡
Parameters
·n-r:_ij
[In] Chart IdentIfIer. 0 means the current chart.
·:·:.m_avan:_ij
[In] Ì0 of the user events. ThIs IdentIfIer Is automatIcally added to the value
CHAFTE7ENT_CUSTD| and converted to the Integer type.
lp-r-m
[In] Event parameter of the long type passed to the DnChartEvent functIon.
jp-r-m
[In] Event parameter of the double type passed to the DnChartEvent functIon.
·p-r-m
[In] Event parameter of the strIng type passed to the DnChartEvent functIon. Ìf the strIng Is
longer than 6J characters, It Is truncated.
Peturn VaIue
No return value.
Note
An Expert AdvIsor or IndIcator attached to the specIfIed chart handles the event usIng the functIon
DnChartEvent(Int event_Id, longE lparam, doubleE dparam, strIngE sparam).
For each type of event, the Input parameters of the DnChartEvent() functIon have defInIte values that
are requIred for the processIng of thIs event. The events and values passed through thIs parameters
are lIsted In the below table.
Event VaIue of the Id
parameter
VaIue of the
Iparam
parameter
VaIue of the
dparam
parameter
VaIue of the
sparam
parameter
Event of a
keystroke
CHAFTE7ENT_KE
Y0DWN
code of a
pressed key
· ·
event of
graphIcal object
CHAFTE7ENT_D8
JECT_CFEATE
· · Name of the
created graphIcal
Working with events
© 2000·2010, |eta0uotes Software Corp.
755
creatIon object
Event of change
of an object
property vIa the
propertIes dIalog
CHAFTE7ENT_D8
JECT_CHANCE
· · Name of the
modIfIed
graphIcal object
Event of
graphIcal object
deletIon
CHAFTE7ENT_D8
JECT_0ELETE
· · Name of the
deleted graphIcal
object
Event of a
mouse clIck on
the chart
CHAFTE7ENT_C
LÌCK
the X coordInate the Y coordInate ·
Event of a
mouse clIck In a
graphIcal object
belongIng to the
chart
CHAFTE7ENT_D8
JECT_CLÌCK
the X coordInate the Y coordInate Name of the
graphIcal object,
on whIch the
event occurred
Event of a
graphIcal object
draggIng usIng
the mouse
CHAFTE7ENT_D8
JECT_0FAC
· · Name of the
moved graphIcal
object
Event of the
fInIshed text
edItIng In the
entry box of the
LabelEdIt
graphIcal object
CHAFTE7ENT_D8
JECT_EN0E0ÌT
· · Name of the
LabelEdIt
graphIcal object,
In whIch text
edItIng has
completed
Ì0 of the user
event under the
N number
CHAFTE7ENT_CU
STD|+N
7alue set by the
EventChartCusto
m() fubctIon
7alue set by the
EventChartCusto
m() functIon
7alue set by the
EventChartCusto
m() functIon
ExampIe:
//--------------------------------------------------------------------
// Ðurr·n.LL·kIxp-nr.m¬¯
// .·pynLj!r `¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m¬L¯.··m
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨¨-, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
tpn·p-nry v-n-L·n ¨!.¨¨¨
-rnLnj ourr·nP¯=¨Ðurr·n¨¡
-rnLnj L-o-LP¯=¨Pnr·¨¡
Lnr on·-J·--rIv-nrP¯=¯¨¨¨¡
//--------------------------------------------------------------------
// Ixp-nr LnLrL-LLz-rL·n run·rL·n
Working with events
© 2000·2010, |eta0uotes Software Corp.
756
//--------------------------------------------------------------------
Lnr JnPnLr.·

//--- .n--r- - ourr·n r· --nJ ·u-r·m -v-nr-
Jo|-·r.n--r-.¨,ourr·nP¯,JЯ_ÐJrrJH,¨,!¨¨,!¨¨·¡
Jo|-·r¯-rPnr-j-n.¨,ourr·nP¯,JЯ--J-_.JHJ-,W!Lr-·¡
Jo|-·r¯-rPnr-j-n.¨,ourr·nP¯,JЯ--J-_ÐJ.JHJ-,Jn-y·¡
Jo|-·r¯-rPnr-j-n.¨,ourr·nP¯,JЯ--J-_x¯P¯rAH.I,!¨¨·¡
Jo|-·r¯-rPnr-j-n.¨,ourr·nP¯,JЯ--J-_1¯P¯rAH.I,!¨¨·¡
Jo|-·r¯-rPnr-j-n.¨,ourr·nP¯,JЯ--J-_x¯P¯I,`¨¨·¡
Jo|-·r¯-rPnr-j-n.¨,ourr·nP¯,JЯ--J-_1¯P¯I,¯¨·¡
Jo|-·r¯-r¯rnLnj.¨,ourr·nP¯,JЯ--J-_¯JHr,¨AnL-L¨·¡
Jo|-·r¯-r¯rnLnj.¨,ourr·nP¯,JЯ--J-_rIxr,¨Ðurr·n¨·¡
Jo|-·r¯-rPnr-j-n.¨,ourr·nP¯,JЯ--J-_¯JHr¯P¯I,!¨·¡
Jo|-·r¯-rPnr-j-n.¨,ourr·nP¯,JЯ--J-_¯IHI.rAÐHI,¨·¡
//--- .n--r- - L-o-L r·n JL-pL-yLnj Lnr·nm-rL·n
Jo|-·r.n--r-.¨,L-o-LP¯,JЯ_HAÐIH,¨,!¨¨,!¨¨·¡
Jo|-·r¯-rPnr-j-n.¨,L-o-LP¯,JЯ--J-_.JHJ-,--J·¡
Jo|-·r¯-rPnr-j-n.¨,L-o-LP¯,JЯ--J-_x¯P¯rAH.I,!¨¨·¡
Jo|-·r¯-rPnr-j-n.¨,L-o-LP¯,JЯ--J-_1¯P¯rAH.I,¯¨·¡
Jo|-·r¯-r¯rnLnj.¨,L-o-LP¯,JЯ--J-_¯JHr,¨rn-ou·!-r M¯¨·¡
Jo|-·r¯-r¯rnLnj.¨,L-o-LP¯,JЯ--J-_rIxr,¨H· Lnr·nm-rL·n¨·¡
Jo|-·r¯-rPnr-j-n.¨,L-o-LP¯,JЯ--J-_¯JHr¯P¯I,`¨·¡
Jo|-·r¯-rPnr-j-n.¨,L-o-LP¯,JЯ--J-_¯IHI.rAÐHI,¨·¡
//---
n-runn.¨·¡
·
//--------------------------------------------------------------------
// Ixp-nr J-LnLrL-LLz-rL·n run·rL·n
//--------------------------------------------------------------------
v·LJ Jn¯-LnLr.··n-r Lnr n---·n·

//---
Jo|-·r¯-L-r-.¨,ourr·nP¯·¡
Jo|-·r¯-L-r-.¨,L-o-LP¯·¡
·
//--------------------------------------------------------------------
// Ixp-nr rL·k run·rL·n
//--------------------------------------------------------------------
v·LJ JnrL·k.·

//---
·
//--------------------------------------------------------------------
v·LJ Jn.!-nrIv-nr.··n-r Lnr LJ,
Working with events
© 2000·2010, |eta0uotes Software Corp.
757
··n-r L·nj sLp-n-m,
··n-r J·uoL- sJp-n-m,
··n-r -rnLnj s-p-n-m·

//--- .!-·k r!- -v-nr oy pn---Lnj - m·u-- ourr·n
Lr.LJ==.|A-rIVIHr_JЯI.r_.HP.··

-rnLnj ·LL·k-J.!-nrJo|-·r=-p-n-m¡
//--- Pr y·u ·LL·k ·n r!- ·o|-·r .Lr! r!- n-m- ourr·nP¯
Lr.·LL·k-J.!-nrJo|-·r==ourr·nP¯·

//--- ¯r-r- ·r r!- ourr·n - pn----J ·n n·r
o··L --L-·r-J=Jo|-·rJ-rPnr-j-n.¨,ourr·nP¯,JЯ--J-_¯rArI·¡
//--- L·j - J-ouj m----j-
-nLnr.¨Ðurr·n pn----J = ¨,--L-·r-J·¡
Lnr ·u-r·mIv-nrP¯¡ // Humo-n ·r r!- ·u-r·m -v-nr r· --nJ
-rnLnj m----j-¡ // M----j- r· o- --nr Ln r!- -v-nr
//--- Pr r!- ourr·n L- pn----J
Lr.--L-·r-J·

m----j-=¨Ðurr·n pn----J¨¡
·u-r·mIv-nrP¯=.|A-rIVIHr_.J¯rJM-!¡
·
-L-- // Ðurr·n L- n·r pn----J

m----j-=¨Ðurr·n Ln n·r pn----J¨¡
·u-r·mIv-nrP¯=.|A-rIVIHr_.J¯rJM----¡
·
//--- ¯-nJ - ·u-r·m -v-nr ¨·un¨ ·!-nr
Iv-nr.!-nr.u-r·m.¨,·u-r·mIv-nrP¯-.|A-rIVIHr_.J¯rJM,¨,¨,m----j-·¡
///--- ¯-nJ - m----j- r· -LL ·p-n ·!-nr-
Ðn·-J·--rIv-nr..!-nrP¯.·,¨,¨Ðn·-J·--r M----j-¨·¡
//--- ¯-ouj m----j-
-nLnr.¨¯-nr -n -v-nr .Lr! P¯ = ¨,·u-r·mIv-nrP¯·¡
·
.!-nr--Jn-..·¡// ¯·n·-J n-Jn-. -LL ·!-nr ·o|-·r-
·
//--- .!-·k r!- -v-nr o-L·nj- r· r!- u--n -v-nr-
Lr.LJ.|A-rIVIHr_.J¯rJM·

Lr.LJ==on·-J·--rIv-nrP¯·

-nLnr.¨J·r on·-J·--r m----j- rn·m - ·!-nr .Lr! LJ = ¨-Lp-n-m·¡
·
-L--

//--- W- n--J - r-xr m----j- Ln r!- -v-nr
Working with events
© 2000·2010, |eta0uotes Software Corp.
758
-rnLnj Lnr·=-p-n-m¡
-nLnr.¨|-nJL- r!- u--n -v-nr .Lr! r!- P¯ = ¨,LJ·¡
//--- ¯L-pL-y - m----j- Ln - L-o-L
Jo|-·r¯-r¯rnLnj.¨,L-o-LP¯,JЯ--J-_rIxr,-p-n-m·¡
.!-nr--Jn-..·¡// ¯·n·-J n-Jn-. -LL ·!-nr ·o|-·r-
·
·
·
//--------------------------------------------------------------------
// --nJ- on·-J·--r -v-nr r· -LL ·p-n ·!-nr-
//--------------------------------------------------------------------
v·LJ Ðn·-J·--rIv-nr.L·nj Lp-n-m,J·uoL- Jp-n-m,-rnLnj -p-n-m·

Lnr -v-nrP¯=on·-J·--rIv-nrP¯-.|A-rIVIHr_.J¯rJM¡
L·nj ·unn.!-nr=.!-nr¯Ln-r.·¡
Lnr L=¨¡
.!LL-.L<.|A-r¯_MAx // W- !-v- ·-nr-LnLy n· m·n- r!-n .|A-r¯_MAx ·p-n ·!-nr-

Iv-nr.!-nr.u-r·m.·unn.!-nr,-v-nrP¯,Lp-n-m,Jp-n-m,-p-n-m·¡
·unn.!-nr=.!-nrH-xr.·unn.!-nr·¡ // W- !-v- n-·-Lv-J - n-. ·!-nr rn·m r!- pn-vL·u-
Lr.·unn.!-nr==¨· on--k¡ // ---·!-J r!- -nJ ·r r!- ·!-nr- LL-r
L--¡// ¯· n·r r·nj-r r· Ln·n---- r!- ··unr-n
·
·
//--------------------------------------------------------------------
See aIso
Events of the clIent termInal, Event handler functIons
Standard Library
© 2000·2010, |eta0uotes Software Corp.
759
Standard LIbrary
ThIs group of chapters contaIns the technIcal detaIls of the |0L5 Standard LIbrary and descrIptIons of
all Its key components.
|0L5 Standard LIbrary Is wrItten In |0L5 and Is desIgned to facIlItate wrItIng programs (IndIcators,
scrIpts, experts) to end users. LIbrary provIdes convenIent access to most of the Internal functIons
|0L5.
|0L5 Standard LIbrary Is placed In the workIng dIrectory of the termInal In the 'Ìnclude' folder.
SectIon LocatIon
8ase class Ìnclude\
Classes of data Ìnclude\Arrays\
Classes for fIle operatIons Ìnclude\FIles\
Classes for strIng operatIons Ìnclude\StrIngs\
Classes for graphIc objects Ìnclude\Dbjects\
Class for workIng wIth chart Ìnclude\Charts\
TechnIcal IndIcators Ìnclude\ÌndIcators\
Trade Classes Ìnclude\Trade\
Standard Library
© 2000·2010, |eta0uotes Software Corp.
760
ßasIc CIass CDbject
Class CDbject Is the base class for constructIng a |0L5 Standard LIbrary .
0escrIptIon
Class CDbject provIdes all Its descendants to be part of a lInked lIst. Also IdentIfIes a number of
vIrtual methods for further ImplementatIon In descendant classes.
0ecIaratIon
·L--- .Jo|-·r
TItIe
tLn·LuJ- <Jo|-·r.m¬!
CIass hethods
AttrIbutes
Prev Cets the value of the prevIous Item
Prev Sets the value of the prevIous Item
Next Cets the value of the subsequent element
Next Sets the next element
Compare methods
vIrtual Compare Feturns the result of comparIson wIth another
object
Inputloutput
vIrtual Save WrItes object to a fIle
vIrtual Load Feads the object from the fIle
vIrtual Type Feturns the type of object
0erIved cIasses:
CArray
CChartDbject
CChart
CStrIng
CFIle
CLIst
CTreeNode
Standard Library
© 2000·2010, |eta0uotes Software Corp.
761
Prev
Cets a poInter to the prevIous lIst Item.
.Jo|-·r· -n-v.·
Peturn VaIue
PoInter to the prevIous lIst Item. Ìf an Item Is lIsted fIrst, then return NULL.
ExampIe:
//--- -x-mpL- r·n .Jo|-·r..-n-v.·
tLn·LuJ- <Jo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

.Jo|-·r ··o|-·r_rLn-r,··o|-·r_--··nJ¡
//---
·o|-·r_rLn-r=n-. .Jo|-·r¡
Lr.·o|-·r_rLn-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
·o|-·r_--··nJ=n-. .Jo|-·r¡
Lr.·o|-·r_--··nJ==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- ·o|-·r_rLn-r¡
n-runn¡
·
//--- --r Lnr-n··nn-·r
·o|-·r_rLn-r.H-xr.·o|-·r_--··nJ·¡
·o|-·r_--··nJ.-n-v.·o|-·r_rLn-r·¡
//--- u-- pn-v ·o|-·r
.Jo|-·r ··o|-·r=·o|-·r_--··nJ.-n-v.·¡
//--- J-L-r- ·o|-·r-
J-L-r- ·o|-·r_rLn-r¡
J-L-r- ·o|-·r_--··nJ¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
762
Prev
Sets the poInter to the prevIous lIst Item.
v·LJ -n-v.
.Jo|-·r· .o¬a·: // -·Lnr-n r· r!- pn-vL·u- LL-r Lr-m
·
Parameters
.o¬a·:
[In] New value poInter to the prevIous lIst Item.
ExampIe:
//--- -x-mpL- r·n .Jo|-·r..-n-v..Jo|-·r··
tLn·LuJ- <Jo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

.Jo|-·r ··o|-·r_rLn-r,··o|-·r_--··nJ¡
//---
·o|-·r_rLn-r=n-. .Jo|-·r¡
Lr.·o|-·r_rLn-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
·o|-·r_--··nJ=n-. .Jo|-·r¡
Lr.·o|-·r_--··nJ==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- ·o|-·r_rLn-r¡
n-runn¡
·
//--- --r Lnr-n··nn-·r
·o|-·r_rLn-r.H-xr.·o|-·r_--··nJ·¡
·o|-·r_--··nJ.-n-v.·o|-·r_rLn-r·¡
//--- u-- ·o|-·r-
//--- ...
//--- J-L-r- ·o|-·r-
J-L-r- ·o|-·r_rLn-r¡
J-L-r- ·o|-·r_--··nJ¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
763
Next
Cets a poInter to the next element of the lIst.
.Jo|-·r· H-xr.·
Peturn VaIue
PoInter to the next Item In the lIst. Ìf the last Item In the lIst, returns NULL.
ExampIe:
//--- -x-mpL- r·n .Jo|-·r..H-xr.·
tLn·LuJ- <Jo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

.Jo|-·r ··o|-·r_rLn-r,··o|-·r_--··nJ¡
//---
·o|-·r_rLn-r=n-. .Jo|-·r¡
Lr.·o|-·r_rLn-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
·o|-·r_--··nJ=n-. .Jo|-·r¡
Lr.·o|-·r_--··nJ==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- ·o|-·r_rLn-r¡
n-runn¡
·
//--- --r Lnr-n··nn-·r
·o|-·r_rLn-r.H-xr.·o|-·r_--··nJ·¡
·o|-·r_--··nJ.-n-v.·o|-·r_rLn-r·¡
//--- u-- n-xr ·o|-·r
.Jo|-·r ··o|-·r=·o|-·r_rLn-r.H-xr.·¡
//--- J-L-r- ·o|-·r-
J-L-r- ·o|-·r_rLn-r¡
J-L-r- ·o|-·r_--··nJ¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
764
Next
Sets the poInter to the next element of the lIst.
v·LJ H-xr.
.Jo|-·r· .o¬a·: // -·Lnr-n r· r!- n-xr LL-r Lr-m
·
Parameters
.o¬a·:
[In] New value poInter to the next lIst Item.
ExampIe:
//--- -x-mpL- r·n .Jo|-·r..H-xr..Jo|-·r··
tLn·LuJ- <Jo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

.Jo|-·r ··o|-·r_rLn-r,··o|-·r_--··nJ¡
//---
·o|-·r_rLn-r=n-. .Jo|-·r¡
Lr.·o|-·r_rLn-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
·o|-·r_--··nJ=n-. .Jo|-·r¡
Lr.·o|-·r_--··nJ==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- ·o|-·r_rLn-r¡
n-runn¡
·
//--- --r Lnr-n··nn-·r
·o|-·r_rLn-r.H-xr.·o|-·r_--··nJ·¡
·o|-·r_--··nJ.-n-v.·o|-·r_rLn-r·¡
//--- u-- ·o|-·r-
//--- ...
//--- J-L-r- ·o|-·r-
J-L-r- ·o|-·r_rLn-r¡
J-L-r- ·o|-·r_--··nJ¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
765
Compare
Compares the data Item In the lIst wIth data on another element of the lIst.
vLnru-L Lnr .·mp-n-.
.Jo|-·r ··n-r · n.ja, // H·J- r· ··mp-n- .Lr!
Lnr m.ja=` // .·mp-n- m·J-
· ··n-r
Parameters
n.ja
[In] PoInter to a lIst Item to compare
m.ja=`
[In] 7arIant ComparIson
Peturn VaIue
0 · In case the lIst Items are equal, ·1 · If the lIst Item Is less than the Item In the lIst for
comparIson (node), 1 · If the lIst Item more than Item In the lIst for comparIson (node).
Note
|ethod Compare () In class CDbject always returns 0 and does not perform any actIon.Ìf you want to
compare data derIved class, the method Compare (...) Should be Implemented.The mode parameter
should be used when ImplementIng multIvarIate comparIson.
ExampIe:
//--- -x-mpL- r·n .Jo|-·r...·mp-n-....·
tLn·LuJ- <Jo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

.Jo|-·r ··o|-·r_rLn-r,··o|-·r_--··nJ¡
//---
·o|-·r_rLn-r=n-. .Jo|-·r¡
Lr.·o|-·r_rLn-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
·o|-·r_--··nJ=n-. .Jo|-·r¡
Lr.·o|-·r_--··nJ==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- ·o|-·r_rLn-r¡
n-runn¡
·
//--- --r Lnr-n··nn-·r
·o|-·r_rLn-r.H-xr.·o|-·r_--··nJ·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
766
·o|-·r_--··nJ.-n-v.·o|-·r_rLn-r·¡
//--- ··mp-n- ·o|-·r-
Lnr n--uLr=·o|-·r_rLn-r..·mp-n-.·o|-·r_--··nJ·¡
//--- J-L-r- ·o|-·r-
J-L-r- ·o|-·r_rLn-r¡
J-L-r- ·o|-·r_--··nJ¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
767
Save
Saves data element lIst In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (), bInary
Peturn VaIue
true · If successfully completed, false · If an error.
Note
|ethod Save (Int) In class CDbject always returns true and does not perform any actIon. Ìf you want
to save the data derIved class In the fIle, the method Save (Int) should be Implemented.
ExampIe:
//--- -x-mpL- r·n .Jo|-·r..¯-v-.Lnr·
tLn·LuJ- <Jo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Jo|-·r ··o|-·r=n-. .Jo|-·r¡
//---
Lr.·o|-·r.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- --r ·o|-·r- J-r-
//--- . . .
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..·o|-·r.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- ·o|-·r¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
768
¯LL-.L·--.rLL-_!-nJL-·¡
·
J-L-r- ·o|-·r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
769
Load
Loads data Item In the lIst from a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // !-nJL- r· rLL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (), bInary
Peturn VaIue
true - If successfully completed, false · If an error.
Note
|ethod Load (Int) In class CDbject always returns true and does not perform any actIon. Ìf you want
to load the data derIved class from a fIle, the method Load (Int) should be Implemented.
ExampIe:
//--- -x-mpL- r·n .Jo|-·r..H·-J.Lnr·
tLn·LuJ- <Jo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Jo|-·r ··o|-·r=n-. .Jo|-·r¡
//---
Lr.·o|-·r.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..·o|-·r.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- ·o|-·r¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
770
//--- u-- ·o|-·r
//--- . . .
J-L-r- ·o|-·r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
771
Type
Cets the type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
Type IdentIfIer (for CDbject · 0).
ExampIe:
//--- -x-mpL- r·n .Jo|-·r..ryp-.·
tLn·LuJ- <Jo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

.Jo|-·r ··o|-·r=n-. .Jo|-·r¡
//---
·o|-·r=n-. .Jo|-·r¡
Lr.·o|-·r ==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r ·o|-·r- ryp-
Lnr ryp-=·o|-·r.ryp-.·¡
//--- J-L-r- ·o|-·r
J-L-r- ·o|-·r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
772
0ata Structures
ThIs sectIon contaIns the technIcal detaIls of workIng wIth varIous data structures (arrays, lInked lIsts,
etc.) and descrIptIon of the relevant components of the |0L5 Standard LIbrary .
UsIng classes of data structures, wIll save tIme when creatIng custom data stores of varIous formats
(IncludIng composIte data structures).
|0L5 Standard LIbrary (In terms of data sets) Is placed In the workIng dIrectory of the termInal In the
Ìnclude\Arrays folder.
0ata Arrays
Use of classes of dynamIc arrays of data wIll save tIme when creatIng a custom data stores of varIous
formats (IncludIng multIdImensIonal arrays).
|0L5 Standard LIbrary (In terms of arrays of data) Is placed In the workIng dIrectory of the termInal
In the Ìnclude\Arrays folder.
CIass 0escrIptIon
8ase class of dynamIc data array CArray 8ase class of dynamIc data array
CArrayChar 0ynamIc array of varIables of type char or uchar
CArrayShort 0ynamIc array of varIables of type short or
ushort
CArrayÌnt 0ynamIc array of varIables of type Int or uInt
CArrayLong 0ynamIc array of varIables of type long or ulong
CArrayFloat 0ynamIc array of varIables of type float
CArray0ouble 0ynamIc array of varIables of type double
CArrayStrIng 0ynamIc array of varIables of type strIng
8ase class of object array CArrayDbj 0ynamIc array of poInters CDbject
8ase class of lIst CLIst ProvIdes the abIlIty to work wIth a lIst of
Instances of CDbject and Its descendant
CTreeNode ProvIdes the abIlIty to work wIth nodes of the
bInary tree CTree
CTree ProvIdes the abIlIty to work wIth the bInary tree
of the CTreeNode class Instances and Its
descendants
Standard Library
© 2000·2010, |eta0uotes Software Corp.
773
CArray
CArray class Is the base class a dynamIc array of varIables.
0escrIptIon
Class CArray provIdes the abIlIty to work wIth a dynamIc array of varIables In the part of the attrIbutes
of management of memory allocatIon, sortIng, and workIng wIth fIles.
0ecIaratIon
·L--- .Ann-y . puoLL· .Jo|-·r
TItIe
tLn·LuJ- <Ann-y-\Ann-y.m¬!
CIass hethods
AttrIbutes
Step Cets the step Increment sIze of the array
Step Set the Increment sIze of the array
Total Cets the number of elements In the array
AvaIlable Cets the number of free elements of the array
are avaIlable wIthout addItIonal memory
allocatIon
|ax Cets the maxImum possIble sIze of the array
wIthout memory reallocatIon
ÌsSorted Cets sIgn sorted array to the specIfIed optIon
Sort|ode Cets the versIon of the sortIng array
CIear methods
Clear 0eletes all of the array elements wIthout
memory release
Sort methods
Sort Sorts an array to the specIfIed optIon
Inputloutput
vIrtual Save Saves data array In the fIle
vIrtual Load Loads data array from a fIle
0erIved cIasses:
CArrayChar
Standard Library
© 2000·2010, |eta0uotes Software Corp.
774
CArrayShort
CArrayÌnt
CArrayLong
CArrayFloat
CArray0ouble
CArrayStrIng
CArrayDbj
Standard Library
© 2000·2010, |eta0uotes Software Corp.
775
Step
Cets the step Increment sIze of the array.
Lnr ¯r-p.· ··n-r
Peturn VaIue
Ìncrement sIze of the array.
ExampIe:
//--- -x-mpL- r·n .Ann-y..¯r-p.·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r n--Lz- -r-p
Lnr -r-p=-nn-y.¯r-p.·¡
//--- u-- -nn-y
//--- ...
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
776
Step
Sets the Increment sIze of the array.
o··L ¯r-p.
Lnr ·:ap // -r-p
·
Parameters
·:ap
[In] The new value of step Increments In the sIze of the array.
Peturn VaIue
true If successful, false · If there was an attempt to establIsh a step less than or equal to zero.
ExampIe:
//--- -x-mpL- r·n .Ann-y..¯r-p.Lnr·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- --r n--Lz- -r-p
o··L n--uLr=-nn-y.¯r-p.!¨`1·¡
//--- u-- -nn-y
//--- ...
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
777
TotaI
Cets the number of elements In the array.
Lnr r·r-L.· ··n-r¡
Peturn VaIue
Number of elements In the array.
ExampIe:
//--- -x-mpL- r·n .Ann-y..r·r-L.·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·!-·k r·r-L
Lnr r·r-L=-nn-y.r·r-L.·¡
//--- u-- -nn-y
//--- ...
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
778
AvaIIabIe
Cets the number of free elements of the array are avaIlable wIthout addItIonal memory allocatIon.
Lnr Av-LL-oL-.· ··n-r
Peturn VaIue
Number of free elements of the array are avaIlable wIthout addItIonal memory allocatIon.
ExampIe:
//--- -x-mpL- r·n .Ann-y..Av-LL-oL-.·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·!-·k -v-LL-oL-
Lnr -v-LL-oL-=-nn-y.Av-LL-oL-.·¡
//--- u-- -nn-y
//--- ...
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
779
hax
Cets the maxImum possIble sIze of the array wIthout memory reallocatIon.
Lnr M-x.· ··n-r
Peturn VaIue
The maxImum possIble sIze of the array wIthout reallocatIon memory.
ExampIe:
//--- -x-mpL- r·n .Ann-y..M-x.·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·!-·k m-xLmum -Lz-
Lnr m-x=-nn-y.M-x.·¡
//--- u-- -nn-y
//--- ...
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
780
IsSorted
Cets sIgn sorted array to the specIfIed optIon.
o··L P-¯·nr-J.
Lnr m.ja=` // ¯·nrLnj m·J-
· ··n-r
Parameters
m.ja=`
[In] Tested versIon of the sort.
Peturn VaIue
Flag of the sorted lIst. Ìf the lIst Is sorted by the specIfIed versIon · true, otherwIse · false.
Note
Symptom sorted array can not be changed dIrectly. Symptom sorted set method Sort () and reset
any methods to add / Insert except ÌnsertSort (...).
ExampIe:
//--- -x-mpL- r·n .Ann-y..P-¯·nr-J.·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·!-·k -·nr-J
Lr.-nn-y.P-¯·nr-J.··

//--- u-- m-r!·J- r·n -·nr-J -nn-y
//--- ...
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
781
Sorthode
Cets the versIon of the sortIng array.
Lnr ¯·nrM·J-.· ··n-r¡
Peturn VaIue
SortIng mode.
ExampIe:
//--- -x-mpL- r·n .Ann-y..¯·nrM·J-.·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·!-·k -·nr m·J-
Lnr -·nr_m·J-=-nn-y.¯·nrM·J-.·¡
//--- u-- -nn-y
//--- ...
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
782
CIear
0eletes all of the array elements wIthout memory release.
v·LJ .L--n.·
Peturn VaIue
None.
ExampIe:
//--- -x-mpL- r·n .Ann-y...L--n.·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- u-- -nn-y
//--- ...
//--- ·L--n -nn-y
-nn-y..L--n.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
783
Sort
Sorts an array to the specIfIed optIon.
v·LJ ¯·nr.
Lnr m.ja=` // ¯·nrLnj m·J-
·
Parameters
m.ja=`
[In] |ode of array sortIng.
Peturn VaIue
No.
Note
SortIng an array Is always ascendIng.For arrays of prImItIve data types (CArrayChar, CArrayShort,
etc.), the parameter mode Is not used.For the array CArrayDbj, multIvarIate sort should be
Implemented In the method Sort (Int) derIved class.
ExampIe:
//--- -x-mpL- r·n .Ann-y..¯·nr.Lnr·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -·nrLnj oy m·J- ¨
-nn-y.¯·nr.¨·¡
//--- u-- -nn-y
//--- ...
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
784
Save
Saves data array In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y..¯-v-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
785
Load
Loads data array from a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y..H·-J....·
tLn·LuJ- <Ann-y-\Ann-y.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y ·-nn-y=n-. .Ann-y¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
786
CArrayChar
CArrayChar class Is a class of dynamIc array of varIables of type char or uchar.
0escrIptIon
Class CArrayChar provIdes the abIlIty to work wIth a dynamIc array of varIables of type char or uchar.
Ìn the class Implemented the abIlIty to add / Insert / delete elements In an array, sort array,
searchIng In sorted array.Ìn addItIon, the Implemented methods of work wIth the fIle.
0ecIaratIon
·L--- .Ann-y.!-n . puoLL· .Ann-y
TItIe
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
CIass hethods
hemory controI
Feserve Allocates memory to Increase the sIze of the
array
FesIze Sets a new (smaller) sIze of the array
Shutdown Clears the array wIth a full memory release
Add methods
Add Adds an element to the end of the array
AddArray Adds to the end of the array elements from
another array
AddArray Adds to the end of the array elements from
another array
Ìnsert Ìnserts an element In the array to the specIfIed
posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
AssIgnArray CopIes the array elements from another array
AssIgnArray CopIes the array elements from another array
hodIfy methods
Update Changes the element at the specIfIed posItIon
array
Standard Library
© 2000·2010, |eta0uotes Software Corp.
787
ShIft |oves an Item from a gIven posItIon In the
array to the specIfIed offset
0eIete methods
0elete Femoves the element from the specIfIed
posItIon array
0eleteFange 0eletes a group of elements from the specIfIed
posItIon array
Access methods
At Cets the element from the specIfIed posItIon
array
Compare methods
CompareArray Compares array wIth another array
CompareArray Compares array wIth another array
Sorted array methods
ÌnsertSort Ìnserts element In a sorted array
Search Searches for an element equal to the model In
sorted array
SearchCreat Searches for an element of more samples In
sorted array
SearchLess Searches for an element less than the sample In
the sorted array
SearchCreatDrEqual Searches for an element greater than or equal
to the model In sorted array
SearchLessDrEqual Searches for an element less than or equal to
the model In sorted array
SearchFIrst FInds the fIrst element equal to the model In
sorted array
SearchLast FInds the last element equal to the model In
sorted array
Inputloutput
vIrtual Save Saves data array In the fIle
vIrtual Load Loads data array from a fIle
vIrtual Type Cets the type IdentIfIer of the array
Standard Library
© 2000·2010, |eta0uotes Software Corp.
788
Peserve
Allocates memory to Increase the sIze of the array.
o··L ----nv-.
Lnr ·iza // Humo-n
·
Parameters
·iza
[In] The number of addItIonal elements of the array.
Peturn VaIue
true If successful, false · If there was an attempt to seek the amount Is less than or equal to zero,
or If the array dId not Increase.
Note
To reduce memory fragmentatIon, Increase the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..----nv-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- n---nv- m-m·ny
Lr..-nn-y.----nv-.!¨`1··

pnLnrr.¨----nv- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
789
PesIze
Sets a new (smaller) sIze of the array.
o··L ---Lz-.
Lnr ·iza // ¯Lz-
·
Parameters
·iza
[In] New sIze of the array.
Peturn VaIue
true If successful, false · If there was an attempt to set the sIze of less than or equal to zero.
Note
ChangIng the sIze of the array allows optImal use of memory.Superfluous elements on the rIght lost.
To reduce fragmentatIon of memory, change the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..---Lz-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- n--Lz- -nn-y
Lr..-nn-y.---Lz-.!¨··

pnLnrr.¨---Lz- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
790
Shutdown
Clears the array wIth a full memory release.
o··L ¯!urJ·.n.·
Peturn VaIue
true If successful, false · If an error occurred.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯!urJ·.n.·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!urJ·.n -nn-y
Lr..-nn-y.¯!urJ·.n.··

pnLnrr.¨¯!urJ·.n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
791
Add
Adds an element to the end of the array.
o··L AJJ.
·!-n alaman: // IL-m-nr r· -JJ
·
Parameters
alaman:
[In] value of the element to add to the array.
Peturn VaIue
true If successful, false · If you can not add an element.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..AJJ.·!-n·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.AJJ.L··

pnLnrr.¨IL-m-nr -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
792
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r ·!-ns ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..AJJAnn-y.··n-r ·!-n s¯`·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
·!-n -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
793
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r .Ann-y.!-n· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayChar·source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..AJJAnn-y.··n-r .Ann-y.!-n··
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y.!-n ·-n·=n-. .Ann-y.!-n¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
794
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
795
Insert
Ìnserts an element In the array to the specIfIed posItIon.
o··L Pn--nr.
·!-n alaman:, // IL-m-nr r· Ln--nr
Lnr p.· // -·-LrL·n
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into an array
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..Pn--nr.·!-n,Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.Pn--nr.L,¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
796
InsertArray
Ìnserts an array of elements from another array wIth the specIfIed posItIon.
o··L Pn--nrAnn-y.
··n-r ·!-ns ·r·/¹, // ¯·un·- -nn-y
Lnr p.· // -·-LrL·n
·
Parameters
·r·/¹
[In] Feference to an array of source elements to Insert
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..Pn--nrAnn-y.··n-r ·!-n s¯`,Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
·!-n -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
797
InsertArray
Ìnserts an array of elements from another array wIth the specIfIed posItIon.
o··L Pn--nrAnn-y.
.Ann-y.!-n· ·r·, // -·Lnr-n r· r!- -·un·-
Lnr p.· // -·-LrL·n
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayChar·source elements to Insert.
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..Pn--nrAnn-y.··n-r .Ann-y.!-n·,Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y.!-n ·-n·=n-. .Ann-y.!-n¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
798
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
799
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r ·!-ns ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..A--LjnAnn-y.··n-r ·!-n s¯`·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
·!-n -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
800
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r .Ann-y.!-n· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayChar·source element to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..A--LjnAnn-y.··n-r .Ann-y.!-n··
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y.!-n ·-n· =n-. .Ann-y.!-n¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -nn-y- L- LJ-nrL·-L
//--- J-L-r- -·un·- -nn-y
Standard Library
© 2000·2010, |eta0uotes Software Corp.
801
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
802
Update
Changes the element at the specIfIed posItIon array.
o··L JpJ-r-.
Lnr p.·, // -·-LrL·n
·!-n alaman: // V-Lu-
·
Parameters
p.·
[In] PosItIon of the element In the array to change
alaman:
[In] New value element
Peturn VaIue
true If successful, false · If you can not change the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..JpJ-r-.Lnr,·!-n·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- upJ-r- -L-m-nr
Lr..-nn-y.JpJ-r-.¨,'A'··

pnLnrr.¨JpJ-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
803
ShIft
|oves an Item from a gIven posItIon In the array to the specIfIed offset.
o··L ¯!Lrr.
Lnr p.·, // -·-LrL·n
Lnr ·nif: // V-Lu-
·
Parameters
p.·
[In] PosItIon of the moved element array
·nif:
[In] The value of dIsplacement (both posItIve and negatIve).
Peturn VaIue
true If successful, false · If you can not move the Item.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯!Lrr.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!Lrr -L-m-nr
Lr..-nn-y.¯!Lrr.!¨,-¯··

pnLnrr.¨¯!Lrr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
804
0eIete
Femoves the element from the gIven posItIon In the array.
o··L ¯-L-r-.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] PosItIon removes the element In the array.
Peturn VaIue
true If successful, false · If you can not remove the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯-L-r-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr
Lr..-nn-y.¯-L-r-.¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
805
0eIetePange
0eletes a group of elements from a gIven posItIon In the array.
o··L ¯-L-r---nj-.
Lnr fr.m, // -·-LrL·n ·r r!- rLn-r -L-m-nr
Lnr :. // -·-LrL·n- ·r r!- L--r -L-m-nr
·
Parameters
fr.m
[In] PosItIon of the fIrst removes the element In the array.
:.
[In] PosItIon of the last deleted element In the array.
Peturn VaIue
true If successful, false · If you can not remove elements.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯-L-r---nj-.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr-
Lr..-nn-y.¯-L-r---nj-.¨,!¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
806
At
Cets the element from the gIven posItIon In the array.
·!-n Ar.
Lnr p.· // -·-LrL·n
· ··n-r
Parameters
p.·
[In] PosItIon of the desIred element In the array.
Peturn VaIue
The value of the element In case of success, CHAF_|AX·If there was an attempt to get an element
of not exIstIng posItIons (the last error EFF_DUT_DF_FANCE).
Note
Df course, CHAF_|AX may be a valId value of an array element, so havIng a value, always check the
last error code.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..Ar.Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

·!-n n--uLr=-nn-y.Ar.L·¡
Lr.n--uLr==.|A-_MAx ss J-rH--rInn·n.·==I--_JJr_J¯_-AHJI·

//--- -nn·n ·r n--JLnj rn·m -nn-y
pnLnrr.¨J-r -L-m-nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
807
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
808
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r ·!-ns ·r·/¹ // ¯·un·- -nn-y
· ··n-r
Parameters
·r·/¹
[In] Feference to an array of source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n...·mp-n-Ann-y.··n-r ·!-n s¯`·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
·!-n -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
809
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r .Ann-y.!-n· ·r· // -·Lnr-n r· r!- -·un·--
· ··n-r
Parameters
·r·
[In] PoInter to an Instance of class CArrayChar·source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n...·mp-n-Ann-y.··n-r .Ann-y.!-n··
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y.!-n ·-n·=n-. .Ann-y.!-n¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y-
J-L-r- -n·¡
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
810
InsertSort
Ìnserts element In a sorted array.
o··L Pn--nr¯·nr.
·!-n alaman: // IL-m-nr r· Ln--nr
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into a sorted array
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..Pn--nr¯·nr.·!-n·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- Ln--nr -L-m-nr
Lr..-nn-y.Pn--nr¯·nr.'A'··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
811
Search
Searches for an element equal to the sample In the sorted array.
Lnr ¯--n·!.
·!-n alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯--n·!.·!-n·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!.'A'·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
812
SearchCreat
Searches for an element of more samples In sorted array.
Lnr ¯--n·!Jn--r.
·!-n alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯--n·!Jn--r.·!-n·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--r.'A'·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
813
SearchLess
Searches for an element less than the sample In the sorted array.
Lnr ¯--n·!H---.
·!-n alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯--n·!H---.·!-n·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---.'A'·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
814
SearchCreatDrEquaI
Searches for an element greater than or equal to the sample In the sorted array
Lnr ¯--n·!Jn--rJnI¬u-L.
·!-n alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯--n·!Jn--rJnI¬u-L.·!-n·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--rJnI¬u-L.'A'·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
815
SearchLessDrEquaI
Searches for an element less than or equal to the sample In the sorted array.
Lnr ¯--n·!H---JnI¬u-L.
·!-n alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯--n·!H---JnI¬u-L.·!-n·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---JnI¬u-L.'A'·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
816
SearchFIrst
FInds the fIrst element equal to the sample In the sorted array.
Lnr ¯--n·!¯Ln-r.
·!-n alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯--n·!¯Ln-r.·!-n·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!¯Ln-r.'A'·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
817
SearchLast
FInds the last element equal to the model In sorted array.
Lnr ¯--n·!H--r.
·!-n alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯--n·!H--r.·!-n·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H--r.'A'·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
818
Save
Saves data array In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true - If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..¯-v-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
819
Load
Loads data array from a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true - If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..H·-J.Lnr·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- u-- -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

pnLnrr.¨IL-m-nr¯`J` = '`·'¨,L,-nn-y.Ar.L··¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
820
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
821
Type
Cets the type IdentIfIer of the array.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
Ì0 type of the array (for CArrayChar · 77).
ExampIe:
//--- -x-mpL- r·n .Ann-y.!-n..ryp-.·
tLn·LuJ- <Ann-y-\Ann-y.!-n.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y.!-n ·-nn-y=n-. .Ann-y.!-n¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r -nn-y ryp-
Lnr ryp-=-nn-y.ryp-.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
822
CArrayShort
CArrayShort class Is a class of dynamIc array of varIables of type short or ushort.
0escrIptIon
Class CArrayShort provIdes the abIlIty to work wIth a dynamIc array of varIables of type short or
ushort.Ìn the class Implemented the abIlIty to add / Insert / delete elements In an array, sort array,
searchIng In sorted array.Ìn addItIon, the Implemented methods of work wIth the fIle.
0ecIaratIon
·L--- .Ann-y¯!·nr . puoLL· .Ann-y
TItIe
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
CIass hethods
hemory controI
Feserve Allocates memory to Increase the sIze of the
array
FesIze Sets a new (smaller) sIze of the array
Shutdown Clears the array wIth a full memory release
Add methods
Add Adds an element to the end of the array
AddArray Adds to the end of the array elements from
another array
AddArray Adds to the end of the array elements from
another array
Ìnsert Ìnserts an element In the array to the specIfIed
posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
AssIgnArray CopIes the array elements from another array
AssIgnArray CopIes the array elements from another array
Update methods
Update Changes the element at the specIfIed posItIon
array
Standard Library
© 2000·2010, |eta0uotes Software Corp.
823
ShIft |oves an Item from a gIven posItIon In the
array to the specIfIed offset
0eIete methods
0elete Femoves the element from the specIfIed
posItIon array
0eleteFange 0eletes a group of elements from the specIfIed
posItIon array
Access methods
At Cets the element from the specIfIed posItIon
array
Compare methods
CompareArray Compares array wIth another array
CompareArray Compares array wIth another array
Sorted array operatIons
ÌnsertSort Ìnserts element In a sorted array
Search Searches for an element equal to the model In
sorted array
SearchCreat Searches for an element of more samples In
sorted array
SearchLess Searches for an element less than the sample In
the sorted array
SearchCreatDrEqual Searches for an element greater than or equal
to the model In sorted array
SearchLessDrEqual Searches for an element less than or equal to
the model In sorted array
SearchFIrst FInds the fIrst element equal to the model In
sorted array
SearchLast FInds the last element equal to the model In
sorted array
Inputloutput
vIrtual Save Saves data array In the fIle
vIrtual Load Loads data array from a fIle
vIrtual Type Cets the type IdentIfIer of the array
Standard Library
© 2000·2010, |eta0uotes Software Corp.
824
Peserve
Allocates memory to Increase the sIze of the array.
o··L ----nv-.
Lnr ·iza // Humo-n
·
Parameters
·iza
[In] The number of addItIonal elements of the array.
Peturn VaIue
true If successful, false · If there was an attempt to seek the amount Is less than or equal to zero,
or If the array dId not Increase.
Note
To reduce memory fragmentatIon, Increase the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..----nv-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- n---nv- m-m·ny
Lr..-nn-y.----nv-.!¨`1··

pnLnrr.¨----nv- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
825
PesIze
Sets a new (smaller) sIze of the array.
o··L ---Lz-.
Lnr ·iza // ¯Lz-
·
Parameters
·iza
[In] New sIze of the array.
Peturn VaIue
true If successful, false · If there was an attempt to set the sIze of less than or equal to zero.
Note
ChangIng the sIze of the array allows optImal use of memory.Superfluous elements on the rIght lost.
To reduce fragmentatIon of memory, change the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..---Lz-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- n--Lz- -nn-y
Lr..-nn-y.---Lz-.!¨··

pnLnrr.¨---Lz- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
826
Shutdown
Clears the array wIth a full memory release.
o··L ¯!urJ·.n.·
Peturn VaIue
true If successful, false · If an error occurred.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯!urJ·.n.·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!urJ·.n -nn-y
Lr..-nn-y.¯!urJ·.n.··

pnLnrr.¨¯!urJ·.n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
827
Add
Adds an element to the end of the array.
o··L AJJ.
-!·nr alaman: // IL-m-nr r· -JJ
·
Parameters
alaman:
[In] 7alue of the element to add to the array.
Peturn VaIue
true If successful, false · If you can not add an element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..AJJ.-!·nr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.AJJ.L··

pnLnrr.¨IL-m-nr -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
828
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r -!·nrs ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..AJJAnn-y.··n-r -!·nr s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
-!·nr -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
829
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r .Ann-y¯!·nr· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayShort·source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..AJJAnn-y.··n-r .Ann-y¯!·nr··
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯!·nr ·-n·=n-. .Ann-y¯!·nr¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
830
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
831
Insert
Ìnserts an element In the array to the specIfIed posItIon.
o··L Pn--nr.
-!·nr alaman:, // IL-m-nr r· Ln--nr
Lnr p.· // -·-LrL·n
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into an array
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..Pn--nr.-!·nr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.Pn--nr.L,¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
832
InsertArray
Ìnserts an array of elements from another array specIfIed posItIon.
o··L Pn--nrAnn-y.
··n-r -!·nrs ·r·/¹, // ¯·un·- -nn-y
Lnr p.· // -·-LrL·n
·
Parameters
·r·/¹
[In] Feference to an array of source elements to Insert
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..Pn--nrAnn-y.··n-r -!·nr s¯`,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
-!·nr -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
833
InsertArray
Ìnserts an array of elements from another array ukazannogy posItIon.
o··L Pn--nrAnn-y.
.Ann-y¯!·nr· ·r·, // -·Lnr-n r· r!- -·un·-
Lnr p.· // -·-LrL·n
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayShort·source elements to Insert.
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..Pn--nrAnn-y.··n-r .Ann-y¯!·nr·,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯!·nr ·-n·=n-. .Ann-y¯!·nr¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
834
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
835
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r -!·nrs ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..A--LjnAnn-y.··n-r -!·nr s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
-!·nr -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
836
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r .Ann-y¯!·nr· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayShort·source element to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..A--LjnAnn-y.··n-r .Ann-y¯!·nr··
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯!·nr ·-n· =n-. .Ann-y¯!·nr¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -nn-y- L- LJ-nrL·-L
//--- J-L-r- -·un·- -nn-y
Standard Library
© 2000·2010, |eta0uotes Software Corp.
837
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
838
Update
Changes the element at the specIfIed posItIon array.
o··L JpJ-r-.
Lnr p.·, // -·-LrL·n
-!·nr alaman: // V-Lu-
·
Parameters
p.·
[In] PosItIon of the element In the array to change
alaman:
[In] New value element
Peturn VaIue
true If successful, false · If you can not change the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..JpJ-r-.Lnr,-!·nr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- upJ-r- -L-m-nr
Lr..-nn-y.JpJ-r-.¨,!¨¨··

pnLnrr.¨JpJ-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
839
ShIft
|oves an Item from a gIven posItIon In the array to the specIfIed offset.
o··L ¯!Lrr.
Lnr p.·, // -·-LrL·n-
Lnr ·nif: // ¯!Lrr
·
Parameters
p.·
[In] PosItIon of the moved element array
·nif:
[In] The value of dIsplacement (both posItIve and negatIve).
Peturn VaIue
true If successful, false · If you can not move the Item.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯!Lrr.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!Lrr -L-m-nr
Lr..-nn-y.¯!Lrr.!¨,-¯··

pnLnrr.¨¯!Lrr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
840
0eIete
Femoves the element from the gIven posItIon In the array.
o··L ¯-L-r-.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] PosItIon removes the element In the array.
Peturn VaIue
true If successful, false · If you can not remove the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯-L-r-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr
Lr..-nn-y.¯-L-r-.¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
841
0eIetePange
0eletes a group of elements from a gIven posItIon In the array.
o··L ¯-L-r---nj-.
Lnr fr.m, // -·-LrL·n ·r r!- rLn-r -L-m-nr
Lnr :. // -·-LrL·n ·r r!- L--- -L-m-nr
·
Parameters
fr.m
[In] PosItIon of the fIrst removes the element In the array.
:.
[In] PosItIon of the last deleted element In the array.
Peturn VaIue
true If successful, false · If you can not remove elements.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯-L-r---nj-.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr-
Lr..-nn-y.¯-L-r---nj-.¨,!¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
842
At
Cets the element from the gIven posItIon In the array.
-!·nr Ar.
Lnr p.· // -·-LrL·n
· ··n-r
Parameters
p.·
[In] PosItIon of the desIred element In the array.
Peturn VaIue
The value of the element In case of success, SHDFT_|AX·If there was an attempt to get an element
of not exIstIng posItIons (the last error EFF_DUT_DF_FANCE).
Note
Df course, SHDFT_|AX may be a valId value of an array element, so havIng a value, always check
the last error code.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..Ar.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

-!·nr n--uLr=-nn-y.Ar.L·¡
Lr.n--uLr==¯|J-r_MAx ss J-rH--rInn·n.·==I--_JJr_J¯_-AHJI·

//--- -nn·n ·r n--JLnj rn·m -nn-y
pnLnrr.¨J-r -L-m-nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
843
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
844
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r -!·nrs ·r·/¹ // ¯·un·- -nn-y
· ··n-r
Parameters
·r·/¹
[In] Feference to an array of source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr...·mp-n-Ann-y.··n-r -!·nr s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
-!·nr -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
845
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r .Ann-y¯!·nr· ·r· // -·Lnr-n r· r!- -·un·-
· ··n-r
Parameters
·r·
[In] PoInter to an Instance of class CArrayShort·source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr...·mp-n-Ann-y.··n-r .Ann-y¯!·nr··
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯!·nr ·-n·=n-. .Ann-y¯!·nr¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y-
J-L-r- -n·¡
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
846
InsertSort
Ìnserts element In a sorted array.
o··L Pn--nr¯·nr.
-!·nr alaman: // IL-m-nr r· Ln--nr
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into a sorted array
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..Pn--nr¯·nr.-!·nr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- Ln--nr -L-m-nr
Lr..-nn-y.Pn--nr¯·nr.!¨¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
847
Search
Searches for an element equal to the sample In the sorted array.
Lnr ¯--n·!.
-!·nr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯--n·!.-!·nr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!.!¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
848
SearchCreat
Searches for an element of more samples In sorted array.
Lnr ¯--n·!Jn--r.
-!·nr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯--n·!Jn--r.-!·nr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--r.!¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
849
SearchLess
Searches for an element less than the sample In the sorted array.
Lnr ¯--n·!H---.
-!·nr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯--n·!H---.-!·nr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---.!¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
850
SearchCreatDrEquaI
Searches for an element greater than or equal to the sample In the sorted array.
Lnr ¯--n·!Jn--rJnI¬u-L.
-!·nr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯--n·!Jn--rJnI¬u-L.-!·nr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--rJnI¬u-L.!¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
851
SearchLessDrEquaI
Searches for an element less than or equal to the sample In the sorted array.
Lnr ¯--n·!H---JnI¬u-L.
-!·nr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯--n·!H---JnI¬u-L.-!·nr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---JnI¬u-L.!¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
852
SearchFIrst
FInds the fIrst element equal to the sample In the sorted array.
Lnr ¯--n·!¯Ln-r.
-!·nr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯--n·!¯Ln-r.-!·nr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!¯Ln-r.!¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
853
SearchLast
FInds the last element equal to the model In sorted array.
Lnr ¯--n·!H--r.
-!·nr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯--n·!H--r.-!·nr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H--r.!¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
854
Save
Saves data array In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..¯-v-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ !¨¨ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

-nn-y.AJJ.L·¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
855
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
856
Load
Loads data array from a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..H·-J.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- u-- -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

pnLnrr.¨IL-m-nr¯`J` = `J¨,L,-nn-y.Ar.L··¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
857
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
858
Type
Cets the type IdentIfIer of the array.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
Ì0 type of the array (for CArrayShort · 82).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯!·nr..ryp-.·
tLn·LuJ- <Ann-y-\Ann-y¯!·nr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯!·nr ·-nn-y=n-. .Ann-y¯!·nr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r -nn-y ryp-
Lnr ryp-=-nn-y.ryp-.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
859
CArrayInt
CArrayÌnt class Is a class of dynamIc array of varIables of type Int or uInt.
0escrIptIon
Class CArrayÌnt provIdes the abIlIty to work wIth a dynamIc array of varIables of type Int or uInt.Ìn the
class Implemented the abIlIty to add / Insert / delete elements In an array, sort array, searchIng In
sorted array.Ìn addItIon, the Implemented methods of work wIth the fIle.
0ecIaratIon
·L--- .Ann-yPnr . puoLL· .Ann-y
TItIe
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
CIass hethods
hemory controI
Feserve Allocates memory to Increase the sIze of the
array
FesIze Sets a new (smaller) sIze of the array
Shutdown Clears the array wIth a full memory release
Add methods
Add Adds an element to the end of the array
AddArray Adds to the end of the array elements from
another array
AddArray Adds to the end of the array elements from
another array
Ìnsert Ìnserts an element In the array to the specIfIed
posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
AssIgnArray CopIes the array elements from another array
AssIgnArray CopIes the array elements from another array
Update methods
Update Changes the element at the specIfIed posItIon
array
Standard Library
© 2000·2010, |eta0uotes Software Corp.
860
ShIft |oves an Item from a gIven posItIon In the
array to the specIfIed offset
0eIete methods
0elete Femoves the element from the specIfIed
posItIon array
0eleteFange 0eletes a group of elements from the specIfIed
posItIon array
Access methods
At Cets the element from the specIfIed posItIon
array
Compare methods
CompareArray Compares array wIth another array
CompareArray Compares array wIth another array
Sorted array operatIons
ÌnsertSort Ìnserts element In a sorted array
Search Searches for an element equal to the model In
sorted array
SearchCreat Searches for an element of more samples In
sorted array
SearchLess Searches for an element less than the sample In
the sorted array
SearchCreatDrEqual Searches for an element greater than or equal
to the model In sorted array
SearchLessDrEqual Searches for an element less than or equal to
the model In sorted array
SearchFIrst FInds the fIrst element equal to the model In
sorted array
SearchLast FInds the last element equal to the model In
sorted array
Inputloutput
vIrtual Save Saves data array In the fIle
vIrtual Load Loads data array from a fIle
vIrtual Type Cets the type IdentIfIer of the array
Standard Library
© 2000·2010, |eta0uotes Software Corp.
861
Peserve
Allocates memory to Increase the sIze of the array.
o··L ----nv-.
Lnr ·iza // Humo-n
·
Parameters
·iza
[In] The number of addItIonal elements of the array.
Peturn VaIue
true If successful, false · If there was an attempt to seek the amount Is less than or equal to zero,
or If the array dId not Increase.
Note
To reduce memory fragmentatIon, Increase the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..----nv-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- n---nv- m-m·ny
Lr..-nn-y.----nv-.!¨`1··

pnLnrr.¨----nv- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
862
PesIze
Sets a new (smaller) sIze of the array.
o··L ---Lz-.
Lnr ·iza // Humo-n
·
Parameters
·iza
[In] New sIze of the array.
Peturn VaIue
true If successful, false · If there was an attempt to set the sIze of less than or equal to zero.
Note
ChangIng the sIze of the array allows optImal use of memory.Superfluous elements on the rIght lost.
To reduce fragmentatIon of memory, change the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..---Lz-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- n--Lz- -nn-y
Lr..-nn-y.---Lz-.!¨··

pnLnrr.¨---Lz- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
863
Shutdown
Clears the array wIth a full memory release.
o··L ¯!urJ·.n.·
Peturn VaIue
true If successful, false · If an error occurred.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯!urJ·.n.·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!urJ·.n -nn-y
Lr..-nn-y.¯!urJ·.n.··

pnLnrr.¨¯!urJ·.n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
864
Add
Adds an element to the end of the array.
o··L AJJ.
Lnr alaman: // IL-m-nr r· -JJ
·
Parameters
alaman:
[In] value of the element to add to the array.
Peturn VaIue
true If successful, false · If you can not add an element.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..AJJ.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.AJJ.L··

pnLnrr.¨IL-m-nr -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
865
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r Lnrs ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..AJJAnn-y.··n-r Lnr s¯`·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
Lnr -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
866
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r .Ann-yPnr· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayÌnt·source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..AJJAnn-y.··n-r .Ann-yPnr··
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yPnr ·-n·=n-. .Ann-yPnr¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
867
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
868
Insert
Ìnserts an element In the array to the specIfIed posItIon.
o··L Pn--nr.
Lnr alaman:, // IL-m-nr r· Ln--nr
Lnr p.· // -·-LrL·n
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into an array
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..Pn--nr.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.Pn--nr.L,¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
869
InsertArray
Ìnserts an array of elements from another array specIfIed posItIon.
o··L Pn--nrAnn-y.
··n-r Lnrs ·r·/¹, // ¯·un·- -nn-y
Lnr p.· // -·-LrL·n
·
Parameters
·r·/¹
[In] Feference to an array of source elements to Insert
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..Pn--nrAnn-y.··n-r Lnr s¯`,Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
Lnr -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
870
InsertArray
Ìnserts an array of elements from another array specIfIed posItIon.
o··L Pn--nrAnn-y.
.Ann-yPnr· ·r·, // -·Lnr-n r· r!- -·un·-
Lnr p.· // -·-LrL·n
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayÌnt·source elements to Insert.
p.·
[In] PosItIon In the array to Insert.
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..Pn--nrAnn-y.··n-r .Ann-yPnr·,Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yPnr ·-n·=n-. .Ann-yPnr¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
871
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
872
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r Lnrs ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..A--LjnAnn-y.··n-r Lnr s¯`·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
Lnr -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
873
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r .Ann-yPnr· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayÌnt·source element to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..A--LjnAnn-y.··n-r .Ann-yPnr··
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yPnr ·-n· =n-. .Ann-yPnr¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
874
//--- -nn-y- L- LJ-nrL·-L
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
875
Update
Changes the element at the specIfIed posItIon array.
o··L JpJ-r-.
Lnr p.·, // -·-LrL·n
Lnr alaman: // V-Lu-
·
Parameters
p.·
[In] PosItIon of the element In the array to change.
alaman:
[In] New value element
Peturn VaIue
true If successful, false · If you can not change the element.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..JpJ-r-.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- upJ-r- -L-m-nr
Lr..-nn-y.JpJ-r-.¨,!¨¨¨¨··

pnLnrr.¨JpJ-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
876
ShIft
|oves an Item from a gIven posItIon In the array to the specIfIed offset.
o··L ¯!Lrr.
Lnr p.·, // -·-LrL·n
Lnr ·nif: // ¯!Lrr
·
Parameters
p.·
[In] PosItIon of the moved element array
·nif:
[In] The value of dIsplacement (both posItIve and negatIve).
Peturn VaIue
true If successful, false · If you can not move the Item.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯!Lrr.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!Lrr -L-m-nr
Lr..-nn-y.¯!Lrr.!¨,-¯··

pnLnrr.¨¯!Lrr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
877
0eIete
Femoves the element from the gIven posItIon In the array.
o··L ¯-L-r-.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] PosItIon removes the element In the array.
Peturn VaIue
true If successful, false · If you can not remove the element.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯-L-r-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr
Lr..-nn-y.¯-L-r-.¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
878
0eIetePange
0eletes a group of elements from a gIven posItIon In the array.
o··L ¯-L-r---nj-.
Lnr fr.m, // -·-LrL·n ·r r!- rLn-r -L-m-nr
Lnr :. // -·-LrL·n ·r r!- L--r -L-m-nr
·
Parameters
fr.m
[In] PosItIon of the fIrst removes the element In the array.
:.
[In] PosItIon of the last deleted element In the array.
Peturn VaIue
true If successful, false · If you can not remove elements.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯-L-r---nj-.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr-
Lr..-nn-y.¯-L-r---nj-.¨,!¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
879
At
Cets the element from the gIven posItIon In the array.
Lnr Ar.
Lnr p.· // -·-LrL·n
· ··n-r
Parameters
p.·
[In] PosItIon of the desIred element In the array.
Peturn VaIue
The value of the element In case of success, ÌNT_|AX·If there was an attempt to get an element of
not exIstIng posItIons (the last error EFF_DUT_DF_FANCE).
Note
Df course, ÌNT_|AX could be a valId value of an array element, so havIng a value, always check the
last error code.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..Ar.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

Lnr n--uLr=-nn-y.Ar.L·¡
Lr.n--uLr==PHr_MAx ss J-rH--rInn·n.·==I--_JJr_J¯_-AHJI·

//--- -nn·n ·r n--JLnj rn·m -nn-y
pnLnrr.¨J-r -L-m-nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
880
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
881
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r Lnrs ·r·/¹ // ¯·un·- -nn-y
· ··n-r
Parameters
·r·/¹
[In] Feference to an array of source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr...·mp-n-Ann-y.··n-r Lnr s¯`·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
Lnr -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
882
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r .Ann-yPnr· ·r· // -·Lnr-n r· r!- -·un·-
· ··n-r
Parameters
·r·
[In] PoInter to an Instance of class CArrayÌnt·source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr...·mp-n-Ann-y.··n-r .Ann-yPnr··
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yPnr ·-n·=n-. .Ann-yPnr¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y-
J-L-r- -n·¡
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
883
InsertSort
Ìnserts element In a sorted array.
o··L Pn--nr¯·nr.
Lnr alaman: // IL-m-nr r· Ln--nr
·
Parameters
alaman:
[In] value of the element to be Inserted Into a sorted array
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..Pn--nr¯·nr.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- Ln--nr -L-m-nr
Lr..-nn-y.Pn--nr¯·nr.!¨¨¨¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
884
Search
Searches for an element equal to the sample In the sorted array.
Lnr ¯--n·!.
Lnr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯--n·!.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!.!¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
885
SearchCreat
Searches for an element of more samples In sorted array.
Lnr ¯--n·!Jn--r.
Lnr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯--n·!Jn--r.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--r.!¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
886
SearchLess
Searches for an element less than the sample In the sorted array.
Lnr ¯--n·!H---.
Lnr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯--n·!H---.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---.!¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
887
SearchCreatDrEquaI
Searches for an element greater than or equal to the sample In the sorted array.
Lnr ¯--n·!Jn--rJnI¬u-L.
Lnr alaman: // IL-m-nr r· ---n·!
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯--n·!Jn--rJnI¬u-L.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--rJnI¬u-L.!¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
888
SearchLessDrEquaI
Searches for an element less than or equal to the sample In the sorted array.
Lnr ¯--n·!H---JnI¬u-L.
Lnr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯--n·!H---JnI¬u-L.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---JnI¬u-L.!¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
889
SearchFIrst
FInds the fIrst element equal to the sample In the sorted array.
Lnr ¯--n·!¯Ln-r.
Lnr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr.. ¯--n·!¯Ln-r.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!¯Ln-r.!¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
890
SearchLast
FInds the last element equal to the model In sorted array.
Lnr ¯--n·!H--r.
Lnr alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯--n·!H--r.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H--r.!¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
891
Save
Saves data array In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..¯-v-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ !¨¨ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

-nn-y.AJJ.L·¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
892
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
893
Load
Loads data array from a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..H·-J.Lnr·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- u-- -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

pnLnrr.¨IL-m-nr¯`J` = `J¨,L,-nn-y.Ar.L··¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
894
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
895
Type
Cets the type IdentIfIer of the array.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
Ì0 type of the array (for CArrayÌnt · 82).
ExampIe:
//--- -x-mpL- r·n .Ann-yPnr..ryp-.·
tLn·LuJ- <Ann-y-\Ann-yPnr.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yPnr ·-nn-y=n-. .Ann-yPnr¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r -nn-y ryp-
Lnr ryp-=-nn-y.ryp-.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
896
CArrayLong
CArrayLong class Is a class of dynamIc array of varIables of type long or ulong.
0escrIptIon
Class CArrayLong provIdes the abIlIty to work wIth a dynamIc array of varIables of type long or ulong.
Ìn the class Implemented the abIlIty to add / Insert / delete elements In an array, sort array,
searchIng In sorted array.Ìn addItIon, the Implemented methods of work wIth the fIle.
0ecIaratIon
·L--- .Ann-yH·nj . puoLL· .Ann-y
TItIe
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
CIass hethod
hemory controI
Feserve Allocates memory to Increase the sIze of the
array
FesIze Sets a new (smaller) sIze of the array
Shutdown Clears the array wIth a full memory release
Add methods
Add Adds an element to the end of the array
AddArray Adds to the end of the array elements from
another array
AddArray Adds to the end of the array elements from
another array
Ìnsert Ìnserts an element In the array to the specIfIed
posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
AssIgnArray CopIes the array elements from another array
AssIgnArray CopIes the array elements from another array
Update methods
Update Changes the element at the specIfIed posItIon
array
Standard Library
© 2000·2010, |eta0uotes Software Corp.
897
ShIft |oves an Item from a gIven posItIon In the
array to the specIfIed offset
0eIete methods
0elete Femoves the element from the specIfIed
posItIon array
0eleteFange 0eletes a group of elements from the specIfIed
posItIon array
Access methods
At Cets the element from the specIfIed posItIon
array
Compare methods
CompareArray Compares array wIth another array
CompareArray Compares array wIth another array
Sorted array operatIons
ÌnsertSort Ìnserts element In a sorted array
Search Searches for an element equal to the model In
sorted array
SearchCreat Searches for an element of more samples In
sorted array
SearchLess Searches for an element less than the sample In
the sorted array
SearchCreatDrEqual Searches for an element greater than or equal
to the model In sorted array
SearchLessDrEqual Searches for an element less than or equal to
the model In sorted array
SearchFIrst FInds the fIrst element equal to the model In
sorted array
SearchLast FInds the last element equal to the model In
sorted array
Inputloutput
vIrtual Save Saves data array In the fIle
vIrtual Load Loads data array from a fIle
vIrtual Type Cets the type IdentIfIer of the array

Standard Library
© 2000·2010, |eta0uotes Software Corp.
898
Peserve
Allocates memory to Increase the sIze of the array.
o··L ----nv-.
Lnr ·iza // Humo-n
·
Parameters
·iza
[In] The number of addItIonal elements of the array.
Peturn VaIue
true If successful, false · If there was an attempt to seek the amount Is less than or equal to zero,
or If the array dId not Increase.
Note
To reduce memory fragmentatIon, Increase the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..----nv-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- n---nv- m-m·ny
Lr..-nn-y.----nv-.!¨`1··

pnLnrr.¨----nv- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
899
PesIze
Sets a new (smaller) sIze of the array.
o··L ---Lz-.
Lnr ·iza // ¯Lz-
·
Parameters
·iza
[In] New sIze of the array.
Peturn VaIue
true If successful, false · If there was an attempt to set the sIze of less than or equal to zero.
Note
ChangIng the sIze of the array allows optImal use of memory.Superfluous elements on the rIght lost.
To reduce fragmentatIon of memory, change the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..---Lz-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- n--Lz- -nn-y
Lr..-nn-y.---Lz-.!¨··

pnLnrr.¨---Lz- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
900
Shutdown
Clears the array wIth a full memory release.
o··L ¯!urJ·.n.·
Peturn VaIue
true If successful, false · If an error occurred.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯!urJ·.n.·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!urJ·.n -nn-y
Lr..-nn-y.¯!urJ·.n.··

pnLnrr.¨¯!urJ·.n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
901
Add
Adds an element to the end of the array.
o··L AJJ.
L·nj alaman: // IL-m-nr r· -JJ
·
Parameters
alaman:
[In] 7alue of the element to add to the array.
Peturn VaIue
true If successful, false · If you can not add an element.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..AJJ.L·nj·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.AJJ.L··

pnLnrr.¨IL-m-nr -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
902
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r L·njs ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..AJJAnn-y.··n-r L·nj s¯`·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
L·nj -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
903
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r .Ann-yH·nj· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayLong·source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..AJJAnn-y.··n-r .Ann-yH·nj··
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yH·nj ·-n·=n-. .Ann-yH·nj¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
904
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
905
Insert
Ìnserts an element In the array to the specIfIed posItIon.
o··L Pn--nr.
L·nj alaman:, // IL-m-nr r· Ln--nr
Lnr p.· // -·-LrL·n
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into an array
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..Pn--nr.L·nj,Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.Pn--nr.L,¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
906
InsertArray
Ìnserts an array of elements from another array ukazannogy posItIon.
o··L Pn--nrAnn-y.
··n-r L·njs ·r·/¹, // ¯·un·- -nn-y
Lnr p.· // -·-LrL·n
·
Parameters
·r·/¹
[In] Feference to an array of source elements to Insert
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..Pn--nrAnn-y.··n-r L·nj s¯`,Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
L·nj -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
907
InsertArray
Ìnserts an array of elements from another array ukazannogy posItIon.
o··L Pn--nrAnn-y.
.Ann-yH·nj· ·r·, // -·Lnr-n r· r!- -·un·-
Lnr p.· // -·-LrL·n
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayLong·source elements to Insert.
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..Pn--nrAnn-y.··n-r .Ann-yH·nj·,Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yH·nj ·-n·=n-. .Ann-yH·nj¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
908
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
909
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r L·njs ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..A--LjnAnn-y.··n-r L·nj s¯`·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
L·nj -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
910
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r .Ann-yH·nj· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayLong·source element to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..A--LjnAnn-y.··n-r .Ann-yH·nj··
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yH·nj ·-n· =n-. .Ann-yH·nj¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -nn-y- L- LJ-nrL·-L
//--- J-L-r- -·un·- -nn-y
Standard Library
© 2000·2010, |eta0uotes Software Corp.
911
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
912
Update
Changes the element at the specIfIed posItIon array.
o··L JpJ-r-.
Lnr p.·, // -·-LrL·n
L·nj alaman: // V-Lu-
·
Parameters
p.·
[In] PosItIon of the element In the array to change
alaman:
[In] New value element
Peturn VaIue
true If successful, false · If you can not change the element.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..JpJ-r-.Lnr,L·nj·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- upJ-r- -L-m-nr
Lr..-nn-y.JpJ-r-.¨,!¨¨¨¨¨¨··

pnLnrr.¨JpJ-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
913
ShIft
|oves an Item from a gIven posItIon In the array to the specIfIed offset.
o··L ¯!Lrr.
Lnr p.·, // -·-LrL·n
Lnr ·nif: // ¯!Lrr
·
Parameters
p.·
[In] PosItIon of the moved element array
·nif:
[In] The value of dIsplacement (both posItIve and negatIve).
Peturn VaIue
true If successful, false · If you can not move the Item.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯!Lrr.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!Lrr -L-m-nr
Lr..-nn-y.¯!Lrr.!¨,-¯··

pnLnrr.¨¯!Lrr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
914
0eIete
Femoves the element from the gIven posItIon In the array.
o··L ¯-L-r-.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] PosItIon removes the element In the array.
Peturn VaIue
true If successful, false · If you can not remove the element.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯-L-r-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr
Lr..-nn-y.¯-L-r-.¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
915
0eIetePange
0eletes a group of elements from a gIven posItIon In the array.
o··L ¯-L-r---nj-.
Lnr fr.m, // -·-LrL·n ·r r!- rLn-r -L-m-nr
Lnr :. // -·-LrL·n ·r r!- L--r -L-m-nr
·
Parameters
fr.m
[In] PosItIon of the fIrst removes the element In the array.
:.
[In] PosItIon of the last deleted element In the array.
Peturn VaIue
true If successful, false · If you can not remove elements.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯-L-r---nj-.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr-
Lr..-nn-y.¯-L-r---nj-.¨,!¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
916
At
Cets the element from the gIven posItIon In the array.
L·nj Ar.
Lnr p.· // -·-LrL·n
· ··n-r
Parameters
p.·
[In] PosItIon of the desIred element In the array.
Peturn VaIue
The value of the element In case of success, LDNC_|AX If there was an attempt to get an element
of not exIstIng posItIons (the last error EFF_DUT_DF_FANCE).
Note
Df course, LDNC_|AX may be a valId value of an array element, so havIng a value, always check the
last error code.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..Ar.Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

L·nj n--uLr=-nn-y.Ar.L·¡
Lr.n--uLr==HJHJ_MAx ss J-rH--rInn·n.·==I--_JJr_J¯_-AHJI·

//--- Inn·n n--JLnj rn·m r!- -nn-y
pnLnrr.¨J-r -L-m-nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
917
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
918
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r L·njs ·r·/¹ // ¯·un·- -nn-y
· ··n-r
Parameters
·r·/¹
[In] Feference to an array of source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj...·mp-n-Ann-y.··n-r L·nj s¯`·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
L·nj -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
919
CompareArrayconst
Compares array wIth another array.
o··L .·mp-n-Ann-y··n-r.
··n-r .Ann-yH·nj· ·r· // -·Lnr-n r· r!- -·un·-
· ··n-r
Parameters
·r·
[In] PoInter to an Instance of class CArrayLong·source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj...·mp-n-Ann-y.··n-r .Ann-yH·nj··
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yH·nj ·-n·=n-. .Ann-yH·nj¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y-
J-L-r- -n·¡
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
920
InsertSort
Ìnserts element In a sorted array.
o··L Pn--nr¯·nr.
L·nj alaman: // IL-m-nr r· Ln--nr
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into a sorted array
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..Pn--nr¯·nr.L·nj·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- Ln--nr -L-m-nr
Lr..-nn-y.Pn--nr¯·nr.!¨¨¨¨¨¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
921
Search
Searches for an element equal to the model In sorted array.
Lnr ¯--n·!.
L·nj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯--n·!.L·nj·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!.!¨¨¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
922
SearchCreat
Searches for an element of larger sample, In sorted array.
Lnr ¯--n·!Jn--r.
L·nj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯--n·!Jn--r.L·nj·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--r.!¨¨¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
923
SearchLess
Searches for an element less than the sample In the sorted array.
Lnr ¯--n·!H---.
L·nj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯--n·!H---.L·nj·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---.!¨¨¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
924
SearchCreatDrEquaI
Searches for an element greater than or equal to the model In sorted array.
Lnr ¯--n·!Jn--rJnI¬u-L.
L·nj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯--n·!Jn--rJnI¬u-L.L·nj·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--rJnI¬u-L.!¨¨¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
925
SearchLessDrEquaI
Searches for an element less than or equal to the model In sorted array.
Lnr ¯--n·!H---JnI¬u-L.
L·nj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯--n·!H---JnI¬u-L.L·nj·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---JnI¬u-L.!¨¨¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
926
SearchFIrst
FInds the fIrst element equal to the model In sorted array.
Lnr ¯--n·!¯Ln-r.
L·nj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯--n·!¯Ln-r.L·nj·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!¯Ln-r.!¨¨¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
927
SearchLast
FInds the last element equal to the model In sorted array.
Lnr ¯--n·!H--r.
L·nj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯--n·!H--r.L·nj·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H--r.!¨¨¨¨¨¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
928
Save
Saves data array In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true - If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..¯-v-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ !¨¨ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

-nn-y.AJJ.L·¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
929
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
930
Load
Loads data array from a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true - If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..H·-J.Lnr·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- u-- -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

pnLnrr.¨IL-m-nr¯`J` = `P¯1¨,L,-nn-y.Ar.L··¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
931
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
932
Type
Cets the type IdentIfIer of the array.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
Ì0 type of the array (for CArrayLong · 84).
ExampIe:
//--- -x-mpL- r·n .Ann-yH·nj..ryp-.·
tLn·LuJ- <Ann-y-\Ann-yH·nj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yH·nj ·-nn-y=n-. .Ann-yH·nj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r -nn-y ryp-
Lnr ryp-=-nn-y.ryp-.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
933
CArrayFIoat
CArrayFloat class Is a class of dynamIc array of varIables of type float.
0escrIptIon
Class CArrayFloat provIdes the abIlIty to work wIth a dynamIc array of varIables of type float.Ìn the
class Implemented the abIlIty to add / Insert / delete elements In an array, sort array, searchIng In
sorted array.Ìn addItIon, the Implemented methods of work wIth the fIle.
0ecIaratIon
·L--- .Ann-y¯L·-r . puoLL· .Ann-y
TItIe
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
CIass hethods
AttrIbutes
0elta Set the comparIson tolerance
hemory controI
Feserve Allocates memory to Increase the sIze of the
array
FesIze Sets a new (smaller) sIze of the array
Shutdown Clears the array wIth a full memory release
Add methods
Add Adds an element to the end of the array
AddArray Adds to the end of the array elements from
another array
AddArray Adds to the end of the array elements from
another array
Ìnsert Ìnserts an element In the array to the specIfIed
posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
AssIgnArray CopIes the array elements from another array
AssIgnArray CopIes the array elements from another array
Update methods
Standard Library
© 2000·2010, |eta0uotes Software Corp.
934
Update Changes the element at the specIfIed posItIon
array
ShIft |oves an Item from a gIven posItIon In the
array to the specIfIed offset
0elete Femoves the element from the specIfIed
posItIon array
0eleteFange 0eletes a group of elements from the specIfIed
posItIon array
Access methods
At Cets the element from the specIfIed posItIon
array
Compare methods
CompareArray Compares array wIth another array
CompareArray Compares array wIth another array
Sorted array operatIons
ÌnsertSort Ìnserts element In a sorted array
Search Searches for an element equal to the model In
sorted array
SearchCreat Searches for an element of more samples In
sorted array
SearchLess Searches for an element less than the sample In
the sorted array
SearchCreatDrEqual Searches for an element greater than or equal
to the model In sorted array
SearchLessDrEqual Searches for an element less than or equal to
the model In sorted array
SearchFIrst FInds the fIrst element equal to the model In
sorted array
SearchLast FInds the last element equal to the model In
sorted array
Inputloutput
vIrtual Save Saves data array In the fIle
vIrtual Load Loads data array from a fIle
vIrtual Type Cets the type IdentIfIer of the array
Standard Library
© 2000·2010, |eta0uotes Software Corp.
935
0eIta
Set tolerance comparIson.
v·LJ ¯-Lr-.
rL·-r jal:- // r·L-n-n·-
·
Parameters
jal:-
[In] the new value of the admIssIon of comparIson.
Peturn VaIue
None
Note
AdmIssIon of comparIson used In the search. 7alues are consIdered equal If theIr dIfference Is less
than or equal to tolerance. The default tolerance Is 0.0.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯-Lr-.rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- --r ··mp-n- v-nL-rL·n
-nn-y.¯-Lr-.¨.¨¨!·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
936
Peserve
Allocates memory to Increase the sIze of the array.
o··L ----nv-.
Lnr ·iza // Humo-n
·
Parameters
·iza
[In] The number of addItIonal elements of the array.
Peturn VaIue
true If successful, false · If there was an attempt to seek the amount Is less than or equal to zero,
or If the array dId not Increase.
Note
To reduce memory fragmentatIon, Increase the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..----nv-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- n---nv- m-m·ny
Lr..-nn-y.----nv-.!¨`1··

pnLnrr.¨----nv- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
937
PesIze
Sets a new (smaller) sIze of the array.
o··L ---Lz-.
Lnr ·iza // ¯Lz-
·
Parameters
·iza
[In] New sIze of the array.
Peturn VaIue
true If successful, false · If there was an attempt to set the sIze of less than or equal to zero.
Note
ChangIng the sIze of the array allows optImal use of memory.Superfluous elements on the rIght lost.
To reduce fragmentatIon of memory, change the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..---Lz-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- n--Lz- -nn-y
Lr..-nn-y.---Lz-.!¨··

pnLnrr.¨---Lz- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
938
Shutdown
Clears the array wIth a full memory release.
o··L ¯!urJ·.n.·
Peturn VaIue
true If successful, false · If an error occurred.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯!urJ·.n.·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!urJ·.n -nn-y
Lr..-nn-y.¯!urJ·.n.··

pnLnrr.¨¯!urJ·.n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
939
Add
Adds an element to the end of the array.
o··L AJJ.
rL·-r alaman: // IL-m-nr r· -JJ
·
Parameters
alaman:
[In] 7alue of the element to add to the array.
Peturn VaIue
true If successful, false · If you can not add an element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..AJJ.rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.AJJ.L··

pnLnrr.¨IL-m-nr -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
940
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r rL·-rs ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..AJJAnn-y.··n-r rL·-r s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
rL·-r -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
941
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r .Ann-y¯L·-r· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayFloat·source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..AJJAnn-y.··n-r .Ann-y¯L·-r··
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯L·-r ·-n·=n-. .Ann-y¯L·-r¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
942
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
943
Insert
Ìnserts an element In the array to the specIfIed posItIon.
o··L Pn--nr.
rL·-r alaman:, // IL-m-nr r· Ln--nr
Lnr p.· // -·-LrL·n
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into an array
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..Pn--nr.rL·-r,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.Pn--nr.L,¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
944
InsertArray
Ìnserts an array of elements from another array wIth the specIfIed posItIon.
o··L Pn--nrAnn-y.
··n-r rL·-rs ·r·/¹, // ¯·un·- -nn-y
Lnr p.· // -·-LrL·n
·
Parameters
·r·/¹
[In] Feference to an array of source elements to Insert
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..Pn--nrAnn-y.··n-r rL·-r s¯`,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
rL·-r -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
945
InsertArray
Ìnserts an array of elements from another array specIfIed posItIon.
o··L Pn--nrAnn-y.
.Ann-y¯L·-r· ·r·, // -·Lnr-n r· r!- -·un·-
Lnr p.· // -·-LrL·n
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayFloat·source elements to Insert.
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..Pn--nrAnn-y.··n-r .Ann-y¯L·-r·,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯L·-r ·-n·=n-. .Ann-y¯L·-r¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
946
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
947
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r rL·-rs ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..A--LjnAnn-y.··n-r rL·-r s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
rL·-r -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
948
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r .Ann-y¯L·-r· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayFloat·source element to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..A--LjnAnn-y.··n-r .Ann-y¯L·-r··
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯L·-r ·-n· =n-. .Ann-y¯L·-r¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -nn-y- L- LJ-nrL·-L
//--- J-L-r- -·un·- -nn-y
Standard Library
© 2000·2010, |eta0uotes Software Corp.
949
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
950
Update
Changes the element at the specIfIed posItIon array.
o··L JpJ-r-.
Lnr p.·, // -·-LrL·n
rL·-r alaman: // V-Lu-
·
Parameters
p.·
[In] PosItIon of the element In the array to change
alaman:
[In] New value element
Peturn VaIue
true If successful, false · If you can not change the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..JpJ-r-.Lnr,rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- upJ-r- -L-m-nr
Lr..-nn-y.JpJ-r-.¨,!¨¨.¨··

pnLnrr.¨JpJ-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
951
ShIft
|oves an Item from a gIven posItIon In the array to the specIfIed offset.
o··L ¯!Lrr.
Lnr p.·, // -·-LrL·n
Lnr ·nif: // ¯!Lrr
·
Parameters
p.·
[In] PosItIon of the moved element array
·nif:
[In] The value of dIsplacement (both posItIve and negatIve).
Peturn VaIue
true If successful, false · If you can not move the Item.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯!Lrr.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!Lrr -L-m-nr
Lr..-nn-y.¯!Lrr.!¨,-¯··

pnLnrr.¨¯!Lrr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
952
0eIete
Femoves the element from the gIven posItIon In the array.
o··L ¯-L-r-.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] PosItIon removes the element In the array.
Peturn VaIue
true If successful, false · If you can not remove the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯-L-r-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr
Lr..-nn-y.¯-L-r-.¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
953
0eIetePange
0eletes a group of elements from a gIven posItIon In the array.
o··L ¯-L-r---nj-.
Lnr fr.m, // -·-LrL·n ·r r!- rLn-r -L-m-nr
Lnr :. // -·-LrL·n ·r L--r -L-m-nr
·
Parameters
fr.m
[In] PosItIon of the fIrst removes the element In the array.
:.
[In] PosItIon of the last deleted element In the array.
Peturn VaIue
true If successful, false · If you can not remove elements.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯-L-r---nj-.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr-
Lr..-nn-y.¯-L-r---nj-.¨,!¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
954
At
Cets the element from the gIven posItIon In the array.
rL·-r Ar.
Lnr p.· // -·-LrL·n
· ··n-r
Parameters
p.·
[In] PosItIon of the desIred element In the array.
Peturn VaIue
The value of the element In case of success, FLT_|AX If there was an attempt to get an element of
not exIstIng posItIons (the last error EFF_DUT_DF_FANCE).
Note
Df course, FLT_|AX may be a valId value of an array element, so havIng a value, always check the
last error code.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..Ar.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

rL·-r n--uLr=-nn-y.Ar.L·¡
Lr.n--uLr==¯Hr_MAx ss J-rH--rInn·n.·==I--_JJr_J¯_-AHJI·

//--- -nn·n n--JLnj rn·m -nn-y
pnLnrr.¨J-r -L-m-nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
955
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
956
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r rL·-rs ·r·/¹ // ¯·un·- -nn-y
· ··n-r
Parameters
·r·/¹
[In] Feference to an array of source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r...·mp-n-Ann-y.··n-r rL·-r s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
rL·-r -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
957
AssIgnArrayconst
CopIes the array elements from another array.
o··L A--LjnAnn-y··n-r.
··n-r .Ann-y¯L·-r· ·r· // -·Lnr-n r· r!- -·un·-
· ··n-r
Parameters
·r·
[In] PoInter to an Instance of class CArrayFloat·source element to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r...·mp-n-Ann-y.··n-r .Ann-y¯L·-r··
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯L·-r ·-n·=n-. .Ann-y¯L·-r¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y-
J-L-r- -n·¡
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
958
InsertSort
Ìnserts element In a sorted array.
o··L Pn--nr¯·nr.
rL·-r alaman: // IL-m-nr r· Ln--nr
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into a sorted array
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..Pn--nr¯·nr.rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- Ln--nr -L-m-nr
Lr..-nn-y.Pn--nr¯·nr.!¨¨.¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
959
Search
Searches for an element equal to the sample In the sorted array.
Lnr ¯--n·!.
rL·-r alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯--n·!.rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
960
SearchCreat
Searches for an element of more samples In sorted array.
Lnr ¯--n·!Jn--r.
rL·-r alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯--n·!Jn--r.rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--r.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
961
SearchLess
Searches for an element less than the sample In the sorted array.
Lnr ¯--n·!H---.
rL·-r alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r.. ¯--n·!H---.rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
962
SearchCreatDrEquaI
Searches for an element greater than or equal to the sample In the sorted array.
Lnr ¯--n·!Jn--rJnI¬u-L.
rL·-r alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯--n·!Jn--rJnI¬u-L.rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--rJnI¬u-L.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
963
SearchLessDrEquaI
Searches for an element less than or equal to the sample In the sorted array.
Lnr ¯--n·!H---JnI¬u-L.
rL·-r alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯--n·!H---JnI¬u-L.rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---JnI¬u-L.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
964
SearchFIrst
FInds the fIrst element equal to the sample In the sorted array.
Lnr ¯--n·!¯Ln-r.
rL·-r alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯--n·!¯Ln-r.rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!¯Ln-r.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
965
SearchLast
FInds the last element equal to the model In sorted array.
Lnr ¯--n·!H--r.
rL·-r alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯--n·!H--r.rL·-r·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H--r.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
966
Save
Saves data array In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..¯-v-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ !¨¨ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

-nn-y.AJJ.L·¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
967
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
968
Load
Loads data array from a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..H·-J.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- u-- -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

pnLnrr.¨IL-m-nr¯`J` = `r¨,L,-nn-y.Ar.L··¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
969
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
970
Type
Cets the type IdentIfIer of the array.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
Ì0 type of the array (for CArrayFloat · 87).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯L·-r..ryp-.·
tLn·LuJ- <Ann-y-\Ann-y¯L·-r.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯L·-r ·-nn-y=n-. .Ann-y¯L·-r¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r -nn-y ryp-
Lnr ryp-=-nn-y.ryp-.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
971
CArray0oubIe
CArray0ouble class Is a class of dynamIc array of varIables of type double.
0escrIptIon
Class CArray0ouble provIdes the abIlIty to work wIth a dynamIc array of varIables of type double.Ìn the
class Implemented the abIlIty to add / Insert / delete elements In an array, sort array, searchIng In
sorted array.Ìn addItIon, the Implemented methods of work wIth the fIle.
0ecIaratIon
·L--- .Ann-y¯·uoL- . puoLL· .Ann-y
TItIe
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
CIass hethods
AttrIbutes
0elta Set the comparIson tolerance
hemory controI
Feserve Allocates memory to Increase the sIze of the
array
FesIze Sets a new (smaller) sIze of the array
Shutdown Clears the array wIth a full memory release
Add methods
Add Adds an element to the end of the array
AddArray Adds to the end of the array elements from
another array
AddArray Adds to the end of the array elements from
another array
Ìnsert Ìnserts an element In the array to the specIfIed
posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
AssIgnArray CopIes the array elements from another array
AssIgnArray CopIes the array elements from another array
Update methods
Standard Library
© 2000·2010, |eta0uotes Software Corp.
972
Update Changes the element at the specIfIed posItIon
array
ShIft |oves an Item from a gIven posItIon In the
array to the specIfIed offset
0eIete methods
0elete Femoves the element from the specIfIed
posItIon array
0eleteFange 0eletes a group of elements from the specIfIed
posItIon array
Access methods
At Cets the element from the specIfIed posItIon
array
Compare methods
CompareArray Compares array wIth another array
CompareArray Compares array wIth another array
Sorted array operatIons
ÌnsertSort Ìnserts element In a sorted array
Search Searches for an element equal to the model In
sorted array
SearchCreat Searches for an element of more samples In
sorted array
SearchLess Searches for an element less than the sample In
the sorted array
SearchCreatDrEqual Searches for an element greater than or equal
to the model In sorted array
SearchLessDrEqual Searches for an element less than or equal to
the model In sorted array
SearchFIrst FInds the fIrst element equal to the model In
sorted array
SearchLast FInds the last element equal to the model In
sorted array
Inputloutput
vIrtual Save Saves data array In the fIle
vIrtual Load Loads data array from a fIle
vIrtual Type Cets the type IdentIfIer of the array
0erIved cIasses:
CÌndIcator8uffer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
973
0eIta
Set tolerance comparIson.
v·LJ ¯-Lr-.
J·uoL- jal:- // r·L-n-n·-
·
Parameters
jal:-
[In] The new value of the admIssIon of comparIson.
Peturn VaIue
No
Note
AdmIssIon of comparIson used In the search. 7alues are consIdered equal If theIr dIfference Is less
than or equal to tolerance. The default tolerance Is 0.0.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯-Lr-.J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- --r ··mp-n- v-nL-rL·n
-nn-y.¯-Lr-.¨.¨¨!·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
974
Peserve
Allocates memory to Increase the sIze of the array.
o··L ----nv-.
Lnr ·iza // Humo-n
·
Parameters
·iza
[In] The number of addItIonal elements of the array.
Peturn VaIue
true If successful, false · If there was an attempt to seek the amount Is less than or equal to zero,
or If the array dId not Increase.
Note
To reduce memory fragmentatIon, Increase the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..----nv-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- n---nv- m-m·ny
Lr..-nn-y.----nv-.!¨`1··

pnLnrr.¨----nv- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
975
PesIze
Sets a new (smaller) sIze of the array.
o··L ---Lz-.
Lnr ·iza // ¯Lz-
·
Parameters
·iza
[In] New sIze of the array.
Peturn VaIue
true If successful, false · If there was an attempt to set the sIze of less than or equal to zero.
Note
ChangIng the sIze of the array allows optImal use of memory.Superfluous elements on the rIght lost.
To reduce fragmentatIon of memory, change the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..---Lz-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- n--Lz- -nn-y
Lr..-nn-y.---Lz-.!¨··

pnLnrr.¨---Lz- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
976
Shutdown
Clears the array wIth a full memory release.
o··L ¯!urJ·.n.·
Peturn VaIue
true If successful, false · If an error occurred.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯!urJ·.n.·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!urJ·.n -nn-y
Lr..-nn-y.¯!urJ·.n.··

pnLnrr.¨¯!urJ·.n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
977
Add
Adds an element to the end of the array.
o··L AJJ.
J·uoL- alaman: // IL-m-nr r· -JJ
·
Parameters
alaman:
[In] value of the element to add to the array.
Peturn VaIue
true If successful, false · If you can not add an element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..AJJ.J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.AJJ.L··

pnLnrr.¨IL-m-nr -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
978
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r J·uoL-s ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..AJJAnn-y.··n-r J·uoL- s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
J·uoL- -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
979
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r .Ann-y¯·uoL-· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArray0ouble·source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..AJJAnn-y.··n-r .Ann-y¯·uoL-··
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯·uoL- ·-n·=n-. .Ann-y¯·uoL-¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
980
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
981
Insert
Ìnserts an element In the array to the specIfIed posItIon.
o··L Pn--nr.
J·uoL- alaman:, // IL-m-nr r· Ln--nr
Lnr p.· // -·-LrL·n
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into an array
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..Pn--nr.J·uoL-,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.Pn--nr.L,¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
982
InsertArray
Ìnserts an array of elements from another array specIfIed posItIon.
o··L Pn--nrAnn-y.
··n-r J·uoL-s ·r·/¹, // ¯·un·- -nn-y
Lnr p.· // -·-LrL·n
·
Parameters
·r·/¹
[In] Feference to an array of source elements to Insert
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..Pn--nrAnn-y.··n-r J·uoL- s¯`,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
J·uoL- -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
983
InsertArray
Ìnserts an array of elements from another array specIfIed posItIon.
o··L Pn--nrAnn-y.
.Ann-y¯·uoL-· ·r·, // -·Lnr-n r· r!- -·un·-
Lnr p.· // -·-LrL·n
·
Parameters
·r·
[In] PoInter to an Instance of class CArray0ouble·source elements to Insert.
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..Pn--nrAnn-y.··n-r .Ann-y¯·uoL-·,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯·uoL- ·-n·=n-. .Ann-y¯·uoL-¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
984
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
985
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r J·uoL-s ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..A--LjnAnn-y.··n-r J·uoL- s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
J·uoL- -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
986
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r .Ann-y¯·uoL-· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArray0ouble·source element to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..A--LjnAnn-y.··n-r .Ann-y¯·uoL-··
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯·uoL- ·-n· =n-. .Ann-y¯·uoL-¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -nn-y- L- LJ-nrL·-L
//--- J-L-r- -·un·- -nn-y
Standard Library
© 2000·2010, |eta0uotes Software Corp.
987
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
988
Update
Changes the element at the specIfIed posItIon array.
o··L JpJ-r-.
Lnr p.·, // -·-LrL·n
J·uoL- alaman: // V-Lu-
·
Parameters
p.·
[In] PosItIon of the element In the array to change
alaman:
[In] New value.
Peturn VaIue
true If successful, false · If you can not change the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..JpJ-r-.Lnr,J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- upJ-r- -L-m-nr
Lr..-nn-y.JpJ-r-.¨,!¨¨.¨··

pnLnrr.¨JpJ-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
989
ShIft
|oves an Item from a gIven posItIon In the array to the specIfIed offset.
o··L ¯!Lrr.
Lnr p.·, // -·-LrL·n
Lnr ·nif: // ¯!Lrr
·
Parameters
p.·
[In] PosItIon of the moved element array
·nif:
[In] The value of dIsplacement (both posItIve and negatIve).
Peturn VaIue
true If successful, false · If you can not move the Item.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯!Lrr.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!Lrr -L-m-nr
Lr..-nn-y.¯!Lrr.!¨,-¯··

pnLnrr.¨¯!Lrr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
990
0eIete
Femoves the element from the gIven posItIon In the array.
o··L ¯-L-r-.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] posItIon removes the element In the array.
Peturn VaIue
true If successful, false · If you can not remove the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯-L-r-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr
Lr..-nn-y.¯-L-r-.¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
991
0eIetePange
0eletes a group of elements from a gIven posItIon In the array.
o··L ¯-L-r---nj-.
Lnr fr.m, // -·-LrL·n ·r r!- rLn-r -L-m-nr
Lnr :. // -·-LrL·n ·r L--r -L-m-nr
·
Parameters
fr.m
[In] PosItIon of the fIrst removes the element In the array.
:.
[In] PosItIon of the last deleted element In the array.
Peturn VaIue
true If successful, false · If you can not remove elements.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯-L-r---nj-.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr-
Lr..-nn-y.¯-L-r---nj-.¨,!¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
992
At
Cets the element from the gIven posItIon In the array.
J·uoL- Ar.
Lnr p.· // -·-LrL·n
· ··n-r
Parameters
p.·
[In] PosItIon of the desIred element In the array.
Peturn VaIue
The value of the element In case of success, 08L_|AX If there was an attempt to get an element of
not exIstIng posItIons (the last error EFF_DUT_DF_FANCE).
Note
Df course, 08L_|AX may be a valId value of an array element, so havIng a value, always check the
last error code.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..Ar.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

J·uoL- n--uLr=-nn-y.Ar.L·¡
Lr.n--uLr==¯ÐH_MAx ss J-rH--rInn·n.·==I--_JJr_J¯_-AHJI·

//--- Inn·n n--JLnj rn·m r!- -nn-y
pnLnrr.¨J-r -L-m-nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
993
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
994
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r J·uoL-s ·r·/¹ // ¯·un·- -nn-y
· ··n-r
Parameters
·r·/¹
[In] Feference to an array of source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-...·mp-n-Ann-y.··n-r J·uoL- s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
J·uoL- -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
995
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r .Ann-y¯·uoL-· ·r· // -·Lnr-n r· r!- -·un·-
· ··n-r
Parameters
·r·
[In] PoInter to an Instance of class CArray0ouble·source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-...·mp-n-Ann-y.··n-r .Ann-y¯·uoL-··
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯·uoL- ·-n·=n-. .Ann-y¯·uoL-¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y-
J-L-r- -n·¡
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
996
InsertSort
Ìnserts element In a sorted array.
o··L Pn--nr¯·nr.
J·uoL- alaman: // IL-m-nr r· Ln--nr
·
Parameters
alaman:
[In] value of the element to be Inserted Into a sorted array
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..Pn--nr¯·nr.J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- Ln--nr -L-m-nr
Lr..-nn-y.Pn--nr¯·nr.!¨¨.¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
997
Search
Searches for an element equal to the sample In the sorted array.
Lnr ¯--n·!.
J·uoL- alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯--n·!.J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
998
SearchCreat
Searches for an element of more samples In sorted array.
Lnr ¯--n·!Jn--r.
J·uoL- alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯--n·!Jn--r.J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--r.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
999
SearchLess
Searches for an element less than the sample In the sorted array.
Lnr ¯--n·!H---.
J·uoL- alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-.. ¯--n·!H---.J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1000
SearchCreatDrEquaI
Searches for an element greater than or equal to the sample In the sorted array.
Lnr ¯--n·!Jn--rJnI¬u-L.
J·uoL- alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯--n·!Jn--rJnI¬u-L.J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--rJnI¬u-L.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1001
SearchLessDrEquaI
Searches for an element less than or equal to the sample In the sorted array.
Lnr ¯--n·!H---JnI¬u-L.
J·uoL- alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯--n·!H---JnI¬u-L.J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---JnI¬u-L.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1002
SearchFIrst
FInds the fIrst element equal to the sample In the sorted array.
Lnr ¯--n·!¯Ln-r.
J·uoL- alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯--n·!¯Ln-r.J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!¯Ln-r.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1003
SearchLast
FInds the last element equal to the model In sorted array.
Lnr ¯--n·!H--r.
J·uoL- alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯--n·!H--r.J·uoL-·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H--r.!¨¨.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1004
Save
Saves data array In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..¯-v-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ !¨¨ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

-nn-y.AJJ.L·¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1005
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1006
Load
Loads data array from a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..H·-J.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- u-- -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

pnLnrr.¨IL-m-nr¯`J` = `r¨,L,-nn-y.Ar.L··¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1007
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1008
Type
Cets the type IdentIfIer of the array.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
Ì0 type of the array (for CArray0ouble · 87).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯·uoL-..ryp-.·
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯·uoL- ·-nn-y=n-. .Ann-y¯·uoL-¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r -nn-y ryp-
Lnr ryp-=-nn-y.ryp-.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1009
CArrayStrIng
CArrayStrIng class Is a class of dynamIc array of varIables of type strIng.
0escrIptIon
Class CArrayStrIng provIdes the abIlIty to work wIth a dynamIc array of varIables of type strIng.Ìn the
class Implemented the abIlIty to add / Insert / delete elements In an array, sort array, searchIng In
sorted array.Ìn addItIon, the Implemented methods of work wIth the fIle.
0ecIaratIon
·L--- .Ann-y¯rnLnj . puoLL· .Ann-y
TItIe
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
CIass hethods
hemory controI
Feserve Allocates memory to Increase the sIze of the
array
FesIze Sets a new (smaller) sIze of the array
Shutdown Sets a new (smaller) sIze of the array
Add methods
Add Adds an element to the end of the array
AddArray Adds to the end of the array elements from
another array
AddArray Adds to the end of the array elements from
another array
Ìnsert Ìnserts an element In the array to the specIfIed
posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
AssIgnArray CopIes the array elements from another array
AssIgnArray CopIes the array elements from another array
Update methods
Update Changes the element at the specIfIed posItIon
array
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1010
ShIft |oves an Item from a gIven posItIon In the
array to the specIfIed offset
0eIete methods
0elete Femoves the element from the specIfIed
posItIon array
0eleteFange 0eletes a group of elements from the specIfIed
posItIon array
Access methods
At Cets the element from the specIfIed posItIon
array
Compare methods
CompareArray Compares array wIth another array
CompareArray Compares array wIth another array
Sorted array opetatIons
ÌnsertSort Ìnserts element In a sorted array
Search Searches for an element equal to the model In
sorted array
SearchCreat Searches for an element of more samples In
sorted array
SearchLess Searches for an element less than the sample In
the sorted array
SearchCreatDrEqual Searches for an element greater than or equal
to the model In sorted array
SearchLessDrEqual Searches for an element less than or equal to
the model In sorted array
SearchFIrst FInds the fIrst element equal to the model In
sorted array
SearchLast FInds the last element equal to the model In
sorted array
Inputloutput
vIrtual Save Saves data array In the fIle
vIrtual Load Loads data array from a fIle
vIrtual Type Cets the type IdentIfIer of the array
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1011
Peserve
Allocates memory to Increase the sIze of the array.
o··L ----nv-.
Lnr ·iza // Humo-n
·
Parameters
·iza
[In] The number of addItIonal elements of the array.
Peturn VaIue
true If successful, false · If there was an attempt to seek the amount Is less than or equal to zero,
or If the array dId not Increase.
Note
To reduce memory fragmentatIon, Increase the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..----nv-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- n---nv- m-m·ny
Lr..-nn-y.----nv-.!¨`1··

pnLnrr.¨----nv- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1012
PesIze
Sets a new (smaller) sIze of the array.
o··L ---Lz-.
Lnr ·iza // ¯Lz-
·
Parameters
·iza
[In] New sIze of the array.
Peturn VaIue
true If successful, false · If there was an attempt to set the sIze of less than or equal to zero.
Note
ChangIng the sIze of the array allows optImal use of memory.Superfluous elements on the rIght lost.
To reduce fragmentatIon of memory, change the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..---Lz-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- n--Lz- -nn-y
Lr..-nn-y.---Lz-.!¨··

pnLnrr.¨---Lz- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1013
Shutdown
Clears the array wIth a full memory release.
o··L ¯!urJ·.n.·
Peturn VaIue
true If successful, false · If an error occurred.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..¯!urJ·.n.·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!urJ·.n -nn-y
Lr..-nn-y.¯!urJ·.n.··

pnLnrr.¨¯!urJ·.n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1014
Add
Adds an element to the end of the array.
o··L AJJ.
-rnLnj alaman: // IL-m-nr r· -JJ
·
Parameters
alaman:
[In] value of the element to add to the array.
Peturn VaIue
true If successful, false · If you can not add an element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..AJJ.-rnLnj·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.AJJ.Pnr-j-nr·¯rnLnj.L···

pnLnrr.¨IL-m-nr -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1015
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r -rnLnjs ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..AJJAnn-y.··n-r -rnLnj s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
-rnLnj -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1016
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r .Ann-y¯rnLnj· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayStrIng · the source of elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..AJJAnn-y.··n-r .Ann-y¯rnLnj··
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯rnLnj ·-n·=n-. .Ann-y¯rnLnj¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1017
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1018
Insert
Ìnserts an element In the array to the specIfIed posItIon.
o··L Pn--nr.
-rnLnj alaman:, // IL-m-nr r· Ln--nr
Lnr p.· // -·-LrL·n
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into an array
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..Pn--nr.-rnLnj,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.Pn--nr.Pnr-j-nr·¯rnLnj.L·,¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1019
InsertArray
Ìnserts an array of elements from another array specIfIed posItIon.
o··L Pn--nrAnn-y.
··n-r -rnLnjs ·r·/¹, // ¯·un·- -nn-y
Lnr p.· // -·-LrL·n
·
Parameters
·r·/¹
[In] Feference to an array of source elements to Insert
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..Pn--nrAnn-y.··n-r -rnLnj s¯`,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
-rnLnj -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1020
InsertArray
Ìnserts an array of elements from another array specIfIed posItIon.
o··L Pn--nrAnn-y.
.Ann-y¯rnLnj· ·r·, // -·Lnr-n r· r!- -·un·-
Lnr p.· // -·-LrL·n
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayStrIng · the source of elements to Insert.
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..Pn--nrAnn-y.··n-r .Ann-y¯rnLnj·,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯rnLnj ·-n·=n-. .Ann-y¯rnLnj¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- Ln--nr -n·r!-n -nn-y
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1021
n-runn¡
·
//--- J-L-r- -·un·- -nn-y
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1022
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r -rnLnjs ·r·/¹ // ¯·un·- -nn-y
·
Parameters
·r·/¹
[In] Feference to an array of source elements to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..A--LjnAnn-y.··n-r -rnLnj s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
-rnLnj -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1023
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r .Ann-y¯rnLnj· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayStrIng · source of elements to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..A--LjnAnn-y.··n-r .Ann-y¯rnLnj··
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯rnLnj ·-n· =n-. .Ann-y¯rnLnj¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -nn-y- L- LJ-nrL·-L
//--- J-L-r- -·un·- -nn-y
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1024
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1025
Update
Changes the element at the specIfIed posItIon array.
o··L JpJ-r-.
Lnr p.·, // -·-LrL·n
-rnLnj alaman: // V-Lu-
·
Parameters
p.·
[In] PosItIon of the element In the array to change
alaman:
[In] New value element
Peturn VaIue
true If successful, false · If you can not change the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..JpJ-r-.Lnr, -rnLnj·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- upJ-r- -L-m-nr
Lr..-nn-y.JpJ-r-.¨,¨AÐ.¨··

pnLnrr.¨JpJ-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1026
ShIft
|oves an Item from a gIven posItIon In the array to the specIfIed offset.
o··L ¯!Lrr.
Lnr p.·, // -·-LrL·n
Lnr ·nif: // ¯!Lrr
·
Parameters
p.·
[In] PosItIon of the moved element array
·nif:
[In] The value of dIsplacement (both posItIve and negatIve).
Peturn VaIue
true If successful, false · If you can not move the Item.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..¯!Lrr.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!Lrr -L-m-nr
Lr..-nn-y.¯!Lrr.!¨,-¯··

pnLnrr.¨¯!Lrr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1027
0eIete
Femoves the element from the gIven posItIon In the array.
o··L ¯-L-r-.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] posItIon removes the element In the array.
Peturn VaIue
true If successful, false · If you can not remove the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..¯-L-r-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr
Lr..-nn-y.¯-L-r-.¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1028
0eIetePange
0eletes a group of elements from a gIven posItIon In the array.
o··L ¯-L-r---nj-.
Lnr fr.m, // -·-LrL·n ·r r!- rLn-r -L-m-nr
Lnr :. // -·-LrL·n ·r L--r -L-m-nr
·
Parameters
fr.m
[In] PosItIon of the fIrst removes the element In the array.
:.
[In] PosItIon of the last deleted element In the array.
Peturn VaIue
true If successful, false · If you can not remove elements.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..¯-L-r---nj-.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr-
Lr..-nn-y.¯-L-r---nj-.¨,!¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1029
At
Cets the element from the gIven posItIon In the array.
-rnLnj Ar.
Lnr p.· // -·-LrL·n
· ··n-r
Parameters
p.·
[In] PosItIon of the desIred element In the array.
Peturn VaIue
The value of the element In case of success, ¨· If there was an attempt to get an element of not
exIstIng posItIons (the last error EFF_DUT_DF_FANCE).
Note
Df course, ¨¨ may be a valId value of an array element, so havIng a value, always check the last
error code.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..Ar.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

-rnLnj n--uLr=-nn-y.Ar.L·¡
Lr.n--uLr==¨¨ ss J-rH--rInn·n.·==I--_JJr_J¯_-AHJI·

//--- Inn·n n--JLnj rn·m -nn-y
pnLnrr.¨J-r -L-m-nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1030
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1031
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r -rnLnjs ·r·/¹ // ¯·un·- -nn-y
· ··n-r
Parameters
·r·/¹
[In] Feference to an array of source elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj...·mp-n-Ann-y.··n-r -rnLnj s¯`·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
-rnLnj -n·¯`¡
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1032
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y-.
··n-r .Ann-y¯rnLnj· ·r· // -·Lnr-n r· r!- -·un·-
· ··n-r
Parameters
·r·
[In] PoInter to an Instance of class CArrayStrIng · the source of elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj...·mp-n-Ann-y.··n-r .Ann-y¯rnLnj··
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-y¯rnLnj ·-n·=n-. .Ann-y¯rnLnj¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -JJ -·un·- -nn-y- -L-m-nr-
//--- . . .
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y-
J-L-r- -n·¡
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1033
InsertSort
Ìnserts element In a sorted array.
o··L Pn--nr¯·nr.
-rnLnj alaman: // IL-m-nr r· Ln--nr
·
Parameters
alaman:
[In] value of the element to be Inserted Into a sorted array
Peturn VaIue
true If successful, false · If you can not Insert the element.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..Pn--nr¯·nr.-rnLnj·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- Ln--nr -L-m-nr
Lr..-nn-y.Pn--nr¯·nr.¨AÐ.¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1034
Search
Searches for an element equal to the sample In the sorted array.
Lnr ¯--n·!.
-rnLnj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..¯--n·!.-rnLnj·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!.¨AÐ.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1035
SearchCreat
Searches for an element of more samples In sorted array.
Lnr ¯--n·!Jn--r.
-rnLnj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..¯--n·!Jn--r.-rnLnj·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--r.¨AÐ.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1036
SearchLess
Searches for an element less than the sample In the sorted array.
Lnr ¯--n·!H---.
-rnLnj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj.. ¯--n·!H---.-rnLnj·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---.¨AÐ.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1037
SearchCreatDrEquaI
Searches for an element greater than or equal to the sample In the sorted array.
Lnr ¯--n·!Jn--rJnI¬u-L.
-rnLnj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj.. ¯--n·!Jn--rJnI¬u-L.-rnLnj·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--rJnI¬u-L.¨AÐ.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1038
SearchLessDrEquaI
Searches for an element less than or equal to the sample In the sorted array.
Lnr ¯--n·!H---JnI¬u-L.
-rnLnj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj.. ¯--n·!H---JnI¬u-L.-rnLnj·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---JnI¬u-L.¨AÐ.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1039
SearchFIrst
FInds the fIrst element equal to the sample In the sorted array.
Lnr ¯--n·!¯Ln-r.
-rnLnj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj.. ¯--n·!¯Ln-r.-rnLnj·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!¯Ln-r.¨AÐ.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1040
SearchLast
FInds the last element equal to the model In sorted array.
Lnr ¯--n·!H--r.
-rnLnj alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj.. ¯--n·!H--r.-rnLnj·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H--r.¨AÐ.¨·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1041
Save
Saves data array In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..¯-v-.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ !¨¨ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

-nn-y.AJJ.Pnr-j-nr·¯rnLnj.L··¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1042
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1043
Load
Loads data array from a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..H·-J.Lnr·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- u-- -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

pnLnrr.¨IL-m-nr¯`J` = '`-'¨,L,-nn-y.Ar.L··¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1044
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1045
Type
Cets the type IdentIfIer of the array.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
Ì0 type of the array (for CArrayStrIng · 89).
ExampIe:
//--- -x-mpL- r·n .Ann-y¯rnLnj..ryp-.·
tLn·LuJ- <Ann-y-\Ann-y¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-y¯rnLnj ·-nn-y=n-. .Ann-y¯rnLnj¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r -nn-y ryp-
Lnr ryp-=-nn-y.ryp-.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1046
CArrayDbj
CArrayDbj class Is a class of dynamIc array of poInters to Instances of CDbject and hIs heIrs.
0escrIptIon
Class CArrayDbj provIdes the abIlIty to work wIth a dynamIc array of poInters to Instances of CDbject
and hIs heIrs. ThIs gIves the possIbIlIty to work as a multIdImensIonal dynamIc arrays of prImItIve
data types, and the more dIffIcult for organIzed data structures.
Ìn the class Implemented the abIlIty to add / Insert / delete elements In an array, sort array,
searchIng In sorted array. Ìn addItIon, the Implemented methods of work wIth the fIle.
There are certaIn subtletIes of the class CArrayDbj.
0ecIaratIon
·L--- .Ann-yJo| . puoLL· .Ann-y
TItIe
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
CIass hethod
AttrIbutes
Free|ode Cets the flag memory management
Free|ode Sets the flag memory management
hemory controI
Feserve Allocates memory to Increase the sIze of the
array
FesIze Sets a new (smaller) sIze of the array
Shutdown Clears the array wIth a total exemptIon memory
array (not element).
Add methods
Add Adds an element to the end of the array
AddArray Adds an element to the end of the array
Ìnsert Ìnserts an element In the array to the specIfIed
posItIon
ÌnsertArray Ìnserts an array of elements from another array
wIth the specIfIed posItIon
AssIgnArray CopIes the array elements from another array
Update methods
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1047
Update Changes the element at the specIfIed posItIon
array
ShIft |oves an Item from a gIven posItIon In the
array to the specIfIed offset
0eIete methods
0etach Cets the element from the specIfIed posItIon
and removIng It from the array
0elete Femoves the element from the specIfIed
posItIon array
0eleteFange 0eletes a group of elements from the specIfIed
posItIon array
Clear Femoves all elements of the array wIthout the
release of the memory array
Access methods
At Cets the element from the specIfIed posItIon
array
Compare methods
CompareArray Compares array wIth another array
Sorted array operatIons
ÌnsertSort Ìnserts element In a sorted array
Search Searches for an element equal to the model In
sorted array
SearchCreat Searches for an element of more samples In
sorted array
SearchLess Searches for an element less than the sample In
the sorted array
SearchCreatDrEqual Searches for an element greater than or equal
to the model In sorted array
SearchLessDrEqual Searches for an element less than or equal to
the model In sorted array
SearchFIrst FInds the fIrst element equal to the model In
sorted array
SearchLast FInds the last element equal to the model In
sorted array
Inputloutput
Save Saves data array In the fIle
Load Loads data array from a fIle
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1048
Type Cets the type IdentIfIer of the array
0erIved cIasses:
CÌndIcator
CÌndIcators
PractIcal applIcatIon of arrays are descendants of class CDbject (IncludIng all classes of the standard
lIbrary).
For example, consIder the optIons for two·dImensIonal array:
tLn·LuJ- <Ann-y-\Ann-y¯·uoL-.m¬!
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr L,|¡
Lnr rLn-r_-Lz-=!¨¡
Lnr --··nJ_-Lz-=!¨¨¡
//--- ·n--r- -nn-y
.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
.Ann-y¯·uoL- ·-uo_-nn-y¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -uo-nn-y-
r·n.L=¨¡L<rLn-r_-Lz-¡L--·

-uo_-nn-y=n-. .Ann-y¯·uoL-¡
Lr.-uo_-nn-y==HJHH·

J-L-r- -nn-y¡
pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- rLLL -nn-y
r·n.|=¨¡|<--··nJ_-Lz-¡|--·

-uo_-nn-y.AJJ.L·|·¡
·
-nn-y.AJJ.-uo_-nn-y·¡
·
//--- ·n--r- -nn-y J·
r·n.L=¨¡L<rLn-r_-Lz-¡L--·

Standard Library
© 2000·2010, |eta0uotes Software Corp.
1049
-uo_-nn-y=-nn-y.Ar.L·¡
r·n.|=¨¡|<--··nJ_-Lz-¡|--·

J·uoL- -L-m-nr=-uo_-nn-y.Ar.|·¡
//--- u-- -nn-y -L-m-nr
·
·
J-L-r- -nn-y¡
·
SubtIetIes
The class has a mechanIsm to control dynamIc memory, so be careful when workIng wIth elements of
the array.
|echanIsm of memory management can be swItched on / off usIng the method Free|ode (bool). 8y
default, the mechanIsm Is enabled.
AccordIngly, there are two optIons for dealIng wIth the class CArrayDbj:
1. |echanIsm of memory management Is enabled. (default)
Ìn thIs case, CArrayDbj take responsIbIlIty for freeIng the memory elements after theIr removal from
the array. Ìn thIs program the user should not free the array elements.
ExampIe:
Lnr L¡
//--- .n--r- -n -nn-y
.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//--- ¯LLL -nn-y -L-m-nr-
r·n.L=¨¡L<!¨¡L--· -nn-y.AJJ.n-. .Jo|-·r·¡
//--- ¯· -·m-r!Lnj
r·n.L=¨¡L<-nn-y.r·r-L.·¡L--·

.Jo|-·r ··o|-·r=-nn-y.Ar.L·¡
//--- A·rL·n .Lr! -n -L-m-nr
. . .
·
//--- --m·v- r!- -nn-y .Lr! r!- -L-m-nr-
J-L-r- -nn-y¡
2. |echanIsm of memory management Is turned off.
Ìn thIs case, CArrayDbj not otvetstvechaet for freeIng the memory elements after theIr removal from
the array. Ìn thIs program the user must free the array elements.
ExampIe:
Lnr L¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1050
//--- .n--r- -n -nn-y
.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//--- ¯L--oL- r!- m-·!-nL-m ·r m-m·ny m-n-j-m-nr
-nn-y.¯n--M·J-.r-L--·¡
//--- ¯LLL -nn-y -L-m-nr-
r·n.L=¨¡L<!¨¡L--· -nn-y.AJJ.n-. .Jo|-·r·¡
//--- ¯· -·m-r!Lnj
r·n.L=¨¡L<-nn-y.r·r-L.·¡L--·

.Jo|-·r ··o|-·r=-nn-y.Ar.L·¡
//--- A·rL·n .Lr! -n -L-m-nr
. . .
·
//--- --m·v- -nn-y -L-m-nr-
.!LL-.-nn-y.r·r-L.·· J-L-r- -nn-y.¯-r-·!.·¡
//--- --m·v- -mpry -nn-y
J-L-r- -nn-y¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1051
Freehode
Cets the flag memory management.
o··L ¯n--M·J-.· ··n-r
Peturn VaIue
Flag of memory management.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯n--M·J-.·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r rn-- m·J- rL-j
o··L -nn-y_rn--_m·J-=-nn-y.¯n--M·J-.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1052
Freehode
Sets the flag memory management.
v·LJ ¯n--M·J-.
o··L m.ja // H-. rL-j
·
Parameters
m.ja
[In] New value of the flag memory management.
Peturn VaIue
None.
Note
SettIng the flag memory management · an Important poInt In the use of class CArrayDbj.SInce the
array elements are poInters to dynamIc objects, It Is Important to determIne what to do wIth them
when removIng from the array.
Ìf the flag Is set, removIng an element from the array, the element Is automatIcally deleted by the
operator delete.Ìf the flag Is not set, It Is assumed that a poInter to the deleted object Is stIll
somewhere In the user program and wIll be relIeved of It (the program) then.
Ìf the user resets the flag memory management, the user must understand theIr responsIbIlIty for
the removal of the array before the completIon of the program, because otherwIse, Is not freed
memory occupIed by the elements when they create new operator.
When large amounts of data, It could lead, eventually, even to break your termInal.Ìf the user does
not reset the flag memory management, there Is another ¨reef¨.
UsIng poInters, array, stored somewhere In the local varIables, after removIng the array wIll lead to
a crItIcal error and crashes the program user.8y default, the memory management flag Is set, Ie the
class of the array Is responsIble for freeIng the memory elements.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯n--M·J-.o··L·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- n---r rn-- m·J- rL-j
-nn-y.¯n--M·J-.r-L--·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1053
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1054
Peserve
Allocates memory to Increase the sIze of the array.
o··L ----nv-.
Lnr ·iza // Humo-n
·
Parameters
·iza
[In] The number of addItIonal elements of the array.
Peturn VaIue
true If successful, false · If there was an attempt to seek the amount Is less than or equal to zero,
or If the array dId not Increase.
Note
To reduce memory fragmentatIon, Increase the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..----nv-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
Lr..-nn-y.----nv-.!¨`1··

pnLnrr.¨----nv- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1055
PesIze
Sets a new (smaller) sIze of the array.
o··L ---Lz-.
Lnr ·iza // ¯Lz-
·
Parameters
·iza
[In] New sIze of the array.
Peturn VaIue
To reduce fragmentatIon of memory, change the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
Note
ChangIng the sIze of array allows to use memory In the optImal way. Excess element located to the
rIght are lost. The memory for lost elements Is released or not dependIng on the mode of memory
management.
To reduce fragmentatIon of memory, change the sIze of the array Is made wIth a step prevIously
gIven through the method of Step (Int), or 16 (default).
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..---Lz-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- n--Lz- -nn-y
Lr..-nn-y.---Lz-.!¨··

pnLnrr.¨---Lz- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1056
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1057
CIear
Femoves all elements of the array wIthout the release of the memory array.
v·LJ .L--n.·
Peturn VaIue
No.
Note
Ìf enabled memory management, memory, deleted Items are exempt.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|...L--n.·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- ·L--n -nn-y
-nn-y..L--n.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1058
Shutdown
Clears the array wIth a total exemptIon memory array (not element).
o··L ¯!urJ·.n.·
Peturn VaIue
true If successful, false · If an error occurred.
Note
Ìf enabled memory management, memory, deleted Items are exempt.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯!urJ·.n.·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!urJ·.n -nn-y
Lr..-nn-y.¯!urJ·.n.··

pnLnrr.¨¯!urJ·.n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1059
CreateEIement
Creates a new array element at the specIfIed posItIon.
o··L .n--r-IL-m-nr.
Lnr injax // -·-LrL·n
·
Parameters
injax
[In] posItIon In whIch you want to create a new element.
Peturn VaIue
true If successful, false · If you can not create element.
Note
|ethod CreateElement (Int) In class CArrayDbj always returns false and does not perform any
actIon. Ìf necessary, In a derIved class, method CreateElement (Int) should be Implemented.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|...n--r-IL-m-nr.Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr -Lz-=!¨¨¡
.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- rLLL -nn-y
-nn-y.----nv-.-Lz-·¡
r·n.Lnr L=¨¡L<-Lz-¡L--·

Lr..-nn-y..n--r-IL-m-nr.L··

pnLnrr.¨IL-m-nr ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1060
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1061
Add
Adds an element to the end of the array.
o··L AJJ.
.Jo|-·r· alaman: // IL-m-nr r· -JJ
·
Parameters
alaman:
[In] value of the element to add to the array.
Peturn VaIue
true If successful, false · If you can not add an element.
Note
Element Is not added to the array If the value for transmIt InvalId poInter (such as NULL).
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..AJJ..Jo|-·r··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ !¨¨ -nn-y- -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.AJJ.n-. .Jo|-·r··

pnLnrr.¨IL-m-nr -JJLrL·n -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1062
AddArray
Adds to the end of the array elements from another array.
o··L AJJAnn-y.
··n-r .Ann-yJo| · ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArray0ouble · source of elements to add.
Peturn VaIue
true If successful, false · If you can not add Items.
Note
AddIng elements of the array In the array Is actually copyIng the poInters.Therefore, when callIng
the method, there Is a ¨reef¨ · that there may be a poInter to a dynamIc object In more than one
varIable.
//--- -x-mpL-
-xr-nn o··L m-k-_-nn·n¡
-xr-nn Lnr -nn·n¡
-xr-nn .Ann-yJo| ·-n·¡
//--- .n--r- - n-. Ln-r-n·- .Ann-yJo|
//--- ¯-r-uLr m-m·ny m-n-j-m-nr L- runn-J ·n
.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//--- AJJ .··py· r!- -L-m-nr- ·r r!- -nn-y-L-r··!Lk-
Lr.-nn-y.=HJHH·
o··L n--uLr=-nn-y.AJJAnn-y.-n··¡
Lr.m-k-_-nn·n·

//--- .·mmLr .n·njJ·Lnj
-.Lr·!.-nn·n·

·--- ¨.
//--- --m·v- r!- -nn-y--·un·-, .Lr!·ur ·!-·kLnj Lr- rL-j m-m·ny m-n-j-m-nr
J-L-r- -n·¡
//--- ---uLr.
//--- M-y -pp--L
//--- ¯·n ¨oLr·mu¨ p·Lnr-n Ln r!- -nn-y n-·-Lv-n
on--k¡
·--- !.
//--- ¯L--oL- r!- m-·!-nL-m ·r m-m·ny m-n-j-m-nr Ln -n -nn-y ·r -·un·-
Lr.-n·.¯n--M·J-.·· -n·.¯n--M·J-.r-L--·¡
//--- Ður J· n·r n-m·v- r!- -nn-y--·un·-
//--- ---uLr.
//--- Arr-n n-m·v-L ·r r!- -nn-y, r!- n-·-Lv-n m-y -pp--L
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1063
//--- ¯·n ¨oLr·mu¨ p·Lnr-n Ln r!- -nn-y--·un·-
on--k¡
·--- `.
//--- ¯L--oL- r!- m-·!-nL-m ·r m-m·ny m-n-j-m-nr Ln -n -nn-y ·r -·un·-
-n·.¯n--M·J-.r-L--·¡
//--- ¯L--oL- r!- m-·!-nL-m ·r m-m·ny m-n-j-m-nr Ln -n -nn-y n-·-Lv-n
-nn-y.¯n--M·J-.r-L--·¡
//--- ---uLr.
//--- Arr-n r!- ··mpL-rL·n ·r r!- pn·jn-m, ·or-Ln - ¨m-m·ny L--k¨
on--k¡
·
·
-L--

//--- ¯L--oL- r!- m-·!-nL-m ·r m-m·ny m-n-j-m-nr Ln -n -nn-y ·r -·un·-
Lr.-n·.¯n--M·J-.·· -n·.¯n--M·J-.r-L--·¡
//--- --m·v- r!- -nn-y--·un·-
J-L-r- -n·¡
//--- ---uLr.
//--- rn--rm-nr r·n -n -nn-y-n-·-pL-nr o- ··nn-·r
//--- ¯-L-r- r!- -nn-y, r!- n-·-Lv-n .LLL J-L-r- Lr- -L-m-nr-
·

ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..AJJAnn-y.··n-r .Ann-yJo|··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yJo| ·-n·=n-. .Ann-yJo|¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- n---r rn-- m·J- rL-j
-n·.¯n--M·J-.r-L--·¡
//--- rLLL -·un·- -nn-y
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1064
//--- . . .
//--- -JJ -n·r!-n -nn-y
Lr..-nn-y.AJJAnn-y.-n···

pnLnrr.¨Ann-y -JJLrL·n -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -·un·- -nn-y .Lr!·ur -L-m-nr-
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1065
Insert
Ìnserts an element In the array to the specIfIed posItIon.
o··L Pn--nr.
.Jo|-·r· alaman:, // IL-m-nr r· Ln--nr
Lnr p.· // -·-LrL·n
·
Parameters
alaman:
[In] value of the element to be Inserted Into an array
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not Insert the element.
Note
Element Is not added to the array If the value for transmIt InvalId poInter (such as NULL).
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..Pn--nr..Jo|-·r·,Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr..-nn-y.Pn--nr.n-. .Jo|-·r,¨··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
·
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1066
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1067
InsertArray
Ìnserts an array of elements from another array specIfIed posItIon.
o··L Pn--nrAnn-y.
··n-r .Ann-yJo|· ·r·, // -·Lnr-n r· r!- -·un·-
Lnr p.· // -·-LrL·n
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayDbj·source elements to Insert.
p.·
[In] PosItIon In the array to Insert
Peturn VaIue
true If successful, false · If you can not paste Items.
Note
See: CArrayDbj::AddArray(const CArrayDbj*).
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..Pn--nrAnn-y.··n-r .Ann-yJo|·,Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yJo| ·-n·=n-. .Ann-yJo|¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- n---r rn-- m·J- rL-j
-n·.¯n--M·J-.r-L--·¡
//--- rLLL -·un·- -nn-y
//--- . . .
//--- Ln--nr -n·r!-n -nn-y
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1068
Lr..-nn-y.Pn--nrAnn-y.-n·,¨··

pnLnrr.¨Ann-y Ln--nrLnj -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -·un·- -nn-y .Lr!·ur -L-m-nr-
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1069
AssIgnArray
CopIes the array elements from another array.
o··L A--LjnAnn-y.
··n-r .Ann-yJo|· ·r· // -·Lnr-n r· r!- -·un·-
·
Parameters
·r·
[In] PoInter to an Instance of class CArrayDbj · source of elements to copy.
Peturn VaIue
true If successful, false · If you can not copy the Items.
Note
Ìf the challenge AssIgnArray array receIver Is not empty, all Its elements wIll be removed from the
array and, If the flag memory management, memory, deleted Items wIll be released.Array·receIver
Is an exact copy of the array source. AddItIonally see CArrayDbj::AddArray(const CArrayDbj*).
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..A--LjnAnn-y.··n-r .Ann-yJo|··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yJo| ·-n·=n-. .Ann-yJo|¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- n---r rn-- m·J- rL-j
-n·.¯n--M·J-.r-L--·¡
//--- rLLL -·un·- -nn-y
//--- . . .
//--- ---Ljn -n·r!-n -nn-y
Lr..-nn-y.A--LjnAnn-y.-n···

Standard Library
© 2000·2010, |eta0uotes Software Corp.
1070
pnLnrr.¨Ann-y ---Ljn-J -nn·n¨·¡
J-L-r- -n·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- -nn-y- L- LJ-nrL·-L
//--- J-L-r- -·un·- -nn-y .Lr!·ur -L-m-nr-
J-L-r- -n·¡
//--- u-- -nn-y
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1071
Update
Changes the element at the specIfIed posItIon array.
o··L JpJ-r-.
Lnr p.·, // -·-LrL·n
.Jo|-·r· alaman: // V-Lu-
·
Parameters
p.·
[In] PosItIon of the element In the array to change
alaman:
[In] New value element
Peturn VaIue
true If successful, false · If you can not change the element.
Note
The element does not change If we as a parameter to pass an InvalId poInter (Ie NULL). Ìf enabled
memory management, memory placeholder released.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..JpJ-r-.Lnr,.Jo|-·r··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- upJ-r- -L-m-nr
Lr..-nn-y.JpJ-r-.¨,n-. .Jo|-·r··

pnLnrr.¨JpJ-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1072
ShIft
|oves an Item from a gIven posItIon In the array to the specIfIed offset.
o··L ¯!Lrr.
Lnr p.·, // -·-LrL·n
Lnr ·nif: // ¯!Lrr
·
Parameters
p.·
[In] PosItIon of the moved element array
·nif:
[In] The value of dIsplacement (both posItIve and negatIve).
Peturn VaIue
true If successful, false · If you can not move the Item.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯!Lrr.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -!Lrr -L-m-nr
Lr..-nn-y.¯!Lrr.!¨,-¯··

pnLnrr.¨¯!Lrr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1073
0etach
Femove an Item from a gIven posItIon In the array.
.Jo|-·r· ¯-r-·!.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] PosItIon of the seIzed Item In the array.
Peturn VaIue
PoInter to the removal of elements In case of success, NULL · If you can not remove the element.
Note
When removed from the array element Is not removed In any state of the flag memory
management. PoInter to the array element wIthdrawn from the IngredIents of the release after use.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯-r-·!.Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
.Jo|-·r ··o|-·r=-nn-y.¯-r-·!.¨·¡
Lr.·o|-·r==HJHH·

pnLnrr.¨¯-r-·! -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
//--- J-L-r- -L-m-nr
J-L-r- ·o|-·r¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1074
0eIete
Femoves the element from the gIven posItIon In the array.
o··L ¯-L-r-.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] posItIon removes the element In the array.
Peturn VaIue
true If successful, false · If you can not remove the element.
Note
Ìf enabled memory management, memory, deleted Items are exempt.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯-L-r-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
Lr..-nn-y.¯-L-r-.¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1075
0eIetePange
0eletes a group of elements from a gIven posItIon In the array.
o··L ¯-L-r---nj-.
Lnr fr.m, // -·-LrL·n ·r r!- rLn-r -L-m-nr
Lnr :. // -·-LrL·n ·r L--r -L-m-nr
·
Parameters
fr.m
[In] PosItIon of the fIrst removes the element In the array.
:.
[In] PosItIon of the last deleted element In the array.
Peturn VaIue
true If successful, false · If you can not remove elements.
Note
Ìf enabled memory management, memory, deleted Items are exempt.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯-L-r---nj-.Lnr,Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -L-m-nr-
Lr..-nn-y.¯-L-r---nj-.¨,!¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1076
At
Cets the element from the gIven posItIon In the array.
.Jo|-·r· Ar.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] PosItIon of the desIred element In the array.
Peturn VaIue
The value of the element, If successful, NULL·If there was an attempt to get an element of non·
exIstent posItIon.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..Ar.Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -L-m-nr-
//--- . . .
r·n.Lnr L=¨¡L<-nn-y.r·r-L.·¡L--·

.Jo|-·r ·n--uLr=-nn-y.Ar.L·¡
Lr.n--uLr==HJHH·

//--- Inn·n n--JLnj rn·m -nn-y
pnLnrr.¨J-r -L-m-nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1077
CompareArray
Compares array wIth another array.
o··L .·mp-n-Ann-y.
··n-r .Ann-yJo|· ·r· // -·Lnr-n r· r!- -·un·-
· ··n-r
Parameters
·r·
[In] PoInter to an Instance of class CArrayDbj · the source of elements for comparIson.
Peturn VaIue
true If arrays are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|...·mp-n-Ann-y.··n-r .Ann-yJo|··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- -nn-y
.Ann-yJo| ·-n·=n-. .Ann-yJo|¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- rLLL -·un·- -nn-y
//--- . . .
//--- ··mp-n- .Lr! -n·r!-n -nn-y
Lnr n--uLr=-nn-y..·mp-n-Ann-y.-n··¡
//--- J-L-r- -nn-y-
J-L-r- -n·¡
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1078
InsertSort
Ìnserts element In a sorted array.
o··L Pn--nr¯·nr.
.Jo|-·r· alaman: // IL-m-nr r· Ln--nr
·
Parameters
alaman:
[In] 7alue of the element to be Inserted Into a sorted array
Peturn VaIue
true If successful, false · If you can not Insert the element.
Note
Element Is not added to the array If the value for transmIt InvalId poInter (such as NULL).
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..Pn--nr¯·nr..Jo|-·r··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- Ln--nr -L-m-nr
Lr..-nn-y.Pn--nr¯·nr.n-. .Jo|-·r··

pnLnrr.¨Pn--nr -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1079
Search
Searches for an element equal to the sample In the sorted array.
Lnr ¯--n·!.
.Jo|-·r· alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯--n·!..Jo|-·r··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ·n--r- --mpL-
.Jo|-·r ·--mpL-=n-. .Jo|-·r¡
Lr.--mpL-==HJHH·

pnLnrr.¨¯-mpL- ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- --r --mpL- -rrnLour--
//--- . . .
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!.--mpL-·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1080
SearchCreat
Searches for an element of more samples In sorted array.
Lnr ¯--n·!Jn--r.
.Jo|-·r· alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯--n·!Jn--r..Jo|-·r··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ·n--r- --mpL-
.Jo|-·r ·--mpL-=n-. .Jo|-·r¡
Lr.--mpL-==HJHH·

pnLnrr.¨¯-mpL- ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- --r --mpL- -rrnLour--
//--- . . .
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--r.--mpL-·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1081
SearchLess
Searches for an element less than the sample In the sorted array.
Lnr ¯--n·!H---.
.Jo|-·r· alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|.. ¯--n·!H---..Jo|-·r··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ·n--r- --mpL-
.Jo|-·r ·--mpL-=n-. .Jo|-·r¡
Lr.--mpL-==HJHH·

pnLnrr.¨¯-mpL- ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- --r --mpL- -rrnLour--
//--- . . .
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---.--mpL-·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1082
SearchCreatDrEquaI
Searches for an element greater than or equal to the sample In the sorted array.
Lnr ¯--n·!Jn--rJnI¬u-L.
.Jo|-·r· alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯--n·!Jn--rJnI¬u-L..Jo|-·r··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ·n--r- --mpL-
.Jo|-·r ·--mpL-=n-. .Jo|-·r¡
Lr.--mpL-==HJHH·

pnLnrr.¨¯-mpL- ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- --r --mpL- -rrnLour--
//--- . . .
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!Jn--rJnI¬u-L.--mpL-·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1083
SearchLessDrEquaI
Searches for an element less than or equal to the sample In the sorted array.
Lnr ¯--n·!H---JnI¬u-L.
.Jo|-·r· alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|.. ¯--n·!H---JnI¬u-L..Jo|-·r··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ·n--r- --mpL-
.Jo|-·r ·--mpL-=n-. .Jo|-·r¡
Lr.--mpL-==HJHH·

pnLnrr.¨¯-mpL- ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- --r --mpL- -rrnLour--
//--- . . .
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H---JnI¬u-L.--mpL-·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1084
SearchFIrst
FInds the fIrst element equal to the sample In the sorted array.
Lnr ¯--n·!¯Ln-r.
.Jo|-·r· alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯--n·!¯Ln-r..Jo|-·r··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ·n--r- --mpL-
.Jo|-·r ·--mpL-=n-. .Jo|-·r¡
Lr.--mpL-==HJHH·

pnLnrr.¨¯-mpL- ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- --r --mpL- -rrnLour--
//--- . . .
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!¯Ln-r.--mpL-·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1085
SearchLast
FInds the last element equal to the model In sorted array.
Lnr ¯--n·!H--r.
.Jo|-·r· alaman: // ¯-mpL-
· ··n-r
Parameters
alaman:
[In] The sample element to search In the array.
Peturn VaIue
The posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|.. ¯--n·!H--r..Jo|-·r··
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- -·nr -nn-y
-nn-y.¯·nr.·¡
//--- ·n--r- --mpL-
.Jo|-·r ·--mpL-=n-. .Jo|-·r¡
Lr.--mpL-==HJHH·

pnLnrr.¨¯-mpL- ·n--r- -nn·n¨·¡
J-L-r- -nn-y¡
n-runn¡
·
//--- --r --mpL- -rrnLour--
//--- . . .
//--- ---n·! -L-m-nr
Lr.-nn-y.¯--n·!H--r.--mpL-·.=-!· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1086
Save
Saves data array In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to prevIously opened by FIleDpen (...) functIon bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..¯-v-.Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ -nn-y- -L-m-nr-
//--- . . .
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1087
Load
Loads data array from a fIle.s
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle to open earlIer, wIth the functIon FIleDpen (...), bInary fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
Note
When readIng from the fIle array to create each element of the method Is called CArrayDbj::
CreateElement(Int).
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..H·-J.Lnr·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn-y.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- -nn-y¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1088
//--- u-- -nn-y- -L-m-nr-
//--- . . .
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1089
Type
Cets the type IdentIfIer of the array.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
Ì0 type of the array (for CArrayDbj · 7778).
ExampIe:
//--- -x-mpL- r·n .Ann-yJo|..ryp-.·
tLn·LuJ- <Ann-y-\Ann-yJo|.m¬!
//---
v·LJ Jn¯r-nr.·

.Ann-yJo| ·-nn-y=n-. .Ann-yJo|¡
//---
Lr.-nn-y==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r -nn-y ryp-
Lnr ryp-=-nn-y.ryp-.·¡
//--- J-L-r- -nn-y
J-L-r- -nn-y¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1090
CLIst
CLIst Class Is a class of dynamIc lIst of Instances of the class CDbject and hIs heIrs.
0escrIptIon
Class CLIst provIdes the abIlIty to work wIth a lIst of Instances of CDbject and hIs heIrs. Ìn the class
Implemented the abIlIty to add / Insert / delete Items In the lIst, sort the lIst, search In sorted lIst. Ìn
addItIon, the Implemented methods of work wIth the fIle.
There are some subtletIes of workIng wIth the class CLIst. The class has a mechanIsm to control
dynamIc memory, so be careful when workIng wIth elements of the lIst.
SubtletIes of the mechanIsm of memory management sImIlar to those descrIbed In CArrayDbj.
0ecIaratIon
·L--- .HL-r . puoLL· .Jo|-·r
TItIe
tLn·LuJ- ·Arrays\LIst.mqh·
CIass hethods
AttrIbutes
Free|ode Cets the flag memory management when
deletIng lIst Items.
Free|ode Sets the flag memory management when
deletIng Items In the lIst
Total Cets the number of elements In the lIst
ÌsSorted Cets flag sorted lIst
Sort|ode Cets the versIon of the sortIng
Create methods
CreateElement Creates a new Item to the lIst
Add methods
Add Adds element to the end of the lIst
Ìnsert Ìnserts element In the lIst In the specIfIed
posItIon
0eIete methods
0etachCurrent Femove an Item from the current posItIon of
the lIst wIthout deletIng It ¨physIcally¨
0eleteCurrent Femoves the element from the current posItIon
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1091
In the lIst
0elete Femoves the element from the specIfIed
posItIon In the lIst
Clear Femoves all lIst Items
NavIgatIon
ÌndexDf Cets the Index of the lIst Item
CetNodeAtÌndex Cets an Item wIth the specIfIed Index of the lIst
CetFIrstNode Cets the fIrst element of the lIst
CetPrevNode Cets the prevIous element lIst
CetCurrentNode Cets the current lIst Item
CetNextNode Cets the next Item In the lIst
CetLastNode Cets the last Item
DrderIng methods
Sort Sort lIst
|oveToÌndex |oves the current Item lIst to the specIfIed
posItIon
Exchange Changes elements of the lIst seats
Compare methods
CompareLIst Compares the lIst wIth another lIst
Search methods
Search Searches for an element equal to the model In
sorted lIst
Inputloutput
vIrtual Save Saves data In the fIle lIst
vIrtual Load Loads data from fIle lIst
vIrtual Type Cets the type IdentIfIer lIst

Standard Library
© 2000·2010, |eta0uotes Software Corp.
1092
Freehode
Cets the flag memory management when deletIng lIst Items.
o··L ¯n--M·J-.· ··n-r
Peturn VaIue
Flag of memory management.
ExampIe:
//--- -x-mpL- r·n .HL-r..¯n--M·J-.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r rn-- m·J- rL-j
o··L LL-r_rn--_m·J-=LL-r.¯n--M·J-.·¡
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1093
Freehode
Sets the flag memory management when deletIng lIst Items.
v·LJ ¯n--M·J-.
o··L m.ja // H-. v-Lu-
·
Parameters
m.ja
[In] New value of the flag memory management.
Note
SettIng the flag memory management · an Important poInt In the use of class CLIst.SInce the
elements of the lIst are poInters to dynamIc objects, It Is Important to determIne what to do wIth
them when you delete from the lIst.Ìf the flag Is set, then when you delete an Item from the lIst, the
Item Is automatIcally deleted by the operator delete.Ìf the flag Is not set, It Is assumed that a
poInter to the deleted object Is stIll somewhere In the user program and wIll be relIeved of It (the
program) then.
Ìf the user resets the flag memory management, the user must understand theIr responsIbIlIty for
the removal of Items In the lIst before completIng the program, because otherwIse, Is not freed
memory occupIed by the elements when they create new operator.When large amounts of data, It
could lead, eventually, even to break your termInal.
Ìf the user does not reset the flag memory management, there Is another ¨reef¨.UsIng poInters·lIst
Items that are stored somewhere In the local varIables, after removIng the lIst, wIll lead to a crItIcal
error and crashes the program user.8y default, the memory management flag Is set, Ie the class
lIst, Is responsIble for freeIng the memory elements.
ExampIe:
//--- -x-mpL- r·n .HL-r..¯n--M·J-.o··L·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- n---r rn-- m·J- rL-j
LL-r.¯n--M·J-.r-L--·¡
//--- u-- LL-r
//--- . . .
//--- J-L-r- LL-r
J-L-r- LL-r¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1094
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1095
TotaI
Cets the number of elements In the lIst.
Lnr r·r-L.· ··n-r
Peturn VaIue
Number of elements In the lIst.
ExampIe:
//--- -x-mpL- r·n .HL-r..r·r-L.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·!-·k r·r-L
Lnr r·r-L=LL-r.r·r-L.·¡
//--- u-- LL-r
//--- ...
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1096
IsSorted
Cets the flag sorted lIst.
o··L P-¯·nr-J.
Lnr m.ja=` // ¯·nrLnj m·J-
· ··n-r
Parameters
m.ja=`
[In] Tested versIon sortIng
Peturn VaIue
Flag of the sorted lIst. Ìf the lIst Is sorted by the specIfIed optIon: true, otherwIse: false.
Note
Flag of the sorted lIst can not be changed dIrectly. Flag set by Sort (Int) and resets any methods to
add / Insert.
ExampIe:
//--- -x-mpL- r·n .HL-r..P-¯·nr-J.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·!-·k -·nr-J
Lr.LL-r.P-¯·nr-J.¨··

//--- u-- m-r!·J- r·n -·nr-J LL-r
//--- ...
·
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1097
Sorthode
Cets the versIon of the sort.
Lnr ¯·nrM·J-.· ··n-r
Peturn VaIue
DptIon sortIng, or ·1 If the lIst Is not sorted.
ExampIe:
//--- -x-mpL- r·n .HL-r..¯·nrM·J-.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·!-·k -·nr m·J-
Lnr -·nr_m·J-=LL-r.¯·nrM·J-.·¡
//--- u-- LL-r
//--- ...
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1098
CreateEIement
Creates a new Item to the lIst.
.Jo|-·r· .n--r-IL-m-nr.·
Peturn VaIue
PoInter to the newly created element, If successful, NULL · If you can not create element.
Note
|ethod CreateElement () In class CLIst always returns NULL and does not perform any actIons. Ìf
necessary, In a derIved class, method CreateElement () should be Implemented.
ExampIe:
//--- -x-mpL- r·n .HL-r...n--r-IL-m-nr.Lnr·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr -Lz-=!¨¨¡
.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- rLLL LL-r
r·n.Lnr L=¨¡L<-Lz-¡L--·

.Jo|-·r ··o|-·r=LL-r..n--r-IL-m-nr.·¡
Lr.·o|-·r==HJHH·

pnLnrr.¨IL-m-nr ·n--r- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
LL-r.AJJ.·o|-·r·¡
·
//--- u-- LL-r
//--- . . .
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1099
Add
Adds an element to the end of the lIst.
Lnr AJJ.
.Jo|-·r· alaman: // IL-m-nr r· -JJ
·
Parameters
alaman:
[In] 7alue of the element to add to the lIst.
Peturn VaIue
Ìf successful, It returns the Index of added element, or ·1 In the case of error.
Note
Element Is not added to the lIst, If the parameter does not pass valId poInter (Ie NULL).
ExampIe:
//--- -x-mpL- r·n .HL-r..AJJ..·o|-·r··
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ !¨¨ -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr.LL-r.AJJ.n-. .Jo|-·r·==-!·

pnLnrr.¨IL-m-nr -JJLrL·n -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
·
//--- u-- LL-r
//--- . . .
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1100
Insert
Ìnserts element In the lIst In the specIfIed posItIon.
Lnr Pn--nr.
.Jo|-·r· alaman:, // IL-m-nr r· Ln--nr
Lnr p.· // -·-LrL·n
·
Parameters
alaman:
[In] value of the element to Insert In the lIst
p.·
[In] PosItIon In the lIst to Insert
Peturn VaIue
Ìf successful, It returns the Index of Inserted element, or ·1 In the case of error.
Note
Element Is not added to the lIst, If the parameter does not pass valId poInter (Ie NULL).
ExampIe:
//--- -x-mpL- r·n .HL-r..Pn--nr..Jo|-·r·,Lnr·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- Ln--nr !¨¨ -L-m-nr-
r·n.Lnr L=¨¡L<!¨¨¡L--·

Lr.LL-r.Pn--nr.n-. .Jo|-·r,¨·==-!·

pnLnrr.¨IL-m-nr Ln--nr -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
·
//--- u-- LL-r
//--- . . .
//--- J-L-r- LL-r
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1101
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1102
0etachCurrent
Extracts an element from the current posItIon wIthout Its ¨physIcal¨ deleteIon.
.Jo|-·r· ¯-r-·!.unn-nr.·
Peturn VaIue
PoInter to the removal of elements In case of success, NULL · If you can not remove the element.
Note
When removed from the lIst, the Item Is not removed In any state of the flag memory management.
PoInter to wIthdraw from the lIst of IngredIents of the release element after use.
ExampIe:
//--- -x-mpL- r·n .HL-r..¯-r-·!.unn-nr.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r -L-m-nr-
//--- . . .
.Jo|-·r ··o|-·r=LL-r.¯-r-·!.unn-nr.·¡
Lr.·o|-·r==HJHH·

pnLnrr.¨¯-r-·! -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
//--- J-L-r- -L-m-nr
J-L-r- ·o|-·r¡
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1103
0eIeteCurrent
Femoves the element from the current posItIon In the lIst.
o··L ¯-L-r-.unn-nr.·
Peturn VaIue
true If successful, false · If you can not remove the element.
Note
Ìf enabled memory management, memory, removes the element Is released.
ExampIe:
//--- -x-mpL- r·n .HL-r..¯-L-r-.unn-nr.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r -L-m-nr-
//--- . . .
Lr..LL-r.¯-L-r-.unn-nr.··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1104
0eIete
Femoves the element from the gIven posItIon In the lIst.
o··L ¯-L-r-.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] posItIon removes the element In the lIst.
Peturn VaIue
true If successful, false · If you can not remove the element.
Note
Ìf enabled memory management, memory, removes the element Is released.
ExampIe:
//--- -x-mpL- r·n .HL-r..¯-L-r-.Lnr·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r -L-m-nr-
//--- . . .
Lr..LL-r.¯-L-r-.¨··

pnLnrr.¨¯-L-r- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1105
CIear
Femoves all elements of the lIst.
v·LJ .L--n.·
Note
Ìf enabled memory management, memory, deleted Items are exempt.
ExampIe:
//--- -x-mpL- r·n .HL-r...L--n.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r -L-m-nr-
//--- . . .
//--- ·L--n LL-r
LL-r..L--n.·¡
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1106
IndexDf
Cets the Index of the lIst Item.
Lnr PnJ-xJr.
.Jo|-·r· alaman: // -·Lnr-n r· r!- -L-m-nr
·
Parameters
alaman:
[In] PoInter to the lIst Item.
Peturn VaIue
Ìndex Item In the lIst, or ·1.
ExampIe:
//--- -x-mpL- r·n .HL-r..PnJ-xJr..Jo|-·r··
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
.Jo|-·r ··o|-·r=n-. .Jo|-·r¡
Lr.·o|-·r==HJHH·

pnLnrr.¨IL-m-nr ·n--r- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
Lr.LL-r.AJJ.·o|-·r··

Lnr p·-=LL-r.PnJ-xJr.·o|-·r·¡
·
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1107
CetNodeAtIndex
Cets an Item wIth the specIfIed Index of the lIst.
.Jo|-·r· J-rH·J-ArPnJ-x.
Lnr p.· // p·-LrL·n
·
Parameters
p.·
[In] Item Index In the lIst.
Peturned vaIue
PoInter to the Item In case of success, NULL · If you can not get a poInter.
ExampIe:
//--- -x-mpL- r·n .HL-r..J-rH·J-ArPnJ-x.Lnr·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r -L-m-nr-
//--- . . .
.Jo|-·r ··o|-·r=LL-r.J-rH·J-ArPnJ-x.!¨·¡
Lr.·o|-·r==HJHH·

pnLnrr.¨J-r n·J- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
//--- J· n·r J-L-r- -L-m-nr
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1108
CetFIrstNode
Cets the fIrst element of the lIst.
.Jo|-·r· J-r¯Ln-rH·J-.·
Peturn VaIue
PoInter to the fIrst Item In case of success, NULL · If you can not get a poInter.
ExampIe:
//--- -x-mpL- r·n .HL-r..J-r¯Ln-rH·J-.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r -L-m-nr-
//--- . . .
.Jo|-·r ··o|-·r=LL-r.J-r¯Ln-rH·J-.·¡
Lr.·o|-·r==HJHH·

pnLnrr.¨J-r n·J- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
//--- J· n·r J-L-r- -L-m-nr
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1109
CetPrevNode
Cets the prevIous element of the lIst.
.Jo|-·r· J-r-n-vH·J-.·
Peturn VaIue
PoInter to the prevIous element, If successful, NULL · If you can not get a poInter.
ExampIe:
//--- -x-mpL- r·n .HL-r..J-r-n-vH·J-.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r -L-m-nr-
//--- . . .
.Jo|-·r ··o|-·r=LL-r.J-r-n-vH·J-.·¡
Lr.·o|-·r==HJHH·

pnLnrr.¨J-r n·J- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
//--- J· n·r J-L-r- -L-m-nr
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1110
CetCurrentNode
Cets the current lIst Item.
.Jo|-·r· J-r.unn-nrH·J-.·
Peturn VaIue
PoInter to the current Item, If successful, NULL · If you can not get a poInter.
ExampIe:
//--- -x-mpL- r·n .HL-r..J-r.unn-nrH·J-.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r -L-m-nr-
//--- . . .
.Jo|-·r ··o|-·r=LL-r.J-r.unn-nrH·J-.·¡
Lr.·o|-·r==HJHH·

pnLnrr.¨J-r n·J- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
//--- J· n·r J-L-r- -L-m-nr
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1111
CetNextNode
Cets the next Item In the lIst.
.Jo|-·r· J-rH-xrH·J-.·
Peturn VaIue
PoInter to the next Item If successful, NULL · If you can not get a poInter.
ExampIe:
//--- -x-mpL- r·n .HL-r..J-rH-xrH·J-.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r -L-m-nr-
//--- . . .
.Jo|-·r ··o|-·r=LL-r.J-rH-xrH·J-.·¡
Lr.·o|-·r==HJHH·

pnLnrr.¨J-r n·J- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
//--- J· n·r J-L-r- -L-m-nr
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1112
CetLastNode
Cets the last element of the lIst.
.Jo|-·r· J-rH--rH·J-.·
Peturn VaIue
PoInter to the last element In the case of success, NULL · If you can not get a poInter.
ExampIe:
//--- -x-mpL- r·n .HL-r..J-rH--rH·J-.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r -L-m-nr-
//--- . . .
.Jo|-·r ··o|-·r=LL-r.J-rH--rH·J-.·¡
Lr.·o|-·r==HJHH·

pnLnrr.¨J-r n·J- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- u-- -L-m-nr
//--- . . .
//--- J· n·r J-L-r- -L-m-nr
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1113
Sort
Sorts a lIst.
v·LJ ¯·nr.
Lnr m.ja // ¯·nrLnj m·J-
·
Parameters
m.ja
[In] SortIng mode.
Peturn VaIue
No.
Note
SortIng the lIst Is always In ascendIng order.
ExampIe:
//--- -x-mpL- r·n .HL-r..¯·nr.Lnr·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -·nrLnj oy m·J- ¨
LL-r.¯·nr.¨·¡
//--- u-- LL-r
//--- ...
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1114
hoveToIndex
|oves the current Item lIst to the specIfIed posItIon.
o··L M·v-r·PnJ-x.
Lnr p.· // -·-LrL·n
·
Parameters
p.·
[In] PosItIon In the lIst to move.
Peturn VaIue
true If successful, false · If you can not move the Item.
ExampIe:
//--- -x-mpL- r·n .HL-r..M·v-r·PnJ-x.Lnr·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- m·v- ·unn-nr n·J- r· o-jLn
LL-r.M·v-r·PnJ-x.¨·¡
//--- u-- LL-r
//--- . . .
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1115
Exchange
Changes elements of the lIst seats.
o··L Ix·!-nj-.
.Jo|-·r· n.ja., // HL-r Lr-m
.Jo|-·r· n.ja2 // HL-r Lr-m
·
Parameters
n.ja.
[In] LIst Item
n.ja2
[In] LIst Item
Peturn VaIue
true If successful, false · If you can not change the elements In some places.
ExampIe:
//--- -x-mpL- r·n .HL-r..Ix·!-nj-..Jo|-·r·,.Jo|-·r··
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -x·!-nj-
LL-r.Ix·!-nj-.LL-r.J-r¯Ln-rH·J-.·,LL-r.J-rH--rH·J-.··¡
//--- u-- LL-r
//--- . . .
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1116
CompareLIst
Compares the lIst wIth another lIst.
o··L .·mp-n-HL-r.
.HL-r· li·: // WLr! .!·m .- ··mp-n-
·
Parameters
li·:
[In] A poInter to an Instance of class CLIst·source elements for comparIson.
Peturn VaIue
true If the lIsts are equal, false · If not.
ExampIe:
//--- -x-mpL- r·n .HL-r...·mp-n-HL-r.··n-r .HL-r··
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·n--r- -·un·- LL-r
.HL-r ·-n·=n-. .HL-r¡
Lr.-n·==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- rLLL -·un·- LL-r
//--- . . .
//--- ··mp-n- .Lr! -n·r!-n LL-r
o··L n--uLr=LL-r..·mp-n-HL-r.-n··¡
//--- J-L-r- LL-r-
J-L-r- -n·¡
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1117
Search
Searches for an element equal to the model In the sorted lIst.
.Jo|-·r· ¯--n·!.
.Jo|-·r· alaman: // ¯-mpL-
·
Parameters
alaman:
[In] Sample cell to search for In the lIst.
Peturn VaIue
PoInter to the found Item If successful, NULL · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n .HL-r..¯--n·!..Jo|-·r··
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r- -L-m-nr-
//--- . . .
//--- -·nr LL-r
LL-r.¯·nr.¨·¡
//--- ·n--r- --mpL-
.Jo|-·r ·--mpL-=n-. .Jo|-·r¡
Lr.--mpL-==HJHH·

pnLnrr.¨¯-mpL- ·n--r- -nn·n¨·¡
J-L-r- LL-r¡
n-runn¡
·
//--- --r --mpL- -rrnLour--
//--- . . .
//--- ---n·! -L-m-nr
Lr.LL-r.¯--n·!.--mpL-·.=HJHH· pnLnrr.¨IL-m-nr r·unJ¨·¡
-L-- pnLnrr.¨IL-m-nr n·r r·unJ¨·¡
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1118
Save
Saves data In the fIle lIst.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the prevIously opened usIng the functIon FIleDpen (...) fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n .HL-r..¯-v-.Lnr·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- -JJ LL-r- -L-m-nr-
//--- . . .
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..LL-r.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- LL-r¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- J-L-r- LL-r
J-L-r- LL-r¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1119
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1120
Load
Loads lIst data from a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] Handle of the prevIously open, wIth the functIon FIleDpen (...), bInary
Peturn VaIue
true · If successfully completed, false · If an error.
Note
When readIng from the fIle lIst Items to create each element of the method Is called CLIst::
CreateElement ().
ExampIe:
//--- -x-mpL- r·n .H·-J..H·-J.Lnr·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r.=HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..LL-r.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
J-L-r- LL-r¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1121
//--- u-- LL-r -L-m-nr-
//--- . . .
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1122
Type
Cets the type IdentIfIer lIst.
vLnru-L Lnr ryp-.·
Peturn VaIue
Type IdentIfIer lIst (for CLIst · 7779).
ExampIe:
//--- -x-mpL- r·n .HL-r..ryp-.·
tLn·LuJ- <Ann-y-\HL-r.m¬!
//---
v·LJ Jn¯r-nr.·

.HL-r ·LL-r=n-. .HL-r¡
//---
Lr.LL-r==HJHH·

pnLnrr.¨Jo|-·r ·n--r- -nn·n¨·¡
n-runn¡
·
//--- j-r LL-r ryp-
Lnr ryp-=LL-r.ryp-.·¡
//--- J-L-r- LL-r
J-L-r- LL-r¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1123
CTreeNode
Class CTreeNode Is a class of node of the bInary tree CTree.
0escrIptIon
Class CTreeNode provIdes the abIlIty to work wIth nodes of the bInary tree CTree. DptIons of
navIgatIon through the tree Is Implemented In the class. 8esIdes that methods of work wIth a fIle are
Implemented.
0ecIaratIon
·L--- .rn--H·J- . puoLL· .Jo|-·r
Header
tLn·LuJ- ·Arrays\TreeNode.mqh·
CIass hethods by Croups
AttrIbutes
Dwner Cets/sets the poInter of the owner node
Left Cets/sets the poInter of the left node
FIght Cets/sets the poInter of the rIght node
8alance Cets the node balance
8alanceL Cets the balance of the left sub·branch of the
node
8alanceF Cets the balance of the rIght sub·branch of the
node
CreatIon of a new eIement
CreateSample Creates a new node Instance
ComparIson
Fefresh8alance Fecalculates the node balance
Search
CetNext Cets the poInter of the next node
InputlDutput
SaveNode Saves the node data to a fIle
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1124
LoadNode 0ownloads the node data from a fIle
vIrtual Type Cets the IdentIfIer of the node type
0erIved cIasses:
CTree
Trees of CTreeNode class descendants get practIcal applIcatIon.
A descendant of class CTreeNode must have predefIned methods: CreateSample that creates a new
Instance of the descendant class of CTreeNode, Compare that compares values of key fIelds of the
descendant class of CTreeNode, Type (If It's necessary to IdentIfy a node), SaveNode and LoadNode (If
It's necessary to work wIth a fIle).
Let's consIder and example of a CTree descendant class.
//--------------------------------------------------------------------
// Myrn--H·J-.m¬¯
// .·pynLj!r `¨!¨, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m-r-¬u·r--.n-r/
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨!¨, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
//---
tLn·LuJ- <Ann-y-\rn--H·J-.m¬!
//--------------------------------------------------------------------
// ¯--·nLo- ·L---J-nLv-J rn·m .rn--H·J-.
//--------------------------------------------------------------------
// .L--- .Myrn--H·J-.
// -unp·--. .L--- ·r -L-m-nr ·r - oLn-ny rn--.
// ¯--·-nJ-nr ·r ·L--- .rn--H·J-.
//--------------------------------------------------------------------
·L--- .Myrn--H·J- . puoLL· .rn--H·J-

pn·r-·r-J.
//--- u--n'- J-r-
L·nj m_L·nj¡ // k-y rL-LJ ·r ryp- L·nj
J·uoL- m_J·uoL-¡ // ·u-r·m v-nL-oL- ·r ryp- J·uoL-
-rnLnj m_-rnLnj¡ // ·u-r·m v-nL-oL- ·r ryp- -rnLnj
J-r-rLm- m_J-r-rLm-¡ // ·u-r·m v-nL-oL- ·r ryp- J-r-rLm-
puoLL·.
.Myrn--H·J-.·¡
//--- m-r!·J- ·r -··---Lnj r!--- u--n'- J-r-
L·nj J-rH·nj.v·LJ· n-runn.m_L·nj·¡ ·
v·LJ ¯-rH·nj.L·nj v-Lu-· m_L·nj=v-Lu-¡ ·
J·uoL- J-r¯·uoL-.v·LJ· n-runn.m_J·uoL-·¡ ·
v·LJ ¯-r¯·uoL-.J·uoL- v-Lu-· m_J·uoL-=v-Lu-¡ ·
-rnLnj J-r¯rnLnj.v·LJ· n-runn.m_-rnLnj·¡ ·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1125
v·LJ ¯-r¯rnLnj.-rnLnj v-Lu-· m_-rnLnj=v-Lu-¡ ·
J-r-rLm- J-r¯-r-rLm-.v·LJ· n-runn.m_J-r-rLm-·¡ ·
v·LJ ¯-r¯-r-rLm-.J-r-rLm- v-Lu-· m_J-r-rLm-=v-Lu-¡ ·
//--- m-r!·J- ·r .·nkLnj .Lr! rLL--
vLnru-L o··L ¯-v-.Lnr rLL-_!-nJL-·¡
vLnru-L o··L H·-J.Lnr rLL-_!-nJL-·¡
pn·r-·r-J.
vLnru-L Lnr .·mp-n-.··n-r .Jo|-·r ·n·J-,Lnr m·J-·¡
//--- m-r!·J- ·r ·n--rLnj ·L--- Ln-r-n·--
vLnru-L .rn--H·J-· .n--r-¯-mpL-.·¡
·¡
//--------------------------------------------------------------------
// .Myrn--H·J- ·L--- ··n-rnu·r·n.
// PH-Jr. n·n-.
// JJr-Jr. n·n-.
// -IMA-·. n·n-.
//--------------------------------------------------------------------
v·LJ .Myrn--H·J-...Myrn--H·J-.·

//--- LnLrL-LLz-rL·n ·r u--n'- J-r-
m_L·nj =¨¡
m_J·uoL- =¨.¨¡
m_-rnLnj =¨¨¡
m_J-r-rLm- =¨¡
·
//--------------------------------------------------------------------
// .·mp-nL-·n .Lr! -n·r!-n r!n-- n·J- oy r!- -p-·LrL-J -Lj·nLr!m.
// PH-Jr. n·J- - -nn-y -L-m-nr r· ··mp-n-,
// m·J- - LJ-nrLrL-n ·r ··mp-nL-·n -Lj·nLr!m.
// JJr-Jr. n--uLr ·r ··mp-nL-·n .¨,¨,<¨·.
// -IMA-·. n·n-.
//--------------------------------------------------------------------
Lnr .Myrn--H·J-...·mp-n-.··n-r .Jo|-·r ·n·J-,Lnr m·J-·

//--- p-n-m-r-n m·J- L- Ljn·n-J, o-·-u-- rn-- ··n-rnu·rL·n -Lj·nLr!m L- r!- ·nLy ·n-
Lnr n--=¨¡
//--- -xpLL·Lr ryp- ·--rLnj
.Myrn--H·J- ·n=n·J-¡
n--=.Lnr·.m_L·nj-n.m_L·nj·¡
//---
n-runn.n--·¡
·
//--------------------------------------------------------------------
// .n--rL·n ·r - n-. ·L--- Ln-r-n·-.
// PH-Jr. n·n-.
// JJr-Jr. p·Lnr-n r· - n-. Ln-r-n·- ·r ·L--- .Myrn--H·J-.
// -IMA-·. n·n-.
//--------------------------------------------------------------------
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1126
.rn--H·J-· .Myrn--H·J-...n--r-¯-mpL-.·

.Myrn--H·J- ·n--uLr=n-. .Myrn--H·J-¡
//---
n-runn.n--uLr·¡
·
//--------------------------------------------------------------------
// WnLr- rn-- n·J- J-r- r· - rLL-.
// PH-Jr. rLL-_!-nJL- -!-nJL- ·r - rLL- pn--·p-n-J r·n .nLrLnj.
// JJr-Jr. rnu- Lr J·, ·r!-n.L-- r-L--.
// -IMA-·. n·n-.
//--------------------------------------------------------------------
o··L .Myrn--H·J-..¯-v-.Lnr rLL-_!-nJL-·

uLnr L=¨,L-n¡
//--- ·!-·k-
Lr.rLL-_!-nJL-<¨· n-runn.r-L--·¡
//--- .nLrLnj u--n J-r-
//--- .nLrLnj ·u-r·m v-nL-oL- ·r ryp- L·nj
Lr.¯LL-WnLr-H·nj.rLL-_!-nJL-,m_L·nj·.=-Lz-·r.L·nj·· n-runn.r-L--·¡
//--- .nLrLnj ·u-r·m v-nL-oL- ·r ryp- J·uoL-
Lr.¯LL-WnLr-¯·uoL-.rLL-_!-nJL-,m_J·uoL-·.=-Lz-·r.J·uoL-·· n-runn.r-L--·¡
//--- .nLrLnj ·u-r·m v-nL-oL- ·r ryp- -rnLnj
L-n=¯rnLnjH-n.m_-rnLnj·¡
//--- .nLr- -rnLnj L-njr!
Lr.¯LL-WnLr-Pnr-j-n.rLL-_!-nJL-,L-n,PHr_VAHJI·.=PHr_VAHJI· n-runn.r-L--·¡
//--- .nLr- r!- -rnLnj
Lr.L-n.=¨ ss ¯LL-WnLr-¯rnLnj.rLL-_!-nJL-,m_-rnLnj,L-n·.=L-n· n-runn.r-L--·¡
//--- .nLrLnj ·u-r·m v-nL-oL- ·r ryp- J-r-rLm-
Lr.¯LL-WnLr-H·nj.rLL-_!-nJL-,m_J-r-rLm-·.=-Lz-·r.L·nj·· n-runn.r-L--·¡
//---
n-runn.rnu-·¡
·
//--------------------------------------------------------------------
// ---J rn-- n·J- J-r- rn·m - rLL-.
// PH-Jr. rLL-_!-nJL- -!-nJL- ·r - rLL- pn--·p-n-J r·n n--JLnj.
// JJr-Jr. rnu- Lr J·, ·r!-n.L-- r-L--.
// -IMA-·. n·n-.
//--------------------------------------------------------------------
o··L .Myrn--H·J-..H·-J.Lnr rLL-_!-nJL-·

uLnr L=¨,L-n¡
//--- ·!-·k-
Lr.rLL-_!-nJL-<¨· n-runn.r-L--·¡
//--- n--JLnj
Lr.¯LL-P-InJLnj.rLL-_!-nJL-·· n-runn.r-L--·¡
//--- n--JLnj ·u-r·m v-nL-oL- ·r ryp- ·!-n
//--- n--JLnj ·u-r·m v-nL-oL- ·r ryp- L·nj
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1127
m_L·nj=¯LL----JH·nj.rLL-_!-nJL-·¡
//--- n--JLnj ·u-r·m v-nL-oL- ·r ryp- J·uoL-
m_J·uoL-=¯LL----J¯·uoL-.rLL-_!-nJL-·¡
//--- n--JLnj ·u-r·m v-nL-oL- ·r ryp- -rnLnj
//--- n--J r!- -rnLnj L-njr!
L-n=¯LL----JPnr-j-n.rLL-_!-nJL-,PHr_VAHJI·¡
//--- n--J r!- -rnLnj
Lr.L-n.=¨· m_-rnLnj=¯LL----J¯rnLnj.rLL-_!-nJL-,L-n·¡
-L-- m_-rnLnj=¨¨¡
//--- n--JLnj ·u-r·m v-nL-oL- ·r ryp- J-r-rLm-
m_J-r-rLm-=¯LL----JH·nj.rLL-_!-nJL-·¡
//---
n-runn.rnu-·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1128
Dwner
Cets the poInter of the owner node.
.rn--H·J-· J.n-n.·
Peturn VaIue
PoInter of the node·owner.
Dwner
Sets the poInter of the owner node.
v·LJ J.n-n.
.rn--H·J-· n.ja // n·J-
·
Parameters
n.ja
[In] New value of the poInter of the owner node.
Peturn VaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1129
Left
Cets the poInter of the left node.
.rn--H·J-· H-rr.·
Peturn VaIue
PoInter of the left node.
Left
Sets the poInter of the left node.
v·LJ H-rr.
.rn--H·J-· n.ja // n·J-
·
Parameters
n.ja
[In] New value of the poInter of the left node.
Peturn VaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1130
PIght
Cets the poInter of the rIght node.
.rn--H·J-· -Lj!r.·
Peturn VaIue
The poInter of the rIght node.
PIght
Sets the poInter of the rIght node.
v·LJ -Lj!r.
.rn--H·J-· n.ja // n·J-
·
Parameters
n.ja
[In] New value of the poInter of the rIght node.
Peturn VaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1131
ßaIance
Cets the node balance.
Lnr Ð-L-n·-.· ··n-r
Peturn VaIue
Node balance.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1132
ßaIanceL
Cets the balance of the left sub·branch of the node.
Lnr Ð-L-n·-H.· ··n-r
Peturn VaIue
8alance of the left sub·branch of the node.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1133
ßaIanceP
Cets the balance of the rIght sub·branch of the node.
Lnr Ð-L-n·--.· ··n-r
Peturn VaIue
8alance of the rIght sub·branch of the node.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1134
CreateSampIe
Creates a new node sample.
vLnru-L .rn--H·J-· .n--r-¯-mpL-.·
Peturn VaIue
PoInter to the new node sample or NULL.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1135
PefreshßaIance
Fecalculates the node balance.
Lnr --rn--!Ð-L-n·-.·
Peturn VaIue
Node balance.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1136
CetNext
Cets the poInter of the next node.
.rn--H·J-· J-rH-xr.
.rn--H·J-· n.ja // n·J-
·
Parameters
n.ja
[In] Node of the search start.
Peturn VaIue
PoInter of the next node.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1137
SaveNode
WrItes node data to a fIle.
o··L ¯-v-H·J-.
Lnr fila_n-njla // !-nJL-
·
Parameters
fila_n-njla
[In] Handle of a bInary fIle that was earlIer opened for wrItIng.
Peturn VaIue
true In case of success, otherwIse false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1138
LoadNode
Feads node data from a fIle.
o··L H·-JH·J-.
Lnr fila_n-njla, // !-nJL-
.rn--H·J-· m-in // n·J-
·
Parameters
fila_n-njla
[In] Handle of a bInary fIle that was earlIer opened for readIng.
m-in
[In] Node for data.
Peturn VaIue
true In case of success, otherwIse false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1139
Type
Cets the IdentIfIer of the node type.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
ÌdentIfIer of the node type.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1140
CTree
Class CTree Is a class of the bInary tree of samples of class CTreeNode and Its descendants.
0escrIptIon
Class CTree prIvIdes the possIbIlIty to work wIth a bInary tree of CTreeNode class samples and Its
descendants. DptIons of addIng/InsertIng/deletIng of three elements and search In a tree are
Implemented In the class. 8esIdes that, methods of work wIth a fIle are Implemented.
Note that mechanIsm of dynamIc memory management Is not Implemented In class CTree (as dIstInct
from classes CLIst and CArrayDbj). All tree nodes are deleted wIth memory release.
0ecIaratIon
·L--- .rn-- . puoLL· .rn--H·J-
Header
tLn·LuJ- ·Arrays\Tree.mqh·
CIass hethods by Croups
AttrIbutes
Foot Cets a root node of the tree
CreatIon of a new eIement
CreateElement Creates a new node Instance
FIIIIng
Ìnsert Adds a node to a tree
0eIetIon
0etach 0etaches a specIfIed node from a tree
0elete 0eletes a specIfIed node from a tree
Clear 0eletes all nodes of a tree
Search
FInd Searches for a node In a tree by sample
Inputloutput
vIrtual Save Saves all the tree data to a fIle
vIrtual Load 0ownloads tree data from a fIle
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1141
vIrtual Type Cets IdentIfIer of the tree type
Trees of CTreeNode class descendants - descendants of class CTree get practIcal applIcatIon.
0escendant of class CTree must have a predefIned method CreateElement that creates a new sample
of descendant class CTreeNode.
Let's consIder an example of descendant class CTree.
//--------------------------------------------------------------------
// Myrn--.m¬¯
// .·pynLj!r `¨!¨, M-r-,u·r-- ¯·rr.-n- .·np.
// !rrp.//....m-r-¬u·r--.n-r/
//--------------------------------------------------------------------
tpn·p-nry ··pynLj!r ¨`¨!¨, M-r-,u·r-- ¯·rr.-n- .·np.¨
tpn·p-nry LLnk ¨!rrp.//....m¬L¯.··m¨
//---
tLn·LuJ- <Ann-y-\rn--.m¬!
tLn·LuJ- ¨Myrn--H·J-.m¬!¨
//---
Lnpur Lnr -xr.·unr-JH·J-- = !¨¨¡
//--------------------------------------------------------------------
// ¯--·nLo- ·L--- .Myrn-- J-nLv-J rn·m .rn--.
//--------------------------------------------------------------------
// .L--- .Myrn--.
// -unp·--. .·n-rnu·rL·n -nJ n-vLj-rL·n ·r - oLn-ny ---n·! rn--.
//--------------------------------------------------------------------
·L--- .Myrn-- . puoLL· .rn--

puoLL·.
//--- m-r!·J- ·r ---n·! ·n r!- rn-- oy ·u-r·m J-r-
.Myrn--H·J-· ¯LnJÐyH·nj.L·nj rLnJ_L·nj·¡
//--- m-r!·J ·r ·n--rL·n ·r r!- rn-- -L-m-nr
vLnru-L .rn--H·J- ·.n--r-IL-m-nr.·¡
·¡
//---
.Myrn-- Myrn--¡
//--------------------------------------------------------------------
// .n--rL·n ·r - n-. rn-- n·J-.
// PH-Jr. n·n-.
// JJr-Jr. p·Lnr-n r· r!- n-. rn-- n·J- ·r J·, ·n HJHH.
// -IMA-·. n·n-.
//--------------------------------------------------------------------
.rn--H·J- ·.Myrn--...n--r-IL-m-nr.·

.Myrn--H·J- ·n·J-=n-. .Myrn--H·J-¡
//---
n-runn.n·J-·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1142
//--------------------------------------------------------------------
// ¯--n·! ·r -L-m-nr Ln - LL-r oy v-Lu- m_L·nj.
// PH-Jr. rLnJ_L·nj - ---n·!-J v-Lu-.
// JJr-Jr. p·Lnr-n ·r - r·unJ LL-r -L-m-nr, ·n HJHH.
// -IMA-·. n·n-.
//--------------------------------------------------------------------
.Myrn--H·J-· .Myrn--..¯LnJÐyH·nj.L·nj rLnJ_L·nj·

.Myrn--H·J- ·n--=HJHH¡
.Myrn--H·J- ·n·J-¡
//--- ·n--r- - rn-- n·J- r· p--- r!- ---n·! p-n-m-r-n
n·J-=n-. .Myrn--H·J-¡
Lr.n·J-==HJHH· n-runn.HJHH·¡
n·J-.¯-rH·nj.rLnJ_L·nj·¡
//---
n--=¯LnJ.n·J-·¡
J-L-r- n·J-¡
//---
n-runn.n--·¡
·
//--------------------------------------------------------------------
// -·nLpr ¨r--rLnj ·r ·L--- .Myrn--¨
//--------------------------------------------------------------------
//--- -nn-y r·n -rnLnj LnLrL-LLz-rL·n
-rnLnj -rn_-nn-y¯!!`=¨p¨,¨··¨,¨LLL¨,¨uuuu¨,¨yyyyy¨,¨rrrrr¨,¨nnnn¨,¨---¨,¨..¨,¨¬¨,¨---¨·¡
//---
Lnr Jn¯r-nr.· -xp·nr

Lnr L¡
uLnr p·-¡
Lnr o-j_rLm-,-nJ_rLm-¡
.Myrn--H·J- ·n·J-¡ //--- r-mp·n-ny p·Lnr-n r· r!- --mpL- ·r ·L--- .Myrn--H·J-
//---
pnLnrr.¨¯r-nr r--r `-.¨,__¯PHI__·¡
//--- ¯LLL ·ur Myrn-- .Lr! --mpL-- ·r ·L--- Myrn--H·J- Ln r!- -m·unr ·r -xr.·unr-JH·J--.
o-j_rLm-=J-rrL·k.·unr.·¡
r·n.L=¨¡L<-xr.·unr-JH·J--¡L--·

n·J-=Myrn--..n--r-IL-m-nr.·¡
Lr.n·J-==HJHH·

//--- -m-nj-n·y -xLr
pnLnrr.¨`- .`1J·. ·n--r- -nn·n¨,__¯PHI__,__HPHI__·¡
n-runn.__HPHI__·¡
·
H·J-¯-r¯-r-.n·J-,L·¡
n·J-.¯-rH·nj.L·¡
Myrn--.Pn--nr.n·J-·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1143
·
-nJ_rLm-=J-rrL·k.·unr.·¡
pnLnrr.¨¯LLLLnj rLm- ·r Myrn-- L- `J m-.¨,-nJ_rLm--o-j_rLm-·¡
//--- .n--r- - r-mp·n-ny rn-- rmpMyrn--.
.Myrn-- rmpMyrn--¡
//--- ¯-r-·! ¯¨` ·r rn-- -L-m-nr- .-LL -v-n·
//--- -nJ -JJ r!-m r· r!- r-mp·n-ny rn-- rmpMyrn--.
o-j_rLm-=J-rrL·k.·unr.·¡
r·n.L=¨¡L<-xr.·unr-JH·J--¡L-=`·

n·J-=Myrn--.¯LnJÐyH·nj.L·¡
Lr.n·J-.=HJHH·
Lr.Myrn--.¯-r-·!.n·J-·· rmpMyrn--.Pn--nr.n·J-·¡
·
-nJ_rLm-=J-rrL·k.·unr.·¡
pnLnrr.¨¯-L-rL·n rLm- ·r `J -L-m-nr- rn·m Myrn-- L- `J m-.¨,-xr.·unr-JH·J--/`,-nJ_rLm--o-j_rLm-·¡
//--- --runn r!- J-r-·!-J
n·J-=rmpMyrn--.-··r.·¡
.!LL-.n·J-.=HJHH·

Lr.rmpMyrn--.¯-r-·!.n·J-·· Myrn--.Pn--nr.n·J-·¡
n·J-=rmpMyrn--.-··r.·¡
·
//--- .!-·k .·nk ·r m-r!·J ¯-v-.Lnr rLL-_!-nJL-·¡
Lnr rLL-_!-nJL-¡
rLL-_!-nJL-=¯LL-Jp-n.¨Myrn--.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..Myrn--.¯-v-.rLL-_!-nJL-··

//--- -nn·n .nLrLnj r· - rLL-
//--- -m-nj-n·y -xLr
pnLnrr.¨`-. Inn·n `J Ln `J.¨,__¯PHI__,J-rH--rInn·n.·,__HPHI__·¡
//--- ·L·-- rLL- o-r·n- L--vLnj...
¯LL-.L·--.rLL-_!-nJL-·¡
n-runn.__HPHI__·¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- .!-·k .·nk ·r m-r!·J H·-J.Lnr rLL-_!-nJL-·¡
rLL-_!-nJL-=¯LL-Jp-n.¨Myrn--.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..rmpMyrn--.H·-J.rLL-_!-nJL-··

//--- -nn·n n--JLnj rn·m rLL-
//--- -m-nj-n·y -xLr
pnLnrr.¨`-. Inn·n `J Ln `J.¨,__¯PHI__,J-rH--rInn·n.·,__HPHI__·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1144
//--- ·L·-- rLL- o-r·n- L--vLnj...
¯LL-.L·--.rLL-_!-nJL-·¡
n-runn.__HPHI__·¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//---
Myrn--..L--n.·¡
rmpMyrn--..L--n.·¡
//---
pnLnrr.¨InJ r--r `-. J·.¨,__¯PHI__·¡
//---
n-runn.¨·¡
·
//--------------------------------------------------------------------
// ¯un·rL·n ·r ·urpur ·r n·J- ··nr-nr- r· |·unn-L
//--------------------------------------------------------------------
v·LJ H·J-r·H·j..Myrn--H·J- ·n·J-·

pnLnrr.¨ `P¯1J,`r,'`-','`-'¨,
n·J-.J-rH·nj.·,n·J-.J-r¯·uoL-.·,
n·J-.J-r¯rnLnj.·,rLm-r·¯rnLnj.n·J-.J-r¯-r-rLm-.···¡
·
//--------------------------------------------------------------------
// ¯un·rL·n ·r ¨rLLLLnj¨ ·r n·J- .Lr! n-nJ·m v-Lu--
//--------------------------------------------------------------------
v·LJ H·J-¯-r¯-r-..Myrn--H·J- ·n·J-,Lnr m·J-·

Lr.m·J-``==¨·

n·J-.¯-rH·nj.m·J-·M-r!--nJ.··¡
n·J-.¯-r¯·uoL-.M-r!-·..`.¨`,m·J-··M-r!--nJ.··¡
·
-L--

n·J-.¯-rH·nj.m·J-·.L·nj·.-!··M-r!--nJ.··¡
n·J-.¯-r¯·uoL-.-M-r!-·..`.¨`,m·J-··M-r!--nJ.··¡
·
n·J-.¯-r¯rnLnj.-rn_-nn-y¯m·J-`!¨`·¡
n·J-.¯-r¯-r-rLm-.!¨¨¨¨·m·J-·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1145
Poot
Cets the root node of the tree.
.rn--H·J-· -··r.· ··n-r
Peturn VaIue
PoInter of the root node of the tree.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1146
CreateEIement
Creates a new Instance of the node.
vLnru-L .rn--H·J-· .n--r-IL-m-nr.·
Peturn VaIue
PoInter of the new Instance of the node or NULL.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1147
Insert
Adds a node to a tree.
.rn--H·J-· Pn--nr.
.rn--H·J-· nav_n.ja // n·J-
·
Parameters
nav_n.ja
[In] poInter of a node to Insert to a tree.
Peturn VaIue
PoInter of the owner node or NULL.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1148
0etach
0etaches a specIfIed node from a tree.
o··L ¯-r-·!.
.rn--H·J-· n.ja // n·J-
·
Parameters
n.ja
[In] Node poInter to detach.
Peturn VaIue
true In case of success, otherwIse false.
Note
After detachment the node poInter Is not released. The tree Is balanced.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1149
0eIete
0eletes a specIfIed node from a tree.
o··L ¯-L-r-.
.rn--H·J-· n.ja // n·J-
·
Parameters
n.ja
[In] Node poInter to delete.
Peturn VaIue
true In case of success, otherwIse false.
Note
After deletIon a node poInter Is released. The tree Is balanced.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1150
CIear
0eletes all nodes of a tree.
v·LJ .L--n.·
Peturn VaIue
None.
Note
After deletIon node poInters are released.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1151
FInd
Searches for a node In a tree by sample.
.rn--H·J-· ¯LnJ.
.rn--H·J-· n.ja // n·J-
·
Parameters
n.ja
[In] Node that contaIns data·search sample.
Peturn VaIue
PoInter of the found node or NULL.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1152
Save
WrItes tree data to a fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // !-nJL-
·
Parameters
fila_n-njla
[In] Handle of a bInary fIle that was earlIer opened for wrItIng.
Peturn VaIue
true In case of success, otherwIse false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1153
Load
Feads tree data to a fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // !-nJL-
·
Parameters
fila_n-njla
[In] Handle of a bInary fIle that was earlIer opened for readIng.
Peturn VaIue
true In case of success, otherwIse false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1154
Type
Cets IdentIfIer of the tree type.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
ÌdentIfIer of the tree type.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1155
CraphIc Dbjects
ThIs sectIon contaIns the technIcal detaIls of workIng wIth classes of graphIcal objects and a
descrIptIon of the relevant components of the |0L5 Standard LIbrary .
The use of classes of graphIcal objects, wIll save tIme when creatIng custom programs (scrIpts,
expert).
|0L5 Standard LIbrary (In terms of graphIcal objects) Is placed In the workIng dIrectory of the
termInal In the Ìnclude\ChartDbjects folder.
CIasslCroup 0escrIptIon
8ase class for graphIcal object CChartDbject 8ase class of a graphIc object
LInes Croup classes ¨LInes¨
Channels Croup classes ¨Channels¨
Cann Tools Croup classes ¨Cann¨
FIbonaccI Tools Croup classes ¨FIbonaccI¨
EllIott Tools Croup classes ¨EllIott¨
Shapes Croup classes ¨Shapes¨
Arrows Croup classes ¨Arrows¨
Controls Croup classes ¨Controls¨
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1156
CChartDbject
CChartDbject Is a base class of graphIc objects of chart type of the Standard |0L5 lIbrary.
0escrIptIon
Class CChartDbject provIdes the sImplIfIed access for all of Its descendants to |0L5 APÌ functIons.
0ecIaratIon
·L--- ..!-nrJo|-·r . puoLL· .Jo|-·r
TItIe
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
CIass hethods
AttrIbutes
ChartÌd Cets the Ì0 chart, who owns a graphIc
WIndow Cets the number of wIndows In whIch the chart
Is a graphIc
Name Cets/sets the name of a graphIc object
NumPoInts Cets the number of anchor poInts
AssIgn
Attach 8Inds a graphIc chart
SetPoInt Sets the anchor poInt
0eIete
0elete 0eletes a graphIc chart
0etach UntIe a graphIc chart
ShIft
ShIftDbject The relatIve movement of the object
ShIftPoInt The relatIve movement of the object poInt
Dbject propertIes
TIme Cets/sets the tIme coordInates of the object
poInt
PrIce Cets/sets the prIce coordInate of a poInt object
Color Cets/sets the color of the object
Style Cets/sets the lIne style object
WIdth Cets/sets the wIdth of the lIne object
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1157
8ackCround Cets/sets the flag drawIng object background
Selected Cets/sets the flag sIt on an object
Selectable Cets/sets the flag selectable object
0escrIptIon Cets/sets the text of the object
TImeframes Cets/sets the mask of flags vIsIbIlIty of the
object
CreateTIme Cets the tIme object creatIon
LeveIs propertIes of the object
LevelsCount Cets/sets the number of levels of object
LevelColor Cets/sets the color of the lIne level
LevelStyle Cets/sets the lIne style level
LevelWIdth Cets/sets the wIdth of the lIne level
Level7alue Cets/sets the level
Level0escrIptIon Cets/sets the text level
Access to hDL5 API functIons
CetÌnteger Cets the value of the object propertIes
SetÌnteger Sets the object propertIes
Cet0ouble Cets the value of the object propertIes
Set0ouble Sets the object propertIes
CetStrIng Cets the value of the object propertIes
SetStrIng Sets the object propertIes
InputlDutput
vIrtual Save 7Irtual method entry In the fIle
vIrtual Load 7Irtual method of readIng from a fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
0erIved cIasses:
CChartDbjectArrow
CChartDbject8Itmap
CChartDbject8mpLabel
CChartDbjectCycles
CChartDbjectEllIottWaveJ
CChartDbjectEllIpse
CChartDbjectFIboArc
CChartDbjectFIboFan
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1158
CChartDbjectFIboTImes
CChartDbjectHLIne
CChartDbjectFectangle
CChartDbjectSubChart
CChartDbjectText
CChartDbjectTrend
CChartDbjectTrIangle
CChartDbject7LIne
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1159
ChartId
Cets the Ì0 chart, who owns a graphIc object.
L·nj .!-nrPJ.· ··n-r
Peturn VaIue
Ìd chart on whIch the graphIc object. Ìf object not found, It returns ·1.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r...!-nrPJ
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r ·!-nr LJLnrLrL-n ·r ·!-nr ·o|-·r
L·nj ·!-rn_LJ=·o|-·r..!-nrPJ.·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1160
WIndow
Cets the number of wIndows In whIch the chart Is a graphIc object.
Lnr WLnJ·..· ··n-r
Peturn VaIue
Number of wIndows In whIch the chart Is a graphIc object (0 · maIn wIndow). Ìf object not found, It
returns ·1.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..WLnJ·.
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r .LnJ·. ·r ·!-nr ·o|-·r
Lnr .LnJ·.=·o|-·r.WLnJ·..·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1161
Name (Cet hethod)
Cets the name of the graphIc object.
-rnLnj H-m-.· ··n-r
Peturn VaIue
Name of the graphIc object tIed to an Instance of the class. Ìf object not found, returns NULL.
Name (Set hethod)
Sets the name of the graphIc object.
o··L H-m-.
-rnLnj n-ma // n-. n-m-
·
Parameters
n-ma
[In] The new name of the graphIc object.
Peturn VaIue
true If successful, false · If you can not change the name.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..H-m-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r n-m- ·r ·!-nr ·o|-·r
-rnLnj ·o|-·r_n-m-=·o|-·r.H-m-.·¡
Lr.·o|-·r_n-m-.=¨My.!-nrJo|-·r¨·

//--- --r n-m- ·r ·!-nr ·o|-·r
·o|-·r.H-m-.¨My.!-nrJo|-·r¨·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1162
NumPoInts
Cets the number of anchor poInts of a graphIc object.
Lnr Hum-·Lnr-.· ··n-r
Peturn VaIue
Number of poInts lInkIng a graphIc object that Is bound to an Instance of the class. Ìf not bound
object, It returns 0.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..Hum-·Lnr-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r p·Lnr- ··unr ·r ·!-nr ·o|-·r
Lnr p·Lnr-=·o|-·r.Hum-·Lnr-.·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1163
Attach
8Inds a graphIcal object to an Instance of the class.
o··L Arr-·!.
L·nj ·n-r:_ij, // .!-nr P¯
-rnLnj n-ma, // H-m- ·r r!- ·o|-·r
Lnr vinj.v, // .!-nr .LnJ·.
Lnr p.in:· // Humo-n ·r p·Lnr-
·
Parameters
·n-r:_ij
[out] Chart IdentIfIer.
n-ma
[In] Name of the graphIc object.
vinj.v
[In] Chart wIndow number (0 - maIn wIndow).
p.in:·
[In] Number of poInts anchor graphIc object.
Peturn VaIue
true · If successful, false · If you can not bInd object.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..Arr-·!
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- -rr-·! ·!-nr ·o|-·r
Lr..·o|-·r.Arr-·!..!-nrP¯.·,¨MyJo|-·r¨,¨,`··

pnLnrr.¨Jo|-·r -rr-·! -nn·n¨·¡
n-runn¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1164
SetPoInt
Sets the new coordInates of thIs anchor poInt graphIc object.
o··L ¯-r-·Lnr.
Lnr p.in:, // -·Lnr numo-n
J-r-rLm- nav_:ima, // rLm- ···nJLn-r-
J·uoL- nav_pri·a // -nL·- ···nJLn-r-
·
Parameters
p.in:
[In] Number anchor poInt graphIc object.
nav_:ima
[In] The new value of the coordInates of thIs poInt of tIme bIndIngs.
nav_pri·a
[In] New value coordInates of the prIce specIfIed anchor poInt.
Peturn VaIue
true · If successful, false · If you can not change the coordInates of the poInt.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯-r-·Lnr
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
J·uoL- pnL·-¡
//---
Lr.·o|-·r.Hum-·Lnr-.·¨·

//--- --r p·Lnr ·r ·!-nr ·o|-·r
·o|-·r.¯-r-·Lnr.¨,.unnrLm-.·,pnL·-·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1165
0eIete
Femoves a graphIcal object wIth the attached chart.
o··L ¯-L-r-.·
Peturn VaIue
true · If successful, false · If you can not remove the object.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯-L-r-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- J-r-·! ·!-nr ·o|-·r
Lr..·o|-·r.¯-L-r-.··

pnLnrr.¨Jo|-·r J-L-r- -nn·n¨·¡
n-runn¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1166
0etach
UntIe graphIc object.
o··L ¯-r-·!.·
Peturn VaIue
true · If successful, false · If you can not decouple the object.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯-r-·!
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- J-r-·! ·!-nr ·o|-·r
Lr..·o|-·r.¯-r-·!.··

pnLnrr.¨Jo|-·r J-r-·! -nn·n¨·¡
n-runn¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1167
ShIftDbject
|oves a graphIc object.
o··L ¯!LrrJo|-·r.
J-r-rLm- j_:ima, // Pn·n-m-nr ·r rLm- ···nJLn-r-
J·uoL- j_pri·a // Pn·n-m-nr ·r pnL·- ···nJLn-r-
·
Parameters
j_:ima
[In] Ìncrement the coordInates of all poInts of tIme bIndIngs
j_pri·a
[In] Ìncrement the coordInates of the prIces of all waypoInts.
Peturn VaIue
true · If successful, false · If you can not move the object.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯!LrrJo|-·r
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
J-r-rLm- J_rLm-¡
J·uoL- J_pnL·-¡
//--- -!Lrr ·!-nr ·o|-·r
·o|-·r.¯!LrrJo|-·r.J_rLm-,J_pnL·-·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1168
ShIftPoInt
|oves a specIfIed poInt anchor graphIc.
o··L ¯!Lrr-·Lnr.
Lnr p.in:, // -·Lnr numo-n
J-r-rLm- j_:ima, // Pn·n-m-nr ·r rLm- ···nJLn-r-
J·uoL- j_pri·a // Pn·n-m-nr ·r pnL·- ···nJLn-r-
·
Parameters
p.in:
[In] Number anchor poInt graphIc object.
j_:ima
[In] Ìncrement the coordInates of tIme specIfIed anchor poInt.
j_pri·a
[In] Ìncrement the coordInates of the prIce specIfIed anchor poInt.
Peturn VaIue
true · If successful, false · If you can not move the poInt.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯!Lrr-·Lnr
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
J-r-rLm- J_rLm-¡
J·uoL- J_pnL·-¡
//---
Lr.·o|-·r.Hum-·Lnr-.·¨·

//--- -!Lrr p·Lnr ·r ·!-nr ·o|-·r
·o|-·r.¯!Lrr-·Lnr.¨,J_rLm-,J_pnL·-·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1169
TIme (Cet hethod)
The coordInates of tIme specIfIed anchor poInt graphIc object.
J-r-rLm- rLm-.
Lnr p.in: // -·Lnr numo-n
· ··n-r
Parameters
p.in:
[In] Number anchor poInt graphIc object.
Peturn VaIue
CoordInates of tIme specIfIed anchor poInt graphIc object that Is bound to an Instance of the class.
Ìf not bound object or the object Is not thIs poInt, It returns 0.
TIme (Set hethod)
Sets the coordInate of tIme specIfIed anchor poInt graphIc object.
o··L rLm-.
Lnr p.in:, // -·Lnr numo-n
J-r-rLm- nav_:ima // rLm-
·
Parameters
p.in:
[In] Number anchor poInt graphIc object.
nav_:ima
[In] The new value of the coordInates of thIs poInt of tIme anchor graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the coordInate of tIme.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..rLm-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//---
r·n.Lnr L=¨¡L<·o|-·r.Hum-·Lnr-.·¡L--·

//--- j-r rLm- ·r p·Lnr ·!-nr ·o|-·r
J-r-rLm- p·Lnr_rLm-=·o|-·r.rLm-.L·¡
Lr.p·Lnr_rLm-==¨·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1170

//--- --r rLm- ·r p·Lnr ·!-nr ·o|-·r
·o|-·r.rLm-.L,rLm-.unn-nr.··¡
·
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1171
PrIce (Cet hethod)
Cets the coordInate of the prIce specIfIed anchor poInt graphIc object.
J·uoL- -nL·-.
Lnr p.in: // -·Lnr numo-n
· ··n-r
Parameters
p.in:
[In] Number anchor poInt graphIc object.
Peturn VaIue
CoordInate prIces specIfIed anchor poInt graphIc object that Is bound to an Instance of the class. Ìf
not bound object or the object Is not thIs poInt, It returns E|PTY_7ALUE.
PrIce (Set hethod)
Sets the coordInate of the prIce specIfIed anchor poInt graphIc object.
o··L -nL·-.
Lnr p.in:, // -·Lnr numo-n
J·uoL- nav_pri·a // -nL·-
·
Parameters
p.in:
[In] Number anchor poInt graphIc object.
nav_pri·a
[In] News value coordInates of the prIce specIfIed anchor poInt graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the coordInate prIces.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..-nL·-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
J·uoL- pnL·-¡
//---
r·n.Lnr L=¨¡L<·o|-·r.Hum-·Lnr-.·¡L--·

//--- j-r pnL·- ·r p·Lnr ·!-nr ·o|-·r
J·uoL- p·Lnr_pnL·-=·o|-·r.-nL·-.L·¡
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1172
Lr.p·Lnr_pnL·-.=pnL·-·

//--- --r pnL·- ·r p·Lnr ·!-nr ·o|-·r
·o|-·r.-nL·-.L,pnL·-·¡
·
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1173
CoIor (Cet hethod)
Cets the lIne color of the graphIc object.
··L·n .·L·n.· ··n-r
Peturn VaIue
Color lIne of graphIc object, assIgned to the class Instance. Ìf there Is no object assIgned, It returns
CLF_NDNE.
CoIor (Set hethod)
Sets the color of the lIne for the graphIc object.
o··L .·L·n.
··L·n nav_·.l.r // H-. ··L·n
·
Parameters
nav_·.l.r
[In] New value lIne color graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the color.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r...·L·n
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r ··L·n ·r ·!-nr ·o|-·r
··L·n ·o|-·r_··L·n=·o|-·r..·L·n.·¡
Lr.·o|-·r_··L·n.=--J·

//--- --r ··L·n ·r ·!-nr ·o|-·r
·o|-·r..·L·n.--J·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1174
StyIe (Cet hethod)
Cets the lIne style graphIc.
IHJM_HPHI_¯r1HI ¯ryL-.· ··n-r
Peturn VaIue
Style lIne of the graphIc object, assIgned to the class Instance. Ìf there Is no object assIgned, It
returns WFDNC_7ALUE.
StyIe (Set hethod)
Sets the lIne style graphIc.
o··L ¯ryL-.
IHJM_HPHI_¯r1HI nav_·:yla // ¯ryL-
·
Parameters
nav_·:yla
[In] New value·style lIne drawIng object.
Peturn VaIue
true · If successful, false · If you can not change the style.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯ryL-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r -ryL- ·r ·!-nr ·o|-·r
IHJM_HPHI_¯r1HI -ryL-=·o|-·r.¯ryL-.·¡
Lr.-ryL-.=¯r1HI_¯JHP¯·

//--- --r -ryL- ·r ·!-nr ·o|-·r
·o|-·r.¯ryL-.¯r1HI_¯JHP¯·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1175
WIdth (Cet hethod)
Cets the thIckness of the lIne graphIc object.
Lnr WLJr!.· ··n-r
Peturn VaIue
The thIckness of the lIne graphIc object that Is bound to an Instance of the class. Ìf not bound
object, It returns ·1.
WIdth (Set hethod)
Sets the thIckness of the lIne graphIc object.
o··L WLJr!.
Lnr nav_vij:n // r!L·kn---
·
Parameters
nav_vij:n
[In] The new value of the thIckness of the lIne graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the thIckness.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..WLJr!
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r .LJr! ·r ·!-nr ·o|-·r
Lnr .LJr!=·o|-·r.WLJr!.·¡
Lr..LJr!.=!·

//--- --r .LJr! ·r ·!-nr ·o|-·r
·o|-·r.WLJr!.!·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1176
ßackground (Cet hethod)
Cets the flag drawIng a graphIc object In the background.
o··L Ð-·kjn·unJ.· ··n-r
Peturn VaIue
Flag of drawIng In the background, a graphIc object that Is bound to an Instance of the class. Ìf not
bound object returns false.
ßackground (Set hethod)
Sets the flag drawIng a graphIc object In the background.
o··L Ð-·kjn·unJ.
o··L o-·rjr.:nj // V-Lu- ·r r!- rL-j
·
Parameters
o-·rjr.:nj
[In] New value of the flag drawIng a graphIc object In the background.
Peturn VaIue
true · If successful, false · If you can not change the flag.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..Ð-·kjn·unJ
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r o-·kjn·unJ rL-j ·r ·!-nr ·o|-·r
o··L o-·kjn·unJ_rL-j=·o|-·r.Ð-·kjn·unJ.·¡
Lr..o-·kjn·unJ_rL-j·

//--- --r o-·kjn·unJ rL-j ·r ·!-nr ·o|-·r
·o|-·r.Ð-·kjn·unJ.rnu-·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1177
SeIected (Cet hethod)
Cets the flag ¨reprImand¨ graphIc object.
o··L ¯-L-·r-J.· ··n-r
Peturn VaIue
Flag ¨slate¨, a graphIc object that Is bound to an Instance of the class. Ìf not bound object returns
false.
SeIected (Set hethod)
Sets the flag ¨reprImand¨ graphIc object.
o··L ¯-L-·r-J.
o··L ·ala·:aj // V-Lu- ·r r!- rL-j
·
Parameters
·ala·:aj
[In] New value of the flag ¨reprImand¨ graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the flag.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯-L-·r-J
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r --L-·r-J rL-j ·r ·!-nr ·o|-·r
o··L --L-·r-J_rL-j=·o|-·r.¯-L-·r-J.·¡
Lr.--L-·r-J_rL-j·

//--- --r --L-·r-J rL-j ·r ·!-nr ·o|-·r
·o|-·r.¯-L-·r-J.r-L--·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1178
SeIectabIe (Cet hethod)
Cets the flag ¨selectable¨ graphIc object.
o··L ¯-L-·r-oL-.· ··n-r
Peturn VaIue
Flag ¨selectable¨, a graphIc object that Is bound to an Instance of the class. Ìf not bound object
returns false.
SeIectabIe (Set hethod)
Sets the flag ¨selectable¨ graphIc object.
o··L ¯-L-·r-oL-.
o··L ·ala·:-ola // V-Lu- ·r r!- rL-j
·
Parameters
·ala·:-ola
[In] New value of the flag ¨selectable¨ graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the flag.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯-L-·r-oL-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r --L-·r-oL- rL-j ·r ·!-nr ·o|-·r
o··L --L-·r-oL-_rL-j=·o|-·r.¯-L-·r-oL-.·¡
Lr.--L-·r-oL-_rL-j·

//--- --r --L-·r-oL- rL-j ·r ·!-nr ·o|-·r
·o|-·r.¯-L-·r-oL-.r-L--·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1179
0escrIptIon (Cet hethod)
Cets a descrIptIon (text) graphIc object.
-rnLnj ¯--·nLprL·n.· ··n-r
Peturn VaIue
0escrIptIon (text) graphIc object that Is bound to an Instance of the class. Ìf no bound object, It
returns NULL.
0escrIptIon (Set hethod)
Sets the descrIptIon (text) graphIc object.
o··L ¯--·nLprL·n.
-rnLnj :ax: // r-xr
·
Parameters
:ax:
[In] New value descrIptIons (text) graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the descrIptIon (text).
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯--·nLprL·n
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r J--·nLprL·n ·r ·!-nr ·o|-·r
-rnLnj J--·nLprL·n=·o|-·r.¯--·nLprL·n.·¡
Lr.J--·nLprL·n==¨¨·

//--- --r J--·nLprL·n ·r ·!-nr ·o|-·r
·o|-·r.¯--·nLprL·n.¨MyJo|-·r¨·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1180
TImeframes (Cet hethod)
Cets the vIsIbIlIty flag graphIc object.
Lnr rLm-rn-m--.· ··n-r
Peturn VaIue
Flags vIsIbIlIty graphIc object that Is bound to an Instance of the class. Ìf not bound object, It
returns 0.
TImeframes (Set hethod)
Sets the vIsIbIlIty flag graphIc.
o··L rLm-rn-m--.
Lnr nav_:imafr-ma· // VL-LoLLLry rL-j-
·
Parameters
nav_:imafr-ma·
[In] New flags vIsIbIlIty graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the flags of vIsIbIlIty.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..rLm-rn-m--
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r rLm-rn-m-- ·r ·!-nr ·o|-·r
Lnr rLm-rn-m--=·o|-·r.rLm-rn-m--.·¡
Lr...rLm-rn-m--sJЯ_-I-PJ¯_|!··

//--- --r rLm-rn-m-- ·r ·!-nr ·o|-·r
·o|-·r.rLm-rn-m--.rLm-rn-m--JЯ_-I-PJ¯_|!·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1181
CreateTIme
Cets the tIme to create graphIcal object.
J-r-rLm- .n--r-rLm-.· ··n-r
Peturn VaIue
TIme to create graphIcal object that Is bound to an Instance of the class. Ìf not bound object, It
returns 0.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r...n--r-rLm-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r ·n--r- rLm- ·r ·!-nr ·o|-·r
J-r-rLm- ·n--r-_rLm-=·o|-·r..n--r-rLm-.·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1182
LeveIsCount (Cet hethod)
Cets the number of levels of graphIcal object.
Lnr H-v-L-.·unr.· ··n-r
Peturn VaIue
Number of levels of graphIcal object that Is bound to an Instance of the class. Ìf not bound object, It
returns 0.
LeveIsCount (Set hethod)
Sets the number of levels of graphIcal object.
o··L H-v-L-.·unr.
Lnr laval· // Humo-n ·r L-v-L-
·
Parameters
laval·
[In] the number of new levels of graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the number of levels.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..H-v-L-.·unr
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r L-v-L- ··unr ·r ·!-nr ·o|-·r
Lnr L-v-L-_··unr=·o|-·r.H-v-L-.·unr.·¡
//--- --r L-v-L- ··unr ·r ·!-nr ·o|-·r
·o|-·r.H-v-L-.·unr.L-v-L-_··unr-!·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1183
LeveICoIor (Cet hethod)
Cets the lIne color specIfIed level of graphIc object.
··L·n H-v-L.·L·n.
Lnr laval // H-v-L numo-n
· ··n-r
Parameters
laval
[In] Number of levels of graphIcal object.
Peturn VaIue
Color LIne level specIfIed graphIc object that Is bound to an Instance of the class. Ìf not bound
object or the object Is no specIfIed level, It returns CLF_NDNE.
LeveICoIor (Set hethod)
Sets the lIne color specIfIed level of graphIc object.
o··L H-v-L.·L·n.
Lnr laval, // H-v-L numo-n
··L·n nav_·.l.r // H-. ··L·n
·
Parameters
laval
[In] Number of levels of graphIcal object.
nav_·.l.r
[In] New value lIne color of the level of graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the color.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..H-v-L.·L·n
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//---
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- j-r L-v-L ··L·n ·r ·!-nr ·o|-·r
··L·n L-v-L_··L·n=·o|-·r.H-v-L.·L·n.L·¡
Lr.L-v-L_··L·n.=--J·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1184

//--- --r L-v-L ··L·n ·r ·!-nr ·o|-·r
·o|-·r.H-v-L.·L·n.L,--J·¡
·
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1185
LeveIStyIe (Cet hethod)
Cets the lIne style specIfIed level of graphIcal object.
IHJM_HPHI_¯r1HI H-v-L¯ryL-.
Lnr laval // H-v-L numo-n
· ··n-r
Parameters
laval
[In] Number of levels of graphIcal object.
Peturn VaIue
LIne style specIfIed level graphIcal object that Is bound to an Instance of the class. Ìf not bound
object or the object Is no specIfIed level of returns WFDNC_7ALUE.
LeveIStyIe (Set hethod)
Sets the lIne style specIfIed level of graphIcal object.
Lnr H-v-L¯ryL-.
Lnr laval, // H-v-L numo-n
IHJM_HPHI_¯r1HI ·:yla // HLn- ¯ryL-
·
Parameters
laval
[In] Number of levels of graphIcal object.
·:yla
[In] New value·style lIne level specIfIed graphIcal object.
Peturn VaIue
true · If successful, false · If you can not change the style.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..H-v-L¯ryL-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//---
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- j-r L-v-L -ryL- ·r ·!-nr ·o|-·r
IHJM_HPHI_¯r1HI L-v-L_-ryL-=·o|-·r.H-v-L¯ryL-.L·¡
Lr.L-v-L_-ryL-.=¯r1HI_¯JHP¯·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1186

//--- --r L-v-L -ryL- ·r ·!-nr ·o|-·r
·o|-·r.H-v-L¯ryL-.L,¯r1HI_¯JHP¯·¡
·
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1187
LeveIWIdth (Cet hethod)
Cets the lIne thIckness specIfIed level of graphIc object.
Lnr H-v-LWLJr!.
Lnr laval // H-v-L numo-n
· ··n-r
Parameters
laval
[In] Number of levels of graphIcal object.
Peturn VaIue
The thIckness of the lInes of the level of graphIcal object that Is bound to an Instance of the class.
Ìf not bound object or the object Is no specIfIed level, It returns ·1.
LeveIWIdth (Set hethod)
FInds the last element equal to the model In sorted array.
o··L H-v-LWLJr!.
Lnr laval, // H-v-L numo-n
Lnr nav_vij:n // H-. .LJr!
·
Parameters
laval
[In] Number of levels of graphIcal object.
nav_vij:n
[In] New value lIne thIckness specIfIed level graphIcal object.
Peturn VaIue
posItIon of the found element, If successful, ·1 · If the Item was not found.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..H-v-LWLJr!
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//---
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- j-r L-v-L .LJr! ·r ·!-nr ·o|-·r
Lnr L-v-L_.LJr!=·o|-·r.H-v-LWLJr!.L·¡
Lr.L-v-L_.LJr!.=!·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1188

//--- --r L-v-L .LJr! ·r ·!-nr ·o|-·r
·o|-·r.H-v-LWLJr!.L,!·¡
·
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1189
LeveIVaIue (Cet hethod)
Cets the value of the level of graphIc object.
J·uoL- H-v-LV-Lu-.
Lnr laval // H-v-L numo-n
· ··n-r
Parameters
laval
[In] Number of levels of graphIcal object.
Peturn VaIue
The value of thIs level of graphIcal object that Is bound to an Instance of the class. Ìf not bound
object or the object Is no level specIfIed, returns E|PTY_7ALUE.
LeveIVaIue (Set hethod)
Sets the value of the specIfIed level of graphIc object.
o··L H-v-LV-Lu-.
Lnr laval, // H-v-L numo-n
J·uoL- nav_v-l:a // H-. v-Lu-
·
Parameters
laval
[In] Number of levels of graphIcal object.
nav_v-l:a
[In] New value of the level of graphIc object.
Peturn VaIue
true · If successful, false · If you can not change the level.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..H-v-LV-Lu-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//---
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- j-r L-v-L v-Lu- ·r ·!-nr ·o|-·r
J·uoL- L-v-L_v-Lu-=·o|-·r.H-v-LV-Lu-.L·¡
Lr.L-v-L_v-Lu-.=¨.!·L·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1190

//--- --r L-v-L v-Lu- ·r ·!-nr ·o|-·r
·o|-·r.H-v-LV-Lu-.L,¨.!·L·¡
·
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1191
LeveI0escrIptIon (Cet hethod)
Cets a descrIptIon (text) of the level of graphIcal object.
-rnLnj H-v-L¯--·nLprL·n.
Lnr laval // H-v-L numo-n
· ··n-r
Parameters
laval
[In] Number of levels of graphIcal object.
Peturn VaIue
0escrIptIon (text) of the level of graphIcal object that Is bound to an Instance of the class. Ìf not
bound object or the object Is no specIfIed level, returns NULL.
LeveI0escrIptIon (Set hethod)
Sets the descrIptIon (text) of the level of graphIcal object.
o··L H-v-L¯--·nLprL·n.
Lnr laval , // H-v-L numo-n
-rnLnj :ax: // r-xr
·
Parameters
laval
[In] Number of level of graphIcal object.
:ax:
[In] New value of descrIptIon (text) of the level of graphIc object.
Peturn VaIue
true - If successful, false · If you can not change the descrIptIon (text).
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..H-v-L¯--·nLprL·n
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//---
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- j-r L-v-L J--·nLprL·n ·r ·!-nr ·o|-·r
-rnLnj L-v-L_J--·nLprL·n=·o|-·r.H-v-L¯--·nLprL·n.L·¡
Lr.L-v-L_J--·nLprL·n==¨¨·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1192

//--- --r L-v-L J--·nLprL·n ·r ·!-nr ·o|-·r
·o|-·r.H-v-L¯--·nLprL·n.L,¨H-v-L_¨-Pnr-j-nr·¯rnLnj.L··¡
·
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1193
CetInteger
ProvIdes sImplIfIed access to the functIons of APÌ |0L5 DbjectCetÌnteger() for Integer·value
propertIes (of type bool, char, uchar, short, ushort, Int, uInt, lIng, ulong, datetIme, color) bound to an
Instance of the class graphIc.There are two versIons of a functIon call:
CettIng a property vaIue wIthout checkIng the correctness
L·nj J-rPnr-j-n.
IHJM_JЯI.r_--J-I-r1_PHrIJI- pr.p_ij, // PJ-nrLrL-n ·r Lnr-j-n-pn·p-nry
Lnr m.jifiar=-. // M·JLrL-n
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of double·graphIc propertIes.
m.jifiar=-.
[In] |odIfIer (Index) double·features.
Peturn VaIue
Ìf successfull, It returns the value of Integer·type property, If error, It returns 0.
CettIng a property vaIue In verIfyIng the correctness of such treatment
o··L J-rPnr-j-n.
IHJM_JЯI.r_--J-I-r1_PHrIJI- pr.p_ij, // PJ-nrLrL-n ·r Lnr-j-n-pn·p-nry
Lnr m.jifiar, // M·JLrL-n
L·njs v-l:a // HLnk r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 Integer·graphIc propertIes of the object.
m.jifiar
[In] |odIfIer (Index) Integer·property.
v-l:a
[out] Feference to a varIable to accommodate the Integer·value propertIes.
Peturn VaIue
true · If successful, false · If you can not get Integer·property.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..J-rPnr-j-n
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1194

..!-nrJo|-·r ·o|-·r¡
//--- j-r ··L·n ·r ·!-nr ·o|-·r oy ---y m-r!·J
pnLnrr.¨Jo|-·r- ··L·n L- `-¨,.·L·nr·¯rnLnj.·o|-·r.J-rPnr-j-n.JЯ--J-_.JHJ-·,rnu-··¡
//--- j-r ··L·n ·r ·!-nr ·o|-·r oy ·L---L· m-r!·J
L·nj ··L·n_v-Lu-¡
Lr..·o|-·r.J-rPnr-j-n.JЯ--J-_.JHJ-,¨,··L·n_v-Lu-··

pnLnrr.¨J-r Lnr-j-n pn·p-nry -nn·n `J¨,J-rH--rInn·n.··¡
n-runn¡
·
-L--
pnLnrr.¨Jo|-·r- ··L·n L- `-¨,··L·n_v-Lu-·¡
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- j-r L-v-L- .LJr! oy ---y m-r!·J
pnLnrr.¨H-v-L `J .LJr! L- `J¨,L,·o|-·r.J-rPnr-j-n.JЯ--J-_HIVIHWP¯r|,L··¡
//--- j-r L-v-L- .LJr! oy ·L---L· m-r!·J
L·nj .LJr!_v-Lu-¡
Lr..·o|-·r.J-rPnr-j-n.JЯ--J-_HIVIHWP¯r|,L,.LJr!_v-Lu-··

pnLnrr.¨J-r Lnr-j-n pn·p-nry -nn·n `J¨,J-rH--rInn·n.··¡
n-runn¡
·
-L--
pnLnrr.¨H-v-L `J .LJr! L- `J¨,L,.LJr!_v-Lu-·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1195
SetInteger
ProvIdes sImplIfIed access to the functIons of APÌ |0L5 DbjectSetÌnteger() to change the Integer·
propertIes (wIth types bool, char, uchar, short, ushort, Int, uInt, lIng, ulong, datetIme, color) bound to
an Instance of the class graphIc.There are two versIons of a functIon call:
SettIng a property vaIue that does not requIre a modIfIer
o··L ¯-rPnr-j-n.
IHJM_JЯI.r_--J-I-r1_PHrIJI- pr.p_ij, // PJ-nrLrL-n ·r Lnr-j-n-pn·p-nry
L·nj v-l:a // V-Lu-
·
Parameters
pr.p_ij
[In] Ì0 Integer·graphIc propertIes of the object.
v-l:a
[In] new mutable Integer·value propertIes.
SettIng a property vaIue IndIcatIng the modIfIer
o··L ¯-rPnr-j-n.
IHJM_JЯI.r_--J-I-r1_PHrIJI- pr.p_ij, // PJ-nrLrL-n ·r Lnr-j-n-pn·p-nry
Lnr m.jifiar, // M·JLrL-n
L·nj v-l:a // V-Lu-
·
Parameters
pr.p_ij
[In] Ì0 Integer·graphIc propertIes of the object.
m.jifiar
[In] |odIfIer (Index) Integer·property.
v-l:a
[In] new mutable Integer·value propertIes.
Peturn VaIue
true · If successful, false · If you can not change the Integer·property.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯-rPnr-j-n
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- --r n-. ··L·n ·r ·!-nr ·o|-·r
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1196
Lr..·o|-·r.¯-rPnr-j-n.JЯ--J-_.JHJ-,--J··

pnLnrr.¨¯-r Lnr-j-n pn·p-nry -nn·n `J¨,J-rH--rInn·n.··¡
n-runn¡
·
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- --r L-v-L- .LJr!
Lr..·o|-·r.¯-rPnr-j-n.JЯ--J-_HIVIHWP¯r|,L,L··

pnLnrr.¨¯-r Lnr-j-n pn·p-nry -nn·n `J¨,J-rH--rInn·n.··¡
n-runn¡
·
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1197
Cet0oubIe
ProvIdes sImplIfIed access to the functIons of APÌ |0L5 DbjectCet0ouble() to get the values double·
propertIes (havIng type float and double) of the graphIc object, assIgned to the class Instance. There
are two versIons of a functIon call:
CettIng a property vaIue wIthout checkIng the correctness
J·uoL- J-r¯·uoL-.
IHJM_JЯI.r_--J-I-r1_¯JJÐHI pr.p_ij, // PJ-nrLrL-n ·r J·uoL--pn·p-nry
Lnr m.jifiar=-. // M·JLrL-n
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of double·graphIc propertIes.
m.jifiar=-.
[In] |odIfIer (Index) double·features.
Peturn VaIue
Ìf successful, It returns the value of property of double type, If error, It returns E|PTY_7ALUE.
CettIng a property vaIue In verIfyIng the correctness of such treatment
o··L J-r¯·uoL-.
IHJM_JЯI.r_--J-I-r1_¯JJÐHI pr.p_ij, // PJ-nrLrL-n ·r J·uoL--pn·p-nry
Lnr m.jifiar, // M·JLrL-n
J·uoL-s v-l:a // HLnk r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of double·graphIc propertIes.
m.jifiar
[In] |odIfIer (Index) double·features.
v-l:a
[out] Feference to a varIable to accommodate the double·value propertIes.
Peturn VaIue
true · If successful, false · If you can not get a double·feature.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..J-r¯·uoL-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1198

..!-nrJo|-·r ·o|-·r¡
//---
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- j-r L-v-L- v-Lu- oy ---y m-r!·J
pnLnrr.¨H-v-L `J v-Lu-=`r¨,L,·o|-·r.J-r¯·uoL-.JЯ--J-_HIVIHVAHJI,L··¡
//--- j-r L-v-L- v-Lu- oy ·L---L· m-r!·J
J·uoL- v-Lu-¡
Lr..·o|-·r.¯-r¯·uoL-.JЯ--J-_HIVIHVAHJI,L,v-Lu-··

pnLnrr.¨J-r J·uoL- pn·p-nry -nn·n `J¨,J-rH--rInn·n.··¡
n-runn¡
·
-L--
pnLnrr.¨H-v-L `J v-Lu-=`r¨,L,v-Lu-·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1199
Set0oubIe
ProvIdes sImplIfIed access to the functIons of APÌ |0L5 DbjectSet0ouble() to change the double·
propertIes (havIng type float and double) bound to an Instance of the class graphIc object. There are
two versIons of a functIon call:
SettIng a property vaIue that does not requIre a modIfIer
o··L ¯-r¯·uoL-.
IHJM_JЯI.r_--J-I-r1_¯JJÐHI pr.p_ij, // PJ-nrLrL-n ·r J·uoL--pn·p-nry
J·uoL- v-l:a // V-Lu-
·
Parameters
pr.p_ij
[In] Ì0 of double·graphIc propertIes.
v-l:a
[In] New value mutable double·features.
SettIng a property vaIue IndIcatIng the modIfIer
o··L ¯-r¯·uoL-.
IHJM_JЯI.r_--J-I-r1_¯JJÐHI pr.p_ij, // PJ-nrLrL-n ·r J·uoL--pn·p-nry
Lnr m.jifiar, // M·JLrL-n
J·uoL- v-l:a // V-Lu-
·
Parameters
pr.p_ij
[In] Ì0 of double·graphIc propertIes.
m.jifiar
[In] |odIfIer (Index) of double·property.
v-l:a
[In] New value mutable double·property.
Peturn VaIue
true · If successful, false · If you can not change the double·feature.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯-r¯·uoL-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//---
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1200
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- --r L-v-L v-Lu- ·r ·!-nr ·o|-·r
Lr..·o|-·r.¯-r¯·uoL-.JЯ--J-_HIVIHVAHJI,L,¨.!·L··

pnLnrr.¨¯-r J·uoL- pn·p-nry -nn·n `J¨,J-rH--rInn·n.··¡
n-runn¡
·
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1201
CetStrIng
ProvIdes sImplIfIed access to the functIons of APÌ |0L5 DbjectCetStrIng() for strIng·value propertIes,
Is bound to an Instance of the class graphIc object. There are two versIons of a functIon call:
CettIng a property vaIue wIthout checkIng the correctness
-rnLnj J-r¯rnLnj.
IHJM_JЯI.r_--J-I-r1_¯r-PHJ pr.p_ij, // PJ-nrLrL-n ·r -rnLnj-pn·p-nry
Lnr m.jifiar=-. // M·JLrL-n
· ··n-r
Parameters
pr.p_ij
[In] ÌdentIfIer strIng·propertIes of graphIc object.
m.jifiar=-.
[In] |odIfIer (Index) strIng·propertIes.
Peturn VaIue
7alue of strIng·property.
CettIng a property vaIue In verIfyIng the correctness of such treatment
o··L J-r¯rnLnj.
IHJM_JЯI.r_--J-I-r1_¯r-PHJ pr.p_ij, // PJ-nrLrL-n ·r -rnLnj-pn·p-nry
Lnr m.jifiar, // M·JLrL-n
-rnLnjs v-l:a // HLnk r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] ÌdentIfIer strIng·propertIes of graphIc object.
m.jifiar
[In] |odIfIer (Index) strIng·propertIes.
v-l:a
[out] Feference to a varIable to accommodate the strIng·value propertIes.
Peturn VaIue
true · If successful, false · If you can not get a strIng·property.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..J-r¯rnLnj
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

Standard Library
© 2000·2010, |eta0uotes Software Corp.
1202
..!-nrJo|-·r ·o|-·r¡
-rnLnj v-Lu-¡
//--- j-r n-m- ·r ·!-nr ·o|-·r oy ---y m-r!·J
pnLnrr.¨Jo|-·r n-m- L- '`-'¨,·o|-·r.J-r¯rnLnj.JЯ--J-_HAMI··¡
//--- j-r n-m- ·r ·!-nr ·o|-·r oy ·L---L· m-r!·J
Lr..·o|-·r.J-r¯rnLnj.JЯ--J-_HAMI,¨,v-Lu-··

pnLnrr.¨J-r -rnLnj pn·p-nry -nn·n `J¨,J-rH--rInn·n.··¡
n-runn¡
·
-L--
pnLnrr.¨Jo|-·r n-m- L- '`-'¨,v-Lu-·¡
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- j-r L-v-L- J--·nLprL·n oy ---y m-r!·J
pnLnrr.¨H-v-L `J J--·nLprL·n L- '`-'¨,L,·o|-·r.J-r¯rnLnj.JЯ--J-_HIVIHrIxr,L··¡
//--- j-r L-v-L- J--·nLprL·n oy ·L---L· m-r!·J
Lr..·o|-·r.J-r¯rnLnj.JЯ--J-_HIVIHrIxr,L,v-Lu-··

pnLnrr.¨J-r -rnLnj pn·p-nry -nn·n `J¨,J-rH--rInn·n.··¡
n-runn¡
·
-L--
pnLnrr.¨H-v-L `J J--·nLprL·n L- '`-'¨,L,v-Lu-·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1203
SetStrIng
ProvIdes sImplIfIed access to the functIons of APÌ |0L5 DbjectSetStrIng() to change the propertIes of
strIng·tIed to the Instance of the class graphIc object. There are two versIons of a functIon call:
SettIng a property vaIue that does not requIre a modIfIer
o··L ¯-r¯rnLnj.
IHJM_JЯI.r_--J-I-r1_¯r-PHJ pr.p_ij, // PJ-nrLrL-n ·r -rnLnj-pn·p-nry
-rnLnj v-l:a // V-Lu-
·
Parameters
pr.p_ij
[In] ÌdentIfIer strIng·propertIes of graphIc object.
v-l:a
[In] New value mutable strIng·propertIes.
SettIng a property vaIue IndIcatIng the modIfIer
o··L ¯-r¯rnLnj.
IHJM_JЯI.r_--J-I-r1_¯r-PHJ pr.p_ij, // PJ-nrLrL-n ·r -rnLnj-pn·p-nry
Lnr m.jifiar, // M·JLrL-n
-rnLnj v-l:a // V-Lu-
·
Parameters
pr.p_ij
[In] ÌdentIfIer strIng·propertIes of graphIc object.
m.jifiar
[In] |odIfIer (Index) strIng·propertIes.
v-l:a
[In] New value mutable strIng·propertIes.
Peturn VaIue
true · If successful, false · If you can not change the strIng·property.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯-r¯rnLnj
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- --r n-. n-m- ·r ·!-nr ·o|-·r
Lr..·o|-·r.¯-r¯rnLnj.JЯ--J-_HAMI,¨MyJo|-·r¨··
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1204

pnLnrr.¨¯-r -rnLnj pn·p-nry -nn·n `J¨,J-rH--rInn·n.··¡
n-runn¡
·
r·n.Lnr L=¨¡L<·o|-·r.H-v-L-.·unr.·¡L--·

//--- --r L-v-L- J--·nLprL·n
Lr..·o|-·r.¯-r¯rnLnj.JЯ--J-_HIVIHrIxr,L,¨H-v-L_¨-Pnr-j-nr·¯rnLnj.L···

pnLnrr.¨¯-r -rnLnj pn·p-nry -nn·n `J¨,J-rH--rInn·n.··¡
n-runn¡
·
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1205
Save
Saves parameters of the object In the fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the prevIously opened usIng the functIon FIleDpen (...) fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..¯-v-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
..!-nrJo|-·r ·o|-·r=n-. ..!-nrJo|-·r¡
//--- --r ·o|-·r p-n-m-r-n-
//--- . . .
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..·o|-·r.¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1206
Load
Loads the parameters of the object from the fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the prevIously opened usIng the functIon FIleDpen (...) fIle.
Peturn VaIue
true · If successfully completed, false · If an error.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..H·-J
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
..!-nrJo|-·r ·o|-·r¡
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..·o|-·r.H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- u-- ·o|-·r
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1207
Type
Cets the type IdentIfIer graphIc object.
vLnru-L Lnr ryp-.· ··n-r
Peturn VaIue
Ì0 type of object (for CChartDbject · 0x8888).
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..ryp-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·r ·o|-·r¡
//--- j-r ·o|-·r ryp-
Lnr ryp-=·o|-·r.ryp-.·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1208
Dbjects LInes
A group of graphIc objects ¨LInes¨.
ThIs sectIon contaIns the technIcal detaIls of workIng wIth a group of classes of graphIcal objects
¨LInes¨ and a descrIptIon of the relevant components of the |0L5 Standard LIbrary .
CIass name Dbject
CChartDbject7LIne CraphIc object ¨7ertIcal LIne¨
CChartDbjectHLIne CraphIc object ¨HorIzontal LIne¨
CChartDbjectTrend CraphIc object ¨Trend LIne¨
CChartDbjectTrend8yAngle CraphIc object ¨Trend LIne by Angle¨
CChartDbjectCycles CraphIc object ¨CyclIc LInes¨
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1209
CChartDbjectVLIne
Class CChartDbject7LIne Is a class for sImplIfIed access to ¨7ertIcal LIne¨ graphIc object propertIes.
0escrIptIon
Class CChartDbject7LIne provIdes access to ¨7ertIcal LIne¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rVHLn- . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-HLn--.m¬!
CIass hethods
Create
Create Creates graphIc object ¨7ertIcal LIne¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1210
Create
Creates graphIc object ¨7ertIcal LIne¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima // rLm- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima
[In] TIme coordInate of the anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1211
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_7LÌNE for CChartDbject7lIne).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1212
CChartDbjectHLIne
Class CChartDbjectHLIne Is a class for sImplIfIed access to ¨HorIzontal LIne¨ graphIc object
propertIes.
0escrIptIon
Class CChartDbjectHLIne provIdes access to ¨HorIzonal LIne¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r|HLn- . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-HLn--.m¬!
CIass hethods
Create
Create Creates graphIc object ¨HorIzontal LIne¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1213
Create
Creates graphIc object ¨HorIzontal LIne¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
L·nj vinj.v, // .!-nr .LnJ·.
J·uoL- pri·a // -nL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
pri·a
[In] PrIce coordInate of the anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1214
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_HLÌNE for CChartDbjectHLIne).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1215
CChartDbjectTrend
Class CChartDbjectTrend Is a class for sImplIfIed access to ¨Trend LIne¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectTrend provIdes access to ¨Trend LIne¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rrn-nJ . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-HLn--.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Trend LIne¨
PropertIes
FayLeft Cets/Sets property ¨Fay Left¨
FayFIght Cets/Sets property ¨Fay FIght¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
0erIved cIasses:
CChartDbjectChannel
CChartDbjectFIbo
CChartDbjectFIboChannel
CChartDbjectFIboExpansIon
CChartDbjectCannFan
CChartDbjectCannCrId
CChartDbjectPItchfork
CChartDbjectFegressIon
CChartDbjectStd0evChannel
CChartDbjectTrend8yAngle
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1216
Create
Creates graphIc object ¨Trend LIne¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // !-r rLm- ···nJLn-r-
J·uoL- pri·a., // !-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // `nJ rLm- ···nJLn-r-
J·uoL- pri·a2 // `nJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1217
PayLeft (Cet hethod)
Cets the value of ¨Fay Left¨ property.
o··L --yH-rr.· ··n-r
Peturned vaIue
The value of ¨Fay Left¨ property, assIgned to the class Instance. Ìf there Is no object assIgned, It
returns false.
PayLeft (Set hethod)
Sets new flag value for the ¨Fay Left¨ property.
o··L --yH-rr.
o··L r-y // rL-j
·
Parameters
r-y
[In] New value of the ¨Fay Left¨ property.
Peturned vaIue
true If successful, false If flag hasn't changed error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1218
PayPIght (Cet hethod)
Cets the value of ¨Fay FIght¨ property.
o··L --y-Lj!r.· ··n-r
Peturned vaIue
The value of ¨Fay FIght¨ property, assIgned to the class Instance. Ìf there Is no object assIgned, It
returns false.
PayPIght (Set hethod)
Sets new flag value for the ¨Fay FIght¨ property.
o··L --y-Lj!r.
o··L r-y // rL-j
·
Parameters
r-y
[In] New value of the ¨Fay FIght¨ property.
Peturned vaIue
true If successful, false If flag hasn't changed error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1219
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the fIle already opened usIng by functIon FIleDpen(...) .
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1220
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1221
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_TFEN0 for CChartDbjectTrend).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1222
CChartDbjectTrendßyAngIe
Class CChartDbjectTrend8yAngle Is a class for sImplIfIed access to ¨Trend LIne by Angle¨ graphIc
object propertIes.
0escrIptIon
Class CChartDbjectTrend8yAngle provIdes access to ¨Trend LIne by Angle¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rrn-nJÐyAnjL- . puoLL· ..!-nrJo|-·rrn-nJ
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-HLn--.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Trend LIne by Angle¨
PropertIes
Angle Cets/Sets property ¨Angle¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
0erIved cIasses:
CChartDbjectCannLIne
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1223
Create
Creates graphIc object ¨Trend LIne by Angle¨
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
L·nj vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // !-r rLm- ···nJLn-r-
J·uoL- pri·a., // !-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // `nJ rLm- ···nJLn-r-
J·uoL- pri·a2 // `nJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1224
AngIe (Cet hethod)
Cets the value of ¨Angle¨ property.
J·uoL- AnjL-.· ··n-r
Peturned vaIue
The value of ¨Angle¨ property, assIgned to the class Instance. Ìf there Is no object assIgned, It
returns E|PTY_7ALUE.
AngIe (Set hethod)
Sets new value for the ¨Angle¨ property.
o··L AnjL-.
J·uoL- -njla // AnjL-
·
Parameters
-njla
[In] New value of the ¨Angle¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1225
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_TFEN08YANCLE for CChartDbjectTrend8yAngle).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1226
CChartDbjectCycIes
Class CChartDbjectCycles Is a class for sImplIfIed access to ¨CyclIc LInes¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectCycles provIdes access to ¨CyclIc LInes¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r.y·L-- . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-HLn--.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Cycle LInes¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1227
Create
Creates graphIc object ¨CyclIc LInes¨
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
L·nj vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // !-r rLm- ···nJLn-r-
J·uoL- pri·a., // !-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // `nJ rLm- ···nJLn-r-
J·uoL- pri·a2 // `nJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1228
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_CYCLES for CChartDbjectCycles).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1229
Dbjects ChanneIs
A group of graphIc objects ¨Channels¨.
ThIs sectIon contaIns the technIcal detaIls of workIng wIth a group of classes of graphIcal objects
¨Channels¨ and a descrIptIon of the relevant components of the |0L5 Standard LIbrary .
CIass name Dbject
CChartDbjectChannel CraphIc object ¨EquIdIstant Channel¨
CChartDbjectFegressIon CraphIc object ¨LInear FegressIon Channel¨
CChartDbjectStd0evChannel CraphIc object ¨Standard devIatIons Channel¨
CChartDbjectPItchfork CraphIc object ¨Andrew's PItchfork¨
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1230
CChartDbjectChanneI
The CChartDbjectChannel Is a class for sImplIfIed access to ¨EquIdIstant Channel¨ graphIc object
propertIes.
0escrIptIon
The class CChartDbjectChannel provIdes access to ¨EquIdIstant Channel¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r.!-nn-L . puoLL· ..!-nrJo|-·rrn-nJ
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-.!-nn-L-.m¬!
CIass hethods
Create
Create Creates graphIc object ¨EquIdIstant Channel¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1231
Create
Creates graphIc object ¨EquIdIstant Channel¨
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // rLm- ···nJLn-r-
J·uoL- pri·a.,
J-r-rLm- :ima2,
J·uoL- pri·a2,
J-r-rLm- :ima¨,
J·uoL- pri·a¨
·
Parameters
·n-r:_ij
[In] Chart Ì0 (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
:ima¨
[In] TIme coordInate of the thIrd anchor poInt.
pri·a¨
[In] PrIce coordInate of the thIrd anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1232
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_CHANNEL for CChartDbjectChannel).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1233
CChartDbjectPegressIon
Class CChartDbjectFegressIon Is a class for sImplIfIed access to ¨LInear FegressIon Channel¨ graphIc
object propertIes.
0escrIptIon
Class CChartDbjectFegressIon provIdes access to ¨LInear FegressIon Channel¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r--jn---L·n . puoLL· ..!-nrJo|-·rrn-nJ
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-.!-nn-L-.m¬!
CIass hethods
Create
Create Creates graphIc object ¨LInear FegressIon
Channel¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1234
Create
Creates graphIc object ¨LInear FegressIon Channel¨
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
L·nj vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J-r-rLm- :ima2 // ¯-··nJ rLm- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1235
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_FECFESSÌDN for CChartDbjectFegressIon).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1236
CChartDbjectStd0evChanneI
Class CChartDbjectStd0evChannel Is a class for sImplIfIed access to ¨Standard 0evIatIon Channel¨
graphIc object propertIes.
0escrIptIon
Class CChartDbjectStd0evChannel provIdes access to ¨Standard 0evIatIon Channel¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r¯rJ¯-v.!-nn-L . puoLL· ..!-nrJo|-·rrn-nJ
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-.!-nn-L-.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Standard 0evIatIon
Channel¨
PropertIes
0evIatIons Cets/Sets property ¨0evIatIon¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1237
Create
Creates graphIc object ¨Standard 0evIatIon Channel¨
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- javi-:i.n // ¯-vL-rL·n
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
javi-:i.n
[In] NumerIcal value for ¨0evIatIon¨ property.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1238
0evIatIon (Cet hethod)
Cets numerIcal value for ¨0evIatIon¨ property.
J·uoL- ¯-vL-rL·n.· ··n-r
Peturned vaIue
NumerIcal value of ¨0evIatIon¨ property, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
0evIatIon (Set hethod)
Sets numerIcal value for ¨0evIatIon¨ property.
o··L ¯-vL-rL·n.
J·uoL- javi-:i.n // ¯-vL-rL·n
·
Parameters
javi-:i.n
[In] New value for ¨0evIatIon¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1239
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the fIle already opened usIng by functIon FIleDpen(...) .
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1240
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the fIle already opened usIng by functIon FIleDpen(...) .
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1241
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_ST00E7CHANNEL for CChartDbjectStd0evChannel).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1242
CChartDbjectPItchfork
Class CChartDbjectPItchfork Is a class for sImplIfIed access to ¨Andrew's PItchfork¨ graphIc object
propertIes.
0escrIptIon
Class CChartDbjectPItchfork provIdes access to ¨Andrew's PItchfork¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r-Lr·!r·nk . puoLL· ..!-nrJo|-·rrn-nJ
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-.!-nn-L-.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Andrew's PItchfork¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1243
Create
Creates graphIc object ¨Andrew's PItchfork¨
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
L·nj vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // !-r rLm- ···nJLn-r-
J·uoL- pri·a., // !-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ...
J·uoL- pri·a2,
J-r-rLm- :ima¨,
J·uoL- pri·a¨
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt..
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the fIrst anchor poInt.
:ima¨
[In] TIme coordInate of the thIrd anchor poInt.
pri·a¨
[In] PrIce coordInate of the thIrd anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1244
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_PÌTCHFDFK for CChartDbjectPItchfork).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1245
Cann TooIs
A group of graphIc objects ¨Cann Tools¨.
ThIs sectIon contaIns the technIcal detaIls of workIng wIth a group of classes of graphIcal objects
¨Cann Tools¨ and a descrIptIon of the relevant components of the |0L5 Standard LIbrary .
CIass name Dbject
CChartDbjectCannLIne CraphIc object ¨Cann LIne¨
CChartDbjectCannFan CraphIc object ¨Cann Fan¨
CChartDbjectCannCrId CraphIc object ¨Cann CrId¨
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1246
CChartDbjectCannLIne
Class CChartDbjectCannLIne Is a class for sImplIfIed access to ¨Cann LIne¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectCannLIne provIdes access to ¨Cann LIne¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rJ-nnHLn- . puoLL· ..!-nrJo|-·rrn-nJÐyAnjL-
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-J-nn.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Cann LIne¨
PropertIes
PIpsPer8ar Cets/Sets property ¨Scale¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1247
Create
Creates graphIc object ¨Cann LIne¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- ppo // -Lp- p-n o-n
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
ppo
[In] PIps per bar.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1248
PIpsPerßar (Cet hethod)
Cets the value of ¨PIps per bar¨ property.
J·uoL- -Lp---nÐ-n.· ··n-r
Peturned vaIue
7alue of ¨PIps per bar¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
PIpsPerßar (Set hethod)
Sets new value for ¨PIps per bar¨ property.
o··L -Lp---nÐ-n.
J·uoL- ppo // -Lp- p-n o-n
·
Parameters
ppo
[In] New value for ¨PIps per bar¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1249
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1250
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1251
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_CANNLÌNE for CChartDbjectCannLIne).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1252
CChartDbjectCannFan
Class CChartDbjectCannFan Is a class for sImplIfIed access to ¨Cann Fan¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectCannFan provIdes access to ¨Cann Fan¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rJ-nn¯-n . puoLL· ..!-nrJo|-·rrn-nJ
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-J-nn.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Cann Fan¨
PropertIes
PIpsPer8ar Cets/Sets property ¨PIps per bar¨
0owntrend Cets/Sets property ¨0owntrend¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1253
Create
Creates graphIc object ¨Cann Fan¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- ppo // -Lp- p-n o-n
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
ppo
[In] PIps per bar.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1254
PIpsPerßar (Cet hethod)
Cets the value of ¨PIps per bar¨ property.
J·uoL- -Lp---nÐ-n.· ··n-r
Peturned vaIue
7alue of ¨PIps per bar¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
PIpsPerßar (Set hethod)
Sets new value for ¨PIps per bar¨ property.
o··L -Lp---nÐ-n.
J·uoL- ppo // -Lp- p-n o-n
·
Parameters
ppo
[In] New value for ¨PIps per bar¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1255
0owntrend (Cet hethod)
Cets the value of ¨0owntrend¨ property.
o··L ¯·.nrn-nJ.· ··n-r
Peturned vaIue
7alue of the ¨0owntrend¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
0owntrend (Set hethod)
Sets new value of ¨0owntrend¨ property.
o··L ¯·.nrn-nJ.
o··L j.vn:ranj // ¯L-j v-Lu-
·
Parameters
j.vn:ranj
[In] New value for ¨0owntrend¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1256
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1257
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1258
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_CANNFAN for CChartDbjectCannFan).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1259
CChartDbjectCannCrId
Class CChartDbjectCannCrId Is a class for sImplIfIed access to ¨Cann CrId¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectCannCrId provIdes access to ¨Cann CrId¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rJ-nnJnLJ . puoLL· ..!-nrJo|-·rrn-nJ
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-J-nn.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Cann CrId¨
PropertIes
PIpsPer8ar Cets/Sets property ¨PIps per bar¨
0owntrend Cets/Sets property ¨0owntrend¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1260
Create
Creates graphIc object ¨Cann CrId¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- ppo // -Lp- p-n o-n
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
ppo
[In] PIps per bar.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1261
PIpsPerßar (Cet hethod)
Cets the value of ¨PIps per bar¨ property.
J·uoL- -Lp---nÐ-n.· ··n-r
Peturned vaIue
7alue of ¨PIps per bar¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
PIpsPerßar (Set hethod)
Sets new value for ¨PIps per bar¨ property.
o··L -Lp---nÐ-n.
J·uoL- ppo // -Lp- p-n o-n
·
Parameters
ppo
[In] New value for ¨PIps per bar¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1262
0owntrend (Cet hethod)
Cets the value of ¨0owntrend¨ property.
o··L ¯·.nrn-nJ.· ··n-r
Peturned vaIue
7alue of ¨0owntrend¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
0owntrend (Set hethod)
Sets new value of ¨0owntrend¨ property.
o··L ¯·.nrn-nJ.
o··L j.vn:ranj // ¯L-j v-Lu-
·
Parameters
j.vn:ranj
[In] New value for ¨0owntrend¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1263
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1264
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1265
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_CANNCFÌ0 for CChartDbjectCannCrId).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1266
FIbonaccI TooIs
A group of graphIc objects ¨FIbonaccI Tools¨.
ThIs sectIon contaIns the technIcal detaIls of workIng wIth a group of classes of graphIcal objects
¨FIbonaccI Tools¨ and a descrIptIon of the relevant components of the |0L5 Standard LIbrary .
CIass name Dbject
CChartDbjectFIbo CraphIc object ¨FIbonaccI Fetracement¨
CChartDbjectFIboTImes CraphIc object ¨FIbonaccI TIme Zones¨
CChartDbjectFIboFan CraphIc object ¨FIbonaccI Fan¨
CChartDbjectFIboArc CraphIc object ¨FIbonaccI Arc¨
CChartDbjectFIboChannel CraphIc object ¨FIbonaccI Channel¨
CChartDbjectFIboExpansIon CraphIc object ¨FIbonaccI ExpansIon¨
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1267
CChartDbjectFIbo
Class CChartDbjectFIbo Is a class for sImplIfIed access to ¨FIbonaccI Fetracement¨ graphIc object
propertIes.
0escrIptIon
Class CChartDbjectFIbo provIdes access to ¨FIbonaccI Fetracement¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r¯Lo· . puoLL· ..!-nrJo|-·rrn-nJ
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-¯Lo·.m¬!
CIass hethods
Create
Create Creates graphIc object ¨FIbonaccI Fetracement¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1268
Create
Creates graphIc object ¨FIbonaccI Fetracement¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2 // ¯-··nJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1269
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_FÌ8D for CChartDbjectFIbo).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1270
CChartDbjectFIboTImes
Class CChartDbjectFIboTImes Is a class for sImplIfIed access to ¨FIbonaccI TIme Zones¨ graphIc object
propertIes.
0escrIptIon
Class CChartDbjectFIboTImes provIdes access to ¨FIbonaccI TIme Zones¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r¯Lo·rLm-- . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-¯Lo·.m¬!
CIass hethods
Create
Create Creates graphIc object ¨FIbonaccI TIme Zones¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1271
Create
Creates graphIc object ¨FIbonaccI TIme Zones¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2 // ¯-··nJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1272
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_FÌ8DTÌ|ES for CChartDbjectFIboTImes).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1273
CChartDbjectFIboFan
Class CChartDbjectFIboFan Is a class for sImplIfIed access to ¨FIbonaccI Fan¨ graphIc object
propertIes.
0escrIptIon
Class CChartDbjectFIboFan provIdes access to ¨FIbonaccI Fan¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r¯Lo·¯-n . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-¯Lo·.m¬!
CIass hethods
Create
Create Creates graphIc object ¨FIbonaccI Fan¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1274
Create
Creates graphIc object ¨FIbonaccI Fan¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2 // ¯-··nJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1275
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_FÌ8DFAN for CChartDbjectFIboFan).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1276
CChartDbjectFIboArc
Class CChartDbjectFIboArc Is a class for sImplIfIed access to ¨FIbonaccI Arc¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectFIboArc provIdes access to ¨FIbonaccI Arc¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r¯Lo·An· . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-¯Lo·.m¬!
CIass hethods
Create
Create Creates graphIc object ¨FIbonaccI Arc¨
PropertIes
Scale Cets/Sets property ¨Scale¨
EllIpse Cets/Sets property ¨EllIpse¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1277
Create
Creates graphIc object ¨FIbonaccI Arc¨
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2, // ¯-··nJ pnL·- ···nJLn-r-
J·uoL- ··-la // ¯·-L-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
··-la
[In] Scale.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1278
ScaIe (Cet hethod)
Cets the value of ¨Scale¨ property.
J·uoL- ¯·-L-.· ··n-r
Peturned vaIue
7alue of ¨Scale¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
ScaIe (Set hethod)
Sets new value for ¨Scale¨ property.
o··L ¯·-L-.
J·uoL- ··-la // ¯·-L-
·
Parameters
··-la
[In] New value for ¨Scale¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1279
EIIIpse (Cet hethod)
Cets the value of ¨EllIpse¨ property.
o··L ILLLp--.· ··n-r
Peturned vaIue
7alue of ¨EllIpse¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
EIIIpse (Set hethod)
Sets new flag value for ¨EllIpse¨ property.
o··L ILLLp--.
o··L allip·a // rL-j v-Lu-
·
Parameters
allip·a
[In] New value for ¨Scale¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1280
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1281
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1282
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_FÌ8DAFC for CChartDbjectFIboArc).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1283
CChartDbjectFIboChanneI
Class CChartDbjectFIboChannel Is a class for sImplIfIed access to ¨FIbonaccI Channel¨ graphIc object
propertIes.
0escrIptIon
Class CChartDbjectFIboChannel provIdes access to ¨FIbonaccI Channel¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r¯Lo·.!-nn-L . puoLL· ..!-nrJo|-·rrn-nJ
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-¯Lo·.m¬!
CIass hethods
Create
Create Creates graphIc object ¨FIbonaccI Channel¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1284
Create
Creates graphIc object ¨FIbonaccI Channel¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2, // ¯-··nJ pnL·- ···nJLn-r-
J-r-rLm- :ima¨, // r!LnJ rLm- ···nJLn-r-
J·uoL- pri·a¨ // r!LnJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
:ima¨
[In] TIme coordInate of the thIrd anchor poInt.
pri·a¨
[In] PrIce coordInate of the thIrd anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1285
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_FÌ8DCHANNEL for CChartDbjectFIboChannel).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1286
CChartDbjectFIboExpansIon
Class CChartDbjectFIboExpansIon Is a class for sImplIfIed access to ¨FIbonaccI ExpansIon¨ graphIc
object propertIes.
0escrIptIon
Class CChartDbjectFIboExpansIon provIdes access to ¨FIbonaccI ExpansIon¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r¯Lo·Ixp-n-L·n . puoLL· ..!-nrJo|-·rrn-nJ
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-¯Lo·.m¬!
CIass hethods
Create
Create Creates graphIc object ¨FIbonaccI ExpansIon¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1287
Create
Creates graphIc object ¨FIbonaccI ExpansIon¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2, // ¯-··nJ pnL·- ···nJLn-r-
J-r-rLm- :ima¨, // r!LnJ rLm- ···nJLn-r-
J·uoL- pri·a¨ // r!LnJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
:ima¨
[In] TIme coordInate of the thIrd anchor poInt.
pri·a¨
[In] PrIce coordInate of the thIrd anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1288
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_EXPANSÌDN for CChartDbjectFIboExpansIon).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1289
EIIIott TooIs
A group of graphIc objects ¨EllIott Tools¨.
ThIs sectIon contaIns the technIcal detaIls of workIng wIth a group of classes of graphIcal objects
¨EllIott Tools¨ and a descrIptIon of the relevant components of the |0L5 Standard LIbrary .
CIass name Dbject
CChartDbjectEllIottWaveJ CraphIc object ¨CorrectIng Wave¨
CChartDbjectEllIottWave5 CraphIc object ¨Ìmpulse Wave¨
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1290
CChartDbjectEIIIottWave3
Class CChartDbjectEllIottWaveJ Is a class for sImplIfIed access to ¨CorrectIng Wave¨ graphIc object
propertIes.
0escrIptIon
Class CChartDbjectEllIottWaveJ provIdes access to ¨CorrectIng Wave¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rILLL·rrW-v-` . puoLL· ..!-nrJo|-·r
TItIe
.!-nrJo|-·r-\.!-nrJo|-·r-ILLL·rr.m¬!
CIass hethods
Create
Create Creates graphIc object ¨CorrectIng Wave¨
PropertIes
0egree Cets/Sets property ¨0egree¨
LInes Cets/Sets property ¨LInes¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
0erIved cIasses:
CChartDbjectEllIottWave5
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1291
Create
Creates graphIc object ¨CorrectIng Wave¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2, // ¯-··nJ pnL·- ···nJLn-r-
J-r-rLm- :ima¨, // r!LnJ rLm- ···nJLn-r-
J·uoL- pri·a¨ // r!LnJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
:ima¨
[In] TIme coordInate of the thIrd anchor poInt.
pri·a¨
[In] TIme coordInate of the thIrd anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1292
0egree (Cet hethod)
Cets the value of ¨0egree¨ property.
IHJM_IHHPJr_WAVI_¯IJ-II ¯-jn--.· ··n-r
Peturned vaIue
7alue of ¨0egree¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns WFDNC_7ALUE.
0egree (Set hethod)
Sets new value for ¨0egree¨ property.
o··L ¯-jn--.
IHJM_IHHPJr_WAVI_¯IJ-II jajraa // pn·p-nry v-Lu-
·
Parameters
jajraa
[In] New value for ¨0egree¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1293
LInes (Cet hethod)
Cets the value of ¨LInes¨ property.
o··L HLn--.· ··n-r
Peturned vaIue
7alue of ¨LInes¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
LInes (Set hethod)
Sets new value for ¨LInes¨ property.
o··L HLn--.
o··L lina· // rL-j v-Lu-
·
Parameters
lina·
[In] New value for ¨LInes¨ property.
Peturned vaIue
true If successful, false If flag hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1294
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1295
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1296
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_ELLÌDTWA7EJ for CChartDbjectEllIottWaveJ).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1297
CChartDbjectEIIIottWave5
Class CChartDbjectEllIottWave5 Is a class for sImplIfIed access to ¨Ìmpulse Wave¨ graphIc object
propertIes.
0escrIptIon
Class CChartDbjectEllIottWave5 provIdes access to ¨Ìmpulse Wave¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rILLL·rrW-v-¯ . puoLL· ..!-nrJo|-·rILLL·rrW-v-`
TItIe
.!-nrJo|-·r-\.!-nrJo|-·r-ILLL·rr.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Ìmpulse Wave¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1298
Create
Creates graphIc object ¨Ìmpulse Wave¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2, // ¯-··nJ pnL·- ···nJLn-r-
J-r-rLm- :ima¨, // r!LnJ rLm- ···nJLn-r-
J·uoL- pri·a¨, // r!LnJ pnL·- ···nJLn-r-
J-r-rLm- :ima4, // ¯·unr! rLm- ···nJLn-r-
J·uoL- pri·a4, // ¯·unr! pnL·- ···nJLn-r-
J-r-rLm- :ima¯ // ¯Lrr! rLm- ···nJLn-r-
J·uoL- pri·a¯, // ¯Lrr! pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
:ima¨
[In] TIme coordInate of the thIrd anchor poInt.
pri·a¨
[In] PrIce coordInate of the thIrd anchor poInt.
:ima4
[In] TIme coordInate of the fourth anchor poInt.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1299
pri·a4
[In] PrIce coordInate of the fourth anchor poInt.
:ima¯
[In] TIme coordInate of the fIfth anchor poInt.
pri·a¯
[In] PrIce coordInate of the fIfth anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1300
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_ELLÌDTWA7E5 for CChartDbjectEllIottWave5).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1301
Dbjects Shapes
A group of graphIc objects ¨Shapes¨.
ThIs sectIon contaIns the technIcal detaIls of workIng wIth a group of classes of graphIcal objects
¨Shapes¨ and a descrIptIon of the relevant components of the |0L5 Standard LIbrary .
CIass name Dbject
CChartDbjectFectangle CraphIc object ¨Fectangle¨
CChartDbjectTrIangle CraphIc object ¨TrIangle¨
CChartDbjectEllIpse CraphIc object ¨EllIpse¨
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1302
CChartDbjectPectangIe
Class CChartDbjectFectangle Is a class for sImplIfIed access to ¨Fectangle¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectFectangle provIdes access to ¨Fectangle¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r--·r-njL- . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-¯!-p--.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Fectangle¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1303
Create
Creates graphIc object ¨Fectangle¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
L·nj vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2 // ¯-··nJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
Peturned vaIue
true If successful, 0 If error
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1304
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_FECTANCLE for CChartDbjectFectangle).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1305
CChartDbjectTrIangIe
Class CChartDbjectTrIangle Is a class for sImplIfIed access to ¨TrIangle¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectTrIangle provIdes access to ¨TrIangle¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rrnL-njL- . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-¯!-p--.m¬!
CIass hethods
Create
Create Creates graphIc object ¨TrIangle¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1306
Create
Creates graphIc object ¨TrIangle¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
L·nj vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2, // ¯-··nJ pnL·- ···nJLn-r-
J-r-rLm- :ima¨, // r!LnJ rLm- ···nJLn-r-
J·uoL- pri·a¨ // r!LnJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
:ima¨
[In] TIme coordInate of the thIrd anchor poInt.
pri·a¨
[In] PrIce coordInate of the thIrd anchor poInt.
Peturned vaIue
true If successful, false If error
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1307
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_TFÌANCLE for CChartDbjectTrIangle).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1308
CChartDbjectEIIIpse
Class CChartDbjectEllIpse Is a class for sImplIfIed access to ¨EllIpse¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectEllIpse provIdes access to ¨EllIpse¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rILLLp-- . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-¯!-p--.m¬!
CIass hethods
Create
Create Creates graphIc object ¨EllIpse¨
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1309
Create
Creates graphIc object ¨EllIpse¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima., // ¯Ln-r rLm- ···nJLn-r-
J·uoL- pri·a., // ¯Ln-r pnL·- ···nJLn-r-
J-r-rLm- :ima2, // ¯-··nJ rLm- ···nJLn-r-
J·uoL- pri·a2, // ¯-··nJ pnL·- ···nJLn-r-
J-r-rLm- :ima¨, // r!LnJ rLm- ···nJLn-r-
J·uoL- pri·a¨ // r!LnJ pnL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima.
[In] TIme coordInate of the fIrst anchor poInt.
pri·a.
[In] PrIce coordInate of the fIrst anchor poInt.
:ima2
[In] TIme coordInate of the second anchor poInt.
pri·a2
[In] PrIce coordInate of the second anchor poInt.
:ima¨
[In] TIme coordInate of the thIrd anchor poInt.
pri·a¨
[In] PrIce coordInate of the thIrd anchor poInt.
Peturned vaIue
true If successful, false If error
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1310
Type
Feturns object type IdentIfIer of the graphIc object.
Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_ELLÌPSE for CChartDbjectEllIpse).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1311
Dbjects Arrows
Croup for graphIc objects Arrows.
ThIs sectIon contaIns the technIcal detaIls of workIng wIth a group of classes of graphIcal objects
¨Arrow¨ and a descrIptIon of the relevant components of the |0L5 Standard LIbrary . Ìn essence, the
arrow · thIs Is some Icon to be dIsplayed to the user, whIch matches a certaIn code. There are two
types of graphIcal objects ¨Arrow¨ to dIsplay Icons on the charts:
Dbject ¨Arrow¨, whIch allows you to specIfy the code Icon dIsplayed object.
Croup objects to dIsplay certaIn types of Icons (and the correspondIng certaIn fIxed code).
CIass for the arrow dIspIays Icons of arbItrary code
CIass name Name of the object arrow
CChartDbjectArrow Arrow
CIasses for the arrow Icon fIxed code
CIass name Name of the object arrow
CChartDbjectArrowCheck Check
CChartDbjectArrow0own Arrow Up
CChartDbjectArrowUp Arrow 0own
CChartDbjectArrowStop Stop SIgn
CChartDbjectArrowThumb0own Thumbs Up
CChartDbjectArrowThumbUp Thumbs 0own
CChartDbjectArrowLeftPrIce Left PrIce Label
CChartDbjectArrowFIghtPrIce FIght PrIce Label
See aIso
Dbject types, |ethods of bIndIng sItes, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1312
CChartDbjectArrow
Class CChartDbjectArrow Is a class for sImplIfIed access to ¨Arrow¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectArrow provIdes access to common propertIes of objects ¨Arrow¨ to all of Its
descendants.
0ecIaratIon
·L--- ..!-nrJo|-·rAnn·. . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-Ann·..m¬!
CIass hethods
Create
Create Creates graphIc object ¨Arrow¨
PropertIes
ArrowCode Cets/Sets property ¨Arrow Code¨
Anchor Cets/Sets property ¨Anchor¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, |ethods of bIndIng sItes, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1313
Create
Creates graphIc object ¨Arrow¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr P¯
-rnLnj n-ma, // Jo|-·r H-m-
Lnr vinj.v, // .!-nr WLnJ·.
J-r-rLm- :ima, // rLm-
J·uoL- pri·a, // -nL·-
·!-n ·.ja // Ann·. .·J-
·
Parameters
·n-r:_ij
[In] Chart ÌdentIfIer (0 - current chart).
n-ma
[In] Dbject name (Should be unIque).
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima
[In] TIme coordInate.
pri·a
[In] PrIce coordInate.
·.ja
[In] ¨Arrow¨ code (WIngdIngs).
Peturned vaIue
true - If successful, overwIse false.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·....n--r-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r-Ann·.-.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·rAnn·. -nn·.¡
//--- --r ·o|-·r p-n-m-r-n-
J·uoL- pnL·-=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
Lr..-nn·...n--r-.¨,¨Ann·.¨,¨,rLm-.unn-nr.·,pnL·-,!-!··

//--- -nn·. ·n--r- -nn·n
pnLnrr.¨Ann·. ·n--r-. Inn·n `J.¨,J-rH--rInn·n.··¡
//---
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1314
n-runn¡
·
//--- u-- -nn·.
//--- . . .
·

Standard Library
© 2000·2010, |eta0uotes Software Corp.
1315
ArrowCode (Cet hethod)
Cets code of the symbol for ¨Arrow¨.
·!-n Ann·..·J-.· ··n-r
Peturned vaIue
Symbol code of ¨Arrow¨ object, assIgned to the class Instance. Ìf there Is no object assIgned, It
returns 0.
ArrowCode (Set hethod)
Sets symbol code for ¨Arrow¨
o··L Ann·..·J-.
·!-n ·.ja // .·J- v-Lu-
·
Parameters
·.ja
[In] new value for ¨arrow¨ code (WIngdIngs).
Peturned vaIue
true - If successful, false - If code hasn't changed.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·...Ann·..·J-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r-Ann·.-.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·rAnn·. -nn·.¡
·!-n ··J-=!-!¡
//--- --r ·o|-·r p-n-m-r-n-
J·uoL- pnL·-=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
Lr..-nn·...n--r-.¨,¨Ann·.¨,¨,rLm-.unn-nr.·,pnL·-,··J-··

//--- -nn·. ·n--r- -nn·n
pnLnrr.¨Ann·. ·n--r-. Inn·n `J.¨,J-rH--rInn·n.··¡
//---
n-runn¡
·
//--- u-- -nn·. r· p·--LoL- ·!-nj-- ··J-
//--- . . .
//--- j-r ··J- ·r -nn·.
Lr.-nn·..Ann·..·J-.·.=··J-·

//--- --r ··J- ·r -nn·.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1316
-nn·..Ann·..·J-.··J-·¡
·
//--- u-- -nn·.
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1317
Anchor (Cet hethod)
Cets anchor type of the ¨Anchor¨ object
IHJM_A--JW_AH.|J- An·!·n.· ··n-r
Peturned vaIue
Anchor type of ¨Arrow¨ object, assIgned to the class Instance. Ìf there Is no object assIgned, It
returns WFDNC_7ALUE.
Anchor (Set hethod)
Sets color for graphIc object
o··L An·!·n.
IHJM_A--JW_AH.|J- nav_·.l.r // n-. ··L·n
·
Parameters
nav_·.l.r
[In] New value of color for lIne of the graphIc object.
Peturned vaIue
true If successful, false If color hasn't changed.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·r..An·!·n
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r-Ann·.-.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·rAnn·. -nn·.¡
IHJM_A--JW_AH.|J- -n·!·n=AH.|J-_ÐJrrJM¡
//--- --r ·o|-·r p-n-m-r-n-
J·uoL- pnL·-=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
Lr..-nn·...n--r-.¨,¨Ann·.¨,¨,rLm-.unn-nr.·,pnL·-,!-!··

//--- -nn·. ·n--r- -nn·n
pnLnrr.¨Ann·. ·n--r-. Inn·n `J.¨,J-rH--rInn·n.··¡
//---
n-runn¡
·
//--- j-r -n·!·n ·r -nn·.
Lr.-nn·..An·!·n.·.=-n·!·n·

//--- --r -n·!·n ·r -nn·.
-nn·..An·!·n.-n·!·n·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1318
//--- u-- -nn·.
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1319
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // rLL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the fIle already opened usIng by functIon FIleDpen(...) .
Peturned vaIue
true If successful, overwIse false.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·...¯-v-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r-Ann·.-.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
..!-nrJo|-·rAnn·. -nn·.¡
//--- --r ·o|-·r p-n-m-r-n-
J·uoL- pnL·-=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
Lr..-nn·...n--r-.¨,¨Ann·.¨,¨,rLm-.unn-nr.·,pnL·-,!-!··

//--- -nn·. ·n--r- -nn·n
pnLnrr.¨Ann·. ·n--r-. Inn·n `J.¨,J-rH--rInn·n.··¡
//---
n-runn¡
·
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_W-PrI¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn·..¯-v-.rLL-_!-nJL-··

//--- rLL- --v- -nn·n
pnLnrr.¨¯LL- --v-. Inn·n `J.¨,J-rH--rInn·n.··¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1320
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // rLL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, overwIse false.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·...H·-J
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r-Ann·.-.m¬!
//---
v·LJ Jn¯r-nr.·

Lnr rLL-_!-nJL-¡
..!-nrJo|-·rAnn·. -nn·.¡
//--- ·p-n rLL-
rLL-_!-nJL-=¯LL-Jp-n.¨My¯LL-.oLn¨,¯PHI_-IA¯¯PHI_ÐPH¯PHI_AH¯P·¡
Lr.rLL-_!-nJL-=¨·

Lr..-nn·..H·-J.rLL-_!-nJL-··

//--- rLL- L·-J -nn·n
pnLnrr.¨¯LL- L·-J. Inn·n `J.¨,J-rH--rInn·n.··¡
¯LL-.L·--.rLL-_!-nJL-·¡
//---
n-runn¡
·
¯LL-.L·--.rLL-_!-nJL-·¡
·
//--- u-- -nn·.
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1321
Type
Feturns graphIc object type IdentIfIer
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (for example D8J_AFFDW for CChartDbjectArrow)
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·...ryp-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r-Ann·.-.m¬!
//---
v·LJ Jn¯r-nr.·

..!-nrJo|-·rAnn·. -nn·.¡
//--- j-r -nn·. ryp-
Lnr ryp-=-nn·..ryp-.·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1322
Arrows wIth fIxed code
Classes ¨Arrows wIth fIxed code¨ are classes for sImplIfIed access to the propertIes of the followIng
graphIc objects:
CIass name Arrow object name
CChartDbjectArrowCheck ¨Arrow Check¨
CChartDbjectArrow0own ¨Arrow 0own¨
CChartDbjectArrowUp ¨Arrow Up¨
CChartDbjectArrowStop ¨Arrow Stop¨
CChartDbjectArrowThumb0own ¨Cood¨ (¨8Ig fInger up¨)
CChartDbjectArrowThumbUp ¨8ad¨ (¨8Ig fInger down¨)
CChartDbjectArrowLeftPrIce ¨Left prIce¨ arrow
CChartDbjectArrowFIghtPrIce ¨FIght prIce¨ arrow
0escrIptIon
Classes ¨Arrows wIth fIxed code¨ provIdes access to the object propertIes.
0ecIaratIons
·L--- ..!-nrJo|-·rAnn·..!-·k . puoLL· ..!-nrJo|-·rAnn·.¡
·L--- ..!-nrJo|-·rAnn·.¯·.n . puoLL· ..!-nrJo|-·rAnn·.¡
·L--- ..!-nrJo|-·rAnn·.Jp . puoLL· ..!-nrJo|-·rAnn·.¡
·L--- ..!-nrJo|-·rAnn·.¯r·p . puoLL· ..!-nrJo|-·rAnn·.¡
·L--- ..!-nrJo|-·rAnn·.r!umo¯·.n . puoLL· ..!-nrJo|-·rAnn·.¡
·L--- ..!-nrJo|-·rAnn·.r!umoJp . puoLL· ..!-nrJo|-·rAnn·.¡
·L--- ..!-nrJo|-·rAnn·.H-rr-nL·- . puoLL· ..!-nrJo|-·rAnn·.¡
·L--- ..!-nrJo|-·rAnn·.-Lj!r-nL·- . puoLL· ..!-nrJo|-·rAnn·.¡
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-Ann·..m¬!
CIass hethods
Create
Create Creates graphIc object specIfIed
PropertIes
ArrowCode ¨Cag¨ for method of code change
Inputloutput
vIrtual Type 7Irtual method of IdentIfIcatIon
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1323
See aIso
Dbject types, |ethods of bIndIng sItes, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1324
Create
Creates graphIc object ¨Arrow wIth fIxed code¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr P¯
-rnLnj n-ma, // Jo|-·r H-m-
Lnr vinj.v, // .!-nr WLnJ·.
J-r-rLm- :ima, // rLm-
J·uoL- pri·a // -nL·-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] UnIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima
[In] TIme coordInate.
pri·a
[In] PrIce coordInate.
Peturned vaIue
true If successful, false If error.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·..!-·k...n--r-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.¯·.n...n--r-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.Jp...n--r-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.¯r·p...n--r-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.r!umo¯·.n...n--r-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.r!umoJp...n--r-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.H-rr-nL·-...n--r-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.-Lj!r-nL·-...n--r-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r-Ann·.-.m¬!
//---
v·LJ Jn¯r-nr.·

//--- r·n -x-mpL-, r-k- ..!-nrJo|-·rAnn·..!-·k
..!-nrJo|-·rAnn·..!-·k -nn·.¡
//--- --r ·o|-·r p-n-m-r-n-
J·uoL- pnL·-=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
Lr..-nn·...n--r-.¨,¨Ann·..!-·k¨,¨,rLm-.unn-nr.·,pnL·-··
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1325

//--- -nn·. ·n--r- -nn·n
pnLnrr.¨Ann·. ·n--r-. Inn·n `J.¨,J-rH--rInn·n.··¡
//---
n-runn¡
·
//--- u-- -nn·.
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1326
ArrowCode
ProhIbIts code changes for ¨Arrow¨.
o··L Ann·..·J-.
·!-n ·.ja // ··J- v-Lu-
·
Parameters
·.ja
[In] any value
Peturned vaIue
Always false.
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·..!-·k..Ann·..·J-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.¯·.n..Ann·..·J-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.Jp..Ann·..·J-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.¯r·p..Ann·..·J-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.r!umo¯·.n..Ann·..·J-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.r!umoJp..Ann·..·J-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.H-rr-nL·-..Ann·..·J-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.-Lj!r-nL·-..Ann·..·J-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r-Ann·.-.m¬!
//---
v·LJ Jn¯r-nr.·

//--- r·n -x-mpL-, r-k- ..!-nrJo|-·rAnn·..!-·k
..!-nrJo|-·rAnn·..!-·k -nn·.¡
//--- --r ·o|-·r p-n-m-r-n-
J·uoL- pnL·-=¯ymo·LPnr·¯·uoL-.¯ymo·L.·,¯1MÐJH_ÐP¯·¡
Lr..-nn·...n--r-.¨,¨Ann·..!-·k¨,¨,rLm-.unn-nr.·,pnL·-··

//--- -nn·. ·n--r- -nn·n
pnLnrr.¨Ann·. ·n--r-. Inn·n `J.¨,J-rH--rInn·n.··¡
//---
n-runn¡
·
//--- --r ··J- ·r -nn·.
Lr..-nn·..Ann·..·J-.!-!··

//--- Lr L- n·r -nn·n
pnLnrr.¨Ann·. ··J- ·-n n·r o- ·!-nj-J¨·¡
·
//--- u-- -nn·.
//--- . . .
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1327
Type
Feturns graphIc object type IdentIfIer
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_AFFDW_CHECK for CChartDbjectArrowCheck, D8J_AFFDW_0DWN for
CChartDbjectArrow0own, D8J_AFFDW_UP for CChartDbjectArrowUp, D8J_AFFDW_STDP for
CChartDbjectArrowStop, D8J_AFFDW_THU|8_0DWN for CChartDbjectArrowThumb0own,
D8J_AFFDW_THU|8_UP for CChartDbjectArrowThumbUp, D8J_AFFDW_LEFT_PFÌCE for
CChartDbjectArrowLeftPrIce, D8J_AFFDW_FÌCHT_PFÌCE for CChartDbjectArrowFIghtPrIce).
ExampIe:
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·..!-·k..ryp-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.¯·.n..ryp-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.Jp..ryp-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.¯r·p..ryp-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.r!umo¯·.n..ryp-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.r!umoJp..ryp-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.H-rr-nL·-..ryp-
//--- -x-mpL- r·n ..!-nrJo|-·rAnn·.-Lj!r-nL·-..ryp-
tLn·LuJ- <.!-nrJo|-·r-\.!-nrJo|-·r-Ann·.-.m¬!
//---
v·LJ Jn¯r-nr.·

//--- r·n -x-mpL-, r-k- ..!-nrJo|-·rAnn·..!-·k
..!-nrJo|-·rAnn·..!-·k -nn·.¡
//--- j-r -nn·. ryp-
Lnr ryp-=-nn·..ryp-.·¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1328
Dbject ControIs
A group of graphIc objects ¨Dbject Controls¨.
ThIs sectIon contaIns the technIcal detaIls of workIng wIth a group of classes of graphIcal objects
¨Dbject Controls¨ and a descrIptIon of the relevant components of the |0L5 Standard LIbrary .
CIass name Dbject
CChartDbjectText CraphIc object ¨Text¨
CChartDbjectLabel CraphIc object ¨Text Label¨
CChartDbjectEdIt CraphIc object ¨EdIt¨
CChartDbject8utton CraphIc object ¨8utton¨
CChartDbjectSubChart CraphIc object ¨Chart¨
CChartDbject8Itmap CraphIc object ¨8Itmap¨
CChartDbject8mpLabel CraphIc object ¨8Itmap Label¨
See aIso
Dbject types, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1329
CChartDbjectText
Class CChartDbjectText Is a class for sImplIfIed access to ¨Text¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectText provIdes access to ¨Text¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rr-xr . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-rxr.·nrn·L-.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Text¨
PropertIes
Angle Cets/Sets property ¨Angle¨
Font Cets/Sets property ¨Font¨
FontSIze Cets/Sets property ¨FontSIze¨
Anchor Cets/Sets property ¨Anchor¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
0erIved cIasses:
CChartDbjectLabel
See aIso
Dbject types, Dbject propertIes, |ethods of bIndIng sItes, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1330
Create
Creates graphIc object ¨Text¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima, // rLm- ···nJLn-r-
J·uoL- pri·a // -nL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima
[In] TIme coordInate of the anchor poInt.
pri·a
[In] PrIce coordInate of the anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1331
AngIe (Cet hethod)
Cets the value of ¨Angle¨ property.
J·uoL- AnjL-.· ··n-r
Peturned vaIue
7alue of ¨Angle¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
AngIe (Set hethod)
Sets new value for ¨Angle¨ property.
o··L AnjL-.
J·uoL- -njla // n-. -njL-
·
Parameters
-njla
[In] New value for ¨Angle¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1332
Font (Cet hethod)
Cets the value of ¨Font¨ property.
-rnLnj ¯·nr.· ··n-r
Peturned vaIue
7alue of ¨Font¨ property of the object, assIgned to the class Instance. Ìf there Is no object assIgned,
It returns ¨¨.
Font (Set hethod)
Sets new value for ¨Font¨ property.
o··L ¯·nr.
-rnLnj f.n: // n-. r·nr
·
Parameters
f.n:
[In] New value for ¨Font¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1333
FontSIze (Cet hethod)
Cets the value of ¨FontSIze¨ property.
Lnr ¯·nr¯Lz-.· ··n-r
Peturned vaIue
7alue of ¨FontSIze¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
FontSIze (Set hethod)
Sets new value for ¨FontSIze¨ property.
o··L ¯·nr¯Lz-.
Lnr ·iza // n-. r·nr -Lz-
·
Parameters
·iza
[In] New value for ¨Font¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1334
Anchor (Cet hethod)
Cets the value of ¨Anchor¨ property.
IHJM_AH.|J-_-JPHr An·!·n.· ··n-r
Peturned vaIue
7alue of ¨Anchor¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns WFDNC_7ALUE.
Anchor (Set hethod)
Sets new value for ¨Anchor¨ property.
o··L An·!·n.
IHJM_AH.|J-_-JPHr -n·n.r // n-. v-Lu-
·
Parameters
-n·n.r
[In] New value for ¨Anchor¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1335
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1336
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1337
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_TEXT for CChartDbjectText).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1338
CChartDbjectLabeI
Class CChartDbjectLabel Is a class for sImplIfIed access to ¨Label¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectLabel provIdes access to ¨Label¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rH-o-L . puoLL· ..!-nrJo|-·rr-xr
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-rxr.·nrn·L-.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Label¨
PropertIes
X_0Istance Cets/Sets property ¨X_0Istance¨
Y_0Istance Cets/Sets property ¨Y_0Istance¨
X_SIze Cets/Sets property ¨X_SIze¨
Y_SIze Cets/Sets property ¨Y_SIze¨
Corner Cets/Sets property ¨Corner¨
TIme ¨Cag¨ for TIme CoordInate change
PrIce ¨Cag¨ for PrIce CoordInate change
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
0erIved cIasses:
CChartDbjectEdIt
See aIso
Dbject types, Dbject propertIes, Chart angle, |ethods of bIndIng sItes, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1339
Create
Creates graphIc object ¨Label¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
Lnr X, // x ···nJLn-r-
Lnr :, // 1 ···nJLn-r-
Lnr ·izaX, // x -Lz-
Lnr ·iza: // 1 -Lz-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
X
[In] X coordInate.
:
[In] Y coordInate.
·izaX
[In] X sIze.
·iza:
[In] Y sIze.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1340
X_0Istance (Cet hethod)
Cets the value of ¨X_0Istance¨ property.
Lnr x_¯L-r-n·-.· ··n-r
Peturned vaIue
7alue of ¨X_0Istance¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
X_0Istance (Set hethod)
Sets new value for ¨X_0Istance¨ property.
o··L x_¯L-r-n·-.
Lnr X // n-. v-Lu-
·
Parameters
X
[In] New value for ¨X_0Istance¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1341
Y_0Istance (Cet hethod)
Cets the value of ¨Y_0Istance¨ property.
Lnr 1_¯L-r-n·-.· ··n-r
Peturned vaIue
7alue of ¨Y_0Istance¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
Y_0Istance (Set hethod)
Sets new value for ¨Y_0Istance¨ property.
o··L 1_¯L-r-n·-.
Lnr : // n-. v-Lu-
·
Parameters
:
[In] New value for ¨Y_0Istance¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1342
X_SIze
Cets the value of ¨X_SIze¨ property.
Lnr x_¯Lz-.· ··n-r
Peturned vaIue
7alue of ¨X_SIze¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1343
Y_SIze
Cets the value of ¨Y_SIze¨ property.
Lnr 1_¯Lz-.· ··n-r
Peturned vaIue
7alue of ¨Y_SIze¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1344
Corner (Cet hethod)
Cets the value of ¨Corner¨ property.
IHJM_ÐA¯I_.J-HI- .·nn-n.· ··n-r
Peturned vaIue
7alue of ¨Corner¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns WFDNC_7ALUE.
Corner (Set hethod)
Sets new value for ¨Corner¨ property.
o··L .·nn-n.
IHJM_ÐA¯I_.J-HI- ·.rnar // n-. v-Lu-
·
Parameters
·.rnar
[In] New value for ¨Corner¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1345
TIme
ProhIbIts changes of the tIme coordInate.
o··L rLm-.
J-r-rLm- :ima // -ny v-Lu-
·
Parameters
:ima
[In] Any value of datetIme type.
Peturned vaIue
always false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1346
PrIce
ProhIbIts changes of the prIce coordInate.
o··L -nL·-.
J·uoL- pri·a // -ny v-Lu-
·
Parameters
pri·a
[In] Any value of double type.
Peturned vaIue
always false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1347
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1348
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1349
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_LA8EL for CChartDbjectLabel).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1350
CChartDbjectEdIt
Class CChartDbjectEdIt Is a class for sImplIfIed access to ¨EdIt¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectEdIt provIdes access to ¨EdIt¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rIJLr . puoLL· ..!-nrJo|-·rH-o-L
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-rxr.·nrn·L-.m¬!
CIass hethods
Create
Create Creates graphIc object ¨EdIt¨
PropertIes
X_SIze Cets property ¨X SIze¨
Y_SIze Cets property ¨Y SIze¨
8ackColor Cets/Sets property ¨8ackground Color¨
Angle Cets/Sets property ¨Angle¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
0erIved cIasses:
CChartDbject8utton
See aIso
Dbject types, Dbject propertIes, Chart angle, |ethods of bIndIng sItes, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1351
Create
Creates graphIc object ¨EdIt¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
Lnr X, // x ···nJLn-r-
Lnr :, // 1 ···nJLn-r-
Lnr ·izaX, // x -Lz-
Lnr ·iza: // 1 -Lz-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
X
[In] X coordInate.
:
[In] Y coordInate.
·izaX
[In] X sIze.
·iza:
[In] Y sIze.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1352
X_SIze
Sets new value for ¨X_SIze¨ property.
o··L x_¯Lz-.
Lnr ·iza // n-. -Lz-
·
Parameters
·iza
[In] New value for ¨X_SIze¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1353
Y_SIze
Sets new value for ¨Y_SIze¨ property.
o··L 1_¯Lz-.
Lnr ·iza // n-. -Lz-
·
Parameters
·iza
[In] New value for ¨Y_SIze¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1354
ßackCoIor (Cet hethod)
Cets the value of ¨8ackColor¨ property.
··L·n Ð-·k.·L·n.· ··n-r
Peturned vaIue
7alue of ¨8ackColor¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns CLF_NDNE.
ßackCoIor (Set hethod)
Sets new value for ¨8ackColor¨ property.
o··L Ð-·k.·L·n.
··L·n nav_·.l.r // n-. o-·kjn·unJ ··L·n
·
Parameters
nav_·.l.r
[In] New value for ¨8ackColor¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1355
AngIe
ProhIbIts changes of the ¨Angle¨ property.
o··L AnjL-.
J·uoL- -njla // -ny v-Lu-
·
Parameters
-njla
[In] Any value of double type.
Peturned vaIue
always false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1356
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1357
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1358
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_E0ÌT for CChartDbjectEdIt).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1359
CChartDbjectßutton
Class CChartDbject8utton Is a class for sImplIfIed access to ¨8utton¨ graphIc object propertIes.
0escrIptIon
Class CChartDbject8utton provIdes access to ¨8utton¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rÐurr·n . puoLL· ..!-nrJo|-·rIJLr
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-rxr.·nrn·L-.m¬!
CIass hethods
Create
Create ÌnherIted form class CChartDbjectEdIt
PropertIes
State Cets/Sets button state (Pressed/0epressed)
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, Dbject propertIes, Chart angle, |ethods of bIndIng sItes, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1360
State (Cet hethod)
Cets the value of ¨State¨ property.
o··L ¯r-r-.· ··n-r
Peturned vaIue
7alue of ¨State¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
State (Set hethod)
Sets new value for ¨State¨ property.
o··L ¯r-r-.
o··L ·:-:a // n-. -r-r- v-Lu-
·
Parameters
X
[In] New value for ¨State¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1361
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1362
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1363
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_8UTTDN for CChartDbject8utton).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1364
CChartDbjectSubChart
Class CChartDbjectSubChart Is a class for sImplIfIed access to ¨Chart¨ graphIc object propertIes.
0escrIptIon
Class CChartDbjectSubChart provIdes access to ¨Chart¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·r¯uo.!-nr . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-¯uo.!-nr.m¬!
CIass hethods
Create
Create Creates graphIc object ¨Chart¨
PropertIes
X_0Istance Cets/Sets property ¨X_0Istance¨
Y_0Istance Cets/Sets property ¨Y_0Istance¨
Corner Cets/Sets property ¨Corner¨
X_SIze Cets/Sets property ¨X_SIze¨
Y_SIze Cets/Sets property ¨Y_SIze¨
Symbol Cets/Sets property ¨Symbol¨
PerIod Cets/Sets property ¨PerIod¨
Scale Cets/Sets property ¨Scale¨
0ateScale Cets/Sets property ¨Show date scale¨
PrIceScale Cets/Sets property ¨Show prIce scale¨
TIme ¨Cag¨ for tIme coordInate change
PrIce ¨Cag¨ for prIce coordInate change
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1365
Dbject types, Dbject propertIes, Chart angle, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1366
Create
Creates graphIc object ¨SubChart¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
Lnr X, // x ···nJLn-r-
Lnr :, // 1 ···nJLn-r-
Lnr ·izaX, // x -Lz-
Lnr ·iza: // 1 -Lz-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
X
[In] X coordInate.
:
[In] Y coordInate.
·izaX
[In] X sIze.
·iza:
[In] Y sIze.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1367
X_0Istance (Cet hethod)
Cets the value of ¨X_0Istance¨ property.
Lnr x_¯L-r-n·-.· ··n-r
Peturned vaIue
7alue of ¨X_0Istance¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
X_0Istance (Set hethod)
Sets new value for ¨X_0Istance¨ property.
o··L x_¯L-r-n·-.
Lnr X // n-. v-Lu-
·
Parameters
X
[In] New value for ¨X_0Istance¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1368
Y_0Istance (Cet hethod)
Cets the value of ¨Y_0Istance¨ property.
Lnr 1_¯L-r-n·-.· ··n-r
Peturned vaIue
7alue of ¨Y_0Istance¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
Y_0Istance (Set hethod)
Sets new value for ¨Y_0Istance¨ property.
o··L 1_¯L-r-n·-.
Lnr : // n-. v-Lu-
·
Parameters
:
[In] New value for ¨Y_0Istance¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1369
Corner (Cet hethod)
Cets the value of ¨Corner¨ property.
IHJM_ÐA¯I_.J-HI-.·nn-n.· ··n-r
Peturned vaIue
7alue of ¨Corner¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns WFDNC_7ALUE.
Corner (Set hethod)
Sets new value for ¨Corner¨ property.
o··L .·nn-n.
IHJM_ÐA¯I_.J-HI- ·.rnar // n-. v-Lu-
·
Parameters
·.rnar
[In] New value for ¨Corner¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1370
X_SIze (Cet hethod)
Cets the value of ¨X_SIze¨ property.
Lnr x_¯Lz-.· ··n-r
Peturned vaIue
7alue of ¨X_SIze¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
X_SIze (Set hethod)
Sets new value for ¨X_SIze¨ property.
o··L x_¯Lz-.
Lnr X // n-. v-Lu-
·
Parameters
X
[In] New value for ¨X_SIze¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1371
Y_SIze (Cet hethod)
Cets the value of ¨Y_SIze¨ property.
Lnr 1_¯Lz-.· ··n-r
Peturned vaIue
7alue of ¨Y_SIze¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
Y_SIze (Set hethod)
Sets new value for ¨Y_SIze¨ property.
o··L 1_¯Lz-.
Lnr : // n-. v-Lu-
·
Parameters
:
[In] New value for ¨Y_SIze¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1372
SymboI (Cet hethod)
Cets the value of ¨Symbol¨ property.
-rnLnj ¯ymo·L.· ··n-r
Peturned vaIue
7alue of ¨Symbol¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns ¨¨.
SymboI (Set hethod)
Sets new value for ¨Symbol¨ property.
o··L ¯ymo·L.
-rnLnj ·ymo.l // n-. -ymo·L
·
Parameters
·ymo.l
[In] New value for ¨Symbol¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1373
PerIod (Cet hethod)
Cets the value of ¨PerIod¨ property.
Lnr --nL·J.· ··n-r
Peturned vaIue
7alue of ¨PerIod¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
PerIod (Set hethod)
Sets new value for ¨PerIod¨ property.
o··L --nL·J.
Lnr pari.j // n-. p-nL·J
·
Parameters
pari.j
[In] New value for ¨PerIod¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1374
ScaIe (Cet hethod)
Cets the value of ¨Scale¨ property.
J·uoL- ¯·-L-.· ··n-r
Peturned vaIue
7alue of ¨Scale¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
ScaIe (Set hethod)
Sets new value for ¨Scale¨ property.
o··L ¯·-L-.
J·uoL- ··-la // n-. -·-L-
·
Parameters
··-la
[In] New value for ¨Scale¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1375
0ateScaIe (Cet hethod)
Cets the value of ¨0ateScale¨ property.
o··L ¯-r-¯·-L-.· ··n-r
Peturned vaIue
7alue of ¨0ateScale¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
0ateScaIe (Set hethod)
Sets new value for ¨0ateScale¨ property.
o··L ¯-r-¯·-L-.
o··L ··-la // n-. v-Lu-
·
Parameters
··-la
[In] New value for ¨0ateScale¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1376
PrIceScaIe (Cet hethod)
Cets the value of ¨PrIceScale¨ property.
o··L -nL·-¯·-L-.· ··n-r
Peturned vaIue
7alue of ¨PrIceScale¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
PrIceScaIe (Set hethod)
Sets new value for ¨PrIceScale¨ property.
o··L -nL·-¯·-L-.
o··L ··-la // n-. v-Lu-
·
Parameters
··-la
[In] New value for ¨PrIceScale¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1377
TIme
ProhIbIts changes of the tIme coordInate.
o··L rLm-.
J-r-rLm- :ima // -ny v-Lu-
·
Parameters
:ima
[In] Any value of datetIme type.
Peturned vaIue
always false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1378
PrIce
ProhIbIts changes of the prIce coordInate.
o··L -nL·-.
J·uoL- pri·a // -ny v-Lu-
·
Parameters
pri·a
[In] Any value of double type.
Peturned vaIue
always false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1379
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1380
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1381
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_CHAFT for CChartDbjectSubChart).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1382
CChartDbjectßItmap
Class CChartDbject8Itmap Is a class for sImplIfIed access to ¨8Itmap¨ graphIc object propertIes.
0escrIptIon
Class CChartDbject8Itmap provIdes access to ¨8Itmap¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rÐLrm-p . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-Ðmp.·nrn·L-.m¬!
CIass hethods
Create
Create Creates graphIc object ¨8Itmap¨
PropertIes
8mpFIle Cets/Sets property ¨8|P FIlename¨
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Dbject types, Dbject propertIes, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1383
Create
Creates graphIc object ¨8Itmap¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
J-r-rLm- :ima, // rLm- ···nJLn-r-
J·uoL- pri·a // -nL·- ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
:ima
[In] TIme coordInate of the anchor poInt.
pri·a
[In] PrIce coordInate of the anchor poInt.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1384
ßmpFIIe (Cet hethod)
Cets the value of ¨8mpFIle¨ property.
-rnLnj Ðmp¯LL-.· ··n-r
Peturned vaIue
7alue of ¨8mpFIle¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
ßmpFIIe (Set hethod)
Sets new value for ¨8mpFIle¨ property.
o··L Ðmp¯LL-.
-rnLnj n-ma // n-. rLL- n-m-
·
Parameters
X
[In] New value for ¨8mpFIle¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1385
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1386
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1387
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_8ÌT|AP for CChartDbject8Itmap).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1388
CChartDbjectßmpLabeI
Class CChartDbject8mpLabel Is a class for sImplIfIed access to ¨8Itmap Label¨ graphIc object
propertIes.
0escrIptIon
Class CChartDbject8mpLabel provIdes access to ¨8Itmap Label¨ object propertIes.
0ecIaratIon
·L--- ..!-nrJo|-·rÐmpH-o-L . puoLL· ..!-nrJo|-·r
TItIe
<.!-nrJo|-·r-\.!-nrJo|-·r-Ðmp.·nrn·L-.m¬!
CIass hethods
Create
Create Creates graphIc object ¨8mpLabel¨
PropertIes
X_0Istance Cets/Sets property ¨X_0Istance¨
Y_0Istance Cets/Sets property ¨Y_0Istance¨
Corner Cets/Sets property ¨Corner¨
X_SIze Cets/Sets property ¨X_SIze¨
Y_SIze Cets/Sets property ¨Y_SIze¨
8mpFIleDn Cets/Sets property ¨8mpFIleDn¨ for button
pressed state (Dn)
8mpFIleDff Cets/Sets property ¨8mpFIleDff¨ for button
depressed state (Dff)
State Cets/Sets property ¨8utton State¨ (Pressed/
0epressed)
TIme ¨Cag¨ for tIme coordInate change
PrIce ¨Cag¨ for prIce coordInate change
Inputloutput
vIrtual Save 7Irtual method for wrItIng to fIle
vIrtual Load 7Irtual method for readIng from fIle
vIrtual Type 7Irtual method of IdentIfIcatIon
See aIso
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1389
Dbject types, Dbject propertIes, Chart angle, CraphIc objects
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1390
Create
Creates graphIc object ¨8mpLabel¨.
o··L .n--r-.
L·nj ·n-r:_ij, // .!-nr LJ-nrLrL-n
-rnLnj n-ma, // Jo|-·r n-m-
Lnr vinj.v, // .!-nr .LnJ·.
Lnr X, // x ···nJLn-r-
Lnr : // 1 ···nJLn-r-
·
Parameters
·n-r:_ij
[In] Chart IdentIfIer (0 - current chart).
n-ma
[In] An unIque name of the object to create.
vinj.v
[In] Chart wIndow number (0 - base wIndow).
X
[In] X coordInate.
:
[In] Y coordInate.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1391
X_0Istance (Cet hethod)
Cets the value of ¨X_0Istance¨ property.
Lnr x_¯L-r-n·-.· ··n-r
Peturned vaIue
7alue of ¨X_0Istance¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
X_0Istance (Set hethod)
Sets new value for ¨X_0Istance¨ property.
o··L x_¯L-r-n·-.
Lnr X // n-. v-Lu-
·
Parameters
X
[In] New value for ¨X_0Istance¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1392
Y_0Istance (Cet hethod)
Cets the value of ¨Y_0Istance¨ property.
Lnr 1_¯L-r-n·-.· ··n-r
Peturned vaIue
7alue of ¨Y_0Istance¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
Y_0Istance (Set hethod)
Sets new value for ¨Y_0Istance¨ property.
o··L 1_¯L-r-n·-.
Lnr : // n-. v-Lu-
·
Parameters
:
[In] New value for ¨Y_0Istance¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1393
Corner (Cet hethod)
Cets the value of ¨Corner¨ property.
IHJM_ÐA¯I_.J-HI-.·nn-n.· ··n-r
Peturned vaIue
7alue of ¨Corner¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns WFDNC_7ALUE.
Corner (Set hethod)
Sets new value for ¨Corner¨ property.
o··L .·nn-n.
IHJM_ÐA¯I_.J-HI- ·.rnar // n-. v-Lu-
·
Parameters
·.rnar
[In] New value for ¨Corner¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1394
X_SIze
Cets the value of ¨X_SIze¨ property.
Lnr x_¯Lz-.· ··n-r
Peturned vaIue
7alue of ¨X_SIze¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1395
Y_SIze
Cets the value of ¨Y_SIze¨ property.
Lnr 1_¯Lz-.· ··n-r
Peturned vaIue
7alue of ¨Y_SIze¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1396
ßmpFIIeDn (Cet hethod)
Cets the value of ¨8mpFIleDn¨ property.
-rnLnj Ðmp¯LL-Jn.· ··n-r
Peturned vaIue
7alue of ¨8mpFIleDn¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns ¨¨.
ßmpFIIeDn (Set hethod)
Sets new value for ¨8mpFIleDn¨ property.
o··L Ðmp¯LL-Jn.
-rnLnj n-ma // rLL- n-m-
·
Parameters
n-ma
[In] New value for ¨8mpFIleDn¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1397
ßmpFIIeDff (Cet hethod)
Cets the value of ¨8mpFIleDff¨ property.
-rnLnj Ðmp¯LL-Jrr.· ··n-r
Peturned vaIue
7alue of ¨8mpFIleDff¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns ¨¨.
ßmpFIIeDff (Set hethod)
Sets new value for ¨8mpFIleDff¨ property.
o··L Ðmp¯LL-Jrr.
-rnLnj n-ma // rLL- n-m-
·
Parameters
n-ma
[In] New value for ¨8mpFIleDff¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1398
State (Cet hethod)
Cets the value of ¨State¨ property.
o··L ¯r-r-.· ··n-r
Peturned vaIue
7alue of ¨State¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
State (Set hethod)
Sets new value for ¨State¨ property.
o··L ¯r-r-.
o··L ·:-:a // n-. -r-r- v-Lu-
·
Parameters
X
[In] New value for ¨State¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1399
TIme
ProhIbIts changes of the tIme coordInate.
o··L rLm-.
J-r-rLm- :ima // -ny v-Lu-
·
Parameters
:ima
[In] Any value of datetIme type.
Peturned vaIue
always false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1400
PrIce
ProhIbIts changes of the prIce coordInate.
o··L -nL·-.
J·uoL- pri·a // -ny v-Lu-
·
Parameters
pri·a
[In] Any value of double type.
Peturned vaIue
always false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1401
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1402
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1403
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (D8J_8ÌT|AP_LA8EL for CChartDbject8mpLabel).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1404
CChart
Class CChart Is a class for sImplIfIed access to ¨Chart¨ graphIc object propertIes.
0escrIptIon
Class CChart provIdes access to ¨Chart¨ object propertIes.
0ecIaratIon
·L--- ..!-nr . puoLL· .Jo|-·r
TItIe
<.!-nr-\.!-nr.m¬!
CIass hethods
Access to protected data
ChartÌ0 Cets IdentIfIer of the chart.
CeneraI propertIes
|ode Cets/Sets the value of ¨|ode¨ property (bar,
candle or lIne).
Foreground Cets/Sets the value of ¨Foreground¨ property.
ShIft Cets/Sets the value of ¨ShIft¨ property.
ShIftSIze Cets/Sets the value of ¨ShIftSIze¨ property (In
percents).
AutoScroll Cets/Sets the value of ¨AutoScroll¨ property.
Scale Cets/Sets the value of ¨Scale¨ property.
ScaleFIx Cets/Sets the value of ¨ScaleFIx¨ property
(fIxed chart scale or not).
ScaleFIx_11 Cets/Sets the value of ¨ScaleFIx_11¨ property
(chart scale Is 1:1, or not).
FIxed|ax Cets/Sets the value of ¨FIxed|ax¨ property
(fIxed maxImal prIce).
FIxed|In Cets/Sets the value of ¨FIxed|In¨ property
(fIxed mInImal prIce).
ScalePP8 Cets/Sets the value of ¨ScalePP8¨ property
(scale Is ¨poInt per bar¨ or not).
PoIntsPer8ar Cets/Sets the value of ¨PoIntsPer8ar¨ property
(In poInts per bar).
Show propertIes
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1405
ShowDHLC Cets/Sets the value of ¨ShowDHLC¨ property.
ShowLIne8Id Cets/Sets the value of ¨ShowLIne8Id¨ property.
ShowLIneAsk Cets/Sets the value of ¨ShowLIneAsk¨ property.
ShowLastLIne Cets/Sets the value of ¨ShowLastLIne¨
property.
ShowPerIodSep Cets/Sets the value of ¨ShowPerIodSep¨
property (show perIod separators).
ShowCrId Cets/Sets the value of ¨ShowCrId¨ property.
Show7olumes Cets/Sets the value of ¨Color7olumes¨ property
(color for volumes and levels of opened
posItIons).
ShowDbject0escr Cets/Sets the value of ¨ShowDbject0escr¨
property (show descrIptIon for graphIc objects).
CoIors propertIes
Color8ackground Cets/Sets the value of ¨Color8ackground¨
property (background color of the chart).
ColorForeground Cets/Sets the value of ¨ColorForeground¨
property (color of axes, scale and DHLC strIngs
of the chart).
ColorCrId Cets/Sets the value of ¨ColorCrId¨ property
(color of the grId).
Color8arUp Cets/Sets the value of ¨Color8arUp¨ property
(color for bull bars, Its shadow and candle body
outlInes).
Color8ar0own Cets/Sets the value of ¨Color8ar0own¨ property
(color for bear bars, Its shadow and candle body
outlInes).
ColorCandle8ull Cets/Sets the value of ¨ColorCandle8ull¨
property (body color of the bull candle).
ColorCandle8ear Cets/Sets the value of ¨ColorCandle8ear¨
property (body color of the bear candle).
ColorChartLIne Cets/Sets the value of ¨ColorChartLIne¨
property (color for lIne chart and 0ojI candles).
Color7olumes Cets/Sets the value of ¨Color7olumes¨ property
(color for volumes and levels of opened
posItIons).
ColorLIne8Id Cets/Sets the value of ¨ColorLIne8Id¨ property
(color of 8Id lIne).
ColorLIneAsk Cets/Sets the value of ¨ColorLIneAsk¨ property
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1406
(color of Ask lIne).
ColorLIneLast Cets/Sets the value of ¨ColorLIneLast¨ property
(color of the last deal prIce lIne).
ColorStopLevels Cets/Sets the value of ¨ColorStopLevels¨
property (color of the SL and TP levels).
Pead onIy propertIes
7IsIble8ars Cets total number of vIsIble chart bars.
WIndowsTotal Cets total number of chart wIndows, IncludIng
the chart IndIcator subwIndows.
WIndowÌs7IsIble Cets vIsIbIlIty flag of the specIfIed chart
subwIndow.
WIndowHandle Cets wIndow handle of the chart (HWN0).
FIrst7IsIble8ar Cets the number of the fIrst vIsIble bar of the
chart.
WIdthÌn8ars Cets wIndow wIdth In bars.
WIdthÌnPIxels Cets subwIndow wIdth In pIxels.
Height!nPixels Cets subwIndow heIght In pIxels.
PriceNin Cets mInImal prIce of the specIfIed subwIndow.
PrIce|ax Cets maxImal prIce of the specIfIed subwIndow.
PropertIes
Attach AssIgns the current chart to the class Instance.
FIrstChart AssIgns the fIrst chart of the clIent termInal to
the class Instance.
NextChart AssIgns the next chart of the clIent termInal to
the class Instance.
Dpen Dpens chart wIth specIfIed parameters and
assIgn It to the class Instance.
0etach 0etaches chart from the class Instance.
Close Closes chart, assIgned to the class Instance.
NavIgatIon
NavIgate NavIgates the chart.
Access to hDL5 API
Symbol Cets symbol of the chart.
PerIod Cets perIod of the chart.
Fedraw Fedraws chart, assIgned to the class Instance.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1407
CetÌnteger The functIon returns the value of the
correspondIng object property.
SetÌnteger Sets new value for the property of the Integer
type.
Cet0ouble The functIon returns the value of the
correspondIng object property.
Set0ouble Sets new value for the property of the double
type.
CetStrIng The functIon returns the value of the
correspondIng object property.
SetStrIng Sets new value for the property of the strIng
type.
SetSymbolPerIod Changes symbol and perIod of the chart,
assIgned to the class Instance.
ApplyTemplate ApplIes specIfIed template to the chart.
ScreenShot Creates screenshot of the specIfIed chart and
saves It to .gIf fIle.
WIndowDn0ropped Cets chart subwIndow number correspondIng to
the object (expert or scrIpt) drop poInt.
PrIceDn0ropped Cets prIce coordInate correspondIng to the
object (expert or scrIpt) drop poInt.
TImeDn0ropped Cets tIme coordInate correspondIng to the
object (expert or scrIpt) drop poInt.
XDn0ropped Cets X coordInate correspondIng to the object
(expert or scrIpt) drop poInt.
YDn0ropped Cets Y coordInate correspondIng to the object
(expert or scrIpt) drop poInt.
InputlDutput
vIrtual Save Saves object parameters to fIle.
vIrtual Load Loads object parameters from fIle.
vIrtual Type Cets graphIc object type IdentIfIer.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1408
ChartI0
Feturns IdentIfIer of the chart.
L·nj .!-nrP¯.· ··n-r
Peturned vaIue
Chart IdentIfIer, assIgned to the class Instance. Ìf there Is no object assIgned, It returns ·1.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1409
hode (Cet hethod)
Cets the value of ¨|ode¨ property (bar, candle or lIne).
IHJM_.|A-r_MJ¯I M·J-.· ··n-r
Peturned vaIue
7alue of ¨|ode¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns WFDNC_7ALUE.
hode (Set hethod)
Sets new value for ¨|ode¨ property (bar, candle or lIne).
o··L M·J-.
IHJM_.|A-r_MJ¯I m.ja // n-. ·!-nr m·J-
·
Parameters
m.ja
[In] Chart mode (candle, bar or lIne).
Peturned vaIue
true If successful, false If mode hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1410
Foreground (Cet hethod)
Cets the value of ¨Foreground¨ property.
o··L ¯·n-jn·unJ.· ··n-r
Peturned vaIue
7alue of ¨Foreground¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
Foreground (Set hethod)
Sets new value for ¨Foreground¨ property.
o··L ¯·n-jn·unJ.
o··L f.rajr.:nj // n-. rL-j v-Lu-
·
Parameters
f.rajr.:nj
[In] New value for ¨Foreground¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1411
ShIft (Cet hethod)
Cets the value of ¨ShIft¨ property.
o··L ¯!Lrr.· ··n-r
Peturned vaIue
7alue of ¨ShIft¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
ShIft (Set hethod)
Sets new value for ¨ShIft¨ property.
o··L ¯!Lrr.
o··L ·nif: // n-. rL-j v-Lu-
·
Parameters
·nif:
[In] New value for ¨ShIft¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1412
ShIftSIze (Cet hethod)
Cets the value of ¨ShIftSIze¨ property (In percents).
J·uoL- ¯!Lrr¯Lz-.· ··n-r
Peturned vaIue
7alue of ¨ShIftSIze¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
ShIftSIze (Set hethod)
Sets new value for ¨ShIft¨ property (In percents).
o··L ¯!Lrr¯Lz-.
J·uoL- ·nif:_·iza // n-. pn·p-nry v-Lu-
·
Parameters
·nif:_·iza
[In] New value for ¨ShIftSIze¨ property (In percents).
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1413
AutoScroII (Cet hethod)
Cets the value of ¨AutoScroll¨ property.
o··L Aur·¯·n·LL.· ··n-r
Peturned vaIue
7alue of ¨AutoScroll¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
AutoScroII (Set hethod)
Sets new value for ¨AutoScroll¨ property.
o··L Aur·¯·n·LL.
o··L -::.··r.ll // n-. rL-j v-Lu-
·
Parameters
-::.··r.ll
[In] New value for ¨Autoscroll¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1414
ScaIe (Cet hethod)
Cets the value of ¨Scale¨ property.
Lnr ¯·-L-.· ··n-r
Peturned vaIue
7alue of ¨Scale¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns 0.
ScaIe (Set hethod)
Sets new value for ¨Scale¨ property.
o··L ¯·-L-.
Lnr ··-la // n-. v-Lu-
·
Parameters
··-la
[In] New value for ¨Scale¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1415
ScaIeFIx (Cet hethod)
Cets the value of ¨ScaleFIx¨ property (fIxed chart scale or not).
o··L ¯·-L-¯Lx.· ··n-r
Peturned vaIue
7alue of ¨ScaleFIx¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
ScaIeFIx (Set hethod)
Sets new value for ¨ScaleFIx¨ property.
o··L ¯·-L-¯Lx.
o··L ··-la_fix // n-. v-Lu-
·
Parameters
··-la_fix
[In] New value for ¨ScaleFIx¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1416
ScaIeFIx_11 (Cet hethod)
Cets the value of ¨ScaleFIx_11¨ property (chart scale Is 1:1, or not).
o··L ¯·-L-¯Lx_!!.· ··n-r
Peturned vaIue
7alue of ¨ScaleFIx_11¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
ScaIeFIx_11 (Set hethod)
Sets new value for ¨ScaleFIx_11¨ property.
o··L ¯·-L-¯Lx_!!.
-rnLnj ··-la_.. // n-. v-Lu-
·
Parameters
··-la_..
[In] New value for ¨ScaleFIx_11¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1417
FIxedhax (Cet hethod)
Cets the value of ¨FIxed|ax¨ property (fIxed maxImal prIce).
J·uoL- ¯Lx-JM-x.· ··n-r
Peturned vaIue
7alue of ¨FIxed|ax¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
FIxedhax (Set hethod)
Sets new value for ¨FIxed|ax¨ property.
o··L ¯Lx-JM-x.
J·uoL- m-x // n-. rLx-J m-xLmum
·
Parameters
m-x
[In] New value for ¨FIxed|ax¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1418
FIxedhIn (Cet hethod)
Cets the value of ¨FIxed|In¨ property (fIxed mInImal prIce).
J·uoL- ¯Lx-JMLn.· ··n-r
Peturned vaIue
7alue of ¨FIxed|In¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
FIxedhIn (Set hethod)
Sets new value for ¨FIxed|In¨ property.
o··L ¯Lx-JM-x.
J·uoL- min // n-. rLx-J mLnLmum
·
Parameters
m-x
[In] New value for ¨FIxed|In¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1419
PoIntsPerßar (Cet hethod)
Cets the value of ¨PoIntsPer8ar¨ property (In poInts per bar).
J·uoL- -·Lnr---nÐ-n.· ··n-r
Peturned vaIue
7alue of ¨PoIntsPer8ar¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns E|PTY_7ALUE.
PoIntsPerßar (Set hethod)
Sets new value for ¨PoIntsPer8ar¨ property.
o··L -·Lnr---nÐ-n.
J·uoL- ppo // n-. -·-L- .Ln p·Lnr- p-n o-n·
·
Parameters
ppo
[In] New value for scale (In poInts per bar).
Peturned vaIue
true If successful, false If scale hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1420
ScaIePPß (Cet hethod)
Cets the value of ¨ScalePP8¨ property (scale Is ¨poInt per bar¨ or not).
o··L ¯·-L---Ð.· ··n-r
Peturned vaIue
7alue of ¨ScalePP8¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
ScaIePPß (Set hethod)
Sets new value for ¨ScalePP8¨ property.
o··L ¯·-L---Ð.
o··L ··-la_ppo // n-. rL-j v-Lu-
·
Parameters
··-la_ppo
[In] New value for ¨ScalePP8¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1421
ShowDHLC (Cet hethod)
Cets the value of ¨ShowDHLC¨ property.
o··L ¯!·.J|H..· ··n-r
Peturned vaIue
7alue of ¨ShowDHLC¨ property of the object, assIgned to the class Instance. Ìf there Is no object
assIgned, It returns false.
ShowDHLC (Set hethod)
Sets new value for ¨ShowDHLC¨ property.
o··L ¯!·.J|H..
o··L ·n.v // n-. v-Lu-
·
Parameters
·n.v
[In] New value for ¨ShowDHLC¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1422
ShowLIneßId (Cet hethod)
Cets the value of ¨ShowLIne8Id¨ property.
o··L ¯!·.HLn-ÐLJ.· ··n-r
Peturned vaIue
7alue of ¨ShowLIne8Id¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns false.
ShowLIneßId (Set hethod)
Sets new value for ¨ShowLIne8Id¨ property.
o··L ¯!·.HLn-ÐLJ.
o··L ·n.v // n-. v-Lu-
·
Parameters
·n.v
[In] New value for ¨ShowLIne8Id¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1423
ShowLIneAsk (Cet hethod)
Cets the value of ¨ShowLIneAsk¨ property.
o··L ¯!·.HLn-A-k.· ··n-r
Peturned vaIue
7alue of ¨ShowLIneAsk¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns false.
ShowLIneAsk (Set hethod)
Sets new value for ¨ShowLIneAsk¨ property.
o··L ¯!·.HLn-A-k.
o··L ·n.v // n-. v-Lu-
·
Parameters
·n.v
[In] New value for ¨ShowLIneAsk¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1424
ShowLastLIne (Cet hethod)
Cets the value of ¨ShowLastLIne¨ property.
o··L ¯!·.H--rHLn-.· ··n-r
Peturned vaIue
7alue of ¨ShowLastLIne¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns false.
ShowLastLIne (Set hethod)
Sets new value for ¨ShowLastLIne¨ property.
o··L ¯!·.H--rHLn-.
o··L ·n.v // n-. rL-j v-Lu-
·
Parameters
·n.v
[In] New value for ¨ShowLastLIne¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1425
ShowPerIodSep (Cet hethod)
Cets the value of ¨ShowPerIodSep¨ property (show perIod separators).
o··L ¯!·.--nL·J¯-p.· ··n-r
Peturned vaIue
7alue of ¨ShowPerIodSep¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns false.
ShowPerIodSep (Set hethod)
Sets new value for ¨ShowPerIodSep¨ property.
o··L ¯!·.--nL·J¯-p.
o··L ·n.v // n-. v-Lu-
·
Parameters
·n.v
[In] New value for ¨ShowPerIodSep¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1426
ShowCrId (Cet hethod)
Cets the value of ¨ShowCrId¨ property.
o··L ¯!·.JnLJ.· ··n-r
Peturned vaIue
7alue of ¨ShowCrId¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns false.
ShowCrId (Set hethod)
Sets new value for ¨ShowCrId¨ property.
o··L ¯!·.JnLJ.
o··L ·n.v // n-. v-Lu-
·
Parameters
·n.v
[In] New value for ¨ShowCrId¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1427
ShowVoIumes (Cet hethod)
Cets the value of ¨Show7olumes¨ property.
o··L ¯!·.V·Lum--.· ··n-r
Peturned vaIue
7alue of ¨Show7olumes¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns false.
ShowVoIumes (Set hethod)
Sets new value for ¨Show7olumes¨ property.
o··L ¯!·.V·Lum--.
o··L ·n.v // n-. v-Lu-
·
Parameters
·n.v
[In] New value for ¨Show7olumes¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1428
ShowDbject0escr (Cet hethod)
Cets the value of ¨ShowDbject0escr¨ property (show descrIptIon for graphIc objects).
o··L ¯!·.Jo|-·r¯--·n.· ··n-r
Peturned vaIue
7alue of ¨ShowDbject0escr¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns false.
ShowDbject0escr (Set hethod)
Sets new value for ¨ShowDbject0escr¨ property.
o··L ¯!·.Jo|-·r¯--·n.
o··L ·n.v // H-. v-Lu-
·
Parameters
·n.v
[In] New value for ¨ShowDbject0escr¨ property.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1429
CoIorßackground (Cet hethod)
Cets the value of ¨Color8ackground¨ property (background color of the chart).
··L·n .·L·nÐ-·kjn·unJ.· ··n-r
Peturned vaIue
7alue of ¨Color8ackground¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorßackground (Set hethod)
Sets new value for ¨Color8ackground¨ property.
o··L .·L·nÐ-·kjn·unJ.
··L·n nav_·.l.r // n-. o-·kjn·unJ ··L·n
·
Parameters
nav_·.l.r
[In] New background color.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1430
CoIorForeground (Cet hethod)
Cets the value of ¨ColorForeground¨ property (color of axes, scale and DHLC strIngs of the chart).
··L·n .·L·n¯·n-jn·unJ.· ··n-r
Peturned vaIue
7alue of ¨ColorForeground¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorForeground (Set hethod)
Sets new value for ¨ColorForeground¨ property (for axes, scale, and DHLC strIng).
o··L .·L·n¯·n-jn·unJ.
··L·n nav_·.l.r // H-. ··L·n
·
Parameters
nav_·.l.r
[In] New color for axes, scale and DHLC strIng.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1431
CoIorCrId (Cet hethod)
Cets the value of ¨ColorCrId¨ property (color of the grId).
··L·n .·L·nJnLJ.· ··n-r
Peturned vaIue
7alue of ¨ColorCrId¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorCrId (Set hethod)
Sets new value for ¨ColorCrId¨ property.
o··L .·L·nJnLJ.
··L·n nav_·.l.r // n-. jnLJ ··L·n
·
Parameters
nav_·.l.r
[In] New grId color.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1432
CoIorßarUp (Cet hethod)
Cets the value of ¨Color8arUp¨ property (color for bull bars, Its shadow and candle body outlInes).
··L·n .·L·nÐ-nJp.· ··n-r
Peturned vaIue
7alue of ¨Color8arUp¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorßarUp (Set hethod)
Sets new value for ¨Color8arUp¨ property.
o··L .·L·nÐ-nJp.
··L·n nav_·.l.r // n-. ··L·n r·n ouLL o-n-
·
Parameters
nav_·.l.r
[In] New color for bull bars.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1433
CoIorßar0own (Cet hethod)
Cets the value of ¨Color8ar0own¨ property (color for bear bars, Its shadow and candle body outlInes).
··L·n .·L·nÐ-n¯·.n.· ··n-r
Peturned vaIue
7alue of ¨Color8ar0own¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorßar0own (Set hethod)
Sets new value for ¨Color8ar0own¨ property.
o··L .·L·nÐ-n¯·.n.
··L·n nav_·.l.r // n-. ··L·n r·n o--n o-n-
·
Parameters
nav_·.l.r
[In] New color for bear bars.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1434
CoIorCandIeßuII (Cet hethod)
Cets the value of ¨ColorCandle8ull¨ property (body color of the bull candle).
··L·n .·L·n.-nJL-ÐuLL.· ··n-r
Peturned vaIue
7alue of ¨ColorCandle8ull¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorCandIeßuII (Set hethod)
Sets new value for ¨Color8ar8ull¨ property.
o··L .·L·n.-nJL-ÐuLL.
··L·n nav_·.l.r // n-. ··L·n r·n ouLL ·-nJL- o·Jy
·
Parameters
nav_·.l.r
[In] New color of the bull candle body.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1435
CoIorCandIeßear (Cet hethod)
Cets the value of ¨ColorCandle8ear¨ property (body color of the bear candle).
··L·n .·L·n.-nJL-Ð--n.· ··n-r
Peturned vaIue
7alue of ¨ColorCandle8ear¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorCandIeßear (Set hethod)
Sets new value for ¨Color8ar8ear¨ property.
o··L .·L·n.-nJL-Ð--n.
··L·n nav_·.l.r // n-. ··L·n r·n o--n ·-nJL- o·Jy
·
Parameters
nav_·.l.r
[In] New color of the bear candle body.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1436
CoIorChartLIne (Cet hethod)
Cets the value of ¨ColorChartLIne¨ property (color for lIne chart and 0ojI candles).
··L·n .·L·n.!-nrHLn-.· ··n-r
Peturned vaIue
7alue of ¨ColorChartLIne¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorChartLIne (Set hethod)
Sets new value for ¨ColorChartLIne¨ property.
o··L .·L·n.!-nrHLn-.
··L·n nav_·.l.r // n-. ··L·n ·r r!- ·!-nr LLn--
·
Parameters
nav_·.l.r
[In] New color of the chart lInes (0ojI candles).
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1437
CoIorVoIumes (Cet hethod)
Cets the value of ¨Color7olumes¨ property (color for volumes and levels of opened posItIons).
··L·n .·L·nV·Lum--.· ··n-r
Peturned vaIue
7alue of ¨Color7olumes¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorVoIumes (Set hethod)
Sets new value for ¨Color7olumes¨ property.
o··L .·L·nV·Lum--.
··L·n nav_·.l.r // n-. ··L·n ·r r!- v·Lum-- .·p-n p·-LrL·n L-v-L-·
·
Parameters
nav_·.l.r
[In] New color of the volumes (open posItIon levels).
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1438
CoIorLIneßId (Cet hethod)
Cets the value of ¨ColorLIne8Id¨ property (color of 8Id lIne).
··L·n .·L·nHLn-ÐLJ.· ··n-r
Peturned vaIue
7alue of ¨ColorLIne8Id¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorLIneßId (Set hethod)
Sets new value for ¨ColorLIne8Id¨ property.
o··L .·L·nHLn-ÐLJ.
··L·n nav_·.l.r // n-. ··L·n r·n ÐLJ LLn-
·
Parameters
nav_·.l.r
[In] New color for 8Id lIne.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1439
CoIorLIneAsk (Cet hethod)
Cets the value of ¨ColorLIneAsk¨ property (color of Ask lIne).
··L·n .·L·nHLn-A-k.· ··n-r
Peturned vaIue
7alue of ¨ColorLIneAsk¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorLIneAsk (Set hethod)
Sets new value for ¨ColorLIneAsk¨ property.
o··L .·L·nHLn-A-k.
··L·n nav_·.l.r // n-. ··L·n r·n A-k LLn-
·
Parameters
nav_·.l.r
[In] New color for Ask lIne.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1440
CoIorLIneLast (Cet hethod)
Cets the value of ¨ColorLIneLast¨ property (color of the last deal prIce lIne).
··L·n .·L·nHLn-H--r.· ··n-r
Peturned vaIue
7alue of ¨ColorLIneLast¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorLIneLast (Set hethod)
Sets new value for ¨ColorLIneLast¨ property.
o··L .·L·nHLn-H--r.
··L·n nav_·.l.r // n-. ··L·n ·r r!- L--r J--L pnL·- LLn-
·
Parameters
nav_·.l.r
[In] New color of the last deal prIce lIne.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1441
CoIorStopLeveIs (Cet hethod)
Cets the value of ¨ColorStopLevels¨ property (color of the SL and TP levels).
··L·n .·L·n¯r·pH-v-L-.· ··n-r
Peturned vaIue
7alue of ¨ColorStopLevels¨ property of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns CLF_NDNE.
CoIorStopLeveIs (Set hethod)
Sets new value for ¨ColorStopLevels¨ property.
o··L .·L·n¯r·pH-v-L-.
··L·n nav_·.l.r // n-. ··L·n ·r r!- ¯H -nJ r- pnL·- L-v-L-
·
Parameters
nav_·.l.r
[In] New color of the Stop Loss and Take ProfIt prIce levels.
Peturned vaIue
true If successful, false If color hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1442
VIsIbIeßars
Cets total number of vIsIble chart bars.
Lnr VL-LoL-Ð-n-.· ··n-r
Peturned vaIue
Cets total number of vIsIble bars of the chart, assIgned to the class Instance. Ìf there Is no chart
assIgned, It returns 0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1443
WIndowsTotaI
Cets total number of chart wIndows, IncludIng the chart IndIcator subwIndows.
Lnr WLnJ·.-r·r-L.· ··n-r
Peturned vaIue
Total number of wIndows, IncludIng the chart IndIcator subwIndows, assIgned to the class Instance.
Ìf there Is no chart assIgned, It returns 0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1444
WIndowIsVIsIbIe
Cets vIsIbIlIty flag of the specIfIed chart subwIndow.
o··L WLnJ·.P-VL-LoL-.
Lnr n:m // -uo.LnJ·. numo-n
· ··n-r
Parameters
n:m
[In] SubwIndow number (0 means base wIndow).
Peturned vaIue
Feturns vIsIbIlIty flag of the specIfIed chart subwIndow, assIgned to the chart Instance. Ìf there Is
no chart assIgned, It returns false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1445
WIndowHandIe
Cets wIndow handle of the chart (HWN0).
Lnr WLnJ·.|-nJL-.· ··n-r
Peturned vaIue
WIndow handle of the chart, assIgned to the chart Instance. Ìf there Is no chart assIgned, It returns
ÌN7ALÌ0_HAN0LE.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1446
FIrstVIsIbIeßar
Cets the number of the fIrst vIsIble bar of the chart.
Lnr ¯Ln-rVL-LoL-Ð-n.· ··n-r
Peturned vaIue
Number of the fIrst vIsIble bar of the chart, assIgned to the chart Instance. Ìf there Is no chart
assIgned, It returns ·1.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1447
WIdthInßars
Cets wIndow wIdth In bars.
Lnr WLJr!PnÐ-n-.· ··n-r
Peturned vaIue
WIndow wIdth In chart bars, assIgned to the chart Instance. Ìf there Is no chart assIgned, It returns
0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1448
WIdthInPIxeIs
Cets subwIndow wIdth In pIxels.
Lnr WLJr!Pn-Lx-L-.· ··n-r
Peturned vaIue
SubwIndow wIdth In chart pIxels, assIgned to the chart Instance. Ìf there Is no chart assIgned, It
returns 0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1449
HeIghtInPIxeIs
Cets subwIndow heIght In pIxels.
Lnr |-Lj!rPn-Lx-L-.
Lnr n:m // -uo.LnJ·. numo-n
· ··n-r
Parameters
n:m
[In] SubwIndow number (0 means base wIndow).
Peturned vaIue
SubwIndow heIght In chart pIxels, assIgned to the chart Instance. Ìf there Is no chart assIgned, It
returns 0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1450
PrIcehIn
Cets mInImal prIce of the specIfIed subwIndow.
J·uoL- -nL·-MLn.
Lnr n:m // -uo.LnJ·. numo-n
· ··n-r
Parameters
n:m
[In] SubwIndow number (0 means base wIndow).
Peturned vaIue
|InImal prIce value of the chart, assIgned to the class Instance. Ìf there Is not chart assIgned, It
returns E|PTY_7ALUE.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1451
PrIcehax
Cets maxImal prIce of the specIfIed subwIndow.
J·uoL- -nL·-M-x.
Lnr n:m // -uo.LnJ·. numo-n
· ··n-r
Parameters
n:m
[In] SubwIndow number (0 means base wIndow).
Peturned vaIue
|axImal prIce value of the chart, assIgned to the class Instance. Ìf there Is not chart assIgned, It
returns E|PTY_7ALUE.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1452
Attach
AssIgns the current chart to the class Instance.
v·LJ Arr-·!.·
Attach
AssIgns the specIfIed chart to the class Instance.
v·LJ Arr-·!.
L·nj ·n-r: // .!-nr LJ-nrLrL-n
·
Parameters
·n-r:
[In] ÌdentIfIer of the chart to assIgn
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1453
FIrstChart
AssIgns the fIrst chart of the clIent termInal to the class Instance.
v·LJ ¯Ln-r.!-nr.·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1454
NextChart
AssIgns the next chart of the clIent termInal to the class Instance.
v·LJ H-xr.!-nr.·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1455
Dpen
Dpens chart wIth specIfIed parameters and assIgn It to the class Instance.
L·nj Jp-n.
··n-r -rnLnj ·ymo.l_n-ma, // ¯ymo·L n-m-
IHJM_rPMI¯-AMI¯ :imafr-ma // --nL·J
·
Parameters
·ymo.l_n-ma
[In] Symbol name. NULL means the symbol of the current chart (to whIch expert attached).
:imafr-ma
[In] Chart tImeframe. 0 means the current tImeframe.
Peturned vaIue
Chart IdentIfIer.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1456
0etach
0etaches chart from the class Instance.
v·LJ ¯-r-·!.·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1457
CIose
Closes chart, assIgned to the class Instance.
v·LJ .L·--.·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1458
NavIgate
NavIgates the chart.
o··L H-vLj-r-.
IHJM_.|A-r_-J¯PrPJH p.·i:i.n, // -·-LrL·n
Lnr ·nif:=` // ¯!Lrr
·
Parameters
p.·i:i.n
[In] Chart posItIon, relatIve to the navIgatIon.
·nif:=`
[In] Number of bars to shIft.
Peturned vaIue
true If successful, false If chart hasn't navIgated.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1459
SymboI
Cets symbol of the chart.
-rnLnj ¯ymo·L.· ··n-r
Peturned vaIue
Symbol of the chart, assIgned to the class Instance. Ìf there Is no chart assIgned, It returns 0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1460
PerIod
Cets perIod of the chart.
IHJM_rPMI¯-AMI¯ --nL·J.· ··n-r
Peturned vaIue
PerIod of the chart, assIgned to the class Instance. Ìf there Is no chart assIgned, It returns 0.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1461
Pedraw
Fedraws chart, assIgned to the class Instance.
v·LJ --Jn-..·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1462
CetInteger
The functIon returns the value of the correspondIng object property. The object property must be of
the Integer type. There are 2 varIants of the functIon.
1. ImmedIateIy returns the property vaIue.
L·nj J-rPnr-j-n.
IHJM_.|A-r_--J-I-r1_PHrIJI- pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr ·:o_vinj.v=` // -uo.LnJ·. numo-n
· ··n-r
2. If successfuI, puts the vaIue of property to the specIfIed varIabIe of Integer type, passed by
reference as Iast parameter.
o··L J-rPnr-j-n.
IHJM_.|A-r_--J-I-r1_PHrIJI- pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr ·:o_vinj.v, // -uo.LnJ·. numo-n
L·njs v-l:a // !-n- .- j-r r!- pn·p-nry v-Lu-
· ··n-r
Parameters
pr.p_ij
[In] Property IdentIfIer.
·:o_vinj.v
[In] Chart subwIndow number.
v-l:a
[In] 7arIable of the Integer type that receIved the value of the requested property.
Peturn VaIue
7alue of property of the chart, assIgned to the class Instance. Ìf there Isn't any chart assIgned, It
returns ·1.
For the second varIant the functIon returns true, If thIs property Is maIntaIned and the value has
been placed Into the value varIable, otherwIse returns false. To read more about the error call
CetLastError().
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1463
SetInteger
Sets new value for the property of the Integer type.
o··L ¯-rPnr-j-n.
IHJM_.|A-r_--J-I-r1_PHrIJI- pr.p_ij, // pn·p-nry LJ-nrLrL-n
L·nj v-l:a // n-. v-Lu-
·
Parameters
pr.p_ij
[In] Property IdentIfIer.
v-l:a
[In] New value of the property.
Peturned vaIue
true If successful, false If property of the Integer type hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1464
Cet0oubIe
The functIon returns the value of the correspondIng object property. The object property must be of
the double type. There are 2 varIants of the functIon.
1. ImmedIateIy returns the property vaIue.
J·uoL- J-r¯·uoL-.
IHJM_.|A-r_--J-I-r1_¯JJÐHI pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr ·:o_vinj.v=` // -uo.LnJ·. numo-n
· ··n-r
2. If successfuI, puts the vaIue of property to the specIfIed varIabIe of doubIe type, passed by
reference as Iast parameter.
o··L J-r¯·uoL-.
IHJM_.|A-r_--J-I-r1_¯JJÐHI pr.p_ij, // pn·p-nry LJ-nrLrL-n
Lnr ·:o_vinj.v, // -uo.LnJ·. numo-n
J·uoL-s v-l:a // !-n- .- j-r r!- pn·p-nry v-Lu-
· ··n-r
Parameters
pr.p_ij
[In] Property IdentIfIer.
·:o_vinj.v
[In] Chart subwIndow number.
v-l:a
[In] 7arIable of the double type that receIved the value of the requested property.
Peturn VaIue
7alue of property of the chart, assIgned to the class Instance. Ìf there Isn't any chart assIgned, It
returns E|PTY_7ALUE.
For the second varIant the functIon returns true, If thIs property Is maIntaIned and the value has
been placed Into the value varIable, otherwIse returns false. To read more about the error call
CetLastError().
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1465
Set0oubIe
Sets new value for the property of the double type.
o··L ¯-r¯·uoL-.
IHJM_.|A-r_--J-I-r1_¯JJÐHI pr.p_ij, // pn·p-nry LJ-nrLrL-n
J·uoL- v-l:a // n-. v-Lu-
·
Parameters
pr.p_ij
[In] Property IdenItIfIer.
v-l:a
[In] New value for the property.
Peturned vaIue
true If successful, false If property of the double type hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1466
CetStrIng
The functIon returns the value of the correspondIng object property. The object property must be of
the strIng type. There are 2 varIants of the functIon.
1. ImmedIateIy returns the property vaIue.
-rnLnj J-r¯rnLnj.
IHJM_.|A-r_--J-I-r1_¯r-PHJ pr.p_ij // pn·p-nry LJ-nrLrL-n
· ··n-r
2. If successfuI, puts the vaIue of property to the specIfIed varIabIe of strIng type, passed by
reference as Iast parameter.
o··L J-r¯rnLnj.
IHJM_.|A-r_--J-I-r1_¯r-PHJ pr.p_ij, // pn·p-nry LJ-nrLrL-n
-rnLnjs v-l:a // !-n- .- j-r r!- pn·p-nry v-Lu-
· ··n-r
Parameters
pr.p_ij
[In] Property IdentIfIer.
·:o_vinj.v
[In] Chart subwIndow number.
v-l:a
[In] 7arIable of the strIng type that receIved the value of the requested property.
Peturn VaIue
7alue of property of the chart, assIgned to the class Instance. Ìf there Isn't any chart assIgned, It
returns ¨¨.
For the second varIant the functIon returns true, If thIs property Is maIntaIned and the value has
been placed Into the value varIable, otherwIse returns false. To read more about the error call
CetLastError().
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1467
SetStrIng
Sets new value for the property of the strIng type.
o··L ¯-r¯rnLnj.
IHJM_.|A-r_--J-I-r1_¯r-PHJ pr.p_ij, // pn·p-nry LJ-nrLrL-n
-rnLnj v-l:a // n-. pn·p-nry v-Lu-
·
Parameters
pr.p_ij
[In] Property IdenItIfIer.
v-l:a
[In] New value for the property.
Peturned vaIue
true If successful, false If property of the strIng type hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1468
SetSymboIPerIod
Changes symbol and perIod of the chart, assIgned to the class Instance.
o··L ¯-r¯ymo·L--nL·J.
··n-r -rnLnj ·ymo.l_n-ma, // ¯ymo·L
IHJM_rPMI¯-AMI¯ :imafr-ma // --nL·J
·
Parameters
·ymo.l_n-ma
[In] New symbol name. NULL means the symbol of the current chart (to whIch expert attached).
:imafr-ma
[In] New chart tImeframe. 0 means the current tImeframe.
Peturned vaIue
true If successful, false If property hasn't changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1469
AppIyTempIate
ApplIes specIfIed template to the chart.
o··L AppLyr-mpL-r-.
··n-r -rnLnj filan-ma // r-mpL-r- rLL- n-m-
·
Parameters
filan-ma
[In] FIle name of the template.
Peturned vaIue
true If successful, false If template hasn't applIed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1470
ScreenShot
Creates screenshot of the specIfIed chart and saves It to .gIf fIle.
o··L ¯·n--n¯!·r.
-rnLnj filan-ma, // ¯LL- n-m-
Lnr vij:n, // WLJr!
Lnr naijn:, // |-Lj!r
IHJM_AHPJH_MJ¯I -lijn_m.ja=ÁLFJ:_RFJH. // ALLjn ryp-
· ··n-r
Parameters
filan-ma
[In] FIle name for screenshot.
vij:n
[In] Screenshot wIdth In pIxels.
naijn:
[In] Screenshot heIght In pIxels.
-lijn_m.ja=ÁLFJ:_RFJH.
[In] AlIgn mode, If screenshot Is narrow.
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1471
WIndowDn0ropped
Cets chart subwIndow number correspondIng to the object (expert or scrIpt) drop poInt.
Lnr WLnJ·.Jn¯n·pp-J.· ··n-r
Peturned vaIue
Chart subwIndow number of the object drop poInt. 0 means maIn chart wIndow.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1472
PrIceDn0ropped
Cets prIce coordInate correspondIng to the object (expert or scrIpt) drop poInt.
J·uoL- -nL·-Jn¯n·pp-J.· ··n-r
Peturned vaIue
PrIce coordInate of the object drop poInt.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1473
TImeDn0ropped
Cets tIme coordInate correspondIng to the object (expert or scrIpt) drop poInt.
J-r-rLm- rLm-Jn¯n·pp-J.· ··n-r
Peturned vaIue
TIme coordInate of the object drop poInt.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1474
XDn0ropped
Cets X coordInate correspondIng to the object (expert or scrIpt) drop poInt.
Lnr xJn¯n·pp-J.· ··n-r
Peturned vaIue
X coordInate of the object drop poInt.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1475
YDn0ropped
Cets Y coordInate correspondIng to the object (expert or scrIpt) drop poInt.
Lnr 1Jn¯n·pp-J.· ··n-r
Peturned vaIue
Y coordInate of the object drop poInt.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1476
Save
Saves object parameters to fIle.
vLnru-L o··L ¯-v-.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1477
Load
Loads object parameters from fIle.
vLnru-L o··L H·-J.
Lnr fila_n-njla // ¯LL- !-nJL-
·
Parameters
fila_n-njla
[In] handle of the bInary fIle already opened usIng by functIon FIleDpen(...).
Peturned vaIue
true If successful, false If error.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1478
Type
Feturns graphIc object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (0x1111 for CChart).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1479
FIIe DperatIons
ThIs sectIon contaIns the technIcal detaIls of the fIle operatIons classes and descrIptIons of the
correspondIng components of the standard |0L5 lIbrary.
The fIle operatIons classes use wIll save tIme In developIng applIcatIons whIch uses fIle Input/output
operatIons.
The |0L5 Standard LIbrary Is placed In the workIng dIrectory of the termInal In the Ìnclude\FIles
folder.
CIass 0escrIptIon
CFIle 8ase fIle operatIons class
CFIle8In 8Inary fIle operatIons class
CFIleTxt Text fIle operatIons class
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1480
CFIIe
CFIle Is a base class for CFIle8In and CFIleTxt classes.
0escrIptIon
Class CFIle provIdes the sImplIfIed access for all of Its descendants to |0L5 APÌ fIle and folder
functIons.
0ecIaratIon
·L--- .¯LL-. puoLL· .Jo|-·r
TItIe
tLn·LuJ- <¯LL--\¯LL-.m¬!
CIass hethods
AttrIbutes
Handle Cets fIle handle
FIlename Cets fIle name
Flags Cets fIle flags
SetUnIcode Sets/Clears the FÌLE_UNÌCD0E flag
SetCommon Sets/Clears the FÌLE_CD||DN flag
CeneraI methods for fIIes
Open Dpens fIle
Close Closes fIle
Delete 0eletes fIle
!sExist Checks fIle for exIstence
Copy CopIes fIle
Nove Fenames/moves fIle
Size Cets fIle sIze
Tell Cets current fIle posItIon
Seek Sets current fIle posItIon
Flush Flushes data on dIsk
!sEnding Checks fIle for end
!sLineEnding Checks lIne for end
CeneraI methods for foIders
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1481
FolderCreate Creates folder
FolderDelete 0eletes folder
FolderClean Clears folder
Search methods
FileFindFirst 8egIn fIle search
FileFindNext ContInue fIle search
FileFindClose Close search handle
0erIved cIasses:
CFIle8In
CFIleTxt
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1482
HandIe
Cets fIle handle of the opened fIle.
Lnr |-nJL-.·
Peturned vaIue
Handle of the opened fIle, assIgned to the class Instance. Ìf there Is no fIle assIgned, It returns ·1.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1483
FIIeName
Cets fIle name of the opened fIle.
-rnLnj ¯LL-H-m-.·
Peturned vaIue
FIle name of the opened fIle, assIgned to the class Instance. Ìf there Is no fIle assIgned, It returns
¨¨.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1484
FIags
Cets flags of the opened fIle.
Lnr ¯L-j-.·
Peturned vaIue
Flags of the opened fIle, assIgned to the class Instance.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1485
SetUnIcode
Sets/Clears the FÌLE_UNÌCD0E flag.
v·LJ ¯-rJnL··J-.
o··L :ni·.ja // H-. rL-j v-Lu-
·
Parameters
:ni·.ja
[In] New value for FÌLE_UNÌCD0E flag.
Note
The result of strIng operatIons Is dependent on the FÌLE_UNÌCD0E flag. Ìf It's false, the ANSÌ codes
are used (one byte symbols). Ìf It set, the UNÌCD0E codes are used (two byte symbols). Ìf the fIle
has already opened, the flag cannot be changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1486
SetCommon
Sets/Clears the FÌLE_CD||DN flag.
v·LJ ¯-r.·mm·n.
o··L ·.mm.n // H-. rL-j v-Lu-
·
Parameters
·.mm.n
[In] New value for FÌLE_CD||DN flag.
Note
The FÌLE_UNÌCD0E flag determInes the current work folder. Ìf It's false, the local termInal folder
used as the current work folder. Ìf It's true, the general folder used as the current work folder. Ìf the
fIle has already opened, the flag cannot be changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1487
Dpen
Dpen the specIfIed fIle and If It successful, assIgns It to the class Instance.
Lnr Jp-n.
··n-r -rnLnj fila_n-ma, // ¯LL- n-m-
Lnr fl-j·, // ¯L-j-
-!·nr jalimi:ar=` // ¯-p-n-r·n
·
Parameters
fila_n-ma
[In] FIle name to open.
fl-j·
[In] FIle open flags.
jalimi:ar=`
[In] CS7 fIle separator.
Peturned vaIue
Handle of the opened fIle.
Note
The work folder Is dependent on the FÌLE_CD||DN flag, defIned by SetCommon() method.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1488
CIose
Closes fIle, assIgned to the class Instance.
v·LJ .L·--.·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1489
0eIete
0eletes the fIle, assIgned to the fIle Instance.
v·LJ ¯-L-r-.·
0eIete
0eletes the specIfIed fIle.
v·LJ ¯-L-r-.
··n-r -rnLnj fila_n-ma // ¯LL- n-m-
·
Parameters
fila_n-ma
[In] FIle name of the fIle to delete.
Note
The work folder Is dependent on FÌLE_CD||DN flag, defIned by SetCommon() method.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1490
IsExIst
Checks fIle for exIstence
o··L P-IxL-r.
··n-r -rnLnj fila_n-ma // ¯LL- n-m-
·
Parameters
fila_n-ma
[In] Name of the fIle to check.
Peturned vaIue
true, If fIle exIsts.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1491
Copy
CopIes a fIle.
o··L .·py.
··n-r -rnLnj ·r·_n-ma, // ¯·un·- rLL- n-m-
Lnr ·r·_fl-j, // ¯L-j
··n-r -rnLnj j·:_n-ma, // ¯--rLn-rL·n rLL- n-m-
Lnr j·:_fl-j· // ¯L-j-
·
Parameters
·r·_n-ma
[In] FIle name of the fIle to copy.
·r·_fl-j
[In] Flags of the fIle to copy (only FÌLE_CD||DN Is used).
j·:_n-ma
[In] FIle name of the destInatIon fIle.
j·:_fl-j·
[In] Flags of the destInatIon fIle (only FÌLE_FEWFÌTE and FÌLE_CD||DN are used).
Peturned vaIue
true If successful, false If It hasn't been copIed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1492
hove
Fenames/moves fIle.
o··L M·v-.
··n-r -rnLnj ·r·_n-ma, // ¯·un·- rLL- n-m-
Lnr ·r·_fl-j, // ¯L-j
··n-r -rnLnj j·:_n-ma, // ¯--rLn-rL·n rLL- n-m-
Lnr j·:_fl-j· // ¯L-j-
·
Parameters
·r·_n-ma
[In] FIle name of the fIle to move.
·r·_fl-j
[In] Flags of the fIle to copy (only FÌLE_CD||DN Is used).
j·:_n-ma
[In] FIle name of the destInatIon fIle.
j·:_fl-j·
[In] Flags of the destInatIon fIle (only FÌLE_FEWFÌTE and FÌLE_CD||DN are used).
Peturned vaIue
true If successful, false If It hasn't been moved.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1493
SIze
Cets fIle sIze In bytes.
uL·nj ¯Lz-.·
Peturned vaIue
FIle sIze In bytes. Ìf there Isn't any fIle assIgned, It returns ULDNC_|AX.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1494
TeII
Cets the current fIle posItIon.
uL·nj r-LL.·
Peturned vaIue
The current fIle posItIon. Ìf there Isn't any fIle assIgned, It returns ULDNC_|AX.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1495
Seek
Sets current fIle posItIon.
v·LJ ¯--k.
L·nj .ff·a:, // Jrr--r
IHJM_¯PHI_-J¯PrPJH .rijin // JnLjLn
·
Parameters
.ff·a:
[In] FIle offset In bytes (can be negatIve).
.rijin
[In] DrIgIn of the offset.
Peturned vaIue
true If successful, false If fIle posItIon hasn't been changed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1496
FIush
Flushes all of the fIle Input/output buffer data on dIsk.
v·LJ ¯Lu-!.·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1497
IsEndIng
Checks fIle for end. Ìt's used durIng the fIle read operatIons.
o··L P-InJLnj.·
Peturned vaIue
true If end of fIle has been achIeved after read or seek operatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1498
IsLIneEndIng
Checks fIle for end of lIne. Ìt's used durIng the fIle read operatIons.
o··L P-HLn-InJLnj.·
Peturned vaIue
true If end of lIne has been achIeved after the txt or csv fIle read operatIon (CF·LF chars).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1499
FoIderCreate
Creates new folder.
o··L ¯·LJ-n.n--r-.
··n-r -rnLnj f.ljar_n-ma // ¯·LJ-n n-m-
·
Parameters
f.ljar_n-ma
[In] Name of the folder to create. Ìt contaIns path to the folder relatIve to the folder defIned by
FÌLE_CD||DN flag.
Peturned vaIue
true If successful, and false If the folder hasn't been created.
Note
The work folder Is dependent on FÌLE_CD||DN flag, defIned by SetCommon() method.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1500
FoIder0eIete
0eletes specIfIed folder.
o··L ¯·LJ-n¯-L-r-.
··n-r -rnLnj f.ljar_n-ma // ¯·LJ-n n-m-
·
Parameters
f.ljar_n-ma
[In] Name of the folder to delete. Ìt contaIns path to the folder relatIve to the folder defIned by
FÌLE_CD||DN flag.
Peturned vaIue
true If successful, and false If the folder hasn't been deleted.
Note
The work folder Is dependent on FÌLE_CD||DN flag, defIned by SetCommon() method.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1501
FoIderCIean
Cleans specIfIed folder.
o··L ¯·LJ-n.L--n.
··n-r -rnLnj f.ljar_n-ma // ¯·LJ-n n-m-
·
Parameters
f.ljar_n-ma
[In] Name of the folder to delete. Ìt contaIns path to the folder relatIve to the folder defIned by
FÌLE_CD||DN flag.
Peturned vaIue
true If successful, and false If the folder hasn't been cleaned.
Note
The work folder Is dependent on FÌLE_CD||DN flag, defIned by SetCommon() method.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1502
FIIeFIndFIrst
Ìt began fIle search usIng the fIlter specIfIed.
Lnr ¯LL-¯LnJ¯Ln-r.
··n-r -rnLnj fil:ar, // ¯--n·! ¯LLr-n
-rnLnjs fila_n-ma // --r-n-n·- r· -rnLnj
·
Parameters
fil:ar
[In] Search fIlter.
fila_n-ma
[out] The reference to strIng for the fIrst fIle found.
Peturned vaIue
Ìf successful, It returns handle, that can be used for further fIle search usIng FIleFIndNext, or
ÌN7ALÌ0_HAN0LE If there Isn't any fIle correspondIng to the fIlter specIfIed.
Note
The work folder Is dependent on FÌLE_CD||DN flag, defIned by SetCommon() method.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1503
FIIeFIndNext
Ìt contInue search, started by functIon FIleFIndFIrst().
o··L ¯LL-¯LnJH-xr.
Lnr ·a-r·n_n-njla, // ¯--n·! !-nJL-
-rnLnjs fila_n-ma // --r-n-n·- r· -rnLnj r·n r!- n-xr rLL- r·unJ
·
Parameters
·a-r·n_n-njla
[In] Search handle, returned by FIleFIndFIrst() method.
fila_n-ma
[In] The reference to strIng for the name of the fIle found If successful.
Peturned vaIue
true If successful, false If there Isn't any fIle, correspondIng to the fIlter specIfIed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1504
FIIeFIndCIose
Closes search handle.
v·LJ ¯LL-¯LnJ.L·--.
Lnr ·a-r·n_n-njla // ¯--n·! !-nJL-
·
Parameters
·a-r·n_n-njla
[In] Search handle, returned by FIleFIndFIrst() method.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1505
CFIIeßIn
CFIle8In Is a class for sImplIfIed access to bInary fIles.
0escrIptIon
Class CFIle8In provIdes an access to bInary fIles.
0ecIaratIon
·L--- .¯LL-ÐLn. puoLL· .¯LL-
TItIe
tLn·LuJ- <¯LL--\¯LL-ÐLn.m¬!
CIass hethods
Dpen methods
Open Dpens a bInary fIle
WrIte methods
WriteChar WrItes char or uchar type varIable
WriteShort WrItes short or ushort type varIable
Write!nteger WrItes Int or uInt type varIable
WriteLong WrItes long or ulong type varIable
WriteFloat WrItes float type varIable
WriteDouble WrItes double type varIable
WriteString WrItes strIng type varIable
WriteCharArray WrItes an array of char or uchar type varIables
WriteShortArray WrItes an array of short or ushort type
varIables
Write!ntegerArray WrItes an array of Int or uInt type varIables
WriteLongArray WrItes an array of long or ulong type varIables
WrIteFloatArray WrItes an array of float varIables
WrIte0oubleArray WrItes an array of double type varIables
WrIteDbject WrItes data of the CDbject class InherItor
Instance
Pead methods
FeadChar Feads char or uchar type varIable
FeadShort Feads short or ushort type varIable
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1506
FeadÌnteger Feads Int or uInt type varIable
FeadLong Feads long or ulong type varIable
FeadFloat Feads float type varIable
Fead0ouble Feads double type varIable
FeadStrIng Feads strIng type varIable
FeadCharArray Feads an array of char or uchar type varIables
FeadShortArray Feads an array of short or ushort type varIables
FeadÌntegerArray Feads an array of Int or uInt type varIables
FeadLongArray Feads an array of long or ulong type varIables
FeadFloatArray Feads an array of float type varIables
Fead0oubleArray Feads an array of double type varIables
FeadDbject Feads data of the CDbject class InherItor
Instance
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1507
Dpen
Dpen the specIfIed bInary fIle and If It successful, assIgns It to the class Instance.
Lnr Jp-n.
··n-r -rnLnj fila_n-ma, // ¯LL- n-m-
Lnr fl-j· // ¯L-j-
·
Parameters
fila_n-ma
[In] FIle name of the fIle to open.
fl-j·
[In] FIle open flags (there Is a forced set of the FÌLE_8ÌN flag).
Peturned vaIue
Handle of the opened fIle.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1508
WrIteChar
WrItes char or uchar type varIable to fIle.
uLnr WnLr-.!-n.
·!-n v-l:a // V-Lu-
·
Parameters
v-l:a
[In] 7arIable to wrIte.
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1509
WrIteShort
WrItes short or ushort type varIable to fIle.
uLnr WnLr-¯!·nr.
-!·nr v-l:a // V-Lu-
·
Parameters
v-l:a
[In] 7arIable to wrIte.
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1510
WrIteInteger
WrItes Int or uInt type varIable to fIle.
uLnr WnLr-Pnr-j-n.
Lnr v-l:a // V-Lu-
·
Parameters
v-l:a
[In] 7arIable to wrIte.
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1511
WrIteLong
WrItes long or ulong type varIable to fIle.
uLnr WnLr-H·nj.
L·nj v-l:a // V-Lu-
·
Parameters
v-l:a
[In] 7arIable to wrIte.
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1512
WrIteFIoat
WrItes float type varIable to fIle.
uLnr WnLr-¯L·-r.
rL·-r v-l:a // V-Lu-
·
Parameters
v-l:a
[In] 7arIable to wrIte.
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1513
WrIte0oubIe
WrItes double type varIable to fIle.
uLnr WnLr-¯·uoL-.
J·uoL- v-l:a // V-Lu-
·
Parameters
v-l:a
[In] 7arIable to wrIte.
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1514
WrIteStrIng
WrItes strIng type varIable to fIle.
uLnr WnLr-¯rnLnj.
··n-r -rnLnj v-l:a // V-Lu-
·
Parameters
v-l:a
[In] StrIng to wrIte.
Peturned vaIue
Number of bytes wrItten.
WrIteStrIng
WrItes strIng type varIable to fIle.
uLnr WnLr-¯rnLnj.
··n-r -rnLnj v-l:a, // V-Lu-
Lnr ·iza // ¯Lz-
·
Parameters
v-l:a
[In] StrIng to wrIte.
·iza
[In] Number of bytes to wrIte.
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1515
WrIteCharArray
WrItes an array of char or uchar type varIables to fIle.
uLnr WnLr-.!-nAnn-y.
·!-ns -rr-y/¹, // Ann-y n-r-n-n·-
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr-
·
Parameters
-rr-y/¹
[In] Array to wrIte.
·:-r:_i:am=`
[In] Start element to wrIte from.
i:am·_·.:n:=-.
[In] Number of elements to wrIte (·1 · for whole array).
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1516
WrIteShortArray
WrItes an array of short or ushort type varIables to fIle.
uLnr WnLr-¯!·nrAnn-y.
-!·nrs -rr-y/¹, // Ann-y r· .nLr-
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· .nLr-
·
Parameters
-rr-y/¹
[In] Array to wrIte.
·:-r:_i:am=`
[In] Start element to wrIte from.
i:am·_·.:n:=-.
[In] Number of elements to wrIte (·1 · for whole array).
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1517
WrIteIntegerArray
WrItes an array of Int or uInt type varIables to fIle.
uLnr WnLr-Pnr-j-nAnn-y.
Lnrs -rr-y/¹, // Ann-y r· .nLr-
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· .nLr-
·
Parameters
-rr-y/¹
[In] Array to wrIte.
·:-r:_i:am=`
[In] Start element to wrIte from.
i:am·_·.:n:=-.
[In] Number of elements to wrIte (·1 · for whole array).
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1518
WrIteLongArray
WrItes an array of long or ulong type varIables to fIle.
uLnr WnLr-H·njAnn-y.
L·njs -rr-y/¹, // Ann-y r· .nLr-
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· .nLr-
·
Parameters
-rr-y/¹
[In] Array to wrIte.
·:-r:_i:am=`
[In] Start element to wrIte from.
i:am·_·.:n:=-.
[In] Number of elements to wrIte (·1 · for whole array).
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1519
WrIteFIoatArray
WrItes an array of float type varIables to fIle.
uLnr WnLr-¯L·-rAnn-y.
rL·-rs -rr-y/¹, // Ann-y r· .nLr-
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· .nLr-
·
Parameters
-rr-y/¹
[In] Array to wrIte.
·:-r:_i:am=`
[In] Start element to wrIte from.
i:am·_·.:n:=-.
[In] Number of elements to wrIte (·1 · for whole array).
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1520
WrIte0oubIeArray
WrItes an array of double type varIables to fIle.
uLnr WnLr-¯·uoL-Ann-y.
J·uoL-s -rr-y/¹, // Ann-y r· .nLr-
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· .nLr-
·
Parameters
-rr-y/¹
[In] Array to wrIte.
·:-r:_i:am=`
[In] Start element to wrIte from.
i:am·_·.:n:=-.
[In] Number of elements to wrIte (·1 · for whole array).
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1521
WrIteDbject
WrItes data of the CDbject class InherItor Instance to fIle.
o··L WnLr-Jo|-·r.
.Jo|-·r· .o¬a·: // --r-n-n·- r· r!- ·o|-·r
·
Parameters
.o¬a·:
[In] Feference to the CDbject class InherItor Instance to wrIte.
Peturned vaIue
true If successful, false If data hasn't been wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1522
PeadChar
Feads char or uchar type varIable from fIle.
o··L ---J.!-n.
·!-ns v-l:a // r-nj-r v-nL-oL-
·
Parameters
v-l:a
[In] Target varIable of type char.
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1523
PeadShort
Feads short or ushort type varIable from fIle.
o··L ---J¯!·nr.
-!·nrs v-l:a
·
Parameters
v-l:a
[In] Target varIable of type short or ushort.
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1524
PeadInteger
Feads Int or uInt type varIable from fIle.
o··L ---JPnr-j-n.
Lnrs v-l:a // r-nj-r v-nL-oL-
·
Parameters
v-l:a
[In] Target varIable of type Int or uInt.
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1525
PeadLong
Feads long or ulong type varIable from fIle.
o··L ---JH·nj.
L·njs v-l:a
·
Parameters
v-l:a
[In] Target varIable of type long or ulong.
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1526
PeadFIoat
Feads float type varIable from fIle.
o··L ---J¯L·-r.
rL·-rs v-l:a // r-nj-r v-nL-oL-
·
Parameters
v-l:a
[In] Target varIable of type float.
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1527
Pead0oubIe
Feads double type varIable from fIle.
o··L ---J¯·uoL-.
J·uoL-s v-l:a
·
Parameters
v-l:a
[In] Target varIable of type double.
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1528
PeadStrIng
Feads strIng type varIable from fIle.
o··L ---J¯rnLnj.
-rnLnjs v-l:a // r-nj-r -rnLnj
·
Parameters
v-l:a
[In] Target varIable of type strIng.
Peturned vaIue
true If successful, false If data hasn't been read.
PeadStrIng
Feads strIng type varIable from fIle.
o··L ---J¯rnLnj.
-rnLnjs v-l:a
·
Parameters
v-l:a
[In] Target varIable of type strIng.
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1529
PeadCharArray
Feads an array of char or uchar type varIables from fIle.
o··L ---J.!-nAnn-y.
·!-ns -rr-y/¹, // r-nj-r -nn-y
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· n--J
·
Parameters
-rr-y/¹
[In] Feference to the target array of type char or uchar.
·:-r:_i:am=`
[In] Start element to read from.
i:am·_·.:n:=-.
[In] Number of elements to read (·1 · read to the end of fIle).
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1530
PeadShortArray
Feads an array of short or ushort type varIables from fIle.
o··L ---J¯!·nrAnn-y.
-!·nrs -rr-y/¹, // r-nj-r -nn-y
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· n--J
·
Parameters
-rr-y/¹
[In] Feference to the target array of type short or ushort.
·:-r:_i:am=`
[In] Start element to read from.
i:am·_·.:n:=-.
[In] Number of elements to read (·1 · read to the end of fIle).
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1531
PeadIntegerArray
Feads an array of Int or uInt type varIables from fIle.
o··L ---JPnr-j-nAnn-y.
Lnrs -rr-y/¹, // r-nj-r -nn-y
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· n--J
·
Parameters
-rr-y/¹
[In] Feference to the target array of type Int or uInt.
·:-r:_i:am=`
[In] Start element to read from.
i:am·_·.:n:=-.
[In] Number of elements to read (·1 · read to the end of fIle).
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1532
PeadLongArray
Feads an array of long or ulong type varIables from fIle.
o··L ---JH·njAnn-y.
L·njs -rr-y/¹, // r-nj-r -nn-y
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· n--J
·
Parameters
-rr-y/¹
[In] Feference to the target array of type long or ulong.
·:-r:_i:am=`
[In] Start element to read from.
i:am·_·.:n:=-.
[In] Number of elements to read (·1 · read to the end of fIle).
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1533
PeadFIoatArray
Feads an array of float type varIables from fIle.
o··L ---J¯L·-rAnn-y.
rL·-rs -rr-y/¹, // r-nj-r -nn-y
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· n--J
·
Parameters
-rr-y/¹
[In] Feference to the target array of type float.
·:-r:_i:am=`
[In] Start element to read from.
i:am·_·.:n:=-.
[In] Number of elements to read (·1 · read to the end of fIle).
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1534
Pead0oubIeArray
Feads an array of double type varIables from fIle.
o··L ---J¯·uoL-Ann-y.
J·uoL-s -rr-y/¹, // r-nj-r -nn-y
Lnr ·:-r:_i:am=`, // ¯r-nr -L-m-nr
Lnr i:am·_·.:n:=-. // Humo-n ·r -L-m-nr- r· n--J
·
Parameters
-rr-y/¹
[In] Feference to the target array of type double.
·:-r:_i:am=`
[In] Start element to read from.
i:am·_·.:n:=-.
[In] Number of elements to read (·1 · read to the end of fIle).
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1535
PeadDbject
Feads data of the CDbject class InherItor Instance from fIle.
o··L ---JJo|-·r.
.Jo|-·r· .o¬a·: // --r-n-n·- r· r!- ·o|-·r
·
Parameters
.o¬a·:
[In] Feference to the target CDbject class InherItor Instance for read to.
Peturned vaIue
true If successful, false If data hasn't been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1536
CFIIeTxt
CFIleTxt Is a class for sImplIfIed access to text fIles.
0escrIptIon
Class CFIleTxt provIdes an access to text fIles.
0ecIaratIon
·L--- .¯LL-rxr. puoLL· .¯LL-
TItIe
tLn·LuJ- <¯LL--\¯LL-rxr.m¬!
CIass hethods
Dpen methods
Dpen Dpen a text fIle
WrIte methods
WrIteStrIng WrItes strIng type varIable to fIle
Pead methods
FeadStrIng Feads strIng type varIable from fIle
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1537
Dpen
Dpen the specIfIed text fIle and If It successful, assIgns It to the class Instance.
Lnr Jp-n.
··n-r -rnLnj fila_n-ma, // rLL- n-m-
Lnr fl-j· // rL-j-
·
Parameters
fila_n-ma
[In] FIle name to open.
fl-j·
[In] FIle open flags (there Is a forced set of the FÌLE_TXT flag).
Peturned vaIue
Dpened fIle handle.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1538
WrIteStrIng
WrItes strIng type varIable to fIle.
uLnr WnLr-¯rnLnj.
··n-r -rnLnj v-l:a // ¯rnLnj r· .nLr-
·
Parameters
v-l:a
[In] StrIng to wrIte.
Peturned vaIue
Number of bytes wrItten.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1539
PeadStrIng
Feads strIng type varIable from fIle.
-rnLnj ---J¯rnLnj.·
Peturned vaIue
StrIng whIch has been read.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1540
StrIng operatIons
ThIs sectIon contaIns the technIcal detaIls of the strIng operatIons classes and descrIptIons of the
correspondIng components of the standard |0L5 lIbrary.
The use of strIng operatIons classes wIll save tIme In developIng applIcatIons whIch uses text
processIng operatIons.
The |0L5 Standard LIbrary Is placed In the workIng dIrectory of the termInal In the Ìnclude\StrIngs
folder.
CIass 0escrIptIon
CStrIng Class for strIng operatIons
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1541
CStrIng
CStrIng Is a class for sImplIfIed access to the varIables of strIng type.
0escrIptIon
Class CFIle provIdes the sImplIfIed access for all of Its descendants to |0L5 APÌ strIng functIons.
0ecIaratIon
·L--- .¯rnLnj. puoLL· .Jo|-·r
TItIe
tLn·LuJ- <¯rnLnj-\¯rnLnj.m¬!
CIass hethods
0ata access methods
Str Cets a strIng
Len Cets length of a strIng
Copy CopIes a strIng
FIII methods
FIll FIlls a strIng wIth specIfIed char
AssIgn AssIgns a strIng
Append Appends a strIng
Ìnsert Ìnserts a strIng
Compare methods
Compare Compares a strIng
CompareNoCase Compares a strIngs case InsensItIve
SubstrIng methods
Left Cets a specIfIed number of characters from the
left sIde of a strIng
FIght Cets a specIfIed number of characters from the
rIght sIde of a strIng
|Id Cets a specIfIed number of characters from a
strIng
TrImldeIete methods
TrIm Femoves all leadIng and traIlIng occurrences of
a set of specIfIed characters from a strIng
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1542
TrImLeft Femoves all leadIng occurrences of a set of
specIfIed characters from a strIng
TrImFIght Femoves all traIlIng occurrences of a set of
specIfIed characters from a strIng
Clear Clears a strIng
Convert methods
ToUpper Converts a strIng to uppercase.
ToLower Converts a strIng to lowercase.
Feverse Feverses a strIng
Search methods
FInd Searches for the fIrst match of a substrIng
FIndFev Searches for the last match of a substrIng
Femove 0eletes a substrIng from a strIng
Feplace Feplaces a substrIng
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1543
Str
Cets a strIng.
-rnLnj ¯rn.· ··n-r¡
Peturned vaIue
Copy of a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1544
Len
Cets length of a strIng.
uLnr H-n.· ··n-r¡
Peturned vaIue
Length of a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1545
Copy
CopIes a strIng by reference.
v·LJ .·py.
-rnLnjs ·.py // --r-n-n·-
· ··n-r¡
Parameters
·.py
[In] Feference to a strIng to copy.
Copy
CopIes a strIng to the CStrIng class Instance.
v·LJ .·py.
.¯rnLnj· ·.py // Jo|-·r J--·nLpr·n
· ··n-r¡
Parameters
·.py
[In] CStrIng class object descrIptor.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1546
FIII
FIlls a strIng wIth specIfIed char.
o··L ¯LLL.
-!·nr ·n-r-·:ar // .!-n-·r-n
·
Parameters
·n-r-·:ar
[In] Character for fIllIng.
Peturned vaIue
true If successful, false If a strIng hasn't been fIlled.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1547
AssIgn
AssIgns a strIng.
v·LJ A--Ljn.
··n-r -rnLnj ·:r // ¯rnLnj r· ---Ljn
·
Parameters
·:r
[In] StrIng to assIgn.
AssIgn
AssIgns a strIng to the CStrIng class Instance.
v·LJ A--Ljn.
.¯rnLnj· ·:r // Jo|-·r J--·nLpr·n
·
Parameters
·:r
[In] CStrIng class object descrIptor to assIgn.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1548
Append
Appends a strIng.
v·LJ App-nJ.
··n-r -rnLnj ·:r // ¯rnLnj r· -pp-nJ
·
Parameters
·:r
[In] StrIng to append.
Append
Appends a strIng to the CStrIng class Instance.
v·LJ App-nJ.
.¯rnLnj· ·:rinj // Jo|-·r J--·nLpr·n
·
Parameters
·:rinj
[In] CStrIng class object descrIptor to append.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1549
Insert
Ìnserts a strIng to the specIfIed posItIon.
uLnr Pn--nr.
uLnr p.·, // -·-LrL·n
··n-r -rnLnj ·:r // ¯rnLnj r· Ln--nr
·
Parameters
p.·
[In] Ìnsert posItIon.
·:r
[In] StrIng to Insert.
Peturned vaIue
Fesulted strIng length.
Insert
Ìnserts a strIng to the specIfIed posItIon to the CStrIng class Instance.
uLnr Pn--nr.
uLnr p.·, // -·-LrL·n
.¯rnLnj· ·:r // Jo|-·r J--·nLpr·n
·
Parameters
p.·
[In] Ìnsert posItIon.
·:r
[In] CStrIng class object descrIptor to Insert.
Peturned vaIue
Fesulted strIng length.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1550
Compare
Compares a strIng.
Lnr .·mp-n-.
··n-r -rnLnj ·:r // ¯rnLnj r· ··mp-n-
· ··n-r¡
Parameters
·:r
[In] StrIng to compare.
Peturned vaIue
Ì returns 0 If a strIngs are equal, ·1 If a strIng of the class Is lower than a strIng to compare, ·1 If
the class strIng greater than a strIng to compare.
Compare
Compares a strIng wIth a strIng of the CStrIng class Instance.
Lnr .·mp-n-.
.¯rnLnj· ·:r // Jo|-·r J--·nLpr·n
· ··n-r¡
Parameters
·:r
[In] CStrIng class object descrIptor to compare.
Peturned vaIue
Ì returns 0 If a strIngs are equal, ·1 If a strIng of the class Is lower than a strIng to compare, ·1 If
the class strIng greater than a strIng to compare.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1551
CompareNoCase
Compares a strIngs case InsensItIve.
Lnr .·mp-n-H·.---.
··n-r -rnLnj ·:r // ¯rnLnj r· ··mp-n-
· ··n-r¡
Parameters
·:r
[In] StrIng to compare.
Peturned vaIue
Ì returns 0 If a strIngs are equal, ·1 If a strIng of the class Is lower than a strIng to compare, ·1 If
the class strIng greater than a strIng to compare.
CompareNoCase
Compares a strIng (case InsensItIve) wIth a strIng of the CStrIng class Instance.
Lnr .·mp-n-H·.---.
.¯rnLnj· ·:r // Jo|-·r J--·nLpr·n
· ··n-r¡
Parameters
·:r
[In] CStrIng class object descrIptor to compare.
Peturned vaIue
Ì returns 0 If a strIngs are equal, ·1 If a strIng of the class Is lower than a strIng to compare, ·1 If
the class strIng greater than a strIng to compare.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1552
Left
Cets a specIfIed number of characters from the left sIde of a strIng.
-rnLnj H-rr.
uLnr ·.:n: // Humo-n ·r ·!-n-·r-n-
·
Parameters
·.:n:
[In] Number of characters.
Peturned vaIue
Fesulted substrIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1553
PIght
Cets a specIfIed number of characters from the rIght sIde of a strIng.
-rnLnj -Lj!r.
uLnr ·.:n: // Humo-n ·r ·!-n-·r-n-
·
Parameters
·.:n:
[In] Number of characters.
Peturned vaIue
Fesulted substrIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1554
hId
Cets a specIfIed number of characters from a strIng.
-rnLnj MLJ.
uLnr p.·, // -·-LrL·n
uLnr ·.:n: // Humo-n ·r ·!-n-·r-n-
·
Parameters
p.·
[In] PosItIon of a strIng.
·.:n:
[In] Number of characters.
Peturned vaIue
Fesulted substrIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1555
TrIm
Femoves all leadIng and traIlIng occurrences of a set of specIfIed characters (and ' ','\t','\r','\n') from a
strIng.
Lnr rnLm.
··n-r -rnLnj :-rja:· // ¯-r ·r ·!-n-·r-n- r· n-m·v-
·
Parameters
:-rja:·
[In] Set of characters to remove.
Peturned vaIue
Number of characters removed.
ExampIe:
//--- -x-mpL- r·n .¯rnLnj..rnLm
tLn·LuJ- <¯rnLnj-\¯rnLnj.m¬!
//---
v·LJ Jn¯r-nr.·

.¯rnLnj -rn¡
//---
-rn.A--Ljn.¨ \r\rAÐ.¯\n\n¨·¡
pnLnrr.¨¯·un·- -rnLnj '`-'¨,-rn.¯rn.··¡
//---
-rn.rnLm.¨¯A-¯A-¯A¨·¡
pnLnrr.¨---uLr -rnLnj '`-'¨,-rn.¯rn.··¡
·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1556
TrImLeft
Femoves all leadIng occurrences of a set of specIfIed characters (and ' ','\t','\r','\n') from a strIng.
Lnr rnLmH-rr.
··n-r -rnLnj :-rja:· // ¯-r ·r ·!-n-·r-n- r· n-m·v-
·
Parameters
:-rja:·
[In] Set of characters to remove.
Peturned vaIue
Number of characters removed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1557
TrImPIght
Femoves all traIlIng occurrences of a set of specIfIed characters (and ' ','\t','\r','\n') from a strIng.
Lnr rnLm-Lj!r.
··n-r -rnLnj :-rja:· // ¯-r ·r ·!-n-·r-n- r· n-m·v-
·
Parameters
:-rja:·
[In] Set of characters to remove.
Peturned vaIue
Number of characters removed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1558
CIear
Clears a strIng.
o··L .L--n.·
Peturned vaIue
true If successful, false If a strIng hasn't been cleared.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1559
ToUpper
Converts a strIng to uppercase.
o··L r·Jpp-n.·
Peturned vaIue
true If successful, false If a strIng hasn't been converted.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1560
ToLower
Converts a strIng to lowercase.
o··L r·H·.-n.·
Peturned vaIue
true If successful, false If a strIng hasn't been converted.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1561
Peverse
Feverses of a strIng.
v·LJ --v-n--.·
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1562
FInd
Searches for the fIrst match of a substrIng.
Lnr ¯LnJ.
uLnr ·:-r:, // -·-LrL·n
··n-r -rnLnj ·:o·:rinj // ¯uo-rnLnj r· ---n·! r·n
· ··n-r¡
Parameters
·:-r:
[In] The Index of the character In the strIng to begIn the search wIth, or 0 to start from the
begInnIng.
·:o·:rinj
[In] SubstrIng to search for.
Peturned vaIue
The Index of the fIrst character that matches the requested substrIng; ·1 If the substrIng Is not
found.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1563
FIndPev
Searches for the last match of a substrIng.
Lnr ¯LnJ--v.
··n-r -rnLnj ·:o·:rinj // ¯uo-rnLnj
· ··n-r¡
Parameters
·:o·:rinj
[In] A substrIng to search for.
Peturned vaIue
The Index of the last character that matches the requested substrIng; ·1 If the substrIng Is not
found.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1564
Pemove
0eletes a substrIng from a strIng.
uLnr --m·v-.
··n-r -rnLnj ·:o·:rinj // ¯uo-rnLnj r· n-m·v-
·
Parameters
·:o·:rinj
[In] A substrIng to search for.
Peturned vaIue
Number of substrIngs deleted.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1565
PepIace
Feplaces a substrIng from a strIng.
uLnr --pL-·-.
··n-r -rnLnj ·:o·:rinj, // ¯uo-rnLnj r· n-pL-·-
··n-r -rnLnj nav·:rinj // H-. -uo-rnLnj
·
Parameters
·:o·:rinj
[In] A substrIng to search for.
nav·:rinj
[In] A substrIng to replace for.
Peturned vaIue
Number of substrIngs replaced.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1566
TechnIcaI IndIcators
ThIs sectIon contaIns the technIcal detaIls of the technIcal IndIcator classes and descrIptIon of the
correspondIng components of the standard |0L5 lIbrary.
The use of the technIcal IndIcator classes wIll save tIme In developIng applIcatIons (scrIpts, expert
advIsors).
The |0L5 Standard LIbrary Is placed In the workIng dIrectory of the termInal In the Ìnclude\ÌndIcators
folder.
CIasslCroup 0escrIptIon
CÌndIcator base class TechnIcal IndIcator base class
CÌndIcator8uffer auxIlIary class TechnIcal IndIcator buffer class
Trend ÌndIcators Croup of Trend IndIcator classes
DscIllators Croup of DscIllator IndIcator classes
7olume IndIcators Croup of 7olume IndIcator classes
8Ill WIllIams ÌndIcators 8Ill WIllIams IndIcator classes
CÌndIcators collectIon TechnIcal IndIcator collectIon
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1567
CIndIcator
CÌndIcator Is a base class for technIcal IndIcator classes of the standard |0L LIbrary.
0escrIptIon
Class CÌndIcator provIdes the sImplIfIed access for all of Its descendants to |0L5 APÌ technIcal
IndIcator functIons.
0ecIaratIon
·L--- .PnJL·-r·n. puoLL· .Ann-yJo|
TItIe
tLn·LuJ- <PnJL·-r·n-\PnJL·-r·n.m¬!
CIass hethods
AttrIbutes
Handle Feturns the IndIcator's handle
Name Feturns the IndIcator's name
Status Feturns the IndIcator's status
Num8uffers Feturns the number of buffers of the IndIcator
TImeframe Feturns the IndIcator's tImeframe flag
Symbol Feturns the IndIcator's symbol
PerIod Feturns the IndIcator's perIod
CurrentNeed Sets the flag of a necessIty to constantly update
current values of the IndIcator
Create hethods
Create Ìt creates the IndIcator wIth the specIfIed
parameters.
8uffSIze Ìt defInes the number of buffers for the
IndIcator
0ata Access hethods
Cet0ata Ìt copIes the data from the IndIcator's buffer
|InImum Feturns the Index of the mInImal element of a
specIfIed buffer In a specIfIed Interval
|In7alue Feturns the value of the mInImal element of a
specIfIed buffer In a specIfIed Interval
|axImum Feturns the Index of the maxImal element of a
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1568
specIfIed buffer In a specIfIed Interval
|ax7alue Feturns the value of the maxImal element of a
specIfIed buffer In a specIfIed Interval
Update hethods
Fefresh Updates the IndIcator data
EnumeratIons ConversIon
PerIodStr Converts ENU|_TÌ|EFFA|ES to strIng
|ethodStr Converts ENU|_|A_|ETHD0 to strIng
PrIceStr Converts ENU|_APPLÌE0_PFÌCE to strIng
7olumeStr Converts ENU|_APPLÌE0_7DLU|E to strIng
0erIved cIasses:
CIAC
CIA0
CIA0X
CIA0XWIlder
CIAllIgator
CIA|A
CIAD
CIATF
CI8ands
CI8earsPower
CI8ullsPower
CI8W|FÌ
CICCÌ
CIChaIkIn
CI0E|A
CI0e|arker
CIEnvelopes
CIForce
CIFractals
CIFrA|A
CICator
CIÌchImoku
CI|A
CI|AC0
CI|FÌ
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1569
CI|omentum
CID87
CIDs|A
CIFSÌ
CIF7Ì
CISAF
CIStd0ev
CIStochastIc
CITE|A
CITrIX
CI7Ì0yA
CI7olumes
CIWPF
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1570
HandIe
Feturns the IndIcator's handle.
Lnr |-nJL-.· ··n-r
Peturned vaIue
ÌndIcator's handle.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1571
Name
Feturns the IndIcator's name.
-rnLnj H-m-.· ··n-r
Peturned vaIue
ÌndIcator's name.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1572
Status
Feturns the IndIcator's status.
-rnLnj ¯r-ru-.· ··n-r
Peturned vaIue
ÌndIcator's status.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1573
Numßuffers
Feturns the number of buffers of the IndIcator.
Lnr HumÐurr-n-.· ··n-r
Peturned vaIue
Number of buffers of the IndIcator.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1574
TImeframe
Feturns the tImeframe flag of the IndIcator.
Lnr rLm-rn-m-.· ··n-r
Peturned vaIue
ÌndIcator's tImeframe flag.
Note
Ìt forms as the object vIsIbIlIty flag.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1575
SymboI
Feturns the symbol of the IndIcator.
-rnLnj ¯ymo·L.· ··n-r
Peturned vaIue
ÌndIcator's symbol.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1576
PerIod
Feturns the perIod of the IndIcator.
IHJM_rPMI¯-AMI¯ --nL·J.· ··n-r
Peturned vaIue
ÌndIcator's perIod.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1577
CurrentNeed
Sets the flag of a necessIty to constantly update current values of the IndIcator.
-rnLnj .unn-nrH--J.
o··L fl-j // v-Lu-
·
Parameters
fl-j
[In] New value of the flag.
Peturned vaIue
No.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1578
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
IHJM_PH¯P.ArJ- :ypa, // ryp-
Lnr n:m_p-r-m·, // Humo-n ·r p-n-m-r-n-
M¬L--n-ms p-r-m·/¹ // n-r-n-n·- r· r!- -nn-y ·r p-n-m-r-n-
·
Parameters
·ymo.l
[In] Symbol name.
pari.j
[In] PerIod.
:ypa
[In] ÌndIcator's type.
n:m_p-r-m·
[In] Number of IndIcator's parameters.
p-r-m·/¹
[In] Feference to the parameters array for the IndIcator.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1579
ßuffSIze
Ìt sets the sIze for the IndIcator's buffer.
v·LJ Ðurr¯Lz-.
Lnr ·iza // ourr-n -Lz-
·
Parameters
·iza
[In] New buffer sIze.
Note
All the IndIcator's buffers wIll have the same sIze.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1580
Cet0ata
Fequests the data from the IndIcator's buffer by start posItIon and number of necessary data.
o··L J-r¯-r-.
Lnr ·:-r:_p.·, // ¯r-nr p·-LrL·n
Lnr ·.:n:, // Humo-n ·r -L-m-nr-
Lnr o:ffar_n:m, // Ðurr-n numo-n
J·uoL-s o:ffar // r-nj-r -nn-y r·n J-r-
· ··n-r
Parameters
·:-r:_p.·
[In] Start posItIon of the IndIcator's buffer.
·.:n:
[In] Number of buffer elements to request.
o:ffar_n:m
[In] Number of the IndIcator's buffer.
o:ffar
[In] Feference to the target array for the data requested.
Peturned vaIue
true If successful, false If data hasn't been receIved.
Cet0ata
Fequests the data from the IndIcator's buffer by start tIme and number of necessary data.
o··L J-r¯-r-.
J-r-rLm- ·:-r:_:ima, // ¯r-nr rLm-
Lnr ·.:n:, // Humo-n ·r -L-m-nr- r· n-¬u--r
Lnr o:ffar_n:m, // Ðurr-n numo-n
J·uoL-s o:ffar // r-nj-r -nn-y r·n J-r-
· ··n-r
Parameters
·:-r:_:ima
[In] Start tIme of the IndIcator's buffer.
·.:n:
[In] Number of elements to request.
o:ffar_n:m
[In] Number of the IndIcator's buffer.
o:ffar
[In] Feference to the target array for the data requested.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1581
Peturned vaIue
true If successful, false If data hasn't been receIved.
Cet0ata
Fequests the data from the IndIcator's buffer by start and fInal tIme.
o··L J-r¯-r-.
J-r-rLm- ·:-r:_:ima, // ¯r-nr rLm-
J-r-rLm- ·:.p_:ima, // ¯Ln-L rLm-
Lnr o:ffar_n:m, // Ðurr-n numo-n
J·uoL-s o:ffar // r-nj-r -nn-y r·n J-r-
· ··n-r
Parameters
·:-r:_:ima
[In] Start tIme.
·:.p_:ima
[In] FInal tIme.
o:ffar_n:m
[In] Number of the IndIcator's buffer.
o:ffar
[In] Feference to the target array for the data requested.
Peturned vaIue
true If successful, false If data hasn't been receIved.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1582
hInImum
Feturns the Index of the mInImal element of a specIfIed buffer In a specIfIed Interval.
Lnr MLnLmum.
Lnr o:ffar_n:m, // ourr-n numo-n
Lnr ·:-r:, // -r-nr LnJ-x
Lnr ·.:n: // numo-n
· ··n-r
Parameters
o:ffar_n:m
[In] 8uffer number to search the value In.
·:-r:
[In] Start Index of the search Interval.
·.:n:
[In] SIze of the search Interval (number of elements).
Peturned vaIue
Ìndex of the mInImal element of a specIfIed buffer In a specIfIed Interval.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1583
hInVaIue
Feturns the value of the mInImal element of a specIfIed buffer In a specIfIed Interval.
J·uoL- MLnV-Lu-.
Lnr o:ffar_n:m, // ourr-n numo-n
Lnr ·:-r:, // -r-nr LnJ-x
Lnr ·.:n:, // numo-n
Lnrs injax // n-r-n-n·-
· ··n-r
Parameters
o:ffar_n:m
[In] 8uffer number to search the value In.
·:-r:
[In] Start Index of the search Interval.
·.:n:
[In] SIze of the search Interval (number of elements).
injax
[out] Feference to the varIable to locate the value of the Index of the found element.
Peturned vaIue
7alue of the mInImal element of a specIfIed buffer In a specIfIed Interval.
Note
The Index of the found element Is placed by reference Index.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1584
haxImum
Feturns the Index of the maxImal element of a specIfIed buffer In a specIfIed Interval.
Lnr M-xLmum.
Lnr o:ffar_n:m, // ourr-n numo-n
Lnr ·:-r:, // -r-nr LnJ-x
Lnr ·.:n: // numo-n
· ··n-r
Parameters
o:ffar_n:m
[In] 8uffer number to search the value In.
·:-r:
[In] Start Index of the search Interval.
·.:n:
[In] SIze of the search Interval (number of elements).
Peturned vaIue
Ìndex of the maxImal element of a specIfIed buffer In a specIfIed Interval.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1585
haxVaIue
Feturns the value of the maxImal element of a specIfIed buffer In a specIfIed Interval.
J·uoL- M-xV-Lu-.
Lnr o:ffar_n:m, // ourr-n numo-n
Lnr ·:-r:, // -r-nr LnJ-x
Lnr ·.:n:, // numo-n
Lnrs injax // n-r-n-n·-
· ··n-r
Parameters
o:ffar_n:m
[In] 8uffer number to search the value In.
·:-r:
[In] Start Index of the search Interval.
·.:n:
[In] SIze of the search Interval (number of elements).
injax
[out] Feference to the varIable to locate the value of the Index of the found element.
Peturned vaIue
7alue of the maxImal element of a specIfIed buffer In a specIfIed Interval.
Note
The Index of the found element Is placed by reference Index.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1586
Pefresh
Updates the IndIcator's data.
v·LJ --rn--!.
Lnr fl-j· // ¯L-j-
·
Parameters
fl-j·
[In] TImeframe update flags.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1587
PerIodStr
The functIon converts the value of the ENU|_TÌ|EFFA|ES enumeratIon to strIng.
-rnLnj --nL·J¯rn.
Lnr v-l // V-Lu-
·
Parameters
v-l
[In] 7alue to convert.
Peturned vaIue
StrIng, whIch corresponds to the value of the ENU|_TÌ|EFFA|ES enumeratIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1588
hethodStr
The functIon converts the value of the ENU|_|A_|ETHD0 enumeratIon to strIng.
-rnLnj M-r!·J¯rn.
Lnr v-l // V-Lu-
· ··n-r
Parameters
v-l
[In] 7alue to convert.
Peturned vaIue
StrIng, whIch corresponds to the value of the ENU|_|A_|ETHD0 enumeratIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1589
PrIceStr
The functIon converts the value of the ENU|_APPLÌE0_PFÌCE enumeratIon to strIng.
-rnLnj -nL·-¯rn.
Lnr v-l // V-Lu-
· ··n-r
Parameters
v-l
[In] 7alue to convert.
Peturned vaIue
StrIng, whIch corresponds to the value of the ENU|_APPLÌE0_PFÌCE enumeratIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1590
VoIumeStr
The functIon converts the value of the ENU|_APPLÌE0_7DLU|E enumeratIon to strIng.
-rnLnj V·Lum-¯rn.
Lnr v-l // V-Lu-
· ··n-r
Parameters
v-l
[In] 7alue to convert.
Peturned vaIue
StrIng, whIch corresponds to the value of the ENU|_APPLÌE0_7DLU|E enumeratIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1591
CIndIcatorßuffer
The CÌndIcator8uffer Is a class for sImplIfIed access to the buffer data of the technIcal IndIcator.
0escrIptIon
The class CÌndIcator8uffer provIdes sImplIfIed access for all of Its descendants to the buffer data of
the technIcal IndIcator.
0ecIaratIon
·L--- .PnJL·-r·nÐurr-n. puoLL· .Ann-y¯·uoL-
TItIe
tLn·LuJ- <PnJL·-r·n-\PnJL·-r·n.m¬!
CIass hethods
AttrIbutes
SIze Ìt sets new buffer sIze for the IndIcator
Dffset Ìt gets/sets the buffer offset
Name Ìt gets/sets the buffer name
0ata Access hethods
At Feturns the numerIcal value of buffer element
wIth the specIfIed Index
|InImum Feturns the Index of the mInImal element In
the specIfIed Interval
|axImum Feturns the Index of the maxImal element In
the specIfIed Interval
0ata Update hethods
Fefresh Updates all buffer elements
Fefresh_0_only Updates only 0th (current) buffer element value
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1592
SIze
Ìt sets new buffer sIze for the IndIcator.
v·LJ ¯Lz-.
Lnr ·iza // H-. ourr-n -Lz-
·
Parameters
·iza
[In] New buffer sIze.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1593
Dffset (Cet hethod)
Feturns the buffer offset.
Lnr Jrr--r.· ··n-r
Peturned vaIue
8uffer offset.
Dffset (Set hethod)
Sets the buffer offset.
v·LJ Jrr--r.
Lnr .ff·a: // H-. ·rr--r
·
Parameters
.ff·a:
[In] New buffer offset.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1594
Name (Cet hethod)
Feturns the buffer name.
-rnLnj H-m-.· ··n-r
Peturned vaIue
8uffer name.
Name (Set hethod)
Sets the buffer name.
v·LJ H-m-.
-rnLnj n-ma // H-. ourr-n n-m-
·
Parameters
n-ma
[In] New buffer name.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1595
At
Feturns the numerIcal value of buffer element wIth the specIfIed Index.
J·uoL- Ar.
Lnr injax // PnJ-x
· ··n-r
Peturned vaIue
NumerIcal value of buffer element.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1596
hInImum
Feturns the Index of the mInImal element In the specIfIed Interval.
Lnr MLnLmum.
Lnr ·:-r:, // -r-nr LnJ-x
Lnr ·.:n: // numo-n
· ··n-r
Parameters
·:-r:
[In] Start Index of the search Interval.
·.:n:
[In] SIze of the search Interval (number of elements).
Peturned vaIue
Ìndex of the mInImal element In the specIfIed Interval.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1597
haxImum
Feturns the Index of the maxImal element In the specIfIed Interval.
Lnr M-xLmum.
Lnr ·:-r:, // -r-nr LnJ-x
Lnr ·.:n: // numo-n
· ··n-r
Parameters
·:-r:
[In] Start Index of the search Interval.
·.:n:
[In] SIze of the search Interval (number of elements).
Peturned vaIue
Ìndex of the maxImal element In the specIfIed Interval.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1598
Pefresh
Updates all buffer elements.
o··L --rn--!.
Lnr n-njla, // PnJL·-r·n'- !-nJL-
Lnr n:m // Ðurr-n numo-n
·
Parameters
n-njla
[In] ÌndIcator's handle.
n:m
[In] ÌndIcator's buffer number.
Peturned vaIue
true If successful, false If buffer hasn't been updated.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1599
Pefresh_0_onIy
Updates the 0th buffer element.
o··L --rn--!_¨_·nLy.
Lnr n-njla, // PnJL·-r·n'- !-nJL-
Lnr n:m // Ðurr-n numo-n
·
Parameters
n-njla
[In] ÌndIcator's handle.
n:m
[In] ÌndIcator's buffer number.
Peturned vaIue
true If successful, false If buffer hasn't been updated.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1600
Trend IndIcator CIasses
ThIs group of chapters contaIns technIcal detaIls of Trend ÌndIcator classes of the |0L5 Standard
LIbrary and descrIptIons of all Its key components.
CIass 0escrIptIon
CIA0X Average 0IrectIonal Ìndex
CIA0XWIlder Average 0IrectIonal Ìndex by Welles WIlder
CI8ands 8ollInger 8ands
CIEnvelopes Envelopes
CIÌchImoku ÌchImoku KInko Hyo
CI|A |ovIng Average
CISAF ParabolIc Stop And Feverse System
CIStd0ev Standard 0evIatIon
CI0E|A 0ouble ExponentIal |ovIng Average
CITE|A TrIple ExponentIal |ovIng Average
CIFrA|A Fractal AdaptIve |ovIng Average
CIA|A AdaptIve |ovIng Average
CI7Ì0yA 7arIable Ìndex 0ynamIc Average
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1601
CIA0X
The CIA0X Is a class Intended for usIng the Average 0IrectIonal Ìndex technIcal IndIcator.
0escrIptIon
The CIA0X class provIdes the creatIon and access to the data of the Average 0IrectIonal Ìndex
IndIcator.
0ecIaratIon
·L--- .LA¯x. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element of the maIn lIne
Plus Feturns the buffer element of the +0Ì lIne
|Inus Feturns the buffer element of the ·0Ì lIne
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1602
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1603
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j // Av-n-jLnj p-nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1604
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1605
PIus
Feturns the buffer element of the +0Ì lIne by the specIfIed Index.
J·uoL- -Lu-.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the +0Ì lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any correct
data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1606
hInus
Feturns the buffer element of the ·0Ì lIne by the specIfIed Index.
J·uoL- MLnu-.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the ·0Ì lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any correct
data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1607
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_A0X for CIA0X).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1608
CIA0XWIIder
The CIA0XWIlder Is a class Intended for usIng the Average 0IrectIonal Ìndex by Welles WIlder technIcal
IndIcator.
0escrIptIon
The CIA0XWIlder class provIdes the creatIon and access to the data of the Average 0IrectIonal Ìndex
by Welles WIlder IndIcator.
0ecIaratIon
·L--- .LA¯xWLLJ-n. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element of the maIn lIne
Plus Feturns the buffer element of the +0Ì lIne
|Inus Feturns the buffer element of the ·0Ì lIne
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1609
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1610
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j // Av-n-jLnj p-nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1611
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1612
PIus
Feturns the buffer element of the +0Ì lIne by the specIfIed Index.
J·uoL- -Lu-.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the +0Ì lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any correct
data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1613
hInus
Feturns the buffer element of the ·0Ì lIne by the specIfIed Index.
J·uoL- MLnu-.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the ·0Ì lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any correct
data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1614
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_A0XW for CIA0XWIlder).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1615
CIßands
The CI8ands Is a class Intended for usIng the 8ollInger 8ands technIcal IndIcator.
0escrIptIon
The CI8ands class provIdes the creatIon and access to the data of the 8ollInger 8ands IndIcator.
0ecIaratIon
·L--- .LÐ-nJ-. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
|aShIft Feturns the horIzontal shIft
0evIatIon Feturns the devIatIon
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element of the base lIne
Upper Feturns the buffer element of the upper lIne
Lower Feturns the buffer element of the lower lIne
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1616
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1617
haShIft
Feturns the horIzontal shIft of the IndIcator.
Lnr M-¯!Lrr.· ··n-r
Peturned vaIue
Feturns the horIzontal shIft value, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1618
0evIatIon
Feturns the devIatIon.
J·uoL- ¯-vL-rL·n.· ··n-r
Peturned vaIue
Feturns the devIatIon, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1619
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1620
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr m-_·nif:, // ¯!Lrr
J·uoL- javi-:i.n, // ¯-vL-rL·n
Lnr -ppliaj // -ppLL-J pnL·-, ·n !-nJL-
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
m-_·nif:
[In] HorIzontal shIft of the IndIcator.
javi-:i.n
[In] 0evIatIon.
-ppliaj
[In] 7olume type to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1621
ßase
Feturns the buffer element of the base lIne by the specIfIed Index.
J·uoL- Ð---.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the 8ase lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1622
Upper
Feturns the buffer element of the upper lIne by the specIfIed Index.
J·uoL- Jpp-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the upper lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1623
Lower
Feturns the buffer element of the lower lIne by the specIfIed Index.
J·uoL- H·.-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the lower lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1624
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_8AN0S for CI8ands).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1625
CIEnveIopes
The CIEnvelopes Is a class Intended for usIng the Envelopes technIcal IndIcator.
0escrIptIon
The CIEnvelopes class provIdes the creatIon and access to the data of the Envelopes IndIcator.
0ecIaratIon
·L--- .LInv-L·p--. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
|aShIft Feturns the horIzontal shIft
|a|ethod Feturns the averagIng method
0evIatIon Feturns the devIatIon
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
Upper Feturns the buffer element of the upper lIne
Lower Feturns the buffer element of the lower lIne
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1626
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1627
haShIft
Feturns the horIzontal shIft of the IndIcator.
Lnr M-¯!Lrr.· ··n-r
Peturned vaIue
Feturns the horIzontal shIft value, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1628
hahethod
Feturns the averagIng method.
IHJM_MA_MIr|J¯ M-M-r!·J.· ··n-r
Peturned vaIue
Feturns the averagIng method, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1629
0evIatIon
Feturns the value of devIatIon.
J·uoL- ¯-vL-rL·n.· ··n-r
Peturned vaIue
Feturns the value of devIatIon, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1630
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1631
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr m-_·nif:, // |·nLz·nr-L -!Lrr
IHJM_MA_MIr|J¯ m-_ma:n.j, // Av-n-jLnj m-r!·J
Lnr -ppliaj, // -nL·- ryp- ·n !-nJL- r· -ppLy
J·uoL- javi-:i.n // ¯-vL-rL·n
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
m-_·nif:
[In] HorIzontal shIft.
m-_ma:n.j
[In] AveragIng method.
-ppliaj
[In] PrIce type of handle to apply.
javi-:i.n
[In] 0evIatIon.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1632
Upper
Feturns the buffer element of the upper lIne by the specIfIed Index.
J·uoL- Jpp-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the upper lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1633
Lower
Feturns the buffer element of the lower lIne by the specIfIed Index.
J·uoL- H·.-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the lower lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1634
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_EN7ELDPES for CIEnvelopes).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1635
CIIchImoku
The CIÌchImoku Is a class Intended for usIng the ÌchImoku KInko Hyo technIcal IndIcator.
0escrIptIon
The CIÌchImoku class provIdes the creatIon, setup and access to the data of the ÌchImoku KInko Hyo
IndIcator.
0ecIaratIon
·L--- .LP·!Lm·ku. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
TenkanSenPerIod Feturns the TenkanSen perIod
KIjunSenPerIod Feturns the KIjunSen perIod
SenkouSpan8PerIod Feturns the SenkouSpan8 perIod
Create hethods
Create Creates the IndIcator
0ata Access hethods
TenkanSen Feturns the buffer element of the TenkanSen
lIne
KIjunSen Feturns the buffer element of the KIjunSen lIne
SenkouSpanA Feturns the buffer element of the SenkouSpanA
lIne
SenkouSpan8 Feturns the buffer element of the SenkouSpan8
lIne
ChInkouSpan Feturns the buffer element of the ChInkouSpan
lIne
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1636
TenkanSenPerIod
Feturns the TenkanSen perIod.
Lnr r-nk-n¯-n--nL·J.· ··n-r
Peturned vaIue
Feturns the TenkanSen perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1637
KIjunSenPerIod
Feturns the KIjunSen perIod.
Lnr ·L|un¯-n--nL·J.· ··n-r
Peturned vaIue
Feturns the KIjunSen perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1638
SenkouSpanßPerIod
Feturns the SenkouSpan8 perIod.
Lnr ¯-nk·u¯p-nÐ--nL·J.· ··n-r
Peturned vaIue
Feturns the SenkouSpan8 perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1639
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr :anr-n_·an, // --nL·J ·r r-nk-n¯-n
Lnr ri¬:n_·an, // --nL·J ·r ·L|un¯-n
Lnr ·anr.:_·p-n_o // --nL·J ·r ¯-nk·u¯p-nÐ
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
:anr-n_·an
[In] PerIod of TenkanSen.
ri¬:n_·an
[In] PerIod of KIjunSen.
·anr.:_·p-n_o
[In] PerIod of SenkouSpan8.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1640
TenkanSen
Feturns the buffer element of the TenkanSen lIne by the specIfIed Index.
J·uoL- r-nk-n¯-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the TenkanSen lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1641
KIjunSen
Feturns the buffer element of the KIjunSen lIne by the specIfIed Index.
J·uoL- ·L|un¯-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the KIjunSen lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1642
SenkouSpanA
Feturns the buffer element of the SenkouSpanA lIne by the specIfIed Index.
J·uoL- ¯-nk·u¯p-nA.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the SenkouSpanA lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't
any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1643
SenkouSpanß
Feturns the buffer element of the SenkouSpan8 lIne by the specIfIed Index.
J·uoL- ¯-nk·u¯p-nÐ.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the SenkouSpan8 lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't
any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1644
ChInkouSpan
Feturns the buffer element of the ChInkouSpan lIne by the specIfIed Index.
J·uoL- .!Lnk·u¯p-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the ChInkouSpan lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't
any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1645
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_ÌCHÌ|DKU for CIÌchImoku).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1646
CIhA
The CI|A Is a class Intended for usIng the |ovIng Average technIcal IndIcator.
0escrIptIon
The CI|A class provIdes the creatIon, setup and access to the data of the |ovIng Average IndIcator.
0ecIaratIon
·L--- .LMA. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
|aShIft Feturns the horIzontal shIft
|a|ethod Feturns the averagIng method
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1647
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1648
haShIft
Feturns the horIzontal shIft of the IndIcator.
Lnr M-¯!Lrr.· ··n-r
Peturned vaIue
Feturns the horIzontal shIft value, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1649
hahethod
Feturns the averagIng method.
IHJM_MA_MIr|J¯ M-M-r!·J.· ··n-r
Peturned vaIue
Feturns the averagIng method, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1650
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1651
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·:rinj, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr m-_·nif:, // |·nLz·nr-L -!Lrr
IHJM_MA_MIr|J¯ m-_ma:n.j, // Av-n-jLnj m-r!·J
Lnr -ppliaj // -nL·- ryp- ·r !-nJL- r· -ppLy
·
Parameters
·:rinj
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
m-_·nif:
[In] HorIzontal shIft.
m-_ma:n.j
[In] AveragIng method.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1652
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1653
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_|A for CI|A).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1654
CISAP
The CISAF Is a class Intended for usIng the ParabolIc Stop And Feverse System technIcal IndIcator.
0escrIptIon
The CISAF class provIdes the creatIon, setup and access to the data of the ParabolIc Stop And Feverse
System IndIcator.
0ecIaratIon
·L--- .L¯A-. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
SarStep Feturns the step for the velocIty IncreasIng
Naximum Feturns the coeffIcIent of prIce followIng
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1655
SarStep
Feturns the step for the velocIty IncreasIng (acceleratIon coeffIcIent).
J·uoL- ¯-n¯r-p.· ··n-r
Peturned vaIue
The step for the velocIty IncreasIng, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1656
haxImum
Feturns the coeffIcIent of prIce followIng.
J·uoL- M-xLmum.· ··n-r
Peturned vaIue
The prIce followIng coeffIcIent, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1657
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
J·uoL- ·:ap, // ¯r-p
J·uoL- m-xim:m // .·-rrL·L-nr
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
·:ap
[In] Step for the velocIty IncreasIng.
m-xim:m
[In] PrIce followIng coeffIcIent.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1658
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1659
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_SAF for CISAF).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1660
CIStd0ev
The CIStd0ev Is a class Intended for usIng the Standard 0evIatIon technIcal IndIcator.
0escrIptIon
The CIStd0ev class provIdes the creatIon, setup and access to the data of the Standard 0evIatIon
IndIcator.
0ecIaratIon
·L--- .L¯rJ¯-v. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
|aShIft Feturns the horIzontal shIft
|a|ethod Feturns the averagIng method
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1661
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1662
haShIft
Feturns the horIzontal shIft of the IndIcator.
Lnr M-¯!Lrr.· ··n-r
Peturned vaIue
Feturns the horIzontal shIft value, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1663
hahethod
Feturns the averagIng method.
IHJM_MA_MIr|J¯ M-M-r!·J.· ··n-r
Peturned vaIue
Feturns the averagIng method, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1664
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1665
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr m-_·nif:, // |·nLz·nr-L -!Lrr
IHJM_MA_MIr|J¯ m-_ma:n.j, // Av-n-jLnj m-r!·J
Lnr -ppliaj // -nL·- ryp- ·n !-nJL- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
m-_·nif:
[In] HorIzontal shIft.
m-_ma:n.j
[In] AveragIng method.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1666
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1667
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_ST00E7 for CIStd0ev).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1668
CI0EhA
The CI0E|A Is a class Intended for usIng the 0ouble ExponentIal |ovIng Average technIcal IndIcator.
0escrIptIon
The CI0E|A class provIdes the creatIon, setup and access to the data of the 0ouble ExponentIal
|ovIng Average IndIcator.
0ecIaratIon
·L--- .L¯IMA. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
ÌndShIft Feturns the horIzontal shIft
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1669
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1670
IndShIft
Feturns the horIzontal shIft of the IndIcator.
Lnr PnJ¯!Lrr.· ··n-r
Peturned vaIue
Feturns the horIzontal shIft value, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1671
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1672
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·:rinj, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr inj_·nif:, // ¯!Lrr
Lnr -ppliaj // -nL·- ryp- ·r !-nJL- r· -ppLy
·
Parameters
·:rinj
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
inj_·nif:
[In] HorIzontal shIft.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1673
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1674
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_0E|A for CI0E|A).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1675
CITEhA
The CITE|A Is a class Intended for usIng the TrIple ExponentIal |ovIng Average technIcal IndIcator.
0escrIptIon
The CITE|A class provIdes the creatIon, setup and access to the data of the TrIple ExponentIal |ovIng
Average IndIcator.
0ecIaratIon
·L--- .LrIMA. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
NaPeriod Feturns the averagIng perIod
!ndShift Feturns the horIzontal shIft
Applied Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1676
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1677
IndShIft
Feturns the horIzontal shIft of the IndIcator.
Lnr PnJ¯!Lrr.· ··n-r
Peturned vaIue
Feturns the horIzontal shIft value, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1678
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1679
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr m-_·nif:, // Jrr--r
Lnr -ppliaj // -nL·- ryp- ·r !-nJL- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
m-_·nif:
[In] HorIzontal shIft.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1680
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1681
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_TE|A for CITE|A).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1682
CIFrAhA
The CIFrA|A Is a class Intended for usIng the Fractal AdaptIve |ovIng Average technIcal IndIcator.
0escrIptIon
The CIFrA|A class provIdes the creatIon, setup and access to the data of the Fractal AdaptIve |ovIng
Average IndIcator.
0ecIaratIon
·L--- .L¯nAMA. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
NaPeriod Feturns the averagIng perIod
!ndShift Feturns the horIzontal shIft
Applied Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1683
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1684
IndShIft
Feturns the horIzontal shIft of the IndIcator.
Lnr PnJ¯!Lrr.· ··n-r
Peturned vaIue
Feturns the horIzontal shIft value, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1685
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1686
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr m-_·nif:, // Jrr--r
Lnr -ppliaj // -nL·- ryp- ·r !-nJL- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
m-_·nif:
[In] HorIzontal shIft.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1687
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1688
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_FFA|A for CIFrA|A).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1689
CIAhA
The CIA|A Is a class Intended for usIng the AdaptIve |ovIng Average technIcal IndIcator.
0escrIptIon
The CIA|A class provIdes the creatIon, setup and access to the data of the AdaptIve |ovIng Average
IndIcator.
0ecIaratIon
·L--- .LAMA. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
FastEmaPerIod Feturns the averagIng perIod for the fast E|A
SlowEmaPerIod Feturns the averagIng perIod for the slow E|A
ÌndShIft Feturns the horIzontal shIft
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1690
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1691
FastEmaPerIod
Feturns the averagIng perIod for the fast E|A.
Lnr ¯--rIm---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the fast E|A, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1692
SIowEmaPerIod
Feturns the averagIng perIod for the slow E|A.
Lnr ¯L·.Im---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the slow E|A, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1693
IndShIft
Feturns the horIzontal shIft of the IndIcator.
Lnr PnJ¯!Lrr.· ··n-r
Peturned vaIue
Feturns the horIzontal shIft value, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1694
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1695
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·:rinj, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr f-·:_am-_pari.j, // ¯--r IMA p-nL·J
Lnr ·l.v_am-_pari.j, // ¯L·. IMA p-nL·J
Lnr inj_·nif:, // ¯!Lrr
Lnr -ppliaj // -nL·- ryp- ·n !-nJL- r· -ppLy
·
Parameters
·:rinj
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
f-·:_am-_pari.j
[In] Fast E|A averagIng perIod.
·l.v_am-_pari.j
[In] Slow E|A averagIng perIod.
inj_·nif:
[In] HorIzontal shIft.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1696
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1697
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_A|A for CIA|A).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1698
CIVI0yA
The CI7Ì0yA Is a class Intended for usIng the 7arIable Ìndex 0YnamIc Average technIcal IndIcator.
0escrIptIon
The CI7Ì0yA class provIdes the creatIon, setup and access to the data of the 7arIable Ìndex 0YnamIc
Average IndIcator.
0ecIaratIon
·L--- .LVP¯yA. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\rn-nJ.m¬!
CIass hethods
AttrIbutes
CmoPerIod Feturns the perIod for |omentum
EmaPerIod Feturns the averagIng perIod for E|A
ÌndShIft Feturns the horIzontal shIft
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1699
CmoPerIod
Feturns the perIod for |omentum.
Lnr .m·--nL·J.· ··n-r
Peturned vaIue
Feturns the perIod for |omentum, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1700
EmaPerIod
Feturns the averagIng perIod for E|A.
Lnr Im---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for E|A, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1701
IndShIft
Feturns the horIzontal shIft of the IndIcator.
Lnr PnJ¯!Lrr.· ··n-r
Peturned vaIue
Feturns the horIzontal shIft value, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1702
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1703
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr ·m._pari.j, // M·m-nrum p-nL·J
Lnr am-_pari.j, // Av-n-jLnj p-nL·J
Lnr inj_·nif:, // ¯!Lrr
Lnr -ppliaj // -nL·- ryp- ·n !-nJL- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
·m._pari.j
[In] |omentum perIod.
am-_pari.j
[In] AveragIng perIod.
inj_·nif:
[In] HorIzontal shIft.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1704
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1705
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_7Ì0YA for CI7Ì0yA).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1706
DscIIIators
ThIs group of chapters contaIns the technIcal detaIls of DscIllators classes of the |0L5 Standard
LIbrary and descrIptIons of all Its key components.
CIass 0escrIptIon
CIATF Average True Fange
CI8earsPower 8ears Power
CI8ullsPower 8ulls Power
CICCÌ CommodIty Channel Ìndex
CIChaIkIn ChaIkIn DscIllator
CI0e|arker 0e|arker
CIForce Force Ìndex
CI|AC0 |ovIng Averages Convergence·0Ivergence
CI|omentum |omentum
CIDs|A |ovIng Average of DscIllator (|AC0 hIstogram)
CIFSÌ FelatIve Strength Ìndex
CIF7Ì FelatIve 7Igor Ìndex
CIStochastIc StochastIc DscIllator
CIWPF WIllIams' Percent Fange
CITrIX TrIple ExponentIal |ovIng Averages DscIllator
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1707
CIATP
The CIATF Is a class Intended for usIng the Average True Fange technIcal IndIcator.
0escrIptIon
The CIATF class provIdes the creatIon, setup and access to the data of the Average True Fange
IndIcator.
0ecIaratIon
·L--- .LAr-. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1708
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1709
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j // Av-n-jLnj p-nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1710
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1711
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_ATF for CIATF).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1712
CIßearsPower
The CI8earsPower Is a class Intended for usIng the 8ears Power technIcal IndIcator.
0escrIptIon
The CI8earsPower class provIdes the creatIon, setup and access to the data of the 8ears Power
IndIcator.
0ecIaratIon
·L--- .LÐ--n--·.-n. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1713
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1714
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j // Av-n-jLnj p-nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1715
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1716
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_8EAFS for CI8earsPower).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1717
CIßuIIsPower
The CI8ullsPower Is a class Intended for usIng the 8ulls Power technIcal IndIcator.
0escrIptIon
The CI8ullsPower class provIdes the creatIon, setup and access to the data of the 8ulls Power
IndIcator.
0ecIaratIon
·L--- .LÐuLL--·.-n. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1718
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1719
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j // Av-n-jLnj p-nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1720
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1721
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_8ULLS for CI8ullsPower).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1722
CICCI
The CICCÌ Is a class Intended for usIng the CommodIty Channel Ìndex technIcal IndIcator.
0escrIptIon
The CICCÌ class provIdes the creatIon, setup and access to the data of the CommodIty Channel Ìndex
IndIcator.
0ecIaratIon
·L--- .L..P. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1723
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1724
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1725
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr -ppliaj // -nL·- ryp- ·n !-nJL- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1726
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1727
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_CCÌ for CICCÌ).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1728
CIChaIkIn
The CIChaIkIn Is a class Intended for usIng the ChaIkIn DscIllator technIcal IndIcator.
0escrIptIon
The CIChaIkIn class provIdes the creatIon, setup and access to the data of the ChaIkIn DscIllator
IndIcator.
0ecIaratIon
·L--- .L.!-LkLn. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
Fast|aPerIod Feturns the averagIng perIod for the fast |A
Slow|aPerIod Feturns the averagIng perIod for the slow |A
|a|ethod Feturns the averagIng method
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1729
FasthaPerIod
Feturns the averagIng perIod for the fast E|A.
Lnr ¯--rM---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the fast E|A, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1730
SIowhaPerIod
Feturns the averagIng perIod for the slow E|A.
Lnr ¯L·.M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the slow E|A, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1731
hahethod
Feturns the averagIng method.
IHJM_MA_MIr|J¯ M-M-r!·J.· ··n-r
Peturned vaIue
Feturns the averagIng method, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1732
AppIIed
Feturns the volume type to apply.
IHJM_A--HPI¯_VJHJMI AppLL-J.· ··n-r
Peturned vaIue
7olume type to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1733
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr f-·:_m-_pari.j, // ¯--r IMA p-nL·J
Lnr ·l.v_m-_pari.j, // ¯L·. IMA p-nL·J
IHJM_MA_MIr|J¯ m-_ma:n.j, // Av-n-jLnj m-r!·J
IHJM_A--HPI¯_VJHJMI -ppliaj // V·Lum- ryp- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
f-·:_m-_pari.j
[In] PerIod for fast E|A.
·l.v_m-_pari.j
[In] PerIod for slow E|A.
m-_ma:n.j
[In] AveragIng method.
-ppliaj
[In] 7olume type to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1734
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1735
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_CHAÌKÌN for CIChaIkIn).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1736
CI0eharker
The CI0e|arker Is a class Intended for usIng the 0e|arker technIcal IndIcator.
0escrIptIon
The CI0e|arker class provIdes the creatIon, setup and access to the data of the 0e|arker IndIcator.
0ecIaratIon
·L--- .L¯-M-nk-n. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1737
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1738
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j // Av-n-jLnj p-nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1739
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1740
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_0E|AFKEF for CI0e|arker).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1741
CIForce
The CIForce Is a class Intended for usIng the Force Ìndex technIcal IndIcator.
0escrIptIon
The CIForce class provIdes the creatIon, setup and access to the data of the Force Ìndex IndIcator.
0ecIaratIon
·L--- .L¯·n·-. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
|a|ethod Feturns the averagIng method
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1742
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1743
hahethod
Feturns the averagIng method.
IHJM_MA_MIr|J¯ M-M-r!·J.· ··n-r
Peturned vaIue
Feturns the averagIng method, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1744
AppIIed
Feturns the volume type to apply.
IHJM_A--HPI¯_VJHJMI AppLL-J.· ··n-r
Peturned vaIue
7olume type to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1745
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
IHJM_MA_MIr|J¯ m-_ma:n.j, // Av-n-jLnj m-r!·J
IHJM_A--HPI¯_VJHJMI -ppliaj // V·Lum- ryp- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
m-_ma:n.j
[In] AveragIng method.
-ppliaj
[In] 7olume type to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1746
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1747
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_FDFCE for CIForce).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1748
CIhAC0
The CI|AC0 Is a class Intended for usIng the |ovIng Averages Convergence·0Ivergence technIcal
IndIcator.
0escrIptIon
The CI|AC0 class provIdes the creatIon, setup and access to the data of the |ovIng Averages
Convergence·0Ivergence IndIcator.
0ecIaratIon
·L--- .LMA.¯. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
FastEmaPerIod Feturns the averagIng perIod fofor the fast
E|A
SlowEmaPerIod Feturns the averagIng perIod of the slow E|A
SIgnalPerIod Feturns the averagIng perIod of the sIgnal lIne
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element of the maIn lIne
SIgnal Feturns the buffer element of the sIgnal lIne
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1749
FastEmaPerIod
Feturns the averagIng perIod for the fast E|A.
Lnr ¯--rIm---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the fast E|A, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1750
SIowEmaPerIod
Feturns the averagIng perIod for the slow E|A.
Lnr ¯L·.Im---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the slow E|A, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1751
SIgnaIPerIod
Feturns the averagIng perIod for the sIgnal lIne.
Lnr ¯Ljn-L--nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the sIgnal lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1752
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1753
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr f-·:_am-_pari.j, // ¯--r IMA p-nL·J
Lnr ·l.v_am-_pari.j, // ¯L·. IMA p-nL·J
Lnr ·ijn-l_pari.j, // ¯Ljn-L p-nL·J
Lnr -ppliaj // -nL·- ryp- ·n !-nJL- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
f-·:_am-_pari.j
[In] Fast E|A perIod.
·l.v_am-_pari.j
[In] Slow E|A perIod.
·ijn-l_pari.j
[In] SIgnal lIne perIod.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1754
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1755
SIgnaI
Feturns the buffer element of the sIgnal lIne by the specIfIed Index.
J·uoL- ¯Ljn-L.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the sIgnal lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1756
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_|AC0 for CI|AC0).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1757
CIhomentum
The CI|omentum Is a class Intended for usIng the |omentum technIcal IndIcator.
0escrIptIon
The CI|omentum class provIdes the creatIon, setup and access to the data of the |omentum
IndIcator.
0ecIaratIon
·L--- .LM·m-nrum. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
NaPeriod Feturns the averagIng perIod
Applied Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
Nain Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1758
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1759
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1760
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr -ppliaj // -nL·- ryp- ·n !-nJL- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1761
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1762
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_|D|ENTU| for CI|omentum).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1763
CIDshA
The CIDs|A Is a class Intended for usIng the |ovIng Average of DscIllator (|AC0 hIstogram) technIcal
IndIcator.
0escrIptIon
The CIDs|A class provIdes the creatIon, setup and access to the data of the |ovIng Average of
DscIllator (|AC0 hIstogram) IndIcator.
0ecIaratIon
·L--- .LJ-MA. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
FastEmaPerIod Feturns the averagIng perIod of the fast E|A
SlowEmaPerIod Feturns the averagIng perIod of the slow E|A
SIgnalPerIod Feturns the averagIng perIod of the sIgnal lIne
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1764
FastEmaPerIod
Feturns the averagIng perIod for the fast E|A.
Lnr ¯--rIm---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the fast E|A, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1765
SIowEmaPerIod
Feturns the averagIng perIod for the slow E|A.
Lnr ¯L·.Im---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the slow E|A, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1766
SIgnaIPerIod
Feturns the averagIng perIod for the sIgnal lIne.
Lnr ¯Ljn-L--nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the sIgnal lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1767
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1768
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr f-·:_am-_pari.j, // ¯--r IMA p-nL·J
Lnr ·l.v_am-_pari.j, // ¯L·. IMA p-nL·J
Lnr ·ijn-l_pari.j, // ¯Ljn-L LLn- p-nL·J
Lnr -ppliaj // -nL·- ryp- ·n !-nJL- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
f-·:_am-_pari.j
[In] Fast E|A perIod.
·l.v_am-_pari.j
[In] Slow E|A perIod.
·ijn-l_pari.j
[In] SIgnal lIne perIod.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1769
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1770
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_DS|A for CIDs|A).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1771
CIPSI
The CIFSÌ Is a class Intended for usIng the FelatIve Strength Ìndex technIcal IndIcator.
0escrIptIon
The CIFSÌ class provIdes the creatIon, setup and access to the data of the FelatIve Strength Ìndex
IndIcator.
0ecIaratIon
·L--- .L-¯P. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
NaPeriod Feturns the averagIng perIod
Applied Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
Nain Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1772
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1773
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1774
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr -ppliaj // -nL·- ryp- ·n !-nJL- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
-ppliaj
[In] PrIce type or handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1775
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1776
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_FSÌ for CIFSÌ).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1777
CIPVI
The CIF7Ì Is a class Intended for usIng the FelatIve 7Igor Ìndex technIcal IndIcator.
0escrIptIon
The CIF7Ì class provIdes the creatIon, setup and access to the data of the FelatIve 7Igor Ìndex
IndIcator.
0ecIaratIon
·L--- .L-VP. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
NaPeriod Feturns the averagIng perIod
Create hethods
Create Creates the IndIcator
0ata Access hethods
Nain Feturns the buffer element of the base lIne
Signal Feturns the buffer element of the sIgnal lIne
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1778
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1779
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j // Av-n-jLnj p-nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1780
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1781
SIgnaI
Feturns the buffer element of the sIgnal lIne by the specIfIed Index.
J·uoL- ¯Ljn-L.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the sIgnal lIne of the specIfIed Index, or 08L_|AX If there Isn't any correct
data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1782
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_F7Ì for CIF7Ì).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1783
CIStochastIc
The CIStochastIc Is a class Intended for usIng the StochastIc DscIllator technIcal IndIcator.
0escrIptIon
The CIStochastIc class provIdes the creatIon, setup and access to the data of the StochastIc DscIllator
IndIcator.
0ecIaratIon
·L--- .L¯r··!--rL·. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
Kperiod Feturns the averagIng perIod for the ºK lIne
Dperiod Feturns the averagIng perIod for the º0 lIne
Slowing Feturns the slowIng perIod
NaNethod Feturns the averagIng method
PriceField PrIce type (Low/HIgh ore Close/Close) to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element of the base lIne
Signal Feturns the buffer element of the sIgnal lIne
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1784
KperIod
Feturns the averagIng perIod for the ºK lIne.
Lnr ·p-nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the ºK lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1785
0perIod
Feturns the averagIng perIod for the º0 lIne.
Lnr ¯p-nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the º0 lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1786
SIowIng
Feturns the perIod of slowIng.
Lnr ¯L·.Lnj.· ··n-r
Peturned vaIue
Feturns the perIod of slowIng, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1787
hahethod
Feturns the averagIng method.
IHJM_MA_MIr|J¯ M-M-r!·J.· ··n-r
Peturned vaIue
Feturns the averagIng method, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1788
PrIceFIeId
Feturns the prIce type (Low/HIgh or Close/Close) to apply.
IHJM_¯rJ_--P.I -nL·-¯L-LJ.· ··n-r
Peturned vaIue
The prIce type to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1789
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr Kpari.j, // Av-n-jLnj p-nL·J ·r `·
Lnr Dpari.j, // Av-n-jLnj p-nL·J ·r `¯
Lnr ·l.vinj, // ¯L·.Lnj p-nL·J
IHJM_MA_MIr|J¯ m-_ma:n.j, // Av-n-jLnj m-r!·J
IHJM_¯rJ_--P.I pri·a_fialj // -nL·- ryp- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
Kpari.j
[In] AveragIng perIod of ºK lIne.
Dpari.j
[In] AveragIng perIod of º0 lIne.
·l.vinj
[In] SlowIng perIod.
m-_ma:n.j
[In] AveragIng perIod.
pri·a_fialj
[In] PrIce type (Low/HIgh or Close/Close) to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1790
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1791
SIgnaI
Feturns the buffer element of the sIgnal lIne by the specIfIed Index.
J·uoL- ¯Ljn-L.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
SIgnaI
Feturns the buffer element of the sIgnal lIne by the specIfIed Index.
J·uoL- ¯Ljn-L.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the sIgnal lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1792
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_STDCHASTÌC for CIStochastIc).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1793
CIWPP
The CIWPF Is a class Intended for usIng the WIllIams' Percent Fange technIcal IndIcator.
0escrIptIon
The CIWPF class provIdes the creatIon, setup and access to the data of the WIllIams' Percent Fange
IndIcator.
0ecIaratIon
·L--- .LW--. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
CalcPeriod Feturns the calculatIon perIod
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1794
CaIcPerIod
Feturns the perIod for calculatIon.
Lnr .-L·--nL·J.· ··n-r
Peturned vaIue
Feturns the the perIod for calculatIon, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1795
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr ·-l·_pari.j // .-L·uL-rL·n p-nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
·-l·_pari.j
[In] PerIod for calculatIon.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1796
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1797
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_WPF for CIWPF).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1798
CITrIX
The CITrIX Is a class Intended for usIng the TrIple ExponentIal |ovIng Averages DscIllator technIcal
IndIcator.
0escrIptIon
The CITrIX class provIdes the creatIon, setup and access to the data of the TrIple ExponentIal |ovIng
Averages DscIllator IndIcator.
0ecIaratIon
·L--- .LrnLx. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\J-·LL-r·n-.m¬!
CIass hethods
AttrIbutes
NaPeriod Feturns the averagIng perIod
Applied Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1799
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1800
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1801
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
Lnr -ppliaj // -nL·- ryp- ·n !-nJL-
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
-ppliaj
[In] PrIce type of handle to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1802
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1803
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_TFÌX for CITrIX).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1804
VoIume IndIcators
ThIs group of chapters contaIns technIcal detaIls of 7olume ÌndIcator classes of the |0L5 Standard
LIbrary and descrIptIons of all Its key components.
CIass 0escrIptIon
CIA0 AccumulatIon/0IstrIbutIon
CI|FÌ |oney Flow Ìndex
CID87 Dn 8alance 7olume
CI7olumes 7olumes
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1805
CIA0
The CIA0 Is a class Intended for usIng the AccumulatIon/0IstrIbutIon technIcal IndIcator.
0escrIptIon
The CIA0 class provIdes the creatIon, setup and access to the data of the AccumulatIon/0IstrIbutIon
IndIcator.
0ecIaratIon
·L--- .LA¯. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\V·Lum--.m¬!
CIass hethods
AttrIbutes
ApplIed Feturns the volume type to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1806
AppIIed
Feturns the volume type to apply.
IHJM_A--HPI¯_VJHJMI AppLL-J.· ··n-r
Peturned vaIue
7olume type to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1807
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
IHJM_A--HPI¯_VJHJMI -ppliaj // V·Lum- ryp- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
-ppliaj
[In] 7olume type to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1808
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1809
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_A0 for CIA0).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1810
CIhFI
The CI|FÌ Is a class Intended for usIng the |oney Flow Ìndex technIcal IndIcator.
0escrIptIon
The CI|FÌ class provIdes the creatIon, setup and access to the data of the |oney Flow Ìndex IndIcator.
0ecIaratIon
·L--- .LM¯P. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\V·Lum--.m¬!
CIass hethods
AttrIbutes
|aPerIod Feturns the averagIng perIod
ApplIed Feturns the volume type to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1811
haPerIod
Feturns the averagIng perIod.
Lnr M---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1812
AppIIed
Feturns the volume type to apply.
IHJM_A--HPI¯_VJHJMI AppLL-J.· ··n-r
Peturned vaIue
7olume type to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1813
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr m-_pari.j, // Av-n-jLnj p-nL·J
IHJM_A--HPI¯_VJHJMI -ppliaj // V·Lum- ryp- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
m-_pari.j
[In] AveragIng perIod.
-ppliaj
[In] 7olume type to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1814
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1815
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_|FÌ for CI|FÌ).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1816
CIDßV
The CID87 Is a class Intended for usIng the Dn 8alance 7olume technIcal IndIcator.
0escrIptIon
The CID87 class provIdes the creatIon, setup and access to the data of the Dn 8alance 7olume
IndIcator.
0ecIaratIon
·L--- .LJÐV. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\V·Lum--.m¬!
CIass hethods
AttrIbutes
ApplIed Feturns the volume type to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1817
AppIIed
Feturns the volume type to apply.
IHJM_A--HPI¯_VJHJMI AppLL-J.· ··n-r
Peturned vaIue
7olume type to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1818
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
IHJM_A--HPI¯_VJHJMI -ppliaj // V·Lum- ryp- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
-ppliaj
[In] 7olume type to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1819
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1820
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_D87 for CID87).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1821
CIVoIumes
The CI7olumes Is a class Intended for usIng the 7olumes technIcal IndIcator.
0escrIptIon
The CI7olumes class provIdes the creatIon, setup and access to the data of the 7olumes IndIcator.
0ecIaratIon
·L--- .LV·Lum--. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\V·Lum--.m¬!
CIass hethods
AttrIbutes
ApplIed Feturns the volume type to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1822
AppIIed
Feturns the volume type to apply.
IHJM_A--HPI¯_VJHJMI AppLL-J.· ··n-r
Peturned vaIue
7olume type to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1823
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
IHJM_A--HPI¯_VJHJMI -ppliaj // V·Lum- ryp- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
-ppliaj
[In] 7olume type to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1824
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1825
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_7DLU|ES for CI7olumes).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1826
ßIII WIIIIams IndIcators
ThIs group of chapters contaIns technIcal detaIls of 8Ill WIllIams ÌndIcator classes of the |0L5
Standard LIbrary and descrIptIons of all Its key components.
CIass 0escrIptIon
CIAC Accelerator DscIllator
CIAllIgator AllIgator
CIAD Awesome DscIllator
CIFractals Fractals
CICator Cator DscIllator
CI8W|FÌ |arket FacIlItatIon Ìndex
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1827
CIAC
The CIAC Is a class Intended for usIng the Accelerator DscIllator technIcal IndIcator.
0escrIptIon
The CIAC class provIdes the creatIon, setup and access to the data of the Accelerator DscIllator
IndIcator.
0ecIaratIon
·L--- .LA.. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\ÐLLLWLLLL-m-.m¬!
CIass hethods
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1828
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j // --nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1829
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1830
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_AC for CIAC).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1831
CIAIIIgator
The CIAllIgator Is a class Intended for usIng the AllIgator technIcal IndIcator.
0escrIptIon
The CIAllIgator class provIdes the creatIon, setup and access to the data of the AllIgator IndIcator.
0ecIaratIon
·L--- .LALLLj-r·n. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\ÐLLLWLLLL-m-.m¬!
CIass hethods
AttrIbutes
JawPerIod Feturns the averagIng perIod for the Jaws lIne
JawShIft Feturns the horIzontal shIft of the Jaws lIne
TeethPerIod Feturns the averagIng perIod for the Teeths
lIne
TeethShIft Feturns the horIzontal shIft of the Teeths lIne
LIpsPerIod Feturns the averagIng perIod for the LIps lIne
LIpsShIft Feturns the horIzontal shIft of the LIps lIne
|a|ethod Feturns the averagIng method
ApplIed Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
Jaw Feturns the buffer element of the Jaws lIne
buffer
Teeth Feturns the buffer element of the Teeths lIne
buffer
LIps Feturns the buffer element of the LIps lIne
buffer
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1832
JawPerIod
Feturns the averagIng perIod for the Jaw lIne.
Lnr ¯-.--nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the Jaw lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1833
JawShIft
Feturns the horIzontal shIft of the Jaws lIne.
Lnr ¯-.¯!Lrr.· ··n-r
Peturned vaIue
HorIzontal shIft of the Jaws lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1834
TeethPerIod
Feturns the averagIng perIod for the Teeth lIne.
Lnr r--r!--nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the Teeth lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1835
TeethShIft
Feturns the horIzontal shIft of the Teeths lIne.
Lnr r--r!¯!Lrr.· ··n-r
Peturned vaIue
HorIzontal shIft of the Teeths lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1836
LIpsPerIod
Feturns the averagIng perIod for the LIps lIne.
Lnr HLp---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the LIps lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1837
LIpsShIft
Feturns the horIzontal shIft of the LIps lIne.
Lnr HLp-¯!Lrr.· ··n-r
Peturned vaIue
HorIzontal shIft of the LIps lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1838
hahethod
Feturns the averagIng method.
IHJM_MA_MIr|J¯ M-M-r!·J.· ··n-r
Peturned vaIue
Feturns the averagIng method, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1839
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1840
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr ¬-v_pari.j, // ¯-.- p-nL·J
Lnr ¬-v_·nif:, // ¯-.- -!Lrr
Lnr :aa:n_pari.j, // r--r!- p-nL·J
Lnr :aa:n_·nif:, // r--r!- -!Lrr
Lnr lip·_pari.j, // HLp- p-nL·J
Lnr lip·_·nif:, // HLp- -!Lrr
IHJM_MA_MIr|J¯ m-_ma:n.j, // Av-n-jLnj m-r!·J
Lnr -ppliaj // V·Lum- ryp- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
¬-v_pari.j
[In] Jaws perIod.
¬-v_·nif:
[In] Jaws shIft.
:aa:n_pari.j
[In] Teeths perIod.
:aa:n_·nif:
[In] Teeths shIft.
lip·_pari.j
[In] LIps perIod.
lip·_·nif:
[In] LIps shIft.
m-_ma:n.j
[In] |ovIng average method.
-ppliaj
[In] 7olume type to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1841
Jaw
Feturns the buffer element of the Jaws lIne by the specIfIed Index.
J·uoL- ¯-..
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the Jaws lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1842
Teeth
Feturns the buffer element of the Teeths lIne by the specIfIed Index.
J·uoL- r--r!.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the Teeths lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1843
LIps
Feturns the buffer element of the LIps lIne by the specIfIed Index.
J·uoL- HLp-.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the LIps lIne of the specIfIed Index, or E|PTY_7ALUE If there Isn't any correct
data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1844
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_ALLÌCATDF for CIAllIgator).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1845
CIAD
The CIAD Is a class Intended for usIng the Awesome DscIllator technIcal IndIcator.
0escrIptIon
The CIAD class provIdes the creatIon, setup and access to the data of the Awesome DscIllator
IndIcator.
0ecIaratIon
·L--- .LAJ. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\ÐLLLWLLLL-m-.m¬!
CIass hethods
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1846
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j // --nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1847
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1848
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_AD for CIAD).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1849
CIFractaIs
The CIFractals Is a class Intended for usIng the Fractals technIcal IndIcator.
0escrIptIon
The CIFractals class provIdes the creatIon, setup and access to the data of the Fractals IndIcator.
0ecIaratIon
·L--- .L¯n-·r-L-. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\ÐLLLWLLLL-m-.m¬!
CIass hethods
Create hethods
Create Creates the IndIcator
0ata Access hethods
Upper Feturns the buffer element of the upper buffer
Lower Feturns the buffer element of the lower buffer
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1850
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j // --nL·J
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1851
Upper
Feturns the buffer element of the upper buffer by the specIfIed Index.
J·uoL- Jpp-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the upper buffer of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1852
Lower
Feturns the buffer element of the lower buffer by the specIfIed Index.
J·uoL- H·.-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the lower buffer of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1853
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_FFACTALS for CIFractals).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1854
CICator
The CICator Is a class Intended for usIng the Cator DscIllator technIcal IndIcator.
0escrIptIon
The CICator class provIdes the creatIon, setup and access to the data of the Cator DscIllator
IndIcator.
0ecIaratIon
·L--- .LJ-r·n. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\ÐLLLWLLLL-m-.m¬!
CIass hethods
AttrIbutes
JawPeriod Feturns the averagIng perIod for the Jaws lIne
JawShift Feturns the horIzontal shIft of the Jaws lIne
TeethPeriod Feturns the averagIng perIod for the Teeths
lIne
TeethShift Feturns the horIzontal shIft of the Teeths lIne
LipsPeriod Feturns the averagIng perIod for the LIps lIne
LipsShift Feturns the horIzontal shIft of the LIps lIne
NaNethod Feturns the averagIng method
Applied Feturns the prIce type or handle to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
Upper Feturns the buffer element of the upper buffer
Lower Feturns the buffer element of the lower buffer
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1855
JawPerIod
Feturns the averagIng perIod for the Jaws lIne.
Lnr ¯-.--nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the Jaws lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1856
JawShIft
Feturns the horIzontal shIft of the Jaws lIne.
Lnr ¯-.¯!Lrr.· ··n-r
Peturned vaIue
HorIzontal shIft of the Jaws lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1857
TeethPerIod
Feturns the averagIng perIod for the Teeth lIne.
Lnr r--r!--nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the Teeth lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1858
TeethShIft
Feturns the horIzontal shIft of the Teeths lIne.
Lnr r--r!¯!Lrr.· ··n-r
Peturned vaIue
HorIzontal shIft of the Teeths lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1859
LIpsPerIod
Feturns the averagIng perIod for the LIps lIne.
Lnr HLp---nL·J.· ··n-r
Peturned vaIue
Feturns the averagIng perIod for the LIps lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1860
LIpsShIft
Feturns the horIzontal shIft of the LIps lIne.
Lnr HLp-¯!Lrr.· ··n-r
Peturned vaIue
HorIzontal shIft of the LIps lIne, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1861
hahethod
Feturns the averagIng method.
IHJM_MA_MIr|J¯ M-M-r!·J.· ··n-r
Peturned vaIue
Feturns the averagIng method, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1862
AppIIed
Feturns the prIce type or handle to apply.
Lnr AppLL-J.· ··n-r
Peturned vaIue
PrIce type or handle to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1863
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
Lnr ¬-v_pari.j, // ¯-.- p-nL·J
Lnr ¬-v_·nif:, // ¯-.- -!Lrr
Lnr :aa:n_pari.j, // r--r!- p-nL·J
Lnr :aa:n_·nif:, // r--r!- -!Lrr
Lnr lip·_pari.j, // HLp- p-nL·J
Lnr lip·_·nif:, // HLp- -!Lrr
IHJM_MA_MIr|J¯ m-_ma:n.j, // Av-n-jLnj m-r!·J
Lnr -ppliaj // V·Lum- ryp- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
¬-v_pari.j
[In] Jaws perIod.
¬-v_·nif:
[In] Jaws shIft.
:aa:n_pari.j
[In] Teeths perIod.
:aa:n_·nif:
[In] Teeths shIft.
lip·_pari.j
[In] LIps perIod.
lip·_·nif:
[In] LIps shIft.
m-_ma:n.j
[In] AveragIng method.
-ppliaj
[In] 7olume type to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1864
Upper
Feturns the buffer element of the upper buffer by the specIfIed Index.
J·uoL- Jpp-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the upper buffer of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1865
Lower
Feturns the buffer element of the lower buffer by the specIfIed Index.
J·uoL- Jpp-n.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
The buffer element of the lower buffer of the specIfIed Index, or E|PTY_7ALUE If there Isn't any
correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1866
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_CATDF for CICator).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1867
CIßWhFI
The CI8W|FÌ Is a class Intended for usIng the |arket FacIlItatIon Ìndex by 8Ill WIllIams technIcal
IndIcator.
0escrIptIon
The CI8W|FÌ class provIdes the creatIon, setup and access to the data of the |arket FacIlItatIon
Ìndex by 8Ill WIllIams IndIcator.
0ecIaratIon
·L--- .LÐWM¯P. puoLL· .PnJL·-r·n
TItIe
tLn·LuJ- <PnJL·-r·n-\ÐLLLWLLLL-m-.m¬!
CIass hethods
AttrIbutes
ApplIed Feturns the volume type to apply
Create hethods
Create Creates the IndIcator
0ata Access hethods
|aIn Feturns the buffer element
Inputloutput
vIrtual Type Feturns the object type IdentIfIer
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1868
AppIIed
Feturns the volume type to apply.
IHJM_A--HPI¯_VJHJMI AppLL-J.· ··n-r
Peturned vaIue
7olume type to apply, defIned at the IndIcator creatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1869
Create
Ìt creates the IndIcator wIth specIfIed parameters.
o··L .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
IHJM_A--HPI¯_VJHJMI -ppliaj // V·Lum- ryp- r· -ppLy
·
Parameters
·ymo.l
[In] Symbol.
pari.j
[In] PerIod.
-ppliaj
[In] 7olume type to apply.
Peturned vaIue
true If successful, false If IndIcator hasn't been created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1870
haIn
Feturns the buffer element by the specIfIed Index.
J·uoL- M-Ln.
Lnr injax // PnJ-x
·
Parameters
injax
[In] Element Index.
Peturned vaIue
8uffer element of the specIfIed Index If successful, or E|PTY_7ALUE If there Isn't any correct data.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1871
Type
Feturns the object type IdentIfIer.
vLnru-L Lnr ryp-.· ··n-r
Peturned vaIue
Dbject type IdentIfIer (ÌN0_8W|FÌ for CI8W|FÌ).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1872
CIndIcators CIass
The CÌndIcators Is a class for collectIng Instances of technIcal IndIcators classes.
0escrIptIon
The CÌndIcators class provIdes creatIon of the technIcal IndIcators class Instances, theIr storage and
management (daya synchronIzatIon, handle and memory management).
0ecIaratIon
·L--- .PnJL·-r·n-. puoLL· .Ann-yJo|
TItIe
tLn·LuJ- <PnJL·-r·n-\PnJL·-r·n.m¬!
CIass hethods
Create hethods
Create Creates technIcal IndIcator
0ata Update hethods
Fefresh Updates data for all technIcal IndIcators In the
collectIon
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1873
Create
Ìt creates the IndIcator wIth the specIfIed parameters.
.PnJL·-r·n· .n--r-.
-rnLnj ·ymo.l, // ¯ymo·L n-m-
IHJM_rPMI¯-AMI¯ pari.j, // --nL·J
IHJM_PH¯P.ArJ- :ypa, // PnJL·-r·n'- ryp-
Lnr ·.:n:, // Humo-n ·r p-n-m-r-n-
M¬L--n-ms p-r-m· // --n-m-r-n- -nn-y n-r-n-n·-
·
Parameters
·ymo.l
[In] Symbol name.
pari.j
[In] PerIod.
:ypa
[In] ÌndIcator's type.
·.:n:
[In] Number of parameters for the IndIcator.
p-r-m·
[In] Feference to the parameters array for the IndIcator.
Peturned vaIue
Ìf successful, It returns the reference to the created IndIcator, and NULL If the IndIcator hasn't been
created.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1874
Pefresh
Updates data for all technIcal IndIcators In the collectIon.
Lnr --rn--!.·
Peturned vaIue
Ìt returns the updated tImeframe flags (formed as an object vIsIbIlIty flags).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1875
Trade CIasses
ThIs sectIon contaIns technIcal detaIls of workIng wIth trade classes and descrIptIon of the relevant
components of the |0L5 standard lIbrary.
UsIng trade classes wIll save tIme when creatIng custom programs (experts).
|0L5 Standard LIbrary (In terms of data sets) Is placed In the termInal workIng dIrectory, In the
Ìnclude\Arrays folder.
CIasslCroup 0escrIptIon
CAccountÌnfo Class for workIng wIth trade account propertIes
CSymbolÌnfo Class for workIng wIth trade Instrument
propertIes
CDrderÌnfo Class for workIng wIth pendIng order propertIes
CHIstoryDrderÌnfo Class for workIng wIth hIstory order propertIes
CPosItIonÌnfo Class for workIng wIth open posItIon propertIes
C0ealÌnfo Class for workIng wIth hIstory deal propertIes
CTrade Class for trade operatIons executIon
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1876
CAccountInfo
CAccountÌnfo Is a class for easy access to the currently opened trade account propertIes.
0escrIptIon
CAccountÌnfo class provIdes easy access to the currently opened trade account propertIes.
0ecIaratIon
·L--- .A···unrPnr·
TItIe
tLn·LuJ- <rn-J-\A···unrPnr·.m¬!
CIass methods by groups
Access to Integer type propertIes
LogIn Cets the account number
Trade|ode Cets the trade mode
Trade|ode0escrIptIon Cets the trade mode as a strIng
Leverage Cets the amount of gIven leverage
|argIn|ode Cets the mode of settIng mInImal margIn level
|argIn|ode0escrIptIon Cets the mode of settIng mInImal margIn level
as a strIng
TradeAllowed Cets the flag of trade allowance
TradeExpert Cets the flag of automated trade allowance
LImItDrders Cets the maxImal number of allowed pendIng
orders
Access to doubIe type propertIes
8alance Cets the balance of account
CredIt Cets the amount of gIven credIt
ProfIt Cets the amount of current profIt on account
EquIty Cets the amount of current equIty on account
|argIn Cets the amount of reserved margIn
Free|argIn Cets the amount of free margIn
|argInLevel Cets the level of margIn
|argInCall Cets the level of margIn for deposIt
|argInStopDut Cets the level of margIn for Stop Dut
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1877
Access to text propertIes
Name Cets the clIent name
Server Cets the trade server name
Currency Cets the deposIt currency name
Company Cets the company name, that serves an
account
Access to hDL5 API functIons
Ìnteger Cets the value of specIfIed Integer type
property
0ouble Cets the value of specIfIed double type property
StrIng Cets value of specIfIed strIng type property
AddItIonaI methods
|argInCheck Cets the amount of margIn, requIred to
execute trade operatIon
Free|argInCheck Cets the amount of free margIn, left after
executIon of trade operatIon
|axLotCheck Cets the maxImal possIble volume of trade
operatIon
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1878
LogIn
Cets the account number.
L·nj H·jLn.· ··n-r
Peturned vaIue
Account number.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1879
Tradehode
Cets the trade mode.
IHJM_A..JJHr_r-A¯I_MJ¯I rn-J-M·J-.· ··n-r
Peturned vaIue
Trade mode.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1880
Tradehode0escrIptIon
Cets the trade mode as a strIng.
-rnLnj rn-J-M·J-¯--·nLprL·n.· ··n-r
Peturned vaIue
Trade mode as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1881
Leverage
Cets the amount of gIven leverage.
L·nj H-v-n-j-.· ··n-r
Peturned vaIue
Amount of gIven leverage.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1882
hargInhode
Cets the mode of settIng mInImal margIn level.
IHJM_A..JJHr_¯rJ-JJr_MJ¯I M-njLnM·J-.· ··n-r
Peturned vaIue
|ode of settIng mInImal margIn level.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1883
hargInhode0escrIptIon
Cets the mode of settIng mInImal margIn level as a strIng.
-rnLnj M-njLnM·J-¯--·nLprL·n.· ··n-r
Peturned vaIue
|ode of settIng mInImal margIn level as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1884
TradeAIIowed
Cets the flag of trade allowance.
o··L rn-J-ALL·.-J.· ··n-r
Peturned vaIue
Flag of trade allowance.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1885
TradeExpert
Cets the flag of automated trade allowance.
o··L rn-J-Ixp-nr.· ··n-r
Peturned vaIue
Flag of automated trade allowance.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1886
LImItDrders
Cets the maxImal number of allowed pendIng orders
Lnr HLmLrJnJ-n-.· ··n-r
Peturned vaIue
The maxImal number of allowed pendIng orders.
Note
0 · no lImIts.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1887
ßaIance
Cets the balance of account.
J·uoL- Ð-L-n·-.· ··n-r
Peturned vaIue
The balance of account (In deposIt currency).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1888
CredIt
Cets the amount of gIven credIt.
J·uoL- .n-JLr.· ··n-r
Peturned vaIue
Amount of gIven credIt (In deposIt currency).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1889
ProfIt
Cets the amount of current profIt on account.
J·uoL- -n·rLr.· ··n-r
Peturned vaIue
Amount of current profIt on account (In deposIt currency).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1890
EquIty
Cets the amount of current equIty on account.
J·uoL- I¬uLry.· ··n-r
Peturned vaIue
Amount of current equIty on account (In deposIt currency).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1891
hargIn
Cets the amount of reserved margIn.
J·uoL- M-njLn.· ··n-r
Peturned vaIue
Amount of reserved margIn (In deposIt currency).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1892
FreehargIn
Cets the amount of free margIn.
J·uoL- ¯n--M-njLn.· ··n-r
Peturned vaIue
Amount of free margIn (In deposIt currency).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1893
hargInLeveI
Cets the level of margIn.
J·uoL- M-njLnH-v-L.· ··n-r
Peturned vaIue
Level of margIn.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1894
hargInCaII
Cets the level of margIn for a deposIt.
J·uoL- M-njLn.-LL.· ··n-r
Peturned vaIue
Level of margIn for a deposIt.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1895
hargInStopDut
Cets the level of margIn for Stop Dut.
J·uoL- M-njLn¯r·pJur.· ··n-r
Peturned vaIue
Level of margIn for Stop Dut.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1896
Name
Cets the clIent name.
-rnLnj H-m-.· ··n-r
Peturned vaIue
ClIent name.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1897
Server
Cets the trade server name.
-rnLnj ¯-nv-n.· ··n-r
Peturned vaIue
Trade server name.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1898
Currency
Cets the deposIt currency name.
-rnLnj .unn-n·y.· ··n-r
Peturned vaIue
0eposIt currency name.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1899
Company
Cets the company name, that serves an account.
-rnLnj .·mp-ny.· ··n-r
Peturned vaIue
Company name, that serves an account.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1900
InfoInteger
Cets the value of specIfIed Integer type property.
L·nj Pnr·Pnr-j-n.
IHJM_A..JJHr_PH¯J_PHrIJI- pr.p_ij // pn·p-nry P¯
· ··n-r
Parameters
pr.p_ij
[In] ÌdentIfIer of the property. The value can be one of the values of
ENU|_ACCDUNT_ÌNFD_ÌNTECEF.
Peturned vaIue
7alue of long type.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1901
Info0oubIe
Cets the value of specIfIed double type property.
J·uoL- Pnr·¯·uoL-.
IHJM_A..JJHr_PH¯J_¯JJÐHI pr.p_ij // pn·p-nry P¯
· ··n-r
Parameters
pr.p_ij
[In] ÌdentIfIer of the property. The value can be one of the values of
ENU|_ACCDUNT_ÌNFD_0DU8LE.
Peturned vaIue
7alue of double type.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1902
InfoStrIng
Cets the value of specIfIed strIng type property.
-rnLnj Pnr·¯rnLnj.
IHJM_A..JJHr_PH¯J_¯r-PHJ pr.p_ij // pn·p-nry P¯
· ··n-r
Parameters
pr.p_ij
[In] ÌdentIfIer of the property. The value can be one of the values of
ENU|_ACCDUNT_ÌNFD_STFÌNC.
Peturned vaIue
7alue of strIng type.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1903
hargInCheck
Cets the amount of margIn, requIred for trade operatIon.
J·uoL- M-njLn.!-·k.
··n-r -rnLnj ·ymo.l, // -ymo·L
IHJM_-J¯PrPJH_r1-I :r-ja_.par-:i.n, // ·p-n-rL·n
J·uoL- v.l:ma, // v·Lum-
J·uoL- pri·a // pnL·-
· ··n-r
Parameters
·ymo.l
[In] Symbol for trade operatIon.
:r-ja_.par-:i.n
[In] Type of trade operatIon.
v.l:ma
[In] 7olume of trade operatIon.
pri·a
[In] PrIce of trade operatIon.
Peturned vaIue
Amount of margIn, requIred for trade operatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1904
FreehargInCheck
Cets the amount of free margIn, left after trade operatIon.
J·uoL- ¯n--M-njLn.!-·k.
··n-r -rnLnj ·ymo.l, // -ymo·L
IHJM_-J¯PrPJH_r1-I :r-ja_.par-:i.n, // ·p-n-rL·n
J·uoL- v.l:ma, // v·Lum-
J·uoL- pri·a // pnL·-
· ··n-r
Parameters
·ymo.l
[In] Symbol for trade operatIon.
:r-ja_.par-:i.n
[In] Type of trade operatIon.
v.l:ma
[In] 7olume of trade operatIon.
pri·a
[In] PrIce of trade operatIon.
Peturned vaIue
Amount of free margIn, left after trade operatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1905
haxLotCheck
Cets the maxImal possIble volume of trade operatIon.
J·uoL- M-xH·r.!-·k.
··n-r -rnLnj ·ymo.l, // -ymo·L
IHJM_-J¯PrPJH_r1-I :r-ja_.par-:i.n, // ·p-n-rL·n
J·uoL- pri·a // pnL·-
· ··n-r
Parameters
·ymo.l
[In] Symbol for trade operatIon.
:r-ja_.par-:i.n
[In] Type of trade operatIon.
pri·a
[In] PrIce of trade operatIon.
Peturned vaIue
|axImal possIble volume of trade operatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1906
CSymboIInfo
CSymbolÌnfo Is a class for easy access to the symbol propertIes.
0escrIptIon
CSymbolÌnfo class provIdes access to the symbol propertIes.
0ecIaratIon
·L--- .¯ymo·LPnr·
TItIe
tLn·LuJ- <rn-J-\¯ymo·LPnr·.m¬!
CIass methods by groups
ControIIIng
Fefresh Fefreshes the symbol data
FefreshFates Fefreshes the symbol quotes
PropertIes
Name Cets/sets symbol name
Select Cets/sets the ¨|arket Watch¨ symbol flag
ÌsSynchronIzed Checks the symbol synchronIzatIon wIth server
VoIumes
7olume Cets the volume of last deal
7olumeHIgh Cets the maxImal volume for a day
7olumeLow Cets the mInImal volume for a day
7olume8Id Cets the volume In the current 8Id
7olumeAsk Cets the volume In the current Ask
hIsceIIaneous
TIme Cets the tIme of last quote
Spread Cets the amount of spread (In poInts)
SpreadFloat Cets the flag of floatIng spread
TIck8ook0epth Cets the depth of tIcks savIng
LeveIs
StopsLevel Cets the mInImal Indent for orders (In poInts)
FreezeLevel Cets the dIstance of freezIng trade operatIons
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1907
(In poInts)
ßId prIces
8Id Cets the current 8Id prIce
8IdHIgh Cets the maxImal 8Id prIce for a day
8IdLow Cets the mInImal 8Id prIce for a day
Ask prIces
Ask Cets the current Ask prIce
AskHIgh Cets the maxImal Ask prIce for a day
AskLow Cets the mInImal Ask prIce for a day
PrIces
Last Cets the current Last prIce
LastHIgh Cets the maxImal Last prIce for a day
LastLow Cets the mInImal Last prIce for a day
Trade modes
TradeCalc|ode Cets the mode of contract cost calculatIon
TradeCalc|ode0escrIptIon Cets the mode of contract cost calculatIon as a
strIng
Trade|ode Cets the type of order executIon
Trade|ode0escrIptIon Cets the type of order executIon as a strIng
TradeExecutIon Cets the closIng of deals mode
TradeExecutIon0escrIptIon Cets the closIng of deals mode as a strIng
Swaps
Swap|ode Cets the swap calculatIon model
Swap|ode0escrIptIon Cets the swap calculatIon model as a strIng
SwapFolloverJdays Cets the day of trIple swap charge
SwapFolloverJdays0escrIptIon Cets the day of trIple swap charge as a strIng
hargIns and fIags
|argInÌnItIal Cets the value of InItIal margIn
|argIn|aIntenance Cets the value of maIntenance margIn
|argInLong Cets the rate of margIn chargIng for long
posItIons
|argInShort Cets the rate of margIn chargIng for short
posItIons
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1908
|argInLImIt Cets the rate of margIn chargIng for LImIt
orders
|argInStop Cets the rate of margIn chargIng for Stop
orders
|argInStopLImIt Cets the rate of margIn chargIng for StopLImIt
orders
TradeTImeFlags Cets the flags of the order expIratIon allowed
modes
TradeFIllFlags Cets the flags of the order fIllIng allowed modes
DuantIzatIon
0IgIts Cets the number of dIgIts after perIod
PoInt Cets the value of one poInt
TIck7alue Cets the cost of tIck (mInImal change of prIce)
TIck7alueProfIt Cets the calculated tIck prIce for a profItable
posItIon
TIck7alueLoss Cets the calculated tIck prIce for a losIng
posItIon
TIckSIze Cets the mInImal change of prIce
Contracts sIzes
ContractSIze Cets the amount of trade contract
Lots|In Cets the mInImal volume to close a deal
Lots|ax Cets the maxImal volume to close a deal
LotsStep Cets the mInImal step of volume change to
close a deal
LotsLImIt Cets the maxImal allowed volume of opened
posItIon and pendIng orders (dIrectIon
InsensItIve) for one symbol
Swaps sIzes
SwapLong Cets the value of long posItIon swap
SwapShort Cets the value of short posItIon swap
Text propertIes
Currency8ase Cets the name of symbol base currency
CurrencyProfIt Cets the profIt currency name
Currency|argIn Cets the margIn currency name
8ank Cets the name of current quote source
0escrIptIon Cets the strIng descrIptIon of symbol
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1909
Path Cets the path In symbols tree
Access to hDL5 API functIons
ÌnfoÌnteger Cets the value of specIfIed Integer type
property
Ìnfo0ouble Cets the value of specIfIed double type property
ÌnfoStrIng Cets the value of specIfIed strIng type property
ServIce functIons
NormalIzePrIce Feturns the value of prIce, normalIzed usIng
the symbol propertIes
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1910
Pefresh
Fefreshes the symbol data.
v·LJ --rn--!.·
Peturned vaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1911
PefreshPates
Fefreshes the symbol quotes data.
o··L --rn--!--r--.·
Peturned vaIue
true - In case of success, false - If unable to refresh quotes.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1912
Name
Cets symbol name.
-rnLnj H-m-.· ··n-r
Peturned vaIue
Symbol name.
Name
Sets symbol name.
v·LJ H-m-.-rnLnj n-ma·
Peturned vaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1913
SeIect
Cets the ¨|arket Watch¨ symbol flag.
o··L ¯-L-·r.· ··n-r
Peturned vaIue
Cets the ¨|arket Watch¨ symbol flag.
SeIect
Sets the ¨|arket Watch¨ symbol flag.
o··L ¯-L-·r.·
Peturned vaIue
true - In case of success, false - If unable to change flag.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1914
IsSynchronIzed
Checks the symbol synchronIzatIon wIth server.
o··L P-¯yn·!n·nLz-J.· ··n-r
Peturned vaIue
true - If the symbol Is synchronIzed wIth server, false - If not.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1915
VoIume
Cets the volume of last deal.
L·nj V·Lum-.· ··n-r
Peturned vaIue
7olume of last deal.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1916
VoIumeHIgh
Cets the maxImal volume for a day.
L·nj V·Lum-|Lj!.· ··n-r
Peturned vaIue
|axImal volume for a day.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1917
VoIumeLow
Cets the mInImal volume for a day.
L·nj V·Lum-H·..· ··n-r
Peturned vaIue
|InImal volume for a day.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1918
VoIumeßId
Cets the volume In the current 8Id.
L·nj V·Lum-ÐLJ.· ··n-r
Peturned vaIue
7olume In the current 8Id.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1919
VoIumeAsk
Cets the volume In the current Ask.
L·nj V·Lum-A-k.· ··n-r
Peturned vaIue
7olume In the current Ask.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1920
TIme
Cets the tIme of last quote.
J-r-rLm- rLm-.· ··n-r
Peturned vaIue
TIme of last quote.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1921
Spread
Cets the amount of spread (In poInts).
Lnr ¯pn--J.· ··n-r
Peturned vaIue
Cets the amount of spread (In poInts).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1922
SpreadFIoat
Cets the flag of floatIng spread.
o··L ¯pn--J¯L·-r.· ··n-r
Peturned vaIue
Flag of floatIng spread.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1923
TIckßook0epth
Cets the depth of tIcks savIng.
Lnr rL·kз·k¯-pr!.· ··n-r
Peturned vaIue
0epth of tIcks savIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1924
StopsLeveI
Cets the mInImal Indent for orders (In poInts).
Lnr ¯r·p-H-v-L.· ··n-r
Peturned vaIue
|InImal Indent for orders (In poInts).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1925
FreezeLeveI
Cets the dIstance of freezIng trade operatIons (In poInts).
Lnr ¯n--z-H-v-L.· ··n-r
Peturned vaIue
0Istance of freezIng trade operatIons (In poInts).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1926
ßId
Cets the current 8Id prIce.
J·uoL- ÐLJ.· ··n-r
Peturned vaIue
Current 8Id prIce.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1927
ßIdHIgh
Cets the maxImal 8Id prIce for a day.
J·uoL- ÐLJ|Lj!.· ··n-r
Peturned vaIue
|axImal 8Id prIce for a day.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1928
ßIdLow
Cets the mInImal 8Id prIce for a day.
J·uoL- ÐLJH·..· ··n-r
Peturned vaIue
|InImal 8Id prIce for a day.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1929
Ask
Cets the current Ask prIce
J·uoL- A-k.· ··n-r
Peturned vaIue
Current Ask prIce.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1930
AskHIgh
Cets the maxImal Ask prIce for a day.
J·uoL- A-k|Lj!.· ··n-r
Peturned vaIue
|axImal Ask prIce for a day.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1931
AskLow
Cets the mInImal Ask prIce for a day.
J·uoL- A-kH·..· ··n-r
Peturned vaIue
|InImal Ask prIce for a day.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1932
Last
Cets the current Last prIce.
J·uoL- H--r.· ··n-r
Peturned vaIue
Current Last prIce.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1933
LastHIgh
Cets the maxImal Last prIce for a day.
J·uoL- H--r|Lj!.· ··n-r
Peturned vaIue
|axImal Last prIce for a day.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1934
LastLow
Cets the mInImal Last prIce for a day.
J·uoL- H--rH·..· ··n-r
Peturned vaIue
|InImal Last prIce for a day.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1935
TradeCaIchode
Cets the mode of contract cost calculatIon.
IHJM_¯1MÐJH_.AH._MJ¯I rn-J-.-L·M·J-.· ··n-r
Peturned vaIue
|ode of contract cost calculatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1936
TradeCaIchode0escrIptIon
Cets the mode of contract cost calculatIon as a strIng.
-rnLnj rn-J-.-L·M·J-¯--·nLprL·n.· ··n-r
Peturned vaIue
|ode of contract cost calculatIon as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1937
Tradehode
Cets the type of order executIon.
IHJM_¯1MÐJH_r-A¯I_MJ¯I rn-J-M·J-.· ··n-r
Peturned vaIue
Cets the type of order executIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1938
Tradehode0escrIptIon
Cets the type of order executIon as a strIng.
-rnLnj rn-J-M·J-¯--·nLprL·n.· ··n-r
Peturned vaIue
Type of order executIon as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1939
TradeExecutIon
Cets the closIng of deals mode.
IHJM_¯1MÐJH_r-A¯I_IxI.JrPJH rn-J-Ix-·urL·n.· ··n-r
Peturned vaIue
ClosIng of deals mode.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1940
TradeExecutIon0escrIptIon
Cets the closIng of deals mode as a strIng.
-rnLnj rn-J-Ix-·urL·n¯--·nLprL·n.· ··n-r
Peturned vaIue
ClosIng of deals mode as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1941
Swaphode
Cets the swap calculatIon model.
IHJM_¯1MÐJH_¯WA-_MJ¯I ¯.-pM·J-.· ··n-r
Peturned vaIue
Swap calculatIon model.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1942
Swaphode0escrIptIon
Cets the swap calculatIon model as a strIng.
-rnLnj ¯.-pM·J-¯--·nLprL·n.· ··n-r
Peturned vaIue
Swap calculatIon model as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1943
SwapPoIIover3days
Cets the day of trIple swap charge.
IHJM_¯A1_J¯_WII· ¯.-p-·LL·v-n`J-y-.· ··n-r
Peturned vaIue
0ay of trIple swap charge.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1944
SwapPoIIover3days0escrIptIon
Cets the day of trIple swap charge as a strIng.
-rnLnj ¯.-p-·LL·v-n`J-y-¯--·nLprL·n.· ··n-r
Peturned vaIue
0ay of trIple swap charge as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1945
hargInInItIaI
Cets the value of InItIal margIn.
J·uoL- M-njLnPnLrL-L.·
Peturned vaIue
7alue of InItIal margIn.
Note
Ìt poInts the amount of margIn (In margIn currency of Instrument), that Is charged from one lot.
Used to check clIent's equIty, when he enters the market.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1946
hargInhaIntenance
Cets the value of maIntenance margIn.
J·uoL- M-njLnM-Lnr-n-n·-.·
Peturned vaIue
7alue of maIntenance margIn.
Note
Ìt poInts the amount of margIn (In margIn currency of Instrument), that Is charged from one lot.
Used to check clIent's equIty, when the account state Is changed. Ìf the maIntenance margIn Is equal
to 0, then the InItIal margIn Is used.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1947
hargInLong
Cets the rate of margIn chargIng for long posItIons.
J·uoL- M-njLnH·nj.· ··n-r
Peturned vaIue
Fate of margIn chargIng for long posItIons.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1948
hargInShort
Cets the rate of margIn chargIng for short posItIons.
J·uoL- M-njLn¯!·nr.· ··n-r
Peturned vaIue
Fate of margIn chargIng for short posItIons.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1949
hargInLImIt
Cets the rate of margIn chargIng for LImIt orders.
J·uoL- M-njLnHLmLr.· ··n-r
Peturned vaIue
Fate of margIn chargIng for LImIt orders.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1950
hargInStop
Cets the rate of margIn chargIng for Stop orders.
J·uoL- M-njLn¯r·p.· ··n-r
Peturned vaIue
Fate of margIn chargIng for Stop orders.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1951
hargInStopLImIt
Cets the rate of margIn chargIng for StopLImIt orders.
J·uoL- M-njLn¯r·pHLmLr.· ··n-r
Peturned vaIue
Fate of margIn chargIng for StopLImIt orders.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1952
TradeTImeFIags
Cets the flags of the order expIratIon allowed modes.
Lnr rn-J-rLm-¯L-j-.· ··n-r
Peturned vaIue
Flags of the order expIratIon allowed modes.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1953
TradeFIIIFIags
Cets the flags of the order fIllIng allowed modes.
Lnr rn-J-¯LLL¯L-j-.· ··n-r
Peturned vaIue
Flags of the order fIllIng allowed modes.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1954
0IgIts
Cets the number of dIgIts after perIod.
Lnr ¯LjLr-.· ··n-r
Peturned vaIue
Cets the number of dIgIts after perIod.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1955
PoInt
Cets the value of one poInt.
J·uoL- -·Lnr.· ··n-r
Peturned vaIue
7alue of one poInt.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1956
TIckVaIue
Cets the cost of tIck (mInImal change of prIce).
J·uoL- rL·kV-Lu-.· ··n-r
Peturned vaIue
Cost of tIck (mInImal change of prIce).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1957
TIckVaIueProfIt
Cets the calculated tIck prIce for a profItable posItIon.
J·uoL- rL·kV-Lu--n·rLr.· ··n-r
Peturned vaIue
The calculated tIck prIce for a profItable posItIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1958
TIckVaIueLoss
Cets the calculated tIck prIce for a losIng posItIon.
J·uoL- rL·kV-Lu-H·--.· ··n-r
Peturned vaIue
The calculated tIck prIce for a losIng posItIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1959
TIckSIze
Cets the mInImal change of prIce.
J·uoL- rL·k¯Lz-.· ··n-r
Peturned vaIue
|InImal change of prIce.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1960
ContractSIze
Cets the amount of trade contract.
J·uoL- .·nrn-·r¯Lz-.· ··n-r
Peturned vaIue
Amount of trade contract.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1961
LotshIn
Cets the mInImal volume to close a deal.
J·uoL- H·r-MLn.· ··n-r
Peturned vaIue
|InImal volume to close a deal.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1962
Lotshax
Cets the maxImal volume to close a deal.
J·uoL- H·r-M-x.· ··n-r
Peturned vaIue
|axImal volume to close a deal.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1963
LotsStep
Cets the mInImal step of volume change to close a deal.
J·uoL- H·r-¯r-p.· ··n-r
Peturned vaIue
|InImal step of volume change to close a deal.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1964
LotsLImIt
Cets the maxImal allowed volume of opened posItIon and pendIng orders (dIrectIon InsensItIve) for
one symbol.
J·uoL- H·r-HLmLr.· ··n-r
Peturned vaIue
The maxImal allowed volume of opened posItIon and pendIng orders (dIrectIon InsensItIve) for one
symbol.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1965
SwapLong
Cets the value of long posItIon swap.
J·uoL- ¯.-pH·nj.· ··n-r
Peturned vaIue
7alue of long posItIon swap.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1966
SwapShort
Cets the value of short posItIon swap.
J·uoL- ¯.-p¯!·nr.· ··n-r
Peturned vaIue
7alue of short posItIon swap.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1967
Currencyßase
Cets the name of symbol base currency.
-rnLnj .unn-n·yÐ---.· ··n-r
Peturned vaIue
Name of symbol base currency.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1968
CurrencyProfIt
Cets the profIt currency name.
-rnLnj .unn-n·y-n·rLr.· ··n-r
Peturned vaIue
ProfIt currency name.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1969
CurrencyhargIn
Cets the margIn currency name.
-rnLnj .unn-n·yM-njLn.· ··n-r
Peturned vaIue
|argIn currency name.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1970
ßank
Cets the name of current quote source.
-rnLnj Ð-nk.· ··n-r
Peturned vaIue
Name of current quote source.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1971
0escrIptIon
Cets the strIng descrIptIon of symbol.
-rnLnj ¯--·nLprL·n.· ··n-r
Peturned vaIue
StrIng descrIptIon of symbol.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1972
Path
Cets the path In symbols tree.
-rnLnj --r!.· ··n-r
Peturned vaIue
Cets the path In symbols tree.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1973
InfoInteger
Cets the value of specIfIed Integer type property.
o··L Pnr·Pnr-j-n.
IHJM_¯1MÐJH_PH¯J_PHrIJI- pr.p_ij, // pn·p-nry P¯
L·njs v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of Integer type property.
v-r
[out] Feference to long type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1974
Info0oubIe
Cets the value of specIfIed double type property.
o··L Pnr·¯·uoL-.
IHJM_¯1MÐJH_PH¯J_¯JJÐHI pr.p_ij, // pn·p-nry P¯
J·uoL-s v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of double type property.
v-r
[out] Feference to double type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1975
InfoStrIng
Cets the value of specIfIed strIng type property.
o··L Pnr·¯rnLnj.
IHJM_¯1MÐJH_PH¯J_¯r-PHJ pr.p_ij, // pn·p-nry P¯
-rnLnjs v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of text property.
v-r
[out] Feference to strIng type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1976
NormaIIzePrIce
Feturns the value of prIce, normalIzed usIng the symbol propertIes.
J·uoL- H·nm-LLz--nL·-.
J·uoL- pri·a // pnL·-
· ··n-r
Parameters
pri·a
[In] PrIce.
Peturned vaIue
NormalIzed prIce.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1977
CDrderInfo
CDrderÌnfo Is a class for easy access to the pendIng order propertIes.
0escrIptIon
CDrderÌnfo class provIdes access to the pendIng order propertIes.
0ecIaratIon
·L--- .JnJ-nPnr·
TItIe
tLn·LuJ- <rn-J-\JnJ-nPnr·.m¬!
CIass methods by groups
Access to Integer type propertIes
TIcket Cets the tIcket of an order, prevIously selected
for access
TImeSetup Cets the tIme of order placement
DrderType Cets the order type
DrderType0escrIptIon Cets the order type as a strIng
State Cets the order state
State0escrIptIon Cets the order state as a strIng
TImeExpIratIon Cets the tIme of order expIratIon
TIme0one Cets the tIme of order executIon or cancellatIon
TypeFIllIng Cets the type of order executIon by remaInder
TypeFIllIng0escrIptIon Cets the type of order executIon by remaInder
as a strIng
TypeTIme Cets the type of order at the tIme of the
expIratIon
TypeTIme0escrIptIon Cets the order type by expIratIon tIme as a
strIng
|agIc Cets the Ì0 of expert, that placed the order
PosItIonÌd Cets the Ì0 of posItIon
Access to doubIe type propertIes
7olumeÌnItIal Cets the InItIal volume of order
7olumeCurrent Cets the unfIlled volume of order
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1978
PrIceDpen Cets the order prIce
StopLoss Cets the order's Stop Loss
TakeProfIt Cets the order's Take ProfIt
PrIceCurrent Cets the current prIce by order symbol
PrIceStopLImIt Cets the prIce of settIng lImIt order
Access to text propertIes
Symbol Cets the name of order symbol
Comment Cets the order comment
Access to hDL5 API functIons
ÌnfoÌnteger Cets the value of specIfIed Integer type
property
Ìnfo0ouble Cets the value of specIfIed double type property
ÌnfoStrIng Cets value of specIfIed strIng type property
State
StoreState Saves the order parameters
CheckState Checks the current parameters agaInst the
saved parameters
SeIectIon
Select Selects an order by tIcket for further access to
Its propertIes
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1979
TIcket
Cets the tIcket of an order, prevIously selected for access usIng the Select method.
uL·nj rL·k-r.· ··n-r
Peturned vaIue
Drder tIcket If successful, otherwIse · ULDNC_|AX.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1980
TImeSetup
Cets the tIme of order placement.
J-r-rLm- rLm-¯-rup.· ··n-r
Peturned vaIue
TIme of order placement.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1981
Type
Cets the order type.
IHJM_J-¯I-_r1-I ryp-.·
Peturned vaIue
Drder type.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1982
Type0escrIptIon
Cets the order type as a strIng.
-rnLnj ryp-¯--·nLprL·n.· ··n-r
Peturned vaIue
Drder type as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1983
State
Cets the order state.
IHJM_J-¯I-_¯rArI ¯r-r-.· ··n-r
Peturned vaIue
Drder state.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1984
State0escrIptIon
Cets the order state as a strIng.
-rnLnj ¯r-r-¯--·nLprL·n.· ··n-r
Peturned vaIue
Drder state as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1985
TImeExpIratIon
Cets the tIme of order expIratIon.
J-r-rLm- rLm-IxpLn-rL·n.· ··n-r
Peturned vaIue
TIme of order expIratIon, set on Its placement.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1986
TIme0one
Cets the tIme of order executIon or cancellatIon.
J-r-rLm- rLm-¯·n-.· ··n-r
Peturned vaIue
TIme of order executIon or cancellatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1987
TypeFIIIIng
Cets the type of order executIon by remaInder.
IHJM_J-¯I-_r1-I_¯PHHPHJ ryp-¯LLLLnj.· ··n-r
Peturned vaIue
Type of order executIon by remaInder.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1988
TypeFIIIIng0escrIptIon
Cets the type of order executIon by remaInder as a strIng.
-rnLnj ryp-¯LLLLnj¯--·nLprL·n.· ··n-r
Peturned vaIue
Type order of executIon by remaInder as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1989
TypeTIme
Cets the type of order at the tIme of the expIratIon.
IHJM_J-¯I-_r1-I_rPMI ryp-rLm-.· ··n-r
Peturned vaIue
Type of order at the tIme of the expIratIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1990
TypeTIme0escrIptIon
Cets the order type by expIratIon tIme as a strIng.
-rnLnj ryp-rLm-¯--·nLprL·n.· ··n-r
Peturned vaIue
Drder type by expIratIon tIme as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1991
hagIc
Cets the Ì0 of expert, that placed the order.
L·nj M-jL·.· ··n-r
Peturned vaIue
Ì0 of expert, that placed the order.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1992
PosItIonId
Cets the Ì0 of posItIon.
L·nj -·-LrL·nPJ.· ··n-r
Peturned vaIue
Ì0 of posItIon, In whIch the order was Involved
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1993
VoIumeInItIaI
Cets the InItIal volume of order.
J·uoL- V·Lum-PnLrL-L.· ··n-r
Peturned vaIue
ÌnItIal volume of order.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1994
VoIumeCurrent
Cets the unfIlled volume of order.
J·uoL- V·Lum-.unn-nr.· ··n-r
Peturned vaIue
UnfIlled volume of order.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1995
PrIceDpen
Cets the order prIce.
J·uoL- -nL·-Jp-n.· ··n-r
Peturned vaIue
PrIce of order placement.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1996
StopLoss
Cets the order's Stop Loss.
J·uoL- ¯r·pH·--.· ··n-r
Peturned vaIue
Drder's Stop Loss.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1997
TakeProfIt
Cets the order's Take ProfIt.
J·uoL- r-k--n·rLr.· ··n-r
Peturned vaIue
Drder's Take ProfIt.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1998
PrIceCurrent
Cets the current prIce by order symbol.
J·uoL- -nL·-.unn-nr.· ··n-r
Peturned vaIue
Current prIce by order symbol.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
1999
PrIceStopLImIt
Cets the prIce of settIng lImIt order.
J·uoL- -nL·-¯r·pHLmLr.· ··n-r
Peturned vaIue
PrIce of settIng lImIt order.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2000
SymboI
Cets the name of order symbol.
-rnLnj ¯ymo·L.· ··n-r
Peturned vaIue
Name of order symbol.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2001
Comment
Cets the order comment.
-rnLnj .·mm-nr.· ··n-r
Peturned vaIue
Drder comment.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2002
InfoInteger
Cets the value of specIfIed Integer type property.
o··L Pnr·Pnr-j-n.
IHJM_J-¯I-_--J-I-r1_PHrIJI- pr.p_ij, // pn·p-nry P¯
L·njs v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of Integer type property.
v-r
[out] Feference to long type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2003
Info0oubIe
Cets the value of specIfIed double type property.
o··L Pnr·¯·uoL-.
IHJM_J-¯I-_--J-I-r1_¯JJÐHI pr.p_ij, // pn·p-nry P¯
J·uoL-s v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of double type property.
v-r
[out] Feference to double type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2004
InfoStrIng
Cets the value of specIfIed strIng type property.
o··L Pnr·¯rnLnj.
IHJM_J-¯I-_--J-I-r1_¯r-PHJ pr.p_ij, // pn·p-nry P¯
-rnLnjs v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of text property.
v-r
[out] Feference to strIng type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2005
StoreState
Saves the order parameters.
v·LJ ¯r·n-¯r-r-.·
Peturned vaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2006
CheckState
Checks the current parameters agaInst the saved parameters.
o··L .!-·k¯r-r-.·
Peturned vaIue
true · If the order parameters have changed sInce the last call of the StoreState() method,
otherwIse · false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2007
SeIect
Selects an order by tIcket for further access to Its propertIes.
o··L ¯-L-·r.
uL·nj :i·ra: // ·nJ-n rL·k-r
·
Peturned vaIue
true - In case of success, false - If unable to select order.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2008
CHIstoryDrderInfo
CHIstoryDrderÌnfo Is a class for easy access to the hIstory order propertIes.
0escrIptIon
CHIstoryDrderÌnfo class provIdes easy access to the hIstory order propertIes.
0ecIaratIon
·L--- .|L-r·nyJnJ-nPnr·
TItIe
tLn·LuJ- <rn-J-\|L-r·nyJnJ-nPnr·.m¬!
CIass methods by groups
Access to Integer type propertIes
TImeSetup Cets the tIme of order placement
DrderType Cets the order type
DrderType0escrIptIon Cets the order type as a strIng
State Cets the order state
State0escrIptIon Cets the order state as a strIng
TImeExpIratIon Cets the tIme of order expIratIon
TIme0one Cets the tIme of order expIratIon or
cancellatIon
TypeFIllIng Cets the type of order executIon by remaInder
TypeFIllIng0escrIptIon Cets the type of order executIon by remaInder
as a strIng
TypeTIme Cets the type of order at the tIme of the
expIratIon
TypeTIme0escrIptIon Cets the order type by expIratIon tIme as a
strIng
|agIc Cets the Ì0 of expert, that placed the order
PosItIonÌd Cets the Ì0 of posItIon
Access to doubIe type propertIes
7olumeÌnItIal Cets the InItIal volume of order
7olumeCurrent Cets the unfIlled volume of order
PrIceDpen Cets the order prIce
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2009
StopLoss Cets the order's Stop Loss
TakeProfIt Cets the order's Take ProfIt
PrIceCurrent Cets the current prIce by order symbol
PrIceStopLImIt Cets the prIce of settIng lImIt order
Access to text propertIes
Symbol Cets the order symbol
Comment Cets the order comment
Access to hDL5 API functIons
ÌnfoÌnteger Cets the value of specIfIed Integer type
property
Ìnfo0ouble Cets the value of specIfIed double type property
ÌnfoStrIng Cets value of specIfIed strIng type property
SeIectIon
Ticket Cets the tIcket/selects the order
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2010
TImeSetup
Cets the tIme of order placement.
J-r-rLm- rLm-¯-rup.· ··n-r
Peturned vaIue
TIme of order placement.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2011
Type
Cets the order type.
IHJM_J-¯I-_r1-I ryp-.· ··n-r
Peturned vaIue
Drder type.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2012
Type0escrIptIon
Cets the order type as a strIng.
-rnLnj ryp-¯--·nLprL·n.· ··n-r
Peturned vaIue
Drder type as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2013
State
Cets the order state.
IHJM_J-¯I-_¯rArI ¯r-r-.· ··n-r
Peturned vaIue
Drder state.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2014
State0escrIptIon
Cets the order state as a strIng.
-rnLnj ¯r-r-¯--·nLprL·n.· ··n-r
Peturned vaIue
Drder state as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2015
TImeExpIratIon
Cets the tIme of order expIratIon.
J-r-rLm- rLm-IxpLn-rL·n.· ··n-r
Peturned vaIue
TIme of order expIratIon, set on Its placement.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2016
TIme0one
Cets the tIme of order executIon or cancellatIon.
J-r-rLm- rLm-¯·n-.· ··n-r
Peturned vaIue
TIme of order executIon or cancellatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2017
TypeFIIIIng
Cets the type of order executIon by remaInder.
IHJM_J-¯I-_r1-I_¯PHHPHJ ryp-¯LLLLnj.· ··n-r
Peturned vaIue
Type of order executIon by remaInder.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2018
TypeFIIIIng0escrIptIon
Cets the type of order executIon by remaInder as a strIng.
-rnLnj ryp-¯LLLLnj¯--·nLprL·n.· ··n-r
Peturned vaIue
Type order of executIon by remaInder as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2019
TypeTIme
Cets the type of order at the tIme of the expIratIon.
IHJM_J-¯I-_r1-I_rPMI ryp-rLm-.· ··n-r
Peturned vaIue
Type of order at the tIme of the expIratIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2020
TypeTIme0escrIptIon
Cets the order type by expIratIon tIme as a strIng.
-rnLnj ryp-rLm-¯--·nLprL·n.· ··n-r
Peturned vaIue
Drder type by expIratIon tIme as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2021
hagIc
Cets the Ì0 of expert, that placed the order.
L·nj M-jL·.· ··n-r
Peturned vaIue
Ì0 of expert, that placed the order.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2022
PosItIonId
Cets the Ì0 of posItIon.
L·nj -·-LrL·nPJ.· ··n-r
Peturned vaIue
Ì0 of posItIon, In whIch the order was Involved
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2023
VoIumeInItIaI
Cets the InItIal volume of order.
J·uoL- V·Lum-PnLrL-L.· ··n-r
Peturned vaIue
ÌnItIal volume of order.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2024
VoIumeCurrent
Cets the unfIlled volume of order.
J·uoL- V·Lum-.unn-nr.· ··n-r
Peturned vaIue
UnfIlled volume of order.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2025
PrIceDpen
Cets the order prIce.
J·uoL- -nL·-Jp-n.· ··n-r
Peturned vaIue
PrIce of order placement.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2026
StopLoss
Cets the order's Stop Loss.
J·uoL- ¯r·pH·--.· ··n-r
Peturned vaIue
Drder's Stop Loss.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2027
TakeProfIt
Cets the order's Take ProfIt.
J·uoL- r-k--n·rLr.· ··n-r
Peturned vaIue
Drder's Take ProfIt.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2028
PrIceCurrent
Cets the current prIce by order symbol.
J·uoL- -nL·-.unn-nr.· ··n-r
Peturned vaIue
Current prIce by order symbol.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2029
PrIceStopLImIt
Cets the prIce of settIng lImIt order.
J·uoL- -nL·-¯r·pHLmLr.· ··n-r
Peturned vaIue
PrIce of settIng lImIt order.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2030
SymboI
Cets the name of order symbol.
-rnLnj ¯ymo·L.· ··n-r
Peturned vaIue
Name of order symbol.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2031
Comment
Cets the order comment.
-rnLnj .·mm-nr.· ··n-r
Peturned vaIue
Drder comment.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2032
InfoInteger
Cets the value of specIfIed Integer type property.
o··L Pnr·Pnr-j-n.
IHJM_J-¯I-_--J-I-r1_PHrIJI- pr.p_ij, // pn·p-nry P¯
L·njs v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of Integer type property.
v-r
[out] Feference to long type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2033
Info0oubIe
Cets the value of specIfIed double type property.
o··L Pnr·¯·uoL-.
IHJM_J-¯I-_--J-I-r1_¯JJÐHI pr.p_ij, // pn·p-nry P¯
J·uoL-s v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of double type property.
v-r
[out] Feference to double type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2034
InfoStrIng
Cets the value of specIfIed strIng type property.
o··L Pnr·¯rnLnj.
IHJM_J-¯I-_--J-I-r1_¯r-PHJ pr.p_ij, // pn·p-nry P¯
-rnLnjs v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of text property.
v-r
[out] Feference to strIng type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2035
TIcket (Cet method)
Cets the order tIcket.
uL·nj rL·k-r.· ··n-r
Peturned vaIue
Drder tIcket.
TIcket (Set method)
Select the order for further work.
v·LJ rL·k-r.
uL·nj :i·ra: // ·nJ-n rL·k-r
·
Parameters
:i·ra:
[In] Drder tIcket.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2036
CPosItIonInfo
CPosItIonÌnfo Is a class for easy access to the open posItIon propertIes.
0escrIptIon
CPosItIonÌnfo class provIdes easy access to the open posItIon propertIes.
0ecIaratIon
·L--- .-·-LrL·nPnr·
TItIe
tLn·LuJ- <rn-J-\-·-LrL·nPnr·.m¬!
CIass methods by groups
Access to Integer type propertIes
TIme Cets the tIme of posItIon openIng
Type Cets the posItIon type
Type0escrIptIon Cets the posItIon type as a strIng
|agIc Cets the Ì0 of expert, that opened the posItIon
ÌdentIfIer Cets the Ì0 of posItIon
Access to doubIe type propertIes
7olume Cets the volume of posItIon
PrIceDpen Cets the prIce of posItIon openIng
StopLoss Cets the prIce of posItIon's Stop Loss
TakeProfIt Cets the prIce of posItIon's Take ProfIt
PrIceCurrent Cets the current prIce by posItIon symbol
CommIssIon Cets the amount of commIssIon by posItIon
Swap Cets the amount of swap by posItIon
ProfIt Cets the amount of current profIt by posItIon
Access to text propertIes
Symbol Cets the name of posItIon symbol
Access to hDL5 API functIons
ÌnfoÌnteger Cets the value of specIfIed Integer type
property
Ìnfo0ouble Cets the value of specIfIed double type property
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2037
ÌnfoStrIng Cets the value of specIfIed strIng type property
SeIectIon
Select Selects the posItIon
State
StoreState Saves the posItIon parameters
CheckState Checks the current parameters agaInst the
saved parameters
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2038
TIme
Cets the tIme of posItIon openIng.
J-r-rLm- rLm-.· ··n-r
Peturned vaIue
TIme of posItIon openIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2039
Type
Cets the posItIon type.
IHJM_-J¯PrPJH_r1-I ryp-.· ··n-r
Peturned vaIue
PosItIon type.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2040
Type0escrIptIon
Cets the posItIon type as a strIng.
-rnLnj ryp-¯--·nLprL·n.· ··n-r
Peturned vaIue
PosItIon type as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2041
hagIc
Cets the Ì0 of expert, that opened the posItIon.
L·nj M-jL·.· ··n-r
Peturned vaIue
Ì0 of expert, that opened the posItIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2042
IdentIfIer
Cets the Ì0 of posItIon.
L·nj PJ-nrLrL-n.· ··n-r
Peturned vaIue
Ì0 of posItIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2043
VoIume
Cets the volume of posItIon.
J·uoL- V·Lum-.· ··n-r
Peturned vaIue
7olume of posItIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2044
PrIceDpen
Cets the prIce of posItIon openIng.
J·uoL- -nL·-Jp-n.· ··n-r
Peturned vaIue
PrIce of posItIon openIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2045
StopLoss
Cets the posItIons's Stop Loss.
J·uoL- ¯r·pH·--.· ··n-r
Peturned vaIue
PosItIons's Stop Loss.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2046
TakeProfIt
Cets the posItIon's Take ProfIt.
J·uoL- r-k--n·rLr.· ··n-r
Peturned vaIue
PosItIon's Take ProfIt.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2047
PrIceCurrent
Cets the current prIce by posItIon symbol.
J·uoL- -nL·-.unn-nr.· ··n-r
Peturned vaIue
Current prIce by posItIon symbol.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2048
CommIssIon
Cets the amount of commIssIon by posItIon.
J·uoL- .·mmL--L·n.· ··n-r
Peturned vaIue
Amount of commIssIon by posItIon (In deposIt currency).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2049
Swap
Cets the amount of swap by posItIon.
J·uoL- ¯.-p.· ··n-r
Peturned vaIue
Amount of swap by posItIon (In deposIt currency).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2050
ProfIt
Cets the amount of current profIt by posItIon.
J·uoL- -n·rLr.· ··n-r
Peturned vaIue
Amount of current profIt by posItIon (In deposIt currency).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2051
SymboI
Cets the name of posItIon symbol.
-rnLnj ¯ymo·L.· ··n-r
Peturned vaIue
Name of posItIon symbol.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2052
InfoInteger
Cets the value of specIfIed Integer type property.
o··L Pnr·Pnr-j-n.
IHJM_-J¯PrPJH_--J-I-r1_PHrIJI- pr.p_ij, // pn·p-nry P¯
L·njs v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of Integer type property.
v-r
[out] Feference to long type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2053
Info0oubIe
Cets the value of specIfIed double type property.
o··L Pnr·¯·uoL-.
IHJM_-J¯PrPJH_--J-I-r1_¯JJÐHI pr.p_ij, // pn·p-nry P¯
J·uoL-s v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of double type property.
v-r
[In] Feference to double type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2054
InfoStrIng
Cets the value of specIfIed strIng type property.
o··L Pnr·¯rnLnj.
IHJM_-J¯PrPJH_--J-I-r1_¯r-PHJ pr.p_ij, // pn·p-nry P¯
-rnLnjs v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of text property.
v-r
[out] Feference to strIng type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2055
SeIect
Select the posItIon for further work.
o··L ¯-L-·r.
··n-r -rnLnj ·ymo.l // -ymo·L
·
Parameters
·ymo.l
[In] Symbol for posItIon selectIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2056
StoreState
Saves the posItIon parameters.
v·LJ ¯r·n-¯r-r-.·
Peturned vaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2057
CheckState
Checks the current parameters agaInst the saved parameters.
o··L .!-·k¯r-r-.·
Peturned vaIue
true · If the posItIon parameters have changed sInce the last call of the StoreState() method,
otherwIse · false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2058
C0eaIInfo
C0ealÌnfo Is a class for easy access to the deal propertIes.
0escrIptIon
C0ealÌnfo class provIdes access to the deal propertIes.
0ecIaratIon
·L--- .¯--LPnr·
TItIe
tLn·LuJ- <rn-J-\¯--LPnr·.m¬!
CIass methods by groups
Access to Integer type propertIes
Drder Cets the order by whIch the deal Is executed
TIme Cets the tIme of deal executIon
Type Cets the deal type
Type0escrIptIon Cets the deal type as a strIng
Entry Cets the deal dIrectIon
Entry0escrIptIon Cets the deal dIrectIon as a strIng
|agIc Cets the Ì0 of expert, that executed the deal
PosItIonÌd Cets the Ì0 of posItIon, In whIch the deal was
Involved
Access to doubIe type propertIes
7olume Cets the volume of deal
PrIce Cets the deal prIce
CommIsIon Cets the amount of commIssIon by deal
Swap Cets the amount of swap when posItIon Is
closed
ProfIt Cets the fInancIal result of deal
Access to text propertIes
Symbol Cets the name of deal symbol
Comment Cets the deal comment
Access to hDL5 API functIons
ÌnfoÌnteger Cets the value of specIfIed Integer type
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2059
property
Ìnfo0ouble Cets the value of specIfIed double type property
ÌnfoStrIng Cets value of specIfIed strIng type property
SeIectIon
TIcket Cets tIcket/selects the deal
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2060
Drder
Cets the order by whIch the deal Is executed.
L·nj JnJ-n.· ··n-r
Peturned vaIue
Drder by whIch the deal Is executed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2061
TIme
Cets the tIme of deal executIon.
J-r-rLm- rLm-.· ··n-r
Peturned vaIue
TIme of deal executIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2062
Type
Cets the deal type.
IHJM_-J¯PrPJH_r1-I ryp-.· ··n-r
Peturned vaIue
0eal type.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2063
Type0escrIptIon
Cets the deal type as a strIng.
-rnLnj ryp-¯--·nLprL·n.· ··n-r
Peturned vaIue
0eal type as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2064
Entry
Compares the deal dIrectIon.
IHJM_¯IAH_IHr-1 Inrny.· ··n-r
Peturned vaIue
0eal dIrectIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2065
Entry0escrIptIon
Cets the deal dIrectIon as a strIng.
-rnLnj Inrny¯--·nLprL·n.· ··n-r
Peturned vaIue
0eal dIrectIon as a strIng.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2066
hagIc
Cets the Ì0 of expert, that executed the deal.
L·nj M-jL·.· ··n-r
Peturned vaIue
Ì0 of expert, that executed the deal.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2067
PosItIonId
Cets the Ì0 of posItIon, In whIch the deal was Involved.
L·nj -·-LrL·nPJ.· ··n-r
Peturned vaIue
Ì0 of posItIon, In whIch the deal was Involved.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2068
VoIume
Cets the volume of deal.
J·uoL- V·Lum-.· ··n-r
Peturned vaIue
7olume of deal.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2069
PrIce
Cets the deal prIce.
J·uoL- -nL·-.· ··n-r
Peturned vaIue
0eal prIce.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2070
CommIssIon
Cets the amount of commIssIon by deal.
J·uoL- .·mmL--L·n.· ··n-r
Peturned vaIue
Amount of commIssIon by deal.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2071
Swap
Cets the amount of swap when posItIon Is closed.
J·uoL- ¯.-p.· ··n-r
Peturned vaIue
Amount of swap when posItIon Is closed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2072
ProfIt
Cets the fInancIal result of deal.
J·uoL- -n·rLr.· ··n-r
Peturned vaIue
FInancIal result of the deal (In deposIt currency).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2073
SymboI
Cets the name of deal symbol.
-rnLnj ¯ymo·L.· ··n-r
Peturned vaIue
Name of deal symbol.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2074
Comment
Cets the deal comment.
-rnLnj .·mm-nr.· ··n-r
Peturned vaIue
0eal comment.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2075
InfoInteger
Cets the value of specIfIed Integer type property.
o··L Pnr·Pnr-j-n.
IHJM_¯IAH_--J-I-r1_PHrIJI- pr.p_ij, // pn·p-nry P¯
L·njs v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of Integer type property.
v-r
[out] Feference to long type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2076
Info0oubIe
Cets the value of specIfIed double type property.
o··L Pnr·¯·uoL-.
IHJM_¯IAH_--J-I-r1_¯JJÐHI pr.p_ij, // pn·p-nry P¯
J·uoL-s v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of double type property.
v-r
[In] Feference to double type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2077
InfoStrIng
Cets the value of specIfIed strIng type property.
o··L Pnr·¯rnLnj.
IHJM_¯IAH_--J-I-r1_¯r-PHJ pr.p_ij, // pn·p-nry P¯
-rnLnjs v-r // n-r-n-n·- r· v-nL-oL-
· ··n-r
Parameters
pr.p_ij
[In] Ì0 of text property.
v-r
[out] Feference to strIng type varIable to place result.
Peturned vaIue
true - In case of success, false - If unable to get property value.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2078
TIcket (Cet method)
Cets the deal tIcket.
uL·nj rL·k-r.· ··n-r
Peturned vaIue
0eal tIcket.
TIcket (Set method)
Select the posItIon for further work.
v·LJ rL·k-r.
uL·nj :i·ra: // rL·k-r
·
Parameters
:i·ra:
[In] 0eal tIcket.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2079
CTrade
CTrade Is a class for easy access to the trade functIons.
0escrIptIon
CTrade class provIdes easy access to the trade functIons.
0ecIaratIon
·L--- .rn-J-
TItIe
tLn·LuJ- <rn-J-\rn-J-.m¬!
CIass methods by groups
SettIng parameters
SetExpert|agIcNumber Sets the expert Ì0
Set0evIatIonÌnPoInts Sets the allowed devIatIon
DperatIons wIth orders
DrderDpen Places the pendIng order wIth set parameters
Drder|odIfy |odIfIes the pendIng order parameters
Drder0elete 0eletes the pendIng order
DperatIons wIth posItIons
PosItIonDpen Dpens the posItIon wIth set parameters
PosItIon|odIfy |odIfIes the posItIon parameters
PosItIonClose Closes the posItIon
Access to the Iast request resuIts
FesultFetcode Cets the code of request result
FesultFetcode0escrIptIon Cets the code of request result as text
Fesult0eal Cets the deal tIcket
FesultDrder Cets the order tIcket
Fesult7olume Cets the volume of deal or order
FesultPrIce Cets the prIce confIrmed by broker
Fesult8Id Cets the current bId prIce (the requote)
FesultAsk Cets the current ask prIce (the requote)
FesultComment Cets the broker comment
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2080
CheckFesultFetcode Cets the value of the retcode fIeld of
|qlTradeCheckFesult type, fIlled whIle checkIng
of the request correctness
CheckFesultFetcode0escrIptIon Cets the strIng descrIptIon of the retcode fIeld
of |qlTradeCheckFesult type, fIlled whIle
checkIng of the request correctness
CheckFesult8alance Cets the value of the balance fIeld of
|qlTradeCheckFesult type, fIlled whIle checkIng
of the request correctness
CheckFesultEquIty Cets the value of the equIty fIeld of
|qlTradeCheckFesult type, fIlled whIle checkIng
of the request correctness
CheckFesult|argIn Cets the value of the margIn fIeld of
|qlTradeCheckFesult type, fIlled whIle checkIng
of the request correctness
CheckFesult|argInFree Cets the value of the margIn_free fIeld of
|qlTradeCheckFesult type, fIlled whIle checkIng
of the request correctness
CheckFesult|argInLevel Cets the value of the margIn_level fIeld of
|qlTradeCheckFesult type, fIlled whIle checkIng
of the request correctness
CheckFesultComment Cets the value of the comment fIeld of
|qlTradeCheckFesult type, fIlled whIle checkIng
of the request correctness
AuxIIIary methods
PrIntFequest PrInts the last request parameters Into journal
PrIntFesult PrInts the results of the last request Into
journal
PrIntCheckFesult PrInts the results of the request checkIng Into
journal
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2081
SetExperthagIcNumber
Sets the expert Ì0.
v·LJ ¯-rIxp-nrM-jL·Humo-n.
uL·nj m-ji· // P¯
·
Parameters
m-ji·
[In] New Ì0 of the expert.
Peturned vaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2082
Set0evIatIonInPoInts
Sets the allowed devIatIon.
v·LJ ¯-r¯-vL-rL·nPn-·Lnr-.
uL·nj javi-:i.n // J-vL-rL·n
·
Parameters
javi-:i.n
[In] Allowed devIatIon.
Peturned vaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2083
DrderDpen
Places the pendIng order wIth set parameters.
o··L JnJ-nJp-n.
··n-r -rnLnj ·ymo.l, // -ymo·L
IHJM_J-¯I-_r1-I .rjar_:ypa, // ·nJ-n ryp-
J·uoL- v.l:ma, // ·nJ-n v·Lum-
J·uoL- limi:_pri·a, // ¯r·pHLmLr pnL·-
J·uoL- pri·a, // -x-·urL·n pnL·-
J·uoL- ·l, // ¯r·p H·-- pnL·-
J·uoL- :p, // r-k- -n·rLr pnL·-
IHJM_J-¯I-_r1-I_rPMI :ypa_:ima, // ryp- oy -xpLn-rL·n
J-r-rLm- axpir-:i.n, // -xpLn-rL·n
··n-r -rnLnj ·.mman:=°° // ··mm-nr
·
Parameters
·ymo.l
[In] Name of trade Instrument.
.rjar_:ypa
[In] Type of order trade operatIon.
v.l:ma
[In] Fequested order volume.
limi:_pri·a
[In] PrIce at whIch the StopLImIt order wIll be placed.
pri·a
[In] PrIce at whIch the order must be executed.
·l
[In] PrIce at whIch the Stop Loss wIll trIgger.
:p
[In] PrIce at whIch the Take ProfIt wIll trIgger.
:ypa_:ima
[In] Drder type by executIon.
axpir-:i.n
[In] ExpIratIon date of pendIng order.
·.mman:=°°
[In] Drder comment.
Peturned vaIue
true · In case of successful check of the basIc structures, otherwIse · false.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2084
Note
Successful completIon of the DrderSend(...) method does not always mean successful executIon of
the trade operatIon. Ìt's necessary to check the result of trade request (trade server return code)
usIng FesultFetcode() and value, returned by FesultDrder().
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2085
DrderhodIfy
|odIfIes the pendIng order parameters.
o··L JnJ-nM·JLry.
uL·nj :i·ra:, // ·nJ-n rL·k-r
J·uoL- pri·a, // -x-·urL·n pnL·-
J·uoL- ·l, // ¯r·p H·-- pnL·-
J·uoL- :p, // r-k- -n·rLr pnL·-
IHJM_J-¯I-_r1-I_rPMI :ypa_:ima, // ryp- oy -xpLn-rL·n
J-r-rLm- axpir-:i.n // -xpLn-rL·n
·
Parameters
:i·ra:
[In] Drder tIcket.
pri·a
[In] The new prIce by whIch the order must be executed (or the prevIous value, If the change Is
not necessary).
·l
[In] The new prIce by whIch the Stop Loss wIll trIgger (or the prevIous value, If the change Is not
necessary).
:p
[In] The new prIce by whIch the Take ProfIt wIll trIgger (or the prevIous value, If the change Is not
necessary).
:ypa_:ima
[In] The new type of order by expIratIon (or the prevIous value, If the change Is not necessary).
axpir-:i.n
[In] The new expIratIon date of pendIng order (or the prevIous value, If the change Is not
necessary).
Peturned vaIue
true · In case of successful check of the basIc structures, otherwIse · false.
Note
Successful completIon of the Drder|odIfy(...) method does not always mean successful executIon of
the trade operatIon. Ìt's necessary to check the result of trade request (trade server return code)
usIng FesultFetcode().
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2086
Drder0eIete
0eletes the pendIng order.
o··L JnJ-n¯-L-r-.
uL·nj :i·ra: // ·nJ-n rL·k-r
·
Parameters
:i·ra:
[In] Drder tIcket.
Peturned vaIue
true · In case of successful check of the basIc structures, otherwIse · false.
Note
Successful completIon of the Drder0elete(...) method does not always mean successful executIon of
the trade operatIon. Ìt's necessary to check the result of trade request (trade server return code)
usIng FesultFetcode().
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2087
PosItIonDpen
Dpens the posItIon wIth set parameters.
o··L -·-LrL·nJp-n.
··n-r -rnLnj ·ymo.l, // -ymo·L
IHJM_J-¯I-_r1-I .rjar_:ypa, // p·-LrL·n ryp-
J·uoL- v.l:ma, // p·-LrL·n v·Lum-
J·uoL- pri·a, // -x-·urL·n pnL·-
J·uoL- ·l, // ¯r·p H·-- pnL·-
J·uoL- :p, // r-k- -n·rLr pnL·-
··n-r -rnLnj ·.mman:=°° // ··mm-nr
·
Parameters
·ymo.l
[In] Name of trade Instrument, by whIch It Is Intended to open posItIon.
.rjar_:ypa
[In] Type of posItIon trade operatIon.
v.l:ma
[In] Fequested posItIon volume.
pri·a
[In] PrIce at whIch the posItIon must be opened.
·l
[In] PrIce at whIch the Stop Loss wIll trIgger.
:p
[In] PrIce at whIch the Take ProfIt wIll trIgger.
·.mman:=°°
[In] PosItIon comment.
Peturned vaIue
true · In case of successful check of the basIc structures, otherwIse · false.
Note
Successful completIon of the PosItIonDpen(...) method does not always mean successful executIon
of the trade operatIon. Ìt's necessary to check the result of trade request (trade server return code)
usIng FesultFetcode() and value, returned by Fesult0eal().
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2088
PosItIonhodIfy
|odIfIes the posItIon parameters by specIfIed symbol.
o··L -·-LrL·nM·JLry.
··n-r -rnLnj ·ymo.l, // -ymo·L
J·uoL- ·l, // ¯r·p H·-- pnL·-
J·uoL- :p // r-k- -n·rLr pnL·-
·
Parameters
·ymo.l
[In] Name of trade Instrument, by whIch It Is Intended to modIfy posItIon.
·l
[In] The new prIce by whIch the Stop Loss wIll trIgger (or the prevIous value, If the change Is not
necessary).
:p
[In] The new prIce by whIch the Take ProfIt wIll trIgger (or the prevIous value, If the change Is not
necessary).
Peturned vaIue
true · In case of successful check of the basIc structures, otherwIse · false.
Note
Successful completIon of the PosItIon|odIfy(...) method does not always mean successful executIon
of the trade operatIon. Ìt's necessary to check the result of trade request (trade server return code)
usIng FesultFetcode().
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2089
PosItIonCIose
Closes the posItIon by specIfIed symbol.
o··L -·-LrL·n.L·--.
··n-r -rnLnj ·ymo.l, // -ymo·L
uL·nj javi-:i.n=.L¯:J_MÁX // J-vL-rL·n
·
Parameters
·ymo.l
[In] Name of trade Instrument, by whIch It Is Intended to close posItIon.
javi-:i.n=.L¯:J_MÁX
[In] |axImal devIatIon from the current prIce (In poInts).
Peturned vaIue
true · In case of successful check of the basIc structures, otherwIse · false.
Note
Successful completIon of the PosItIonClose(...) method does not always mean successful executIon
of the trade operatIon. Ìt's necessary to check the result of trade request (trade server return code)
usIng FesultFetcode().
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2090
PesuItPetcode
Cets the code of request result.
uLnr ---uLr--r··J-.· ··n-r
Peturned vaIue
Code of request result.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2091
PesuItPetcode0escrIptIon
Cets the code of request result as text.
-rnLnj ---uLr--r··J-¯--·nLprL·n.· ··n-r
Peturned vaIue
Code of the last request result as text.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2092
PesuIt0eaI
Cets the deal tIcket.
uL·nj ---uLr¯--L.· ··n-r
Peturned vaIue
0eal tIcket, If the deal Is executed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2093
PesuItDrder
Cets the order tIcket.
uL·nj ---uLrJnJ-n.· ··n-r
Peturned vaIue
Drder tIcket, If the order Is placed.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2094
PesuItVoIume
Cets the volume of deal or order.
J·uoL- ---uLrV·Lum-.· ··n-r
Peturned vaIue
7olume of deal or order.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2095
PesuItPrIce
Cets the prIce confIrmed by broker.
J·uoL- ---uLr-nL·-.· ··n-r
Peturned vaIue
PrIce, confIrmed by the broker.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2096
PesuItßId
Cets the current bId prIce (the requote).
J·uoL- ---uLrÐLJ.· ··n-r
Peturned vaIue
Current bId prIce (the requote).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2097
PesuItAsk
Cets the current ask prIce (the requote).
J·uoL- ---uLrA-k.· ··n-r
Peturned vaIue
Current ask prIce (the requote).
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2098
PesuItComment
Cets the broker comment.
-rnLnj ---uLr.·mm-nr.· ··n-r
Peturned vaIue
8roker comment to the operatIon.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2099
CheckPesuItPetcode
Cets the value of the retcode fIeld of |qlTradeCheckFesult type, fIlled whIle checkIng of the request
correctness.
uLnr .!-·k---uLr--r··J-.· ··n-r
Peturned vaIue
The value of the retcode fIeld (error code) of |qlTradeCheckFesult type, fIlled whIle checkIng of the
request correctness.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2100
CheckPesuItPetcode0escrIptIon
Cets the strIng descrIptIon of the retcode fIeld of |qlTradeCheckFesult type, fIlled whIle checkIng of
the request correctness.
-rnLnj ---uLr--r··J-¯--·nLprL·n.· ··n-r
Peturned vaIue
The strIng descrIptIon of the retcode fIeld (Error code) of |qlTradeCheckFesult type, fIlled whIle
checkIng of the request correctness.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2101
CheckPesuItßaIance
Cets the value of the balance fIeld of |qlTradeCheckFesult type, fIlled whIle checkIng of the request
correctness.
J·uoL- .!-·k---uLrÐ-L-n·-.· ··n-r
Peturned vaIue
The value of the balance fIeld (balance value that wIll be after the executIon of the trade operatIon)
of |qlTradeCheckFesult type, fIlled whIle checkIng of the request correctness.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2102
CheckPesuItEquIty
Cets the value of the equIty fIeld of |qlTradeCheckFesult type, fIlled whIle checkIng of the request
correctness.
J·uoL- .!-·k---uLrI¬uLry.· ··n-r
Peturned vaIue
The value of the equIty fIeld (equIty value that wIll be after the executIon of the trade operatIon) of
|qlTradeCheckFesult type, fIlled whIle checkIng of the request correctness.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2103
CheckPesuIthargIn
Cets the value of the margIn fIeld of |qlTradeCheckFesult type, fIlled whIle checkIng of the request
correctness.
J·uoL- .!-·k---uLrM-njLn.· ··n-r
Peturned vaIue
The value of the margIn fIeld (margIn requIred for the trade operatIon) of |qlTradeCheckFesult
type, fIlled whIle checkIng of the request correctness.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2104
CheckPesuIthargInFree
Cets the value of the margIn_free fIeld of |qlTradeCheckFesult type, fIlled whIle checkIng of the
request correctness.
J·uoL- .!-·k---uLrM-njLn¯n--.· ··n-r
Peturned vaIue
The value of the margIn_free fIeld (free margIn that wIll be left after the executIon of the trade
operatIon) of |qlTradeCheckFesult type, fIlled whIle checkIng of the request correctness.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2105
CheckPesuIthargInLeveI
Cets the value of the margIn_level fIeld of |qlTradeCheckFesult type, fIlled whIle checkIng of the
request correctness.
J·uoL- .!-·k---uLrM-njLnH-v-L.· ··n-r
Peturned vaIue
The value of the margIn_level fIeld (margIn level that wIll be set after the executIon of the trade
operatIon) of |qlTradeCheckFesult type, fIlled whIle checkIng of the request correctness.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2106
CheckPesuItComment
The value of the comment fIeld of |qlTradeCheckFesult type, fIlled whIle checkIng of the request
correctness.
-rnLnj .!-·k---uLr.·mm-nr.· ··n-r
Peturned vaIue
The value of the comment fIeld (Comment to the reply code, error descrIptIon) of
|qlTradeCheckFesult type, fIlled whIle checkIng of the request correctness.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2107
PrIntPequest
PrInts the last request parameters Into journal.
v·LJ -nLnr--¬u--r.· ··n-r
Peturned vaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2108
PrIntPesuIt
PrInts the results of the last request Into journal.
v·LJ -nLnr---uLr.· ··n-r
Peturned vaIue
None.
Standard Library
© 2000·2010, |eta0uotes Software Corp.
2109
PrIntCheckPesuIt
PrInts the results of the request checkIng Into journal.
v·LJ -nLnr.!-·k---uLr.· ··n-r
Peturned vaIue
None.
Moving from MQL4
© 2000·2010, |eta0uotes Software Corp.
2110
hovIng from hDL4 to hDL5
|0L5 Is the development of Its predecessor · the |0L4 language, In whIch numerous IndIcators,
scrIpts, and Expert AdvIsors were wrItten. 0espIte the fact that the new programmIng language Is
maxImally compatIble wIth the prevIous·generatIon language, there are stIll some dIfferences between
these languages. And when transferrIng programs these dIfferences should be noted.
ThIs sectIon contaIns InformatIon Intended to facIlItate the adaptatIon of codes to the new |0L5
language for programmers who know |0L4.
FIrst It should be noted:
The new language does not contaIn functIons start(), InIt() and deInIt();
The number of IndIcator buffers Is not lImIted;
dll Is downloaded ImmedIately after downloadIng an Expert AdvIsor (or any other mql5 program);
Check of logIcal condItIons Is shortened;
When lImIts of an array are exceeded, the current performance Is termInated (crItIcally · wIth the
output of an errors);
Precedence of operators lIke In C + +;
The language offers the ImplIcIt type cast (even from strIng to a number);
Local varIables are not InItIalIzed automatIcally (except for strIngs);
Common local arrays are automatIcally deleted.
SpecIaI FunctIons InIt, start and deInIt
The |0L4 language contaIned only three predefIned functIons that could be used In the IndIcator,
scrIpt or Expert AdvIsor (not takIng Into account the Include fIles *.mqh and lIbrary fIles). Ìn |0L5
there are no such functIons, but there are theIr analogues. The table shows the approxImate
correspondence of functIons.
hDL4 hDL5
InIt DnÌnIt
start DnStart
deInIt Dn0eInIt
FunctIons DnÌnIt and Dn0eInIt perform the same role as InIt and deInIt In |0L4 · they are desIgned to
locate the code, whIch must be performed durIng InItIalIzatIon and deInItIalIzatIon of mql5 programs.
You can eIther just rename these functIons accordIngly, or leave them as they are, but add calls of
these functIons In correspondIng places.
ExampIe:
v·LJ JnPnLr.·

//--- ¯un·rL·n- L- ·-LL-J r· LnLrL-LLz-
LnLr.·¡
·
Moving from MQL4
© 2000·2010, |eta0uotes Software Corp.
2111
v·LJ Jn¯-LnLr.··n-r Lnr n---·n·

//--- .-LL r!- run·rL·n .Lr! J-LnLrL-LLz-rL·n
J-LnLr.·¡
//---
·
The start functIon Is replaced by DnStart only In scrIpts. Ìn Expert AdvIsors and IndIcators It should be
renamed to DnTIck and DnCalculate, respectIvely. The code that Is to be executed durIng a mql5
program operatIon should be located In these three functIons:
mqI5-program maIn functIon
scrIpt DnStart
IndIcator DnCalculate
Expert AdvIsor DnTIck
Ìf the IndIcator or scrIpt code does not contaIn the maIn functIon, or the functIon name dIffers from
the requIred one, the call of thIs functIon Is not performed. Ìt means, If the source code of a scrIpt
doesn't contaIn DnStart, such a code wIll be compIled as an Expert AdvIsor.
Ìf an IndIcator code doesn't contaIn the DnCalculate functIon, the compIlatIon of such an IndIcator Is
ImpossIble.
PredefIned VarIabIes
Ìn |0L5 there are no such predefIned varIables as Ask, 8Id, 8ars. 7arIables PoInt and 0IgIts have a
slIghtly dIfferent spellIng:
hDL4 hDL5
0IgIts _0IgIts
PoInt _PoInt
_LastError
_PerIod
_Symbol
_StopFlag
_UnInItFeason
Access to TImeserIes
Ìn |0L5 there are no such predefIned tImeserIes as Dpen [], HIgh [], Low [], Close [], 7olume [] and
TIme []. The necessary depth of a tImeserIes can now be set usIng correspondIng functIons to access
tImeserIes.
Moving from MQL4
© 2000·2010, |eta0uotes Software Corp.
2112
Expert AdvIsors
Expert AdvIsors In |0L5 do not requIre the oblIgatory presence of the functIon for handlIng the events
of a new tIck receIpt · DnTIck, as It was In |0L4 (the start functIon In |0L4 Is executed when you
receIve a new tIck), because In |0L5 Expert AdvIsors can contaIn pre·defIned handler functIons are
several types of events:
DnTIck - receIpt of a new tIck;
DnTImer - tImer event;
DnTrade · trade event;
DnChartEvent - events of Input from the keyboard and mouse, events of a graphIc object movIng,
event of a text edItIng completIon In the entry fIeld of the LabelEdIt object;
Dn8ookEvent - event of 0epth of |arket status change.
Custom IndIcators
Ìn |0L4, the number of IndIcator buffers Is lImIted and can't exceed 8. Ìn |0L5 there are no such
lImItatIons, but It should be remembered that each IndIcator buffer requIres allocatIon of a certaIn
part of memory for Its locatIon In the termInal, so the new possIbIlIty should not be abused.
|0L4 offered only 6 types of custom IndIcator plottIng; whIle |0L5 now offers 18 drawIng styles. The
names of drawIng types haven't changed, but the Ideology of the graphIcal representatIon of IndIcators
has changed sIgnIfIcantly.
The dIrectIon of IndexIng In IndIcator buffers also dIffers. 8y default, In |0L5 all the IndIcator buffers
have the behavIor of common arrays, I.e. 0 Indexed element Is the oldest one In the hIstory, and as
the Index Increases, we move from the oldest data to the most recent ones.
The only functIon for workIng wIth custom IndIcators that was preserved from |0L4 Is SetÌndex8uffer.
8ut Its call has changed; now you should specIfy type of data to be stored In an array, lInked to the
IndIcator buffer.
PropertIes of custom IndIcators also have changed and expanded. New functIons for accessIng
tImeserIes have been added, so the total calculatIon algorIthm must be reconsIdered.
CraphIcaI Dbjects
The number of graphIcal objects In has Increased sIgnIfIcantly |0L5. 8esIdes, graphIcal objects can
now be posItIoned In tIme wIth the accuracy of a second In a chart of any tImeframe · now object
anchor poInts are not rounded off to the bar openIng tIme In the current prIce chart.
For objects Arrow, Text and Label now way of bIndIng can be IndIcated, and for Label, 8utton, Chart,
8Itmap Label and EdIt chart corner, to whIch the object Is anchored, can be set.

You might also like