This is a pine script code i need it for Ninja trader 8
study(title="WaveTrend", shorttitle="Magic")
n1 = input(8, "Channel Length")
n2 = input(12, "Average Length")
obLevel1 = input(60, "Over Bought Level 1")
obLevel2 = input(53, "Over Bought Level 2")
osLevel1 = input(-60, "Over Sold Level 1")
osLevel2 = input(-53, "Over Sold Level 2")
ap = hlc3
esa = ema(ap, n1)
d = ema(abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ema(ci, n2)
wt1 = tci
wt2 = sma(wt1,4)
plot(0, color=white)
plot(obLevel1, color=red, transp=50)
plot(osLevel1, color=lime, transp=50)
plot(wt1, color=aqua,style=area, transp=45)
plot(wt2, color=blue, style=area, transp=65)
plot(wt1-wt2, color=yellow, style=line, transp=10)
If possible i would like to add green dot when blue wave is crossing up and red when dark is crossing blue wave.
Thanks