New functions: iTime, iOpen, iHigh, iLow, iClose, iVolume, iBars,
iBarShift, iLowest, iHighest, iRealVolume, iTickVolume, iSpread. These
functions are similar to those used in MQL4. The functions provide for
an easier transfer of code of trading applications to the fifth
generation platform.
Earlier, most of tasks performed through
these functions could be implemented using Copy* functions. However,
users had to implement their own functions in order to find the High/Low
values on the chart and to search for bars based on their time. Now,
these tasks can be easily executed using iHighest, iLowest and iBarShift
functions.
iTime
Returns the Open time of the bar (indicated by the 'shift' parameter) on the corresponding chart.
datetime iTime(
string symbol,
ENUM_TIMEFRAMES timeframe,
int shift
);
iOpen
Returns the Open price of the bar (indicated by the 'shift' parameter) on the corresponding chart.
double iOpen(
string symbol,
ENUM_TIMEFRAMES timeframe,
int shift
);
iHigh
Returns the High price of the bar (indicated by the 'shift' parameter) on the corresponding chart.
double iHigh(
string symbol,
ENUM_TIMEFRAMES timeframe,
int shift
);
iLow
Returns the Low price of the bar (indicated by the 'shift' parameter) on the corresponding chart.
double iLow(
string symbol,
ENUM_TIMEFRAMES timeframe,
int shift
);
iClose
Returns the Close price of the bar (indicated by the 'shift' parameter) on the corresponding chart.
double iClose(
string symbol,
ENUM_TIMEFRAMES timeframe,
int shift
);
iVolume
Returns the tick volume of the bar (indicated by the 'shift' parameter) on the corresponding chart.
long iVolume(
string symbol,
ENUM_TIMEFRAMES timeframe,
int shift
);
iBars
Returns the number of bars of a corresponding symbol and period, available in history.
int iBars(
string symbol,
ENUM_TIMEFRAMES timeframe
);
iBarShift
Search bar by time. The function returns the index of the bar corresponding to the specified time.
int iBarShift(
string symbol,
ENUM_TIMEFRAMES timeframe,
datetime time,
bool exact=false
);
iLowest
Returns the index of the smallest value found on the corresponding chart (shift relative to the current bar).
int iLowest(
string symbol,
ENUM_TIMEFRAMES timeframe,
int type,
int count,
int start
);
iHighest
Returns the index of the largest value found on the corresponding chart (shift relative to the current bar).
int iHighest(
string symbol,
ENUM_TIMEFRAMES timeframe,
int type,
int count,
int start
);
iRealVolume
Returns the real volume of the bar (indicated by the 'shift' parameter) on the corresponding chart.
long iRealVolume(
string symbol,
ENUM_TIMEFRAMES timeframe,
int shift
);
iTickVolume
Returns the tick volume of the bar (indicated by the 'shift' parameter) on the corresponding chart.
long iTickVolume(
string symbol,
ENUM_TIMEFRAMES timeframe,
int shift
);
iSpread
Returns the spread value of the bar (indicated by the 'shift' parameter) on the corresponding chart.
long iSpread(
string symbol,
ENUM_TIMEFRAMES timeframe,
int shift
);