Samurai Beta
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © leo07lee

//@version=5
indicator("Samurai",overlay=true)


//CrossOver

fast = 50
slow = 200

fastMA = ta.ema(close, fast)
slowMA = ta.ema(close, slow)

plot(fastMA, color = color.green)
plot(slowMA, color = color.red)

plotshape(ta.crossover(fastMA, slowMA) ? slowMA : na, style=shape.triangleup,size=size.small,color=color.green,textcolor=color.green, text="LONG",location=location.absolute )
plotshape(ta.crossover(slowMA,fastMA) ? fastMA : na, style=shape.triangledown,size=size.small,color=color.red, textcolor=color.red,text="SHORT",location=location.absolute)  

