The Pet-D seems to be nothing more than a cross of the 8 EMA, with a change of colour bars. Perhaps befitting the T-line cross strategy of Rick Saddler.
This website uses cookies to ensure you get the best experience on our website. To learn more about cookies, including how to control cookies, please read our Cookies Policy.
Jack
//@version=3
//author = https://www.tradingview.com/u/MattDeLong/
study("PET-D Steve Primo", overlay=true)
petda = (ema(close,5) > ema(close,15)) ? 1 : 0
petdb = (ema(close,15) > ema(close,5)) ? 1 : 0
marker = input(title="Show Entry/Exit Markers", type=bool, defval=true)
barcolor((petda) ? green : red)
mychar1 = crossover(petda, petdb) and marker ? 1 : 0
mychar2 = crossover(petdb, petda) and marker ? 1 : 0
plotshape(mychar2, style=shape.triangledown, location=location.abovebar, size=size.tiny, color=red)
plotshape(mychar1, style=shape.triangleup, location=location.belowbar, size=size.tiny, color=green)
// === ALERT ===
alertcondition(mychar1 or mychar2, title="Signal Alert",message="SIGNAL")
alertcondition(mychar1, title="Long Alert",message="Long")
alertcondition(mychar2, title="Short Alert",message="Short")
Script could not be translated from: petda = (ema(close,5)
Trying to add the script+alarms,
Salute!
Good man, God Bless You !
petda = (ema(close,5) > ema(close,15)) ? 1 : 0
petdb = (ema(close,5) > ema(close,15)) ? 0 : 1
marker = input(title="Show Entry/Exit Markers", type=bool, defval=true)