my problem is, that the iHigh function works fine for the horizontol line, but if i try to use the iHighest function it dont works, what is my fault?
#property copyright "Copyright 2014, MetaQuotes Software Corp."
#property indicator_buffers 2
#property indicator_color1 Orange
#property indicator_color2 Orange
extern double Sessionstart = 3;
extern double Sessionend = 7;
int CalculateBars = 240;
for(int Count = CalculateBars; Count >= 0; Count--)
Rangehigh[Count] = iHighest(NULL,PERIOD_H1,MODE_HIGH,30,1);
Rangelow[Count] = iLow(NULL,PERIOD_H1,0);
Don't mix up iHigh (=high of a bar) and iHighest (array index (shift) of the highest high of ...
Same with low!
You obviously don't know what they do!
iHighest does not return the high of a range, as gooly has already told you.
thx now i understand what ya saying. I think i have worked too much with excel. it was my memory that this function would do this. in Excel it is the function "Max(defer area)". I wanted to defer the start of the period and then draw the line for a specific period lenth.
Rangehigh[Count] = iHighest(NULL,PERIOD_H1,MODE_HIGH,30,1); = 15.00000
Rangelow[Count] = iLow(NULL,PERIOD_H1,0); = 1.12345
//--- calculating the lowest value on the 10 consequtive bars in the range
//--- from the 10th to the 19th index inclusive on the current chart
possible way of usage:
double hiHi = iHigh(NULL,0, iHighest(NULL,0, ..));
it's all in the reference!
To add comments, please log in or register