//version=6 indicator("Breakout Point Highlighting", overlay=true)
// Input: Lookback period for finding breakout points lookbackPeriod = input.int(20, title="Lookback Period", minval=1)
// Calculate the highest high and lowest low over the lookback period highestHigh = ta.highest(high, lookbackPeriod) lowestLow = ta.lowest(low, lookbackPeriod)
// Breakout conditions: price breaks above the highest high or below the lowest low breakoutUp = close > highestHigh breakoutDown = close < lowestLow
// Highlight the breakout zones bgcolor(breakoutUp ? color.new(color.green, 90) : na, title="Breakout Up Highlight") bgcolor(breakoutDown ? color.new(color.red, 90) : na, title="Breakout Down Highlight")
// Alert conditions alertcondition(breakoutUp, title="Breakout Up Alert", message="Price has broken above the highest high.") alertcondition(breakoutDown, title="Breakout Down Alert", message="Price has broken below the lowest low.")