MQL4常用的常量及函数
常用的量及函数
Ask The latest known seller's price (ask price) for the current symbol. The RefreshRates() function must be used to update.
Bid The latest known buyer's price (offer price, bid price) of the current symbol. The RefreshRates() function must be used to update
MarketInfo Returns various data about securities listed in the "Market Watch" window
To obtain the current market information there are several functions: SymbolInfoInteger(), SymbolInfoDouble() and SymbolInfoString(). The first parameter is the symbol name, the values of the second function parameter can be one of the identifiers of ENUM_SYMBOL_INFO_INTEGER, ENUM_SYMBOL_INFO_DOUBLE and ENUM_SYMBOL_INFO_STRING.
Open[] Series array that contains open prices of each bar of the current chart.
Close[] Series array that contains close prices for each bar of the current chart.
High[] Series array that contains the highest prices of each bar of the current chart.
Low[] Series array that contains the lowest prices of each bar of the current chart.
iOpen Returns Open price value for the bar of specified symbol with timeframe and shift.
double iOpen(
string symbol, // symbol
int timeframe, // timeframe
int shift // shift
);
iClose Returns Close price value for the bar of specified symbol with timeframe and shift.
double iClose(
string symbol, // symbol
int timeframe, // timeframe
int shift // shift
);
iHigh Returns High price value for the bar of specified symbol with timeframe and shift.
double iHigh(
string symbol, // symbol
int timeframe, // timeframe
int shift // shift
);
iHighest Returns the shift of the maximum value over a specific number of bars depending on type.
int iHighest(
string symbol, // symbol
int timeframe, // timeframe
int type, // timeseries
int count, // cont
int start // start
);
Bid The latest known buyer's price (offer price, bid price) of the current symbol. The RefreshRates() function must be used to update
MarketInfo Returns various data about securities listed in the "Market Watch" window
To obtain the current market information there are several functions: SymbolInfoInteger(), SymbolInfoDouble() and SymbolInfoString(). The first parameter is the symbol name, the values of the second function parameter can be one of the identifiers of ENUM_SYMBOL_INFO_INTEGER, ENUM_SYMBOL_INFO_DOUBLE and ENUM_SYMBOL_INFO_STRING.
Open[] Series array that contains open prices of each bar of the current chart.
Close[] Series array that contains close prices for each bar of the current chart.
High[] Series array that contains the highest prices of each bar of the current chart.
Low[] Series array that contains the lowest prices of each bar of the current chart.
iOpen Returns Open price value for the bar of specified symbol with timeframe and shift.
double iOpen(
string symbol, // symbol
int timeframe, // timeframe
int shift // shift
);
iClose Returns Close price value for the bar of specified symbol with timeframe and shift.
double iClose(
string symbol, // symbol
int timeframe, // timeframe
int shift // shift
);
iHigh Returns High price value for the bar of specified symbol with timeframe and shift.
double iHigh(
string symbol, // symbol
int timeframe, // timeframe
int shift // shift
);
iHighest Returns the shift of the maximum value over a specific number of bars depending on type.
int iHighest(
string symbol, // symbol
int timeframe, // timeframe
int type, // timeseries
int count, // cont
int start // start
);
iLowest Returns the shift of the lowest value over a specific number of bars depending on type.
int iLowest(
string symbol, // symbol
int timeframe, // timeframe
int type, // timeseries id
int count, // count
int start // starting index
);
int iLowest(
string symbol, // symbol
int timeframe, // timeframe
int type, // timeseries id
int count, // count
int start // starting index
);
自带指标的调用
iMA Calculates the Moving Average indicator and returns its value.
double iMA(
string symbol, // symbol
int timeframe, // timeframe
int ma_period, // MA averaging period
int ma_shift, // MA shift
int ma_method, // averaging method
int applied_price, // applied price
int shift // shift
);
iCCI Calculates the Commodity Channel Index indicator and returns its value
double iCCI(
string symbol, // symbol
int timeframe, // timeframe
int period, // averaging period
int applied_price, // applied price
int shift // shift
);
double iMA(
string symbol, // symbol
int timeframe, // timeframe
int ma_period, // MA averaging period
int ma_shift, // MA shift
int ma_method, // averaging method
int applied_price, // applied price
int shift // shift
);
iCCI Calculates the Commodity Channel Index indicator and returns its value
double iCCI(
string symbol, // symbol
int timeframe, // timeframe
int period, // averaging period
int applied_price, // applied price
int shift // shift
);
自定义指标的调用:
iCustom Calculates the specified custom indicator and returns its value
double iCustom(
string symbol, // symbol
int timeframe, // timeframe
string name, // path/name of the custom indicator compiled program
... // custom indicator input parameters (if necessary)
int mode, // line index
int shift // shift
);
iCustom Calculates the specified custom indicator and returns its value
double iCustom(
string symbol, // symbol
int timeframe, // timeframe
string name, // path/name of the custom indicator compiled program
... // custom indicator input parameters (if necessary)
int mode, // line index
int shift // shift
);
浙公网安备 33010602011771号