kai197:
As stated in the title, I'm wondering what's the different and when to use iHigh and iHighest?
iHigh gives you the high price of a particular bar, based on its offset. https://docs.mql4.com/series/ihigh
iHighest gives you the offset of a bar - not the price - which is the highest in a specified range. https://docs.mql4.com/series/ihighest
For example:
int idx = iHighest(Symbol(), PERIOD_H1, MODE_HIGH, 10, 0);
... gives you the index of the highest of the last 10 H1 bars. It will return a bar shift, such as 5, not the high price of that bar.
Therefore, iHigh and iHighest are frequently used together. In order to get the high price of the last 10 bars, you would use:
double vHighOfLast10Bars = iHigh(Symbol(), PERIOD_H1, iHighest(Symbol(), PERIOD_H1, MODE_HIGH, 10, 0));
In other words: you take the output of iHighest and feed it into iHigh.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
As stated in the title, I'm wondering what's the different and when to use iHigh and iHighest?
Thank you.