hello,how to get the high of the open position bar?

 
and how to get the bar before the open position bar?
 
double hoot(int period,int ticket ){
 if (OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) return 0.0f; 
datetime tot=OrderOpenTime(); 
int deltaT=iTime(OrderSymbol(),period,0)-tot; 
int shift=deltaT/period; 
return(iHigh(OrderSymbol(),period,shift));
 }

try it. not been tested.

 
double high_curr=High[0];
double high_prev=High[1];
double High_curr=iHigh(Symbol(),PERIOD_CURRENT,0);
double High_prev=iHigh(Symbol(),PERIOD_CURRENT,1);