How to get the highest price between a Buy & Sell signal?

How to define the highest price between a Buy Signal and a Sell Signal. because if my first entry failed then i want enter above the highest price of that period? Say my entry signal is @100 and market goes up to 102 then goes down to 97 and hit my SL @98.5. Now i consider the second entry when price cross 102. But i am getting difficulty to define that 102 .

sir i need the highest in between the range of buy and sell. i think it will give the highest value since the buy signal appear. but want that this highest value also be within the next sell ginal.

if i get the time value of SL hit then the problem will be solved.

Not tested/verified

hs = HighestSince(Buy, H);
HighBuySell = ValueWhen(Sell, hs);

thanks, it works. thanks a lot.