Create alert on bar break

Hello All,
I am just new to the pine script. I need to get alert when 5 min bar overlapping the previous day high or low and breaking it. i tried the below code. But however the strategy not available in custom alert due to some missing functionalities in the below. COuld you please someone guide?
`H = security(syminfo.tickerid, ‘D’,high[1],barmerge.gaps_off, barmerge.lookahead_on)
L = security(syminfo.tickerid, ‘D’,low[1],barmerge.gaps_off, barmerge.lookahead_on)
C = security(syminfo.tickerid, ‘D’,close[1],barmerge.gaps_off, barmerge.lookahead_on)
pc = security(syminfo.tickerid, “5”, close[1])
ph = security(syminfo.tickerid, “5”, high[1])
pl = security(syminfo.tickerid, “5”, low[1])
cc = security(syminfo.tickerid, “5”, close)
ov = ph >= H and pl <= H
ov1 = ov ? pl:na

ovc = crossunder(close,ov1)
alertcondition(ovc, title=‘Break’, message=‘Break’)

plot(ov1)
plot(close)
`