Skip to content

List of MQL4 Functions

List of MQL4 Functions

All MQL4 functions in alphabetical order.

FunctionActionSection
AccountBalanceReturns balance value of the current accountAccount Information
AccountCompanyReturns the brokerage company name where the current account was registeredAccount Information
AccountCreditReturns credit value of the current accountAccount Information
AccountCurrencyReturns currency name of the current accountAccount Information
AccountEquityReturns equity value of the current accountAccount Information
AccountFreeMarginReturns free margin value of the current accountAccount Information
AccountFreeMarginCheckReturns free margin that remains after the specified position has been opened at the current price on the current accountAccount Information
AccountFreeMarginModeCalculation mode of free margin allowed to open orders on the current accountAccount Information
AccountInfoDoubleReturns a value of double type of the corresponding account propertyAccount Information
AccountInfoIntegerReturns a value of integer type (bool, int or long) of the corresponding account propertyAccount Information
AccountInfoStringReturns a value string type corresponding account propertyAccount Information
AccountLeverageReturns leverage of the current accountAccount Information
AccountMarginReturns margin value of the current accountAccount Information
AccountNameReturns the current account nameAccount Information
AccountNumberReturns the current account numberAccount Information
AccountProfitReturns profit value of the current accountAccount Information
AccountServerReturns the connected server nameAccount Information
AccountStopoutLevelReturns the value of the Stop Out levelAccount Information
AccountStopoutModeReturns the calculation mode for the Stop Out levelAccount Information
acosReturns the arc cosine of x in radiansMath Functions
AlertDisplays a message in a separate windowCommon Functions
ArrayBsearchReturns index of the first found element in the first array dimensionArray Functions
ArrayCompareReturns the result of comparing two arrays of simple types or custom structures without complex objectsArray Functions
ArrayCopyCopies one array into anotherArray Functions
ArrayCopyRatesCopies rates to the two-dimensional array from chart RateInfo array returns copied bars amountArray Functions
ArrayCopySeriesCopies a series array to another one and returns the count of the copied elementsArray Functions
ArrayDimensionReturns the multidimensional array rankArray Functions
ArrayFillFills an array with the specified valueArray Functions
ArrayFreeFrees up buffer of any dynamic array and sets the size of the zero dimension in 0.Array Functions
ArrayGetAsSeriesChecks direction of array indexingArray Functions
ArrayInitializeSets all elements of a numeric array into a single valueArray Functions
ArrayIsDynamicChecks whether an array is dynamicArray Functions
ArrayIsSeriesChecks whether an array is a timeseriesArray Functions
ArrayMaximumSearch for an element with the maximal valueArray Functions
ArrayMinimumSearch for an element with the minimal valueArray Functions
ArrayRangeReturns the number of elements in the specified dimension of the arrayArray Functions
ArrayResizeSets the new size in the first dimension of the arrayArray Functions
ArraySetAsSeriesSets the direction of array indexingArray Functions
ArraySizeReturns the number of elements in the arrayArray Functions
ArraySortSorting of numeric arrays by the first dimensionArray Functions
asinReturns the arc sine of x in radiansMath Functions
atanReturns the arc tangent of x in radiansMath Functions
BarsReturns the number of bars count in the history for a specified symbol and periodTimeseries and Indicators Access
ceilReturns integer numeric value closest from aboveMath Functions
CharArrayToStringConverting symbol code (ansi) into one-symbol arrayConversion Functions
ChartApplyTemplateApplies a specific template from a specified file to the chartChart Operations
ChartCloseCloses the specified chartChart Operations
ChartFirstReturns the ID of the first chart of the client terminalChart Operations
ChartGetDoubleReturns the double value property of the specified chartChart Operations
ChartGetIntegerReturns the integer value property of the specified chartChart Operations
ChartGetStringReturns the string value property of the specified chartChart Operations
ChartIDReturns the ID of the current chartChart Operations
ChartIndicatorDeleteRemoves an indicator with a specified name from the specified chart windowChart Operations
ChartIndicatorNameReturns the short name of the indicator by the number in the indicators list on the specified chart windowChart Operations
ChartIndicatorsTotalReturns the number of all indicators applied to the specified chart window.Chart Operations
ChartNavigatePerforms shift of the specified chart by the specified number of bars relative to the specified position in the chartChart Operations
ChartNextReturns the chart ID of the chart next to the specified oneChart Operations
ChartOpenOpens a new chart with the specified symbol and periodChart Operations
CharToStrConversion of the symbol code into a one-character stringConversion Functions
CharToStringConverting a symbol code into a one-character stringConversion Functions
ChartPeriodReturns the period value of the specified chartChart Operations
ChartPriceOnDroppedReturns the price coordinate of the chart point, the Expert Advisor or script has been dropped toChart Operations
ChartRedrawCalls a forced redrawing of a specified chartChart Operations
ChartSaveTemplateSaves current chart settings in a template with a specified nameChart Operations
ChartScreenShotProvides a screenshot of the chart of its current state in a gif formatChart Operations
ChartSetDoubleSets the double value for a corresponding property of the specified chartChart Operations
ChartSetIntegerSets the integer value (datetime, int, color, bool or char) for a corresponding property of the specified chartChart Operations
ChartSetStringSets the string value for a corresponding property of the specified chartChart Operations
ChartSetSymbolPeriodChanges the symbol value and a period of the specified chartChart Operations
ChartSymbolReturns the symbol name of the specified chartChart Operations
ChartTimeOnDroppedReturns the time coordinate of the chart point, the Expert Advisor or script has been dropped toChart Operations
ChartTimePriceToXYConverts the coordinates of a chart from the time/price representation to the X and Y coordinatesChart Operations
ChartWindowFindReturns the number of a subwindow where an indicator is drawnChart Operations
ChartWindowOnDroppedReturns the number (index) of the chart subwindow, the Expert Advisor or script has been dropped toChart Operations
ChartXOnDroppedReturns the X coordinate of the chart point, the Expert Advisor or script has been dropped toChart Operations
ChartXYToTimePriceConverts the X and Y coordinates on a chart to the time and price valuesChart Operations
ChartYOnDroppedReturns the Y coordinate of the chart point, the Expert Advisor or script has been dropped toChart Operations
CheckPointerReturns the type of the object pointerCommon Functions
ColorToARGBConverting color type to uint type to receive ARGB representation of the color.Conversion Functions
ColorToStringConverting color value into string as “R,G,B”Conversion Functions
CommentOutputs a comment in the left top corner of the chartCommon Functions
CopyCloseGets history data on bar closing price for a specified symbol and period into an arrayTimeseries and Indicators Access
CopyHighGets history data on maximal bar price for a specified symbol and period into an arrayTimeseries and Indicators Access
CopyLowGets history data on minimal bar price for a specified symbol and period into an arrayTimeseries and Indicators Access
CopyOpenGets history data on bar opening price for a specified symbol and period into an arrayTimeseries and Indicators Access
CopyRatesGets history data of the Rates structure for a specified symbol and period into an arrayTimeseries and Indicators Access
CopyTickVolumeGets history data on tick volumes for a specified symbol and period into an arrayTimeseries and Indicators Access
CopyTimeGets history data on bar opening time for a specified symbol and period into an arrayTimeseries and Indicators Access
cosReturns the cosine of a numberMath Functions
CryptDecodePerforms the inverse transformation of the data from arrayCommon Functions
CryptEncodeTransforms the data from array with the specified methodCommon Functions
DayReturns the current day of the month, i.e., the day of month of the last known server timeDate and Time
DayOfWeekReturns the current zero-based day of the week of the last known server timeDate and Time
DayOfYearReturns the current day of the year i.e., the day of year of the last known server timeDate and Time
DebugBreakProgram breakpoint in debuggingCommon Functions
DigitsReturns the number of decimal digits determining the accuracy of the price value of the current chart symbolCheckup
DoubleToStrReturns text string with the specified numerical value converted into a specified precision formatConversion Functions
DoubleToStringConverting a numeric value to a text line with a specified accuracyConversion Functions
EnumToStringConverting an enumeration value of any type to stringConversion Functions
EventChartCustomGenerates a custom event for the specified chartWorking with Events
EventKillTimerStops the generation of events by the timer in the current chartWorking with Events
EventSetMillisecondTimerLaunches event generator of the high-resolution timer with a period less than 1 second for the current chartWorking with Events
EventSetTimerStarts the timer event generator with the specified periodicity for the current chartWorking with Events
expReturns exponent of a numberMath Functions
ExpertRemoveStops Expert Advisor and unloads it from the chartCommon Functions
fabsReturns absolute value (modulus) of the specified numeric valueMath Functions
FileCloseCloses a previously opened fileFile Functions
FileCopyCopies the original file from a local or shared folder to another fileFile Functions
FileDeleteDeletes a specified fileFile Functions
FileFindCloseCloses search handleFile Functions
FileFindFirstStarts the search of files in a directory in accordance with the specified filterFile Functions
FileFindNextContinues the search started by the FileFindFirst() functionFile Functions
FileFlushWrites to a disk all data remaining in the input/output file bufferFile Functions
FileGetIntegerGets an integer property of a fileFile Functions
FileIsEndingDefines the end of a file in the process of readingFile Functions
FileIsExistChecks the existence of a fileFile Functions
FileIsLineEndingDefines the end of a line in a text file in the process of readingFile Functions
FileMoveMoves or renames a fileFile Functions
FileOpenOpens a file with a specified name and flagFile Functions
FileOpenHistoryOpens file in the current history directory or in its subfoldersFile Functions
FileReadArrayReads arrays of any type except for string from the file of the BIN typeFile Functions
FileReadBoolReads from the file of the CSV type a string from the current position till a delimiter (or till the end of a text line) and converts the read string to a value of bool typeFile Functions
FileReadDatetimeReads from the file of the CSV type a string of one of the formats: “YYYY.MM.DD HH:MM:SS”, “YYYY.MM.DD” or “HH:MM:SS” - and converts it into a datetime valueFile Functions
FileReadDoubleReads a double value from the current position of the file pointerFile Functions
FileReadFloatReads a float value from the current position of the file pointerFile Functions
FileReadIntegerReads int, short or char value from the current position of the file pointerFile Functions
FileReadLongReads a long type value from the current position of the file pointerFile Functions
FileReadNumberReads from the file of the CSV 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 valueFile Functions
FileReadStringReads a string from the current position of a file pointer from a fileFile Functions
FileReadStructReads the contents from a binary file into a structure passed as a parameter, from the current position of the file pointerFile Functions
FileSeekMoves the position of the file pointer by a specified number of bytes relative to the specified positionFile Functions
FileSizeReturns the size of a corresponding open fileFile Functions
FileTellReturns the current position of the file pointer of a corresponding open fileFile Functions
FileWriteWrites data to a file of CSV or TXT typeFile Functions
FileWriteArrayWrites arrays of any type except for string into a file of BIN typeFile Functions
FileWriteDoubleWrites value of the double type from the current position of a file pointer into a binary fileFile Functions
FileWriteFloatWrites value of the float type from the current position of a file pointer into a binary fileFile Functions
FileWriteIntegerWrites value of the int type from the current position of a file pointer into a binary fileFile Functions
FileWriteLongWrites value of the long type from the current position of a file pointer into a binary fileFile Functions
FileWriteStringWrites the value of a string parameter into a BIN or TXT file starting from the current position of the file pointerFile Functions
FileWriteStructWrites the contents of a structure passed as a parameter into a binary file, starting from the current position of the file pointerFile Functions
floorReturns integer numeric value closest from belowMath Functions
fmaxReturns the maximal value of the two numeric valuesMath Functions
fminReturns the minimal value of the two numeric valuesMath Functions
fmodReturns the real remainder after the division of two numbersMath Functions
FolderCleanDeletes all files in the specified folderFile Functions
FolderCreateCreates a folder in the Files directoryFile Functions
FolderDeleteRemoves a selected directory. If the folder is not empty, then it can’t be removedFile Functions
GetLastErrorReturns the last errorCheckup
GetPointerReturns the object pointerCommon Functions
GetTickCountReturns the number of milliseconds that have elapsed since the system was startedCommon Functions
GlobalVariableCheckChecks the existence of a global variable with the specified nameGlobal Variables of the Terminal
GlobalVariableDelDeletes a global variableGlobal Variables of the Terminal
GlobalVariableGetReturns the value of a global variableGlobal Variables of the Terminal
GlobalVariableNameReturns the name of a global variable by it’s ordinal number in the list of global variablesGlobal Variables of the Terminal
GlobalVariablesDeleteAllDeletes global variables with the specified prefix in their namesGlobal Variables of the Terminal
GlobalVariableSetSets the new value to a global variableGlobal Variables of the Terminal
GlobalVariableSetOnConditionSets the new value of the existing global variable by conditionGlobal Variables of the Terminal
GlobalVariablesFlushForcibly saves contents of all global variables to a diskGlobal Variables of the Terminal
GlobalVariablesTotalReturns the total number of global variablesGlobal Variables of the Terminal
GlobalVariableTempSets the new value to a global variable, that exists only in the current session of the terminalGlobal Variables of the Terminal
GlobalVariableTimeReturns time of the last accessing the global variableGlobal Variables of the Terminal
HideTestIndicatorsThe function sets a flag hiding indicators called by the Expert AdvisorCustom Indicators
HourReturns the hour of the last known server time by the moment of the program startDate and Time
iACAccelerator OscillatorTechnical Indicators
iADAccumulation/DistributionTechnical Indicators
iADXAverage Directional IndexTechnical Indicators
iAlligatorAlligatorTechnical Indicators
iAOAwesome OscillatorTechnical Indicators
iATRAverage True RangeTechnical Indicators
iBandsBollinger Bands®Technical Indicators
iBandsOnArrayCalculation of Bollinger Bands® indicator on data, stored in a numeric arrayTechnical Indicators
iBarsReturns the number of bars on the specified chartTimeseries and Indicators Access
iBarShiftReturns the index of the bar which covers the specified timeTimeseries and Indicators Access
iBearsPowerBears PowerTechnical Indicators
iBullsPowerBulls PowerTechnical Indicators
iBWMFIMarket Facilitation Index by Bill WilliamsTechnical Indicators
iCCICommodity Channel IndexTechnical Indicators
iCCIOnArrayCalculation of Commodity Channel Index indicator on data, stored in a numeric arrayTechnical Indicators
iCloseReturns Close price value for the bar of specified symbol with timeframe and shiftTimeseries and Indicators Access
iCustomCustom indicatorTechnical Indicators
iDeMarkerDeMarkerTechnical Indicators
iEnvelopesEnvelopesTechnical Indicators
iEnvelopesOnArrayCalculation of Envelopes indicator on data, stored in a numeric arrayTechnical Indicators
iForceForce IndexTechnical Indicators
iFractalsFractalsTechnical Indicators
iGatorGator OscillatorTechnical Indicators
iHighReturns High price value for the bar of specified symbol with timeframe and shiftTimeseries and Indicators Access
iHighestReturns the shift of the maximum value over a specific number of barsTimeseries and Indicators Access
iIchimokuIchimoku Kinko HyoTechnical Indicators
iLowReturns Low price value for the bar of indicated symbol with timeframe and shiftTimeseries and Indicators Access
iLowestReturns the shift of the lowest value over a specific number of barsTimeseries and Indicators Access
iMAMoving AverageTechnical Indicators
iMACDMoving Averages Convergence-DivergenceTechnical Indicators
iMAOnArrayCalculation of Moving Average indicator on data, stored in a numeric arrayTechnical Indicators
iMFIMoney Flow IndexTechnical Indicators
iMomentumMomentumTechnical Indicators
iMomentumOnArrayCalculation of Momentum indicator on data, stored in a numeric arrayTechnical Indicators
IndicatorBuffersAllocates memory for buffers used for custom indicator calculationsCustom Indicators
IndicatorCountedReturns the amount of bars not changed after the indicator had been launched lastCustom Indicators
IndicatorDigitsSets precision format to visualize indicator valuesCustom Indicators
IndicatorSetDoubleSets the value of an indicator property of the double typeCustom Indicators
IndicatorSetIntegerSets the value of an indicator property of the int typeCustom Indicators
IndicatorSetStringSets the value of an indicator property of the string typeCustom Indicators
IndicatorShortNameSets the “short” name of a custom indicator to be shown in the DataWindow and in the chart subwindowCustom Indicators
IntegerToStringConverting int into a string of preset lengthConversion Functions
iOBVOn Balance VolumeTechnical Indicators
iOpenReturns Open price value for the bar of specified symbol with timeframe and shiftTimeseries and Indicators Access
iOsMAMoving Average of Oscillator (MACD histogram)Technical Indicators
iRSIRelative Strength IndexTechnical Indicators
iRSIOnArrayCalculation of Momentum indicator on data, stored in a numeric arrayTechnical Indicators
iRVIRelative Vigor IndexTechnical Indicators
iSARParabolic Stop And Reverse SystemTechnical Indicators
IsConnectedChecks connection between client terminal and serverCheckup
IsDemoChecks if the Expert Advisor runs on a demo accountCheckup
IsDllsAllowedChecks if the DLL function call is allowed for the Expert AdvisorCheckup
IsExpertEnabledChecks if Expert Advisors are enabled for runningCheckup
IsLibrariesAllowedChecks if the Expert Advisor can call library functionCheckup
IsOptimizationChecks if Expert Advisor runs in the Strategy Tester optimization modeCheckup
IsStoppedReturns true, if an mql4 program has been commanded to stop its operationCheckup
iStdDevStandard DeviationTechnical Indicators
iStdDevOnArrayCalculation of Standard Deviation indicator on data, stored in a numeric arrayTechnical Indicators
IsTestingChecks if the Expert Advisor runs in the testing modeCheckup
iStochasticStochastic OscillatorTechnical Indicators
IsTradeAllowedChecks if the Expert Advisor is allowed to trade and trading context is not busyCheckup
IsTradeContextBusyReturns the information about trade contextCheckup
IsVisualModeChecks if the Expert Advisor is tested in visual modeCheckup
iTimeReturns time value for the bar of specified symbol with timeframe and shiftTimeseries and Indicators Access
iVolumeReturns Tick Volume value for the bar of specified symbol with timeframe and shiftTimeseries and Indicators Access
iWPRWilliams’ Percent RangeTechnical Indicators
logReturns natural logarithmMath Functions
log10Returns the logarithm of a number by base 10Math Functions
MarketInfoReturns various data about securities listed in the “Market Watch” windowMarket Info
MathAbsReturns absolute value (modulus) of the specified numeric valueMath Functions
MathArccosReturns the arc cosine of x in radiansMath Functions
MathArcsinReturns the arc sine of x in radiansMath Functions
MathArctanReturns the arc tangent of x in radiansMath Functions
MathCeilReturns integer numeric value closest from aboveMath Functions
MathCosReturns the cosine of a numberMath Functions
MathExpReturns exponent of a numberMath Functions
MathFloorReturns integer numeric value closest from belowMath Functions
MathIsValidNumberChecks the correctness of a real numberMath Functions
MathLogReturns natural logarithmMath Functions
MathLog10Returns the logarithm of a number by base 10Math Functions
MathMaxReturns the maximal value of the two numeric valuesMath Functions
MathMinReturns the minimal value of the two numeric valuesMath Functions
MathModReturns the real remainder after the division of two numbersMath Functions
MathPowRaises the base to the specified powerMath Functions
MathRandReturns a pseudorandom value within the range of 0 to 32767Math Functions
MathRoundRounds of a value to the nearest integerMath Functions
MathSinReturns the sine of a numberMath Functions
MathSqrtReturns a square rootMath Functions
MathSrandSets the starting point for generating a series of pseudorandom integersMath Functions
MathTanReturns the tangent of a numberMath Functions
MessageBoxCreates, displays a message box and manages itCommon Functions
MinuteReturns the current minute of the last known server time by the moment of the program startDate and Time
MonthReturns the current month as number, i.e., the number of month of the last known server timeDate and Time
MQLInfoIntegerReturns an integer value of a corresponding property of a running mql4 programCheckup
MQLInfoStringReturns a string value of a corresponding property of a running mql4 programCheckup
MQLSetIntegerSets the value of the MQL_CODEPAGE property in an MQL4 program environmentCheckup
NormalizeDoubleRounding of a floating point number to a specified accuracyConversion Functions
ObjectCreateCreates an object of the specified type in a specified chartObject Functions
ObjectDeleteRemoves the object having the specified nameObject Functions
ObjectDescriptionReturns the object descriptionObject Functions
ObjectFindSearches for an object having the specified nameObject Functions
ObjectGetReturns the value of the specified object propertyObject Functions
ObjectGetDoubleReturns the double value of the corresponding object propertyObject Functions
ObjectGetFiboDescriptionReturns the level description of a Fibonacci objectObject Functions
ObjectGetIntegerReturns the integer value of the corresponding object propertyObject Functions
ObjectGetShiftByValueCalculates and returns bar index for the given priceObject Functions
ObjectGetStringReturns the string value of the corresponding object propertyObject Functions
ObjectGetTimeByValueReturns the time value for the specified object price valueObject Functions
ObjectGetValueByShiftCalculates and returns the price value for the specified barObject Functions
ObjectGetValueByTimeReturns the price value of an object for the specified timeObject Functions
ObjectMoveChanges the coordinates of the specified object anchor pointObject Functions
ObjectNameReturns the name of an object by its index in the objects listObject Functions
ObjectsDeleteAllRemoves all objects of the specified type from the specified chart subwindowObject Functions
ObjectSetChanges the value of the specified object propertyObject Functions
ObjectSetDoubleSets the value of the corresponding object propertyObject Functions
ObjectSetFiboDescriptionSets a new description to a level of a Fibonacci objectObject Functions
ObjectSetIntegerSets the value of the corresponding object propertyObject Functions
ObjectSetStringSets the value of the corresponding object propertyObject Functions
ObjectSetTextChanges the object descriptionObject Functions
ObjectsTotalReturns the number of objects of the specified typeObject Functions
ObjectTypeReturns the object typeObject Functions
OrderCloseCloses opened orderTrade Functions
OrderCloseByCloses an opened order by another opposite opened orderTrade Functions
OrderClosePriceReturns close price of the currently selected orderTrade Functions
OrderCloseTimeReturns close time of the currently selected orderTrade Functions
OrderCommentReturns comment of the currently selected orderTrade Functions
OrderCommissionReturns calculated commission of the currently selected orderTrade Functions
OrderDeleteDeletes previously opened pending orderTrade Functions
OrderExpirationReturns expiration date of the selected pending orderTrade Functions
OrderLotsReturns amount of lots of the selected orderTrade Functions
OrderMagicNumberReturns an identifying (magic) number of the currently selected orderTrade Functions
OrderModifyModification of characteristics of the previously opened or pending ordersTrade Functions
OrderOpenPriceReturns open price of the currently selected orderTrade Functions
OrderOpenTimeReturns open time of the currently selected orderTrade Functions
OrderPrintPrints information about the selected order in the logTrade Functions
OrderProfitReturns profit of the currently selected orderTrade Functions
OrderSelectThe function selects an order for further processingTrade Functions
OrderSendThe main function used to open an order or place a pending orderTrade Functions
OrdersHistoryTotalReturns the number of closed orders in the account history loaded into the terminalTrade Functions
OrderStopLossReturns stop loss value of the currently selected orderTrade Functions
OrdersTotalReturns the number of market and pending ordersTrade Functions
OrderSwapReturns swap value of the currently selected orderTrade Functions
OrderSymbolReturns symbol name of the currently selected orderTrade Functions
OrderTakeProfitReturns take profit value of the currently selected orderTrade Functions
OrderTicketReturns ticket number of the currently selected orderTrade Functions
OrderTypeReturns order operation type of the currently selected orderTrade Functions
PeriodReturns the current chart timeframeCheckup
PeriodReturns timeframe of the current chartChart Operations
PeriodSecondsReturns the number of seconds in the periodCommon Functions
PlaySoundPlays a sound fileCommon Functions
PointReturns the point size of the current symbol in the quote currencyCheckup
powRaises the base to the specified powerMath Functions
PrintDisplays a message in the logCommon Functions
PrintFormatFormats and prints the sets of symbols and values in a log file in accordance with a preset formatCommon Functions
randReturns a pseudorandom value within the range of 0 to 32767Math Functions
RefreshRatesRefreshing of data in pre-defined variables and series arraysTimeseries and Indicators Access
ResetLastErrorSets the value of a predetermined variable _LastError to zeroCommon Functions
ResourceCreateCreates an image resource based on a data setCommon Functions
ResourceFreeDeletes dynamically created resource (freeing the memory allocated for it)Common Functions
ResourceReadImageReads data from the graphical resource created by ResourceCreate() function or saved in EX4 file during compilationCommon Functions
ResourceSaveSaves a resource into the specified fileCommon Functions
roundRounds of a value to the nearest integerMath Functions
SecondsReturns the amount of seconds elapsed from the beginning of the current minute of the last known server time by the moment of the program startDate and Time
SendFTPSends a file at the address specified in the settings window of the “FTP” tabCommon Functions
SendMailSends an email at the address specified in the settings window of the “Email” tabCommon Functions
SendNotificationSends push notifications to mobile terminals, whose MetaQuotes ID are specified in the “Notifications” tabCommon Functions
SeriesInfoIntegerReturns information about the state of historical dataTimeseries and Indicators Access
SetIndexArrowSets an arrow symbol for indicators line of the DRAW_ARROW typeCustom Indicators
SetIndexBufferBinds the specified indicator buffer with one-dimensional dynamic array of the double typeCustom Indicators
SetIndexDrawBeginSets the bar number from which the drawing of the given indicator line must startCustom Indicators
SetIndexEmptyValueSets drawing line empty valueCustom Indicators
SetIndexLabelSets drawing line description for showing in the DataWindow and in the tooltipCustom Indicators
SetIndexShiftSets offset for the drawing lineCustom Indicators
SetIndexStyleSets the new type, style, width and color for a given indicator lineCustom Indicators
SetLevelStyleSets a new style, width and color of horizontal levels of indicator to be output in a separate windowCustom Indicators
SetLevelValueSets a value for a given horizontal level of the indicator to be output in a separate windowCustom Indicators
ShortArrayToStringCopying array part into a stringConversion Functions
ShortToStringConverting symbol code (unicode) into one-symbol stringConversion Functions
SignalBaseGetDoubleReturns the value of double type property for selected signalTrade Signals
SignalBaseGetIntegerReturns the value of integer type property for selected signalTrade Signals
SignalBaseGetStringReturns the value of string type property for selected signalTrade Signals
SignalBaseSelectSelects a signal from signals, available in terminal for further working with itTrade Signals
SignalBaseTotalReturns the total amount of signals, available in terminalTrade Signals
SignalInfoGetDoubleReturns the value of double type property of signal copy settingsTrade Signals
SignalInfoGetIntegerReturns the value of integer type property of signal copy settingsTrade Signals
SignalInfoGetStringReturns the value of string type property of signal copy settingsTrade Signals
SignalInfoSetDoubleSets the value of double type property of signal copy settingsTrade Signals
SignalInfoSetIntegerSets the value of integer type property of signal copy settingsTrade Signals
SignalSubscribeSubscribes to the trading signalTrade Signals
SignalUnsubscribeCancels subscriptionTrade Signals
sinReturns the sine of a numberMath Functions
SleepSuspends execution of the current Expert Advisor or script within a specified intervalCommon Functions
sqrtReturns a square rootMath Functions
srandSets the starting point for generating a series of pseudorandom integersMath Functions
StringAddAdds a string to the end of another stringString Functions
StringBufferLenReturns the size of buffer allocated for the stringString Functions
StringCompareCompares two strings and returns 1 if the first string is greater than the second; 0 - if the strings are equal; -1 (minus 1) - if the first string is less than the second oneString Functions
StringConcatenateForms a string of parameters passedString Functions
StringFillFills out a specified string by selected symbolsString Functions
StringFindSearch for a substring in a stringString Functions
StringFormatConverting number into string according to preset formatConversion Functions
StringGetCharReturns character (code) from the specified position in the stringString Functions
StringGetCharacterReturns the value of a number located in the specified string positionString Functions
StringInitInitializes string by specified symbols and provides the specified string lengthString Functions
StringLenReturns the number of symbols in a stringString Functions
StringReplaceReplaces all the found substrings of a string by a set sequence of symbolsString Functions
StringSetCharReturns the string copy with changed character in the specified positionString Functions
StringSetCharacterReturns true is a symbol is successfully inserted to the passed string.String Functions
StringSplitGets substrings by a specified separator from the specified string, returns the number of substrings obtainedString Functions
StringSubstrExtracts a substring from a text string starting from a specified positionString Functions
StringToCharArraySymbol-wise copying a string converted from Unicode to ANSI, to a selected place of array of uchar typeConversion Functions
StringToColorConverting “R,G,B” string or string with color name into color type valueConversion Functions
StringToDoubleConverting a string containing a symbol representation of number into number of double typeConversion Functions
StringToIntegerConverting a string containing a symbol representation of number into number of int typeConversion Functions
StringToLowerTransforms all symbols of a selected string to lowercase by locationString Functions
StringToShortArraySymbol-wise copying a string to a selected part of array of ushort typeConversion Functions
StringToTimeConverting a string containing time or date in “yyyy.mm.dd [hh:mi]” format into datetime typeConversion Functions
StringToUpperTransforms all symbols of a selected string into capitals by locationString Functions
StringTrimLeftCuts line feed characters, spaces and tabs in the left part of the stringString Functions
StringTrimRightCuts line feed characters, spaces and tabs in the right part of the stringString Functions
StrToDoubleConverts string representation of number to double typeConversion Functions
StrToIntegerConverts string containing the value character representation into a value of the integer typeConversion Functions
StrToTimeConverts string in the format “yyyy.mm.dd hh:mi” to datetime typeConversion Functions
StructToTimeConverts a variable of MqlDateTime structure type into a datetime valueDate and Time
SymbolReturns the name of a symbol of the current chartCheckup
SymbolReturns a text string with the name of the current financial instrumentChart Operations
SymbolInfoDoubleReturns the double value of the symbol for the corresponding propertyMarket Info
SymbolInfoIntegerReturns a value of an integer type (long, datetime, int or bool) of a specified symbol for the corresponding propertyMarket Info
SymbolInfoSessionQuoteAllows receiving time of beginning and end of the specified quoting sessions for a specified symbol and day of week.Market Info
SymbolInfoSessionTradeAllows receiving time of beginning and end of the specified trading sessions for a specified symbol and day of week.Market Info
SymbolInfoStringReturns a value of the string type of a specified symbol for the corresponding propertyMarket Info
SymbolInfoTickReturns the current prices for the specified symbol in a variable of the MqlTick typeMarket Info
SymbolNameReturns the name of a specified symbolMarket Info
SymbolSelectSelects a symbol in the Market Watch window or removes a symbol from the windowMarket Info
SymbolsTotalReturns the number of available (selected in Market Watch or all) symbolsMarket Info
tanReturns the tangent of a numberMath Functions
TerminalCloseCommands the terminal to complete operationCommon Functions
TerminalCompanyReturns the name of company owning the client terminalCheckup
TerminalInfoDoubleReturns an double value of a corresponding property of a running mql4 programCheckup
TerminalInfoIntegerReturns an integer value of a corresponding property of a running mql4 programCheckup
TerminalInfoStringReturns a string value of a corresponding property of a running mql4 programCheckup
TerminalNameReturns client terminal nameCheckup
TerminalPathReturns the directory, from which the client terminal was launchedCheckup
TesterStatisticsIt returns the value of a specified statistic calculated based on testing resultsCommon Functions
TextGetSizeReturns the string’s width and height at the current font settingsObject Functions
TextOutTransfers the text to the custom array (buffer) designed for creation of a graphical resourceObject Functions
TextSetFontSets the font for displaying the text using drawing methods (Arial 20 used by default)Object Functions
TimeCurrentReturns the last known server time (time of the last quote receipt) in the datetime formatDate and Time
TimeDayReturns the day of month of the specified dateDate and Time
TimeDaylightSavingsReturns the sign of Daylight Saving Time switchDate and Time
TimeDayOfWeekReturns the zero-based day of week of the specified dateDate and Time
TimeDayOfYearReturns the day of year of the specified dateDate and Time
TimeGMTReturns GMT in datetime format with the Daylight Saving Time by local time of the computer, where the client terminal is runningDate and Time
TimeGMTOffsetReturns the current difference between GMT time and the local computer time in seconds, taking into account DST switchDate and Time
TimeHourReturns the hour of the specified timeDate and Time
TimeLocalReturns the local computer time in datetime formatDate and Time
TimeMinuteReturns the minute of the specified timeDate and Time
TimeMonthReturns the month number of the specified timeDate and Time
TimeSecondsReturns the amount of seconds elapsed from the beginning of the minute of the specified timeDate and Time
TimeToStrConverts value of datetime type into a string of “yyyy.mm.dd hh:mi” formatConversion Functions
TimeToStringConverting a value containing time in seconds elapsed since 01.01.1970 into a string of “yyyy.mm.dd hh:mi” formatConversion Functions
TimeToStructConverts a datetime value into a variable of MqlDateTime structure typeDate and Time
TimeYearReturns year of the specified dateDate and Time
UninitializeReasonReturns the code of the reason for deinitializationCheckup
WebRequestSends HTTP request to the specified serverCommon Functions
WindowBarsPerChartReturns the amount of bars visible on the chartChart Operations
WindowExpertNameReturns the name of the executed Expert Advisor, script, custom indicator, or libraryChart Operations
WindowFindReturns the window index containing this specified indicatorChart Operations
WindowFirstVisibleBarReturns index of the first visible bar in the current chart windowChart Operations
WindowHandleReturns the system handle of the chart windowChart Operations
WindowIsVisibleReturns the visibility flag of the chart subwindowChart Operations
WindowOnDroppedReturns the window index where Expert Advisor, custom indicator or script was droppedChart Operations
WindowPriceMaxReturns the maximal value of the vertical scale of the specified subwindow of the current chartChart Operations
WindowPriceMinReturns the minimal value of the vertical scale of the specified subwindow of the current chartChart Operations
WindowPriceOnDroppedReturns the price of the chart point where Expert Advisor or script was droppedChart Operations
WindowRedrawRedraws the current chart forcedlyChart Operations
WindowScreenShotSaves current chart screen shot as a GIF, PNG or BMP file depending on specified extensionChart Operations
WindowsTotalReturns total number of indicator windows on the chartChart Operations
WindowTimeOnDroppedReturns the time of the chart point where Expert Advisor or script was droppedChart Operations
WindowXOnDroppedReturns the value at X axis in pixels for the chart window client area point at which the Expert Advisor or script was droppedChart Operations
WindowYOnDroppedReturns the value at Y axis in pixels for the chart window client area point at which the Expert Advisor or script was droppedChart Operations
YearReturns the current year, i.e., the year of the last known server timeDate and Time
ZeroMemoryResets a variable passed to it by reference. The variable can be of any type, except for classes and structures that have constructors.Common Functions
Last updated on