iHigh, iLow, iClose with int timeframe different than current time frame

 
double iHigh( string symbol, int timeframe, int shift)


i am using a indicator on a 4 hour chart with ihigh, ilow, iclose based on the 1hr "int timeframe" and for some reason its not working correctly. when i switch to 1hr, then the indicator works fine, but anything other than 1hr, the indicator really messes up.

in the manuel, it says :

Returns High value for the bar of indicated symbol with timeframe and shift. If local history is empty (not loaded), function returns 0.


is my script broken because local history is empty? how to i specify or call the local history?

thank you
 
Based on the information provided...

"its not working correctly" "the indicator really messes up"

... you won't get much of an answer.
 
Try code below, it may help
=============================

double array_price[][6];
double array_price1[][6];
double array_price2[][6];

ArrayCopyRates(array_price,"EURUSD", PERIOD_D1);
ArrayCopyRates(array_price1,"EURUSD", PERIOD_D1);
ArrayCopyRates(array_price2,"EURUSD", PERIOD_D1);

double EURUSD_LOW, EURUSD_HIGH,EURUSD_CLOSE;

EURUSD_LOW = array_price[1][2];
EURUSD_HIGH = array_price1[1][3];
EURUSD_CLOSE = array_price2[1][4];
=====================================
 
Based on the information provided...

"its not working correctly" "the indicator really messes up"

... you won't get much of an answer.



its an indicator that draws the high and lows of each week. when i say its not working correctly, it draws the lines, but the lines are in the wrong location. its fine on the 1 hr since my code is based on the 1 hr period. but when i switch to 4 hours, the lines are in the wrong place. i think its because if the shift on the 1hr is 15, it also does 15 on the 4 hour. metatrader doesnt seem able to access 1 hr information on the 4 hour chart. i will post the code later today. thank you for the reply guys.
Reason: