Chef Momentum
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Chef_Bull

//@version=5
indicator("Chef Momentum",format=format.price, overlay=false)

//STOCH//

periodK = input.int(21, title="%K Length", minval=1)
smoothK = input.int(100, title="%K Smoothing", minval=1)
//periodD = input.int(5, title="%D Smoothing", minval=1) //
k = ta.hma(ta.stoch(close, high, low, periodK), smoothK)
//d = ta.hma(k, periodD)
plot(k, title="%K", color=#FFFFFF)
//plot(d, title="%D", color=#FF6D00)
h0 = hline(80, "Upper Band", color=#787B86)
h1 = hline(20, "Lower Band", color=#787B86)
h2 = hline(50, "Lower Band", color=#787B86)
fill(h0, h1, color=color.rgb(33, 150, 243, 90), title="Background")




//CONDITION//

buy =  ta.crossover(k,25)
sell = ta.crossover(k,80)


plotshape(buy, title = "BUY", color = color.green, style = shape.circle, textcolor = color.white, location = location.bottom, size = size.small)
plotshape(sell, title = "SELL", color = color.red, style = shape.circle, textcolor = color.white, location = location.top, size = size.small)
alertcondition(buy, title="Bull signal", message="Bull signal @ ${{close}}")
alertcondition(sell, title="Bear signal", message="Bear signal @ ${{close}}")

