Plz help with static ? variable.

 

Hello.

I am trying to get a price (high and low) derived from a bar.

I am fine with

double         pricebuy  = iHigh  ( Symbol() , ac.Timeframe [1] , i )    ;
double         pricesell = iLow   ( Symbol() , ac.Timeframe [1] , i )    ;

i being the bar count. However sometimes I notice that a bar is missing (on the 1 minute timeframe) and then the count is off.

I tried putting "static double pricebuy" into the init section, but then it tells me that the variable pricebuy is undefined.