Referencia de las funciones de MQL5
Esta página se genera automáticamente a partir del intérprete MQL5 de TMChart: las funciones listadas se ejecutan en TMChart; un programa que llama a una función que no está aquí se rechaza al cargarlo, con el motivo (nada se imita). Los nombres distinguen mayúsculas de minúsculas, como en MetaTrader 5. Para crear y ejecutar un programa, vea MQL5.
Eventos
Sección titulada «Eventos»EA: OnInit, OnTick, OnDeinit, OnTimer, OnTrade y OnTradeTransaction. Indicador: OnCalculate (las dos formas). Script: OnStart (se ejecuta una vez). Las órdenes de un EA van al corredor de TMChart: Backtest, SIMULADOR, replay y, en la cuenta REAL, solo por la automatización que usted active. MetaTrader 5 nunca ejecuta el programa.
Salida y errores
Sección titulada «Salida y errores»Escriben en la consola del editor (y en el registro de la automatización) y tratan el código de error.
Alert · Comment · GetLastError · Print · printf · PrintFormat · ResetLastError · SetUserError
Matemática
Sección titulada «Matemática»Funciones numéricas, con los nombres Math... y los cortos (fabs, pow…).
acos · asin · atan · atan2 · ceil · cos · exp · fabs · floor · fmax · fmin · fmod · log · log10 · MathAbs · MathArccos · MathArccosh · MathArcsin · MathArcsinh · MathArctan · MathArctan2 · MathArctanh · MathCeil · MathCos · MathCosh · MathExp · MathExpm1 · MathFloor · MathIsValidNumber · MathLog · MathLog10 · MathLog1p · MathMax · MathMin · MathMod · MathPow · MathRand · MathRound · MathSin · MathSinh · MathSqrt · MathSrand · MathTan · MathTanh · NormalizeDouble · pow · rand · round · sin · sqrt · srand · tan
Texto y conversión
Sección titulada «Texto y conversión»Funciones de string y conversiones entre texto, números, fechas, colores y enumeraciones.
CharArrayToString · CharToString · ColorToString · DoubleToString · EnumToString · IntegerToString · ShortToString · StringAdd · StringBufferLen · StringCompare · StringConcatenate · StringFill · StringFind · StringFormat · StringGetCharacter · StringInit · StringLen · StringReplace · StringSetCharacter · StringSplit · StringSubstr · StringToCharArray · StringToColor · StringToDouble · StringToInteger · StringToLower · StringToTime · StringToUpper · StringTrimLeft · StringTrimRight · TimeToString
Fecha y hora
Sección titulada «Fecha y hora»Hora del servidor de la corredora (TimeCurrent), del PC y contadores.
GetMicrosecondCount · GetTickCount · GetTickCount64 · Sleep · StructToTime · TimeCurrent · TimeDaylightSavings · TimeGMT · TimeGMTOffset · TimeLocal · TimeToStruct · TimeTradeServer
Arrays dinámicos y estáticos, orden de serie (ArraySetAsSeries) y copias.
ArrayBsearch · ArrayCopy · ArrayFill · ArrayFree · ArrayGetAsSeries · ArrayInitialize · ArrayInsert · ArrayIsDynamic · ArrayIsSeries · ArrayMaximum · ArrayMinimum · ArrayRange · ArrayRemove · ArrayResize · ArrayReverse · ArraySetAsSeries · ArraySize · ArraySort · ArraySwap · ZeroMemory
Datos del activo (SymbolInfo...), del gráfico y del timeframe.
Digits · Period · PeriodSeconds · Point · Symbol · SymbolExist · SymbolInfoDouble · SymbolInfoInteger · SymbolInfoMarginRate · SymbolInfoString · SymbolInfoTick · SymbolIsSynchronized · SymbolName · SymbolSelect · SymbolsTotal
Series de precio
Sección titulada «Series de precio»Barras y series del activo en cualquier timeframe (CopyRates, iClose…).
Bars · CopyClose · CopyHigh · CopyLow · CopyOpen · CopyRates · CopyRealVolume · CopySpread · CopyTickVolume · CopyTime · iBars · iBarShift · iClose · iHigh · iHighest · iLow · iLowest · iOpen · iRealVolume · iSpread · iTickVolume · iTime · iVolume · SeriesInfoInteger
Cuenta, terminal y eventos
Sección titulada «Cuenta, terminal y eventos»Datos de la cuenta de la ejecución, del programa y el temporizador de OnTimer.
AccountInfoDouble · AccountInfoInteger · AccountInfoString · EventKillTimer · EventSetMillisecondTimer · EventSetTimer · IsStopped · MQLInfoInteger · MQLInfoString · TerminalInfoInteger · TerminalInfoString
Indicadores
Sección titulada «Indicadores»Indicadores técnicos por handle y CopyBuffer, e iCustom para un indicador MQL5 suyo.
BarsCalculated · CopyBuffer · iAC · iAD · iADX · iADXWilder · iAlligator · iAMA · iAO · iATR · iBands · iBearsPower · iBullsPower · iBWMFI · iCCI · iChaikin · iCustom · iDEMA · iDeMarker · iEnvelopes · iForce · iFractals · iFrAMA · iGator · iIchimoku · iMA · iMACD · iMFI · iMomentum · IndicatorCreate · IndicatorRelease · iOBV · iOsMA · iRSI · iRVI · iSAR · iStdDev · iStochastic · iTEMA · iTriX · iVIDyA · iVolumes · iWPR
Indicador propio
Sección titulada «Indicador propio»Buffers y plots de un indicador escrito en MQL5 (OnCalculate).
IndicatorSetDouble · IndicatorSetInteger · IndicatorSetString · PlotIndexGetInteger · PlotIndexSetDouble · PlotIndexSetInteger · PlotIndexSetString · SetIndexBuffer
Negociación
Sección titulada «Negociación»Órdenes, posiciones e historial. Las órdenes van solo al corredor de TMChart (vea abajo).
HistoryDealGetDouble · HistoryDealGetInteger · HistoryDealGetString · HistoryDealGetTicket · HistoryDealSelect · HistoryDealsTotal · HistoryOrderGetDouble · HistoryOrderGetInteger · HistoryOrderGetString · HistoryOrderGetTicket · HistoryOrderSelect · HistoryOrdersTotal · HistorySelect · HistorySelectByPosition · OrderCalcMargin · OrderCalcProfit · OrderCheck · OrderGetDouble · OrderGetInteger · OrderGetString · OrderGetTicket · OrderSelect · OrderSend · OrderSendAsync · OrdersTotal · PositionGetDouble · PositionGetInteger · PositionGetString · PositionGetSymbol · PositionGetTicket · PositionSelect · PositionSelectByTicket · PositionsTotal
Biblioteca Estándar e #include
Sección titulada «Biblioteca Estándar e #include»#include <Trade\Trade.mqh> (y los demás archivos de la carpeta MQL5\Include de su terminal) usa el archivo original del MetaTrader 5 instalado en el PC: la clase CTrade y las que ella usa funcionan con las funciones de esta página. #include "archivo.mqh" lee de la carpeta del propio programa.
Aún no disponibles
Sección titulada «Aún no disponibles»Existen en MetaTrader 5 y están previstas; un programa que las llama se rechaza al cargarlo.
CopyTicks · CopyTicksRange
Fuera del intérprete
Sección titulada «Fuera del intérprete»DLL e #import, .ex5 sin código fuente, objetos gráficos (ObjectCreate, ChartEvent), paneles y Canvas, archivos, red (WebRequest, e-mail, push), bases de datos, OpenCL, matrices/vectores y el calendario económico.
Total: 257 funciones.