Attached is a screenshot and code that I copied and pasted from other sources. My intention is to create arrows with alerts when the linear regression line changes color (not when price closes above/below the LR line). I believe I've accomplished that because I am not getting any error messages, but it is plotting an arrow on every candle.
I would also like to be able to select "true/false" for audible alerts but do not know how to include that in the code.
This is my first attempt at working with Ninja script where something I did "almost" worked but I really do not know what I'm doing.
Is there anyone who would be willing to help me with this mess I've made? :ahhhhh: