The formula depends on the type of tool and the signal you want. Because the Linear Regression Intercept is drawn on the price chart then you want the signal to be when closing price crosses the tool, but if you were looking at an oscillator crossing below a value (eg RSI(5) and 30) then you would just use the tool in the function:
RSI(Bars=5) CrossesBelow 30
Note that it’s not possible to script for tools that you manually place on a chart, such as a Darvas Box or Fibonacci Retracement. If you want to be notified when those levels are breached you can use a Line Alert.
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.