iHighest standard function mystery

 

As somebody that is new to MQL4 I was just wondering which shift will be returned if there were more than one shift with exactly the same maximum value/price over a number of periods, e.g. in the following standard function:

iHighest( NULL, 0, MODE_HIGH,30, 1 )

Will it be the first or the last shift number with the same highest price that will be returned ?
 

Interesting question, if i would have coded the function it would return the smalles shift. I suggest (if you have no option to try it out) to write the code yourself.

 
I believe it returns the earliest bar on duplicates. If it maters, code it yourself.
Reason: