Problem with iHighest -- bug?

 
Hallo everybody,

When I tested my script with " ihighest " and parameter " NULL " for symbol,
it run well.

double valHigh = high[ iHighest( null, PERIOD_D1, MODE_HIGH,10, 0)] ;

Print (valHigh);


- run script and the code gives prope value for current symbol (chart).


But, when tested with specific parameter " EURUSD " it doesn´t work correctly.

double valHigh = high[ iHighest( "EURUSD", PERIOD_D1, MODE_HIGH,10, 0)] ;

Print (valHigh);


- run script and proper value is OK only if the "EURUSD" chart is active.
- change the chart and value is for the current selected chart , but there should be EURUSD result on every active charts.


// SOLUTION
 
int symb = iHighest("EURUSD",PERIOD_D1,MODE_HIGH,10,0);
double symbHighest = iHigh("EURUSD",PERIOD_D1,symb);
 
Print ("EURUSD",": ",symbHighest);

TESTED ON build v. 203 and build v. 208 // The iLowest is the same !!!!
 
double valHigh = high[ iHighest( null, PERIOD_D1, MODE_HIGH,10, 0)] ;

double valHigh = high[ iHighest( "EURUSD", PERIOD_D1, MODE_HIGH,10, 0)] ;

The problem is the use of high[]. It is a series for current chart!
The first line above produces the iHighest for current chart, while the second line for EURUSD chart.
You have to use iHigh for the second statement above.