iHighest and iLowest
Just looked at the documentation,
//--- From index 4 to index 23 inclusive, on the current timeframe int val_index=iHighest(NULL,0,MODE_CLOSE,20,4);
So it searches from bar 4 for 20 bars.
Not between bar 4 and bar 20.Just looked at the documentation,
//--- From index 4 to index 23 inclusive, on the current timeframe int val_index=iHighest(NULL,0,MODE_CLOSE,20,4);
So it searches from bar 4 for 20 bars.
Not between bar 4 and bar 20.You agree to website policy and terms of use
Sometimes the above code returns a bar outside the searched bars.
openYesterdayBar=145 and openTodayBar=76
then
lowestClose=197
How can it return a bar higher than 145?