LineBreak
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © jac001

//@version=5
indicator("LineBreak", overlay=true)

linebreak_tickerid = ticker.linebreak(syminfo.tickerid, 3)
[lb_open, lb_high, lb_low, lb_close] = request.security(linebreak_tickerid, timeframe.period, [open, high, low, close])

plotshape(lb_close[0]>lb_close[1] and lb_close[1]<lb_close[2] and lb_close[1]<lb_open[1] and lb_close[2]<lb_open[2], title = "Buy", text = 'Buy', style = shape.labelup, location = location.belowbar, color= color.green,textcolor = color.white,  size = size.tiny)
plotshape(lb_close[0]<lb_close[1] and lb_close[1]>lb_close[2] and lb_close[1]>lb_open[1] and lb_close[2]>lb_open[2], title = "Sell", text = 'Sell', style = shape.labeldown, location = location.abovebar, color= color.red,textcolor = color.white,  size = size.tiny)

alertcondition(lb_close[0]>lb_close[1] and lb_close[1]<lb_close[2] and lb_close[1]<lb_open[1] and lb_close[2]<lb_open[2], title='Buy', message='Buy')
alertcondition(lb_close[0]<lb_close[1] and lb_close[1]>lb_close[2] and lb_close[1]>lb_open[1] and lb_close[2]>lb_open[2], title='Sell', message='Sell')