// Check for strong and weak single levels strongLevel = ta.valuewhen(isStrongGreen and isStrongRed[1], high[1], 0) weakLevel = ta.valuewhen(isWeakGreen and isStrongRed[1], high[1], 0)
// Plot horizontal lines for levels if strongLevel line.new(x1=bar_index[1], y1=strongLevel, x2=bar_index, y2=strongLevel, color=color.green, width=2, extend=extend.right) if weakLevel line.new(x1=bar_index[1], y1=weakLevel, x2=bar_index, y2=weakLevel, color=color.red, width=2, extend=extend.right)