@MattDeLong, Hi Matt , god work. Just a question : petda and petdb are numbers either 1 or 0. you have used crossover function on petda and petdb. does it work ?
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.
//@version=3
//author = 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")