List of MQL4 Functions
List of MQL4 Functions
All MQL4 functions in alphabetical order.
| Function | Action | Section |
|---|---|---|
| AccountBalance | Returns balance value of the current account | Account Information |
| AccountCompany | Returns the brokerage company name where the current account was registered | Account Information |
| AccountCredit | Returns credit value of the current account | Account Information |
| AccountCurrency | Returns currency name of the current account | Account Information |
| AccountEquity | Returns equity value of the current account | Account Information |
| AccountFreeMargin | Returns free margin value of the current account | Account Information |
| AccountFreeMarginCheck | Returns free margin that remains after the specified position has been opened at the current price on the current account | Account Information |
| AccountFreeMarginMode | Calculation mode of free margin allowed to open orders on the current account | Account Information |
| AccountInfoDouble | Returns a value of double type of the corresponding account property | Account Information |
| AccountInfoInteger | Returns a value of integer type (bool, int or long) of the corresponding account property | Account Information |
| AccountInfoString | Returns a value string type corresponding account property | Account Information |
| AccountLeverage | Returns leverage of the current account | Account Information |
| AccountMargin | Returns margin value of the current account | Account Information |
| AccountName | Returns the current account name | Account Information |
| AccountNumber | Returns the current account number | Account Information |
| AccountProfit | Returns profit value of the current account | Account Information |
| AccountServer | Returns the connected server name | Account Information |
| AccountStopoutLevel | Returns the value of the Stop Out level | Account Information |
| AccountStopoutMode | Returns the calculation mode for the Stop Out level | Account Information |
| acos | Returns the arc cosine of x in radians | Math Functions |
| Alert | Displays a message in a separate window | Common Functions |
| ArrayBsearch | Returns index of the first found element in the first array dimension | Array Functions |
| ArrayCompare | Returns the result of comparing two arrays of simple types or custom structures without complex objects | Array Functions |
| ArrayCopy | Copies one array into another | Array Functions |
| ArrayCopyRates | Copies rates to the two-dimensional array from chart RateInfo array returns copied bars amount | Array Functions |
| ArrayCopySeries | Copies a series array to another one and returns the count of the copied elements | Array Functions |
| ArrayDimension | Returns the multidimensional array rank | Array Functions |
| ArrayFill | Fills an array with the specified value | Array Functions |
| ArrayFree | Frees up buffer of any dynamic array and sets the size of the zero dimension in 0. | Array Functions |
| ArrayGetAsSeries | Checks direction of array indexing | Array Functions |
| ArrayInitialize | Sets all elements of a numeric array into a single value | Array Functions |
| ArrayIsDynamic | Checks whether an array is dynamic | Array Functions |
| ArrayIsSeries | Checks whether an array is a timeseries | Array Functions |
| ArrayMaximum | Search for an element with the maximal value | Array Functions |
| ArrayMinimum | Search for an element with the minimal value | Array Functions |
| ArrayRange | Returns the number of elements in the specified dimension of the array | Array Functions |
| ArrayResize | Sets the new size in the first dimension of the array | Array Functions |
| ArraySetAsSeries | Sets the direction of array indexing | Array Functions |
| ArraySize | Returns the number of elements in the array | Array Functions |
| ArraySort | Sorting of numeric arrays by the first dimension | Array Functions |
| asin | Returns the arc sine of x in radians | Math Functions |
| atan | Returns the arc tangent of x in radians | Math Functions |
| Bars | Returns the number of bars count in the history for a specified symbol and period | Timeseries and Indicators Access |
| ceil | Returns integer numeric value closest from above | Math Functions |
| CharArrayToString | Converting symbol code (ansi) into one-symbol array | Conversion Functions |
| ChartApplyTemplate | Applies a specific template from a specified file to the chart | Chart Operations |
| ChartClose | Closes the specified chart | Chart Operations |
| ChartFirst | Returns the ID of the first chart of the client terminal | Chart Operations |
| ChartGetDouble | Returns the double value property of the specified chart | Chart Operations |
| ChartGetInteger | Returns the integer value property of the specified chart | Chart Operations |
| ChartGetString | Returns the string value property of the specified chart | Chart Operations |
| ChartID | Returns the ID of the current chart | Chart Operations |
| ChartIndicatorDelete | Removes an indicator with a specified name from the specified chart window | Chart Operations |
| ChartIndicatorName | Returns the short name of the indicator by the number in the indicators list on the specified chart window | Chart Operations |
| ChartIndicatorsTotal | Returns the number of all indicators applied to the specified chart window. | Chart Operations |
| ChartNavigate | Performs shift of the specified chart by the specified number of bars relative to the specified position in the chart | Chart Operations |
| ChartNext | Returns the chart ID of the chart next to the specified one | Chart Operations |
| ChartOpen | Opens a new chart with the specified symbol and period | Chart Operations |
| CharToStr | Conversion of the symbol code into a one-character string | Conversion Functions |
| CharToString | Converting a symbol code into a one-character string | Conversion Functions |
| ChartPeriod | Returns the period value of the specified chart | Chart Operations |
| ChartPriceOnDropped | Returns the price coordinate of the chart point, the Expert Advisor or script has been dropped to | Chart Operations |
| ChartRedraw | Calls a forced redrawing of a specified chart | Chart Operations |
| ChartSaveTemplate | Saves current chart settings in a template with a specified name | Chart Operations |
| ChartScreenShot | Provides a screenshot of the chart of its current state in a gif format | Chart Operations |
| ChartSetDouble | Sets the double value for a corresponding property of the specified chart | Chart Operations |
| ChartSetInteger | Sets the integer value (datetime, int, color, bool or char) for a corresponding property of the specified chart | Chart Operations |
| ChartSetString | Sets the string value for a corresponding property of the specified chart | Chart Operations |
| ChartSetSymbolPeriod | Changes the symbol value and a period of the specified chart | Chart Operations |
| ChartSymbol | Returns the symbol name of the specified chart | Chart Operations |
| ChartTimeOnDropped | Returns the time coordinate of the chart point, the Expert Advisor or script has been dropped to | Chart Operations |
| ChartTimePriceToXY | Converts the coordinates of a chart from the time/price representation to the X and Y coordinates | Chart Operations |
| ChartWindowFind | Returns the number of a subwindow where an indicator is drawn | Chart Operations |
| ChartWindowOnDropped | Returns the number (index) of the chart subwindow, the Expert Advisor or script has been dropped to | Chart Operations |
| ChartXOnDropped | Returns the X coordinate of the chart point, the Expert Advisor or script has been dropped to | Chart Operations |
| ChartXYToTimePrice | Converts the X and Y coordinates on a chart to the time and price values | Chart Operations |
| ChartYOnDropped | Returns the Y coordinate of the chart point, the Expert Advisor or script has been dropped to | Chart Operations |
| CheckPointer | Returns the type of the object pointer | Common Functions |
| ColorToARGB | Converting color type to uint type to receive ARGB representation of the color. | Conversion Functions |
| ColorToString | Converting color value into string as “R,G,B” | Conversion Functions |
| Comment | Outputs a comment in the left top corner of the chart | Common Functions |
| CopyClose | Gets history data on bar closing price for a specified symbol and period into an array | Timeseries and Indicators Access |
| CopyHigh | Gets history data on maximal bar price for a specified symbol and period into an array | Timeseries and Indicators Access |
| CopyLow | Gets history data on minimal bar price for a specified symbol and period into an array | Timeseries and Indicators Access |
| CopyOpen | Gets history data on bar opening price for a specified symbol and period into an array | Timeseries and Indicators Access |
| CopyRates | Gets history data of the Rates structure for a specified symbol and period into an array | Timeseries and Indicators Access |
| CopyTickVolume | Gets history data on tick volumes for a specified symbol and period into an array | Timeseries and Indicators Access |
| CopyTime | Gets history data on bar opening time for a specified symbol and period into an array | Timeseries and Indicators Access |
| cos | Returns the cosine of a number | Math Functions |
| CryptDecode | Performs the inverse transformation of the data from array | Common Functions |
| CryptEncode | Transforms the data from array with the specified method | Common Functions |
| Day | Returns the current day of the month, i.e., the day of month of the last known server time | Date and Time |
| DayOfWeek | Returns the current zero-based day of the week of the last known server time | Date and Time |
| DayOfYear | Returns the current day of the year i.e., the day of year of the last known server time | Date and Time |
| DebugBreak | Program breakpoint in debugging | Common Functions |
| Digits | Returns the number of decimal digits determining the accuracy of the price value of the current chart symbol | Checkup |
| DoubleToStr | Returns text string with the specified numerical value converted into a specified precision format | Conversion Functions |
| DoubleToString | Converting a numeric value to a text line with a specified accuracy | Conversion Functions |
| EnumToString | Converting an enumeration value of any type to string | Conversion Functions |
| EventChartCustom | Generates a custom event for the specified chart | Working with Events |
| EventKillTimer | Stops the generation of events by the timer in the current chart | Working with Events |
| EventSetMillisecondTimer | Launches event generator of the high-resolution timer with a period less than 1 second for the current chart | Working with Events |
| EventSetTimer | Starts the timer event generator with the specified periodicity for the current chart | Working with Events |
| exp | Returns exponent of a number | Math Functions |
| ExpertRemove | Stops Expert Advisor and unloads it from the chart | Common Functions |
| fabs | Returns absolute value (modulus) of the specified numeric value | Math Functions |
| FileClose | Closes a previously opened file | File Functions |
| FileCopy | Copies the original file from a local or shared folder to another file | File Functions |
| FileDelete | Deletes a specified file | File Functions |
| FileFindClose | Closes search handle | File Functions |
| FileFindFirst | Starts the search of files in a directory in accordance with the specified filter | File Functions |
| FileFindNext | Continues the search started by the FileFindFirst() function | File Functions |
| FileFlush | Writes to a disk all data remaining in the input/output file buffer | File Functions |
| FileGetInteger | Gets an integer property of a file | File Functions |
| FileIsEnding | Defines the end of a file in the process of reading | File Functions |
| FileIsExist | Checks the existence of a file | File Functions |
| FileIsLineEnding | Defines the end of a line in a text file in the process of reading | File Functions |
| FileMove | Moves or renames a file | File Functions |
| FileOpen | Opens a file with a specified name and flag | File Functions |
| FileOpenHistory | Opens file in the current history directory or in its subfolders | File Functions |
| FileReadArray | Reads arrays of any type except for string from the file of the BIN type | File Functions |
| FileReadBool | Reads 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 type | File Functions |
| FileReadDatetime | Reads 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 value | File Functions |
| FileReadDouble | Reads a double value from the current position of the file pointer | File Functions |
| FileReadFloat | Reads a float value from the current position of the file pointer | File Functions |
| FileReadInteger | Reads int, short or char value from the current position of the file pointer | File Functions |
| FileReadLong | Reads a long type value from the current position of the file pointer | File Functions |
| FileReadNumber | Reads 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 value | File Functions |
| FileReadString | Reads a string from the current position of a file pointer from a file | File Functions |
| FileReadStruct | Reads the contents from a binary file into a structure passed as a parameter, from the current position of the file pointer | File Functions |
| FileSeek | Moves the position of the file pointer by a specified number of bytes relative to the specified position | File Functions |
| FileSize | Returns the size of a corresponding open file | File Functions |
| FileTell | Returns the current position of the file pointer of a corresponding open file | File Functions |
| FileWrite | Writes data to a file of CSV or TXT type | File Functions |
| FileWriteArray | Writes arrays of any type except for string into a file of BIN type | File Functions |
| FileWriteDouble | Writes value of the double type from the current position of a file pointer into a binary file | File Functions |
| FileWriteFloat | Writes value of the float type from the current position of a file pointer into a binary file | File Functions |
| FileWriteInteger | Writes value of the int type from the current position of a file pointer into a binary file | File Functions |
| FileWriteLong | Writes value of the long type from the current position of a file pointer into a binary file | File Functions |
| FileWriteString | Writes the value of a string parameter into a BIN or TXT file starting from the current position of the file pointer | File Functions |
| FileWriteStruct | Writes the contents of a structure passed as a parameter into a binary file, starting from the current position of the file pointer | File Functions |
| floor | Returns integer numeric value closest from below | Math Functions |
| fmax | Returns the maximal value of the two numeric values | Math Functions |
| fmin | Returns the minimal value of the two numeric values | Math Functions |
| fmod | Returns the real remainder after the division of two numbers | Math Functions |
| FolderClean | Deletes all files in the specified folder | File Functions |
| FolderCreate | Creates a folder in the Files directory | File Functions |
| FolderDelete | Removes a selected directory. If the folder is not empty, then it can’t be removed | File Functions |
| GetLastError | Returns the last error | Checkup |
| GetPointer | Returns the object pointer | Common Functions |
| GetTickCount | Returns the number of milliseconds that have elapsed since the system was started | Common Functions |
| GlobalVariableCheck | Checks the existence of a global variable with the specified name | Global Variables of the Terminal |
| GlobalVariableDel | Deletes a global variable | Global Variables of the Terminal |
| GlobalVariableGet | Returns the value of a global variable | Global Variables of the Terminal |
| GlobalVariableName | Returns the name of a global variable by it’s ordinal number in the list of global variables | Global Variables of the Terminal |
| GlobalVariablesDeleteAll | Deletes global variables with the specified prefix in their names | Global Variables of the Terminal |
| GlobalVariableSet | Sets the new value to a global variable | Global Variables of the Terminal |
| GlobalVariableSetOnCondition | Sets the new value of the existing global variable by condition | Global Variables of the Terminal |
| GlobalVariablesFlush | Forcibly saves contents of all global variables to a disk | Global Variables of the Terminal |
| GlobalVariablesTotal | Returns the total number of global variables | Global Variables of the Terminal |
| GlobalVariableTemp | Sets the new value to a global variable, that exists only in the current session of the terminal | Global Variables of the Terminal |
| GlobalVariableTime | Returns time of the last accessing the global variable | Global Variables of the Terminal |
| HideTestIndicators | The function sets a flag hiding indicators called by the Expert Advisor | Custom Indicators |
| Hour | Returns the hour of the last known server time by the moment of the program start | Date and Time |
| iAC | Accelerator Oscillator | Technical Indicators |
| iAD | Accumulation/Distribution | Technical Indicators |
| iADX | Average Directional Index | Technical Indicators |
| iAlligator | Alligator | Technical Indicators |
| iAO | Awesome Oscillator | Technical Indicators |
| iATR | Average True Range | Technical Indicators |
| iBands | Bollinger Bands® | Technical Indicators |
| iBandsOnArray | Calculation of Bollinger Bands® indicator on data, stored in a numeric array | Technical Indicators |
| iBars | Returns the number of bars on the specified chart | Timeseries and Indicators Access |
| iBarShift | Returns the index of the bar which covers the specified time | Timeseries and Indicators Access |
| iBearsPower | Bears Power | Technical Indicators |
| iBullsPower | Bulls Power | Technical Indicators |
| iBWMFI | Market Facilitation Index by Bill Williams | Technical Indicators |
| iCCI | Commodity Channel Index | Technical Indicators |
| iCCIOnArray | Calculation of Commodity Channel Index indicator on data, stored in a numeric array | Technical Indicators |
| iClose | Returns Close price value for the bar of specified symbol with timeframe and shift | Timeseries and Indicators Access |
| iCustom | Custom indicator | Technical Indicators |
| iDeMarker | DeMarker | Technical Indicators |
| iEnvelopes | Envelopes | Technical Indicators |
| iEnvelopesOnArray | Calculation of Envelopes indicator on data, stored in a numeric array | Technical Indicators |
| iForce | Force Index | Technical Indicators |
| iFractals | Fractals | Technical Indicators |
| iGator | Gator Oscillator | Technical Indicators |
| iHigh | Returns High price value for the bar of specified symbol with timeframe and shift | Timeseries and Indicators Access |
| iHighest | Returns the shift of the maximum value over a specific number of bars | Timeseries and Indicators Access |
| iIchimoku | Ichimoku Kinko Hyo | Technical Indicators |
| iLow | Returns Low price value for the bar of indicated symbol with timeframe and shift | Timeseries and Indicators Access |
| iLowest | Returns the shift of the lowest value over a specific number of bars | Timeseries and Indicators Access |
| iMA | Moving Average | Technical Indicators |
| iMACD | Moving Averages Convergence-Divergence | Technical Indicators |
| iMAOnArray | Calculation of Moving Average indicator on data, stored in a numeric array | Technical Indicators |
| iMFI | Money Flow Index | Technical Indicators |
| iMomentum | Momentum | Technical Indicators |
| iMomentumOnArray | Calculation of Momentum indicator on data, stored in a numeric array | Technical Indicators |
| IndicatorBuffers | Allocates memory for buffers used for custom indicator calculations | Custom Indicators |
| IndicatorCounted | Returns the amount of bars not changed after the indicator had been launched last | Custom Indicators |
| IndicatorDigits | Sets precision format to visualize indicator values | Custom Indicators |
| IndicatorSetDouble | Sets the value of an indicator property of the double type | Custom Indicators |
| IndicatorSetInteger | Sets the value of an indicator property of the int type | Custom Indicators |
| IndicatorSetString | Sets the value of an indicator property of the string type | Custom Indicators |
| IndicatorShortName | Sets the “short” name of a custom indicator to be shown in the DataWindow and in the chart subwindow | Custom Indicators |
| IntegerToString | Converting int into a string of preset length | Conversion Functions |
| iOBV | On Balance Volume | Technical Indicators |
| iOpen | Returns Open price value for the bar of specified symbol with timeframe and shift | Timeseries and Indicators Access |
| iOsMA | Moving Average of Oscillator (MACD histogram) | Technical Indicators |
| iRSI | Relative Strength Index | Technical Indicators |
| iRSIOnArray | Calculation of Momentum indicator on data, stored in a numeric array | Technical Indicators |
| iRVI | Relative Vigor Index | Technical Indicators |
| iSAR | Parabolic Stop And Reverse System | Technical Indicators |
| IsConnected | Checks connection between client terminal and server | Checkup |
| IsDemo | Checks if the Expert Advisor runs on a demo account | Checkup |
| IsDllsAllowed | Checks if the DLL function call is allowed for the Expert Advisor | Checkup |
| IsExpertEnabled | Checks if Expert Advisors are enabled for running | Checkup |
| IsLibrariesAllowed | Checks if the Expert Advisor can call library function | Checkup |
| IsOptimization | Checks if Expert Advisor runs in the Strategy Tester optimization mode | Checkup |
| IsStopped | Returns true, if an mql4 program has been commanded to stop its operation | Checkup |
| iStdDev | Standard Deviation | Technical Indicators |
| iStdDevOnArray | Calculation of Standard Deviation indicator on data, stored in a numeric array | Technical Indicators |
| IsTesting | Checks if the Expert Advisor runs in the testing mode | Checkup |
| iStochastic | Stochastic Oscillator | Technical Indicators |
| IsTradeAllowed | Checks if the Expert Advisor is allowed to trade and trading context is not busy | Checkup |
| IsTradeContextBusy | Returns the information about trade context | Checkup |
| IsVisualMode | Checks if the Expert Advisor is tested in visual mode | Checkup |
| iTime | Returns time value for the bar of specified symbol with timeframe and shift | Timeseries and Indicators Access |
| iVolume | Returns Tick Volume value for the bar of specified symbol with timeframe and shift | Timeseries and Indicators Access |
| iWPR | Williams’ Percent Range | Technical Indicators |
| log | Returns natural logarithm | Math Functions |
| log10 | Returns the logarithm of a number by base 10 | Math Functions |
| MarketInfo | Returns various data about securities listed in the “Market Watch” window | Market Info |
| MathAbs | Returns absolute value (modulus) of the specified numeric value | Math Functions |
| MathArccos | Returns the arc cosine of x in radians | Math Functions |
| MathArcsin | Returns the arc sine of x in radians | Math Functions |
| MathArctan | Returns the arc tangent of x in radians | Math Functions |
| MathCeil | Returns integer numeric value closest from above | Math Functions |
| MathCos | Returns the cosine of a number | Math Functions |
| MathExp | Returns exponent of a number | Math Functions |
| MathFloor | Returns integer numeric value closest from below | Math Functions |
| MathIsValidNumber | Checks the correctness of a real number | Math Functions |
| MathLog | Returns natural logarithm | Math Functions |
| MathLog10 | Returns the logarithm of a number by base 10 | Math Functions |
| MathMax | Returns the maximal value of the two numeric values | Math Functions |
| MathMin | Returns the minimal value of the two numeric values | Math Functions |
| MathMod | Returns the real remainder after the division of two numbers | Math Functions |
| MathPow | Raises the base to the specified power | Math Functions |
| MathRand | Returns a pseudorandom value within the range of 0 to 32767 | Math Functions |
| MathRound | Rounds of a value to the nearest integer | Math Functions |
| MathSin | Returns the sine of a number | Math Functions |
| MathSqrt | Returns a square root | Math Functions |
| MathSrand | Sets the starting point for generating a series of pseudorandom integers | Math Functions |
| MathTan | Returns the tangent of a number | Math Functions |
| MessageBox | Creates, displays a message box and manages it | Common Functions |
| Minute | Returns the current minute of the last known server time by the moment of the program start | Date and Time |
| Month | Returns the current month as number, i.e., the number of month of the last known server time | Date and Time |
| MQLInfoInteger | Returns an integer value of a corresponding property of a running mql4 program | Checkup |
| MQLInfoString | Returns a string value of a corresponding property of a running mql4 program | Checkup |
| MQLSetInteger | Sets the value of the MQL_CODEPAGE property in an MQL4 program environment | Checkup |
| NormalizeDouble | Rounding of a floating point number to a specified accuracy | Conversion Functions |
| ObjectCreate | Creates an object of the specified type in a specified chart | Object Functions |
| ObjectDelete | Removes the object having the specified name | Object Functions |
| ObjectDescription | Returns the object description | Object Functions |
| ObjectFind | Searches for an object having the specified name | Object Functions |
| ObjectGet | Returns the value of the specified object property | Object Functions |
| ObjectGetDouble | Returns the double value of the corresponding object property | Object Functions |
| ObjectGetFiboDescription | Returns the level description of a Fibonacci object | Object Functions |
| ObjectGetInteger | Returns the integer value of the corresponding object property | Object Functions |
| ObjectGetShiftByValue | Calculates and returns bar index for the given price | Object Functions |
| ObjectGetString | Returns the string value of the corresponding object property | Object Functions |
| ObjectGetTimeByValue | Returns the time value for the specified object price value | Object Functions |
| ObjectGetValueByShift | Calculates and returns the price value for the specified bar | Object Functions |
| ObjectGetValueByTime | Returns the price value of an object for the specified time | Object Functions |
| ObjectMove | Changes the coordinates of the specified object anchor point | Object Functions |
| ObjectName | Returns the name of an object by its index in the objects list | Object Functions |
| ObjectsDeleteAll | Removes all objects of the specified type from the specified chart subwindow | Object Functions |
| ObjectSet | Changes the value of the specified object property | Object Functions |
| ObjectSetDouble | Sets the value of the corresponding object property | Object Functions |
| ObjectSetFiboDescription | Sets a new description to a level of a Fibonacci object | Object Functions |
| ObjectSetInteger | Sets the value of the corresponding object property | Object Functions |
| ObjectSetString | Sets the value of the corresponding object property | Object Functions |
| ObjectSetText | Changes the object description | Object Functions |
| ObjectsTotal | Returns the number of objects of the specified type | Object Functions |
| ObjectType | Returns the object type | Object Functions |
| OrderClose | Closes opened order | Trade Functions |
| OrderCloseBy | Closes an opened order by another opposite opened order | Trade Functions |
| OrderClosePrice | Returns close price of the currently selected order | Trade Functions |
| OrderCloseTime | Returns close time of the currently selected order | Trade Functions |
| OrderComment | Returns comment of the currently selected order | Trade Functions |
| OrderCommission | Returns calculated commission of the currently selected order | Trade Functions |
| OrderDelete | Deletes previously opened pending order | Trade Functions |
| OrderExpiration | Returns expiration date of the selected pending order | Trade Functions |
| OrderLots | Returns amount of lots of the selected order | Trade Functions |
| OrderMagicNumber | Returns an identifying (magic) number of the currently selected order | Trade Functions |
| OrderModify | Modification of characteristics of the previously opened or pending orders | Trade Functions |
| OrderOpenPrice | Returns open price of the currently selected order | Trade Functions |
| OrderOpenTime | Returns open time of the currently selected order | Trade Functions |
| OrderPrint | Prints information about the selected order in the log | Trade Functions |
| OrderProfit | Returns profit of the currently selected order | Trade Functions |
| OrderSelect | The function selects an order for further processing | Trade Functions |
| OrderSend | The main function used to open an order or place a pending order | Trade Functions |
| OrdersHistoryTotal | Returns the number of closed orders in the account history loaded into the terminal | Trade Functions |
| OrderStopLoss | Returns stop loss value of the currently selected order | Trade Functions |
| OrdersTotal | Returns the number of market and pending orders | Trade Functions |
| OrderSwap | Returns swap value of the currently selected order | Trade Functions |
| OrderSymbol | Returns symbol name of the currently selected order | Trade Functions |
| OrderTakeProfit | Returns take profit value of the currently selected order | Trade Functions |
| OrderTicket | Returns ticket number of the currently selected order | Trade Functions |
| OrderType | Returns order operation type of the currently selected order | Trade Functions |
| Period | Returns the current chart timeframe | Checkup |
| Period | Returns timeframe of the current chart | Chart Operations |
| PeriodSeconds | Returns the number of seconds in the period | Common Functions |
| PlaySound | Plays a sound file | Common Functions |
| Point | Returns the point size of the current symbol in the quote currency | Checkup |
| pow | Raises the base to the specified power | Math Functions |
| Displays a message in the log | Common Functions | |
| PrintFormat | Formats and prints the sets of symbols and values in a log file in accordance with a preset format | Common Functions |
| rand | Returns a pseudorandom value within the range of 0 to 32767 | Math Functions |
| RefreshRates | Refreshing of data in pre-defined variables and series arrays | Timeseries and Indicators Access |
| ResetLastError | Sets the value of a predetermined variable _LastError to zero | Common Functions |
| ResourceCreate | Creates an image resource based on a data set | Common Functions |
| ResourceFree | Deletes dynamically created resource (freeing the memory allocated for it) | Common Functions |
| ResourceReadImage | Reads data from the graphical resource created by ResourceCreate() function or saved in EX4 file during compilation | Common Functions |
| ResourceSave | Saves a resource into the specified file | Common Functions |
| round | Rounds of a value to the nearest integer | Math Functions |
| Seconds | Returns the amount of seconds elapsed from the beginning of the current minute of the last known server time by the moment of the program start | Date and Time |
| SendFTP | Sends a file at the address specified in the settings window of the “FTP” tab | Common Functions |
| SendMail | Sends an email at the address specified in the settings window of the “Email” tab | Common Functions |
| SendNotification | Sends push notifications to mobile terminals, whose MetaQuotes ID are specified in the “Notifications” tab | Common Functions |
| SeriesInfoInteger | Returns information about the state of historical data | Timeseries and Indicators Access |
| SetIndexArrow | Sets an arrow symbol for indicators line of the DRAW_ARROW type | Custom Indicators |
| SetIndexBuffer | Binds the specified indicator buffer with one-dimensional dynamic array of the double type | Custom Indicators |
| SetIndexDrawBegin | Sets the bar number from which the drawing of the given indicator line must start | Custom Indicators |
| SetIndexEmptyValue | Sets drawing line empty value | Custom Indicators |
| SetIndexLabel | Sets drawing line description for showing in the DataWindow and in the tooltip | Custom Indicators |
| SetIndexShift | Sets offset for the drawing line | Custom Indicators |
| SetIndexStyle | Sets the new type, style, width and color for a given indicator line | Custom Indicators |
| SetLevelStyle | Sets a new style, width and color of horizontal levels of indicator to be output in a separate window | Custom Indicators |
| SetLevelValue | Sets a value for a given horizontal level of the indicator to be output in a separate window | Custom Indicators |
| ShortArrayToString | Copying array part into a string | Conversion Functions |
| ShortToString | Converting symbol code (unicode) into one-symbol string | Conversion Functions |
| SignalBaseGetDouble | Returns the value of double type property for selected signal | Trade Signals |
| SignalBaseGetInteger | Returns the value of integer type property for selected signal | Trade Signals |
| SignalBaseGetString | Returns the value of string type property for selected signal | Trade Signals |
| SignalBaseSelect | Selects a signal from signals, available in terminal for further working with it | Trade Signals |
| SignalBaseTotal | Returns the total amount of signals, available in terminal | Trade Signals |
| SignalInfoGetDouble | Returns the value of double type property of signal copy settings | Trade Signals |
| SignalInfoGetInteger | Returns the value of integer type property of signal copy settings | Trade Signals |
| SignalInfoGetString | Returns the value of string type property of signal copy settings | Trade Signals |
| SignalInfoSetDouble | Sets the value of double type property of signal copy settings | Trade Signals |
| SignalInfoSetInteger | Sets the value of integer type property of signal copy settings | Trade Signals |
| SignalSubscribe | Subscribes to the trading signal | Trade Signals |
| SignalUnsubscribe | Cancels subscription | Trade Signals |
| sin | Returns the sine of a number | Math Functions |
| Sleep | Suspends execution of the current Expert Advisor or script within a specified interval | Common Functions |
| sqrt | Returns a square root | Math Functions |
| srand | Sets the starting point for generating a series of pseudorandom integers | Math Functions |
| StringAdd | Adds a string to the end of another string | String Functions |
| StringBufferLen | Returns the size of buffer allocated for the string | String Functions |
| StringCompare | Compares 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 one | String Functions |
| StringConcatenate | Forms a string of parameters passed | String Functions |
| StringFill | Fills out a specified string by selected symbols | String Functions |
| StringFind | Search for a substring in a string | String Functions |
| StringFormat | Converting number into string according to preset format | Conversion Functions |
| StringGetChar | Returns character (code) from the specified position in the string | String Functions |
| StringGetCharacter | Returns the value of a number located in the specified string position | String Functions |
| StringInit | Initializes string by specified symbols and provides the specified string length | String Functions |
| StringLen | Returns the number of symbols in a string | String Functions |
| StringReplace | Replaces all the found substrings of a string by a set sequence of symbols | String Functions |
| StringSetChar | Returns the string copy with changed character in the specified position | String Functions |
| StringSetCharacter | Returns true is a symbol is successfully inserted to the passed string. | String Functions |
| StringSplit | Gets substrings by a specified separator from the specified string, returns the number of substrings obtained | String Functions |
| StringSubstr | Extracts a substring from a text string starting from a specified position | String Functions |
| StringToCharArray | Symbol-wise copying a string converted from Unicode to ANSI, to a selected place of array of uchar type | Conversion Functions |
| StringToColor | Converting “R,G,B” string or string with color name into color type value | Conversion Functions |
| StringToDouble | Converting a string containing a symbol representation of number into number of double type | Conversion Functions |
| StringToInteger | Converting a string containing a symbol representation of number into number of int type | Conversion Functions |
| StringToLower | Transforms all symbols of a selected string to lowercase by location | String Functions |
| StringToShortArray | Symbol-wise copying a string to a selected part of array of ushort type | Conversion Functions |
| StringToTime | Converting a string containing time or date in “yyyy.mm.dd [hh:mi]” format into datetime type | Conversion Functions |
| StringToUpper | Transforms all symbols of a selected string into capitals by location | String Functions |
| StringTrimLeft | Cuts line feed characters, spaces and tabs in the left part of the string | String Functions |
| StringTrimRight | Cuts line feed characters, spaces and tabs in the right part of the string | String Functions |
| StrToDouble | Converts string representation of number to double type | Conversion Functions |
| StrToInteger | Converts string containing the value character representation into a value of the integer type | Conversion Functions |
| StrToTime | Converts string in the format “yyyy.mm.dd hh:mi” to datetime type | Conversion Functions |
| StructToTime | Converts a variable of MqlDateTime structure type into a datetime value | Date and Time |
| Symbol | Returns the name of a symbol of the current chart | Checkup |
| Symbol | Returns a text string with the name of the current financial instrument | Chart Operations |
| SymbolInfoDouble | Returns the double value of the symbol for the corresponding property | Market Info |
| SymbolInfoInteger | Returns a value of an integer type (long, datetime, int or bool) of a specified symbol for the corresponding property | Market Info |
| SymbolInfoSessionQuote | Allows receiving time of beginning and end of the specified quoting sessions for a specified symbol and day of week. | Market Info |
| SymbolInfoSessionTrade | Allows receiving time of beginning and end of the specified trading sessions for a specified symbol and day of week. | Market Info |
| SymbolInfoString | Returns a value of the string type of a specified symbol for the corresponding property | Market Info |
| SymbolInfoTick | Returns the current prices for the specified symbol in a variable of the MqlTick type | Market Info |
| SymbolName | Returns the name of a specified symbol | Market Info |
| SymbolSelect | Selects a symbol in the Market Watch window or removes a symbol from the window | Market Info |
| SymbolsTotal | Returns the number of available (selected in Market Watch or all) symbols | Market Info |
| tan | Returns the tangent of a number | Math Functions |
| TerminalClose | Commands the terminal to complete operation | Common Functions |
| TerminalCompany | Returns the name of company owning the client terminal | Checkup |
| TerminalInfoDouble | Returns an double value of a corresponding property of a running mql4 program | Checkup |
| TerminalInfoInteger | Returns an integer value of a corresponding property of a running mql4 program | Checkup |
| TerminalInfoString | Returns a string value of a corresponding property of a running mql4 program | Checkup |
| TerminalName | Returns client terminal name | Checkup |
| TerminalPath | Returns the directory, from which the client terminal was launched | Checkup |
| TesterStatistics | It returns the value of a specified statistic calculated based on testing results | Common Functions |
| TextGetSize | Returns the string’s width and height at the current font settings | Object Functions |
| TextOut | Transfers the text to the custom array (buffer) designed for creation of a graphical resource | Object Functions |
| TextSetFont | Sets the font for displaying the text using drawing methods (Arial 20 used by default) | Object Functions |
| TimeCurrent | Returns the last known server time (time of the last quote receipt) in the datetime format | Date and Time |
| TimeDay | Returns the day of month of the specified date | Date and Time |
| TimeDaylightSavings | Returns the sign of Daylight Saving Time switch | Date and Time |
| TimeDayOfWeek | Returns the zero-based day of week of the specified date | Date and Time |
| TimeDayOfYear | Returns the day of year of the specified date | Date and Time |
| TimeGMT | Returns GMT in datetime format with the Daylight Saving Time by local time of the computer, where the client terminal is running | Date and Time |
| TimeGMTOffset | Returns the current difference between GMT time and the local computer time in seconds, taking into account DST switch | Date and Time |
| TimeHour | Returns the hour of the specified time | Date and Time |
| TimeLocal | Returns the local computer time in datetime format | Date and Time |
| TimeMinute | Returns the minute of the specified time | Date and Time |
| TimeMonth | Returns the month number of the specified time | Date and Time |
| TimeSeconds | Returns the amount of seconds elapsed from the beginning of the minute of the specified time | Date and Time |
| TimeToStr | Converts value of datetime type into a string of “yyyy.mm.dd hh:mi” format | Conversion Functions |
| TimeToString | Converting a value containing time in seconds elapsed since 01.01.1970 into a string of “yyyy.mm.dd hh:mi” format | Conversion Functions |
| TimeToStruct | Converts a datetime value into a variable of MqlDateTime structure type | Date and Time |
| TimeYear | Returns year of the specified date | Date and Time |
| UninitializeReason | Returns the code of the reason for deinitialization | Checkup |
| WebRequest | Sends HTTP request to the specified server | Common Functions |
| WindowBarsPerChart | Returns the amount of bars visible on the chart | Chart Operations |
| WindowExpertName | Returns the name of the executed Expert Advisor, script, custom indicator, or library | Chart Operations |
| WindowFind | Returns the window index containing this specified indicator | Chart Operations |
| WindowFirstVisibleBar | Returns index of the first visible bar in the current chart window | Chart Operations |
| WindowHandle | Returns the system handle of the chart window | Chart Operations |
| WindowIsVisible | Returns the visibility flag of the chart subwindow | Chart Operations |
| WindowOnDropped | Returns the window index where Expert Advisor, custom indicator or script was dropped | Chart Operations |
| WindowPriceMax | Returns the maximal value of the vertical scale of the specified subwindow of the current chart | Chart Operations |
| WindowPriceMin | Returns the minimal value of the vertical scale of the specified subwindow of the current chart | Chart Operations |
| WindowPriceOnDropped | Returns the price of the chart point where Expert Advisor or script was dropped | Chart Operations |
| WindowRedraw | Redraws the current chart forcedly | Chart Operations |
| WindowScreenShot | Saves current chart screen shot as a GIF, PNG or BMP file depending on specified extension | Chart Operations |
| WindowsTotal | Returns total number of indicator windows on the chart | Chart Operations |
| WindowTimeOnDropped | Returns the time of the chart point where Expert Advisor or script was dropped | Chart Operations |
| WindowXOnDropped | Returns the value at X axis in pixels for the chart window client area point at which the Expert Advisor or script was dropped | Chart Operations |
| WindowYOnDropped | Returns the value at Y axis in pixels for the chart window client area point at which the Expert Advisor or script was dropped | Chart Operations |
| Year | Returns the current year, i.e., the year of the last known server time | Date and Time |
| ZeroMemory | Resets 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