Add a horizontal line code needed

 

Heiken Ashi Smoothed indicator(attached)

Would anybody help me with the code so that it displays a horizontal line -where there is a signal change? ...And can it be given the signal color?

Thanks.

Reason: