iLowest
iLowest
返回特定数量条形图中最低值的偏移量,具体取决于类型。
int iLowest(
string symbol, // symbol
int timeframe, // timeframe
int type, // timeseries id
int count, // count
int start // starting index
);参数
- symbol
[in] 符号名称。NULL表示当前符号。
- timeframe
[in] 时间框架。可以是ENUM_TIMEFRAMES枚举值中的任何一个。0表示当前图表时间框架。
- type
[in] 序列数组标识符。可以是Series array identifier枚举值中的任何一个。
- count=WHOLE_ARRAY
[in] 进行搜索的条形图数量(从起始条形图到最后一个条形图的方向)。
- start=0
[in] 相对于当前条形图显示的条形图偏移量,数据应从该条形图开始获取。
返回值
特定数量条形图中最低值的偏移量,如果出现错误则返回-1。要检查错误,需要调用GetLastError()函数。
示例:
double val;
//--- calculating the lowest value on the 10 consequtive bars in the range
//--- from the 10th to the 19th index inclusive on the current chart
int val_index=iLowest(NULL,0,MODE_LOW,10,10);
if(val_index!=-1) val=Low[val_index];
else PrintFormat("Error in iLowest. Error code=%d",GetLastError());最后更新于