hi to all, i am new here and start to learn programming to make my own indicators. I hope someone can help me with my actual problem. i search the highest high and the lowest low on the 15 minutes chart between 8 and 9 o’clock the problem is that i get all the highs and lows from every candle in this timerange thanks for the help in advance kind regards defparam calculateonlastbars = 100 if time > 080000 and time < 090000 then HighestH = high //max(high,high) LowestL = low //min(low,low) //UpperRange = HighestH < HighestH[1] and HighestH > HighestH[2] //BottomRange = LowestL > LowestL[1] and LowestL < LowestL[2] endif //if currentdayofweek = 1 or 2 or 3 or 4 or 5 then drawray(barindex-1,HighestH,HighestH,HighestH) coloured(0,200,0) STYLE(line,2) drawray(barindex-1,LowestL,LowestL,LowestL) coloured(200,0,0) STYLE(line,2) //endif return