Line cross alert (works, but incomplete)

 

Hi all,

here is an indicator which gives an alert when a horizontal line is crossed. The alert is shown only once per bar, so it does not bother you. It should also work for trendlines but it does not work 100%. Unfortunately I cannot fix it. I am very thankful if someone can fix it.

Good trades,

Marbo

Files: