I wish to add an alert for the below script...a buy alert when price crosses above "crossprice" and a sell alert when price crosses below "crossprice" one bar ago that signal once. Also, that sends a text message to my cell phone. Below is the script. Thanks.
input FAST = 8.3896; input SLOW = 17.5185; input Length = 9.0503; #Constants def a = 2 / (1 + FAST); def b = 1 - a; def c = 2 / (1 + SLOW); def d = 1 - c; def e = 2 / (1 + Length); def f = 1 - e; rec FASTMAQ = (close * a) + (FASTMAQ * b); rec SLOWMAQ = (close * c) + (SLOWMAQ * d); def MACD = FastMAQ - SLOWMAQ; rec Signal = (MACD * e) + (Signal * f); plot Crossprice = ((Signal * f) + (FASTMAQ * b * e) - (SLOWMAQ * d * e) - (FASTMAQ * b) + (SLOWMAQ * d)) / (a - c - (a * e) + (c * e)); plot xPrice = CrossPrice;