I don't know how to code but I'm thinking maybe this part has something to do with it?
//No Alert handling here.
if ((leftBarsAgo < 0 && rightBarsAgo < 0) || (leftBarsAgo > 0 && rightBarsAgo > 0) && draw.DrawType != DrawType.HorizontalLine )
DrawTextFixed("noAlert", "Check start & end points. Not eligible for alert. ", TextPosition.TopLeft);
else if (leftBarsAgo == rightBarsAgo && draw.DrawType != DrawType.HorizontalLine)
DrawTextFixed("noAlert", "Not eligible for alert. No alerts for vertical lines", TextPosition.TopLeft);
else
{
//Alert Checking is done here. Can add your own actions to the block if desired.
if(CrossBelow(Close, lineValueAtLastBar, 1) || CrossAbove(Close, lineValueAtLastBar, 1))
{
Alert("AlertLineCrossing", Cbi.Priority.High, alertMessage, soundFile, 0, Color.White, Color.Black);
Thanks

Comment