bug in Highest() & Lowest() need work around

 
I need to calculate the lowest Low and Highest High for a specific currency that is not the base chart. Let's say the EA is on a GBPJPY chart and I try to pull data for USDJPY, it will give data for GBPJPY. a BUG!

      
      valLowest=Low[iLowest("USDJPY",PERIOD_H1,MODE_LOW,12,0)];
      valHighest=High[iHighest("USDJPY",PERIOD_H1,MODE_HIGH,12,0)];
      Print(pair," valLowest: ",valLowest," valHighest: ",valHighest);



Is there another way to code this to get the information? I know that I could use this but I want to be able to lookback by X-hours.

valLowest=MarketInfo("USDJPY",MODE_LOW);
valHighest=MarketInfo("USDJPY",MODE_HIGH);
 
      valLowest=iLow("USDJPY",PERIOD_H1,iLowest("USDJPY",PERIOD_H1,MODE_LOW,12,0));
      valHighest=iHigh("USDJPY",PERIOD_H1,iHighest("USDJPY",PERIOD_H1,MODE_HIGH,12,0));


feel the difference

 
Feels GREAT!! thanks

I know you guys are busy with more important updates but when you get around to it, you might want to change the sample given in the dictionary

Sample:
double val=Low[iLowest(NULL,0,MODE_LOW,10,10)];