Stoma Trading
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © payachonpooh5102

//@version=5
//Author SKiNNiEH 3-15-2022
indicator(title='EMA Cross', shorttitle="StomaTrading", overlay=true)
fastLength  = input.int(34, title="Fast EMA")
slowLength  = input.int(89, title="Slow EMA")
fast = ta.ema(close, fastLength)
slow = ta.ema(close, slowLength)
plotFast = plot(fast, color = color.new(color.blue, 0), title="Fast EMA")
plotSlow = plot(slow, color = color.new(color.red, 0), title="Slow EMA")
plot(ta.cross(fast, slow) ? slow : na, style=plot.style_cross, linewidth=3, color=color.new(color.white, 0), title="EMA Cross")
fill(plotFast, plotSlow, color = fast > slow ? color.new(color.green, 85) : color.new(color.red,85), title = "Background")
