liminal-rider
New member
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.
Code:
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[1] * a) + (FASTMAQ[1] * b);
rec SLOWMAQ = (close[1] * c) + (SLOWMAQ[1] * d);
def MACD = FastMAQ - SLOWMAQ;
rec Signal = (MACD * e) + (Signal[1] * f);
plot Crossprice = ((Signal * f) + (FASTMAQ * b * e) - (SLOWMAQ * d * e) -
(FASTMAQ * b) + (SLOWMAQ * d)) / (a - c - (a * e) + (c * e));
plot xPrice = CrossPrice;