Super scalp
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Wolfgang_Grimmer

//@version=5
indicator("Super scalp",overlay=true)
atrPeriod = input(10, 'ATR Length') // 2. Change the ATR length/period (optional)  
factor = input.float(1.5, 'Factor') // 3. Change the ATR factor/multiplier (optional)  
riskvalue = input.int(1, 'Risk Value', tooltip='The volume executed will be based on your EA Settings on your MT4/5') // 4. Change the risk value (optional)  

[supertrend, direction] = ta.supertrend(factor, atrPeriod)

bodyMiddle = plot((open + close) / 2, display=display.none)
upTrend = plot(direction < 0 ? supertrend : na, 'Up Trend', color=color.new(color.green, 0), style=plot.style_linebr)
downTrend = plot(direction < 0 ? na : supertrend, 'Down Trend', color=color.new(color.red, 0), style=plot.style_linebr)

fill(bodyMiddle, upTrend, color.new(color.green, 90), fillgaps=false)
vwapval =  ta.vwap(close)
MA9 = ta.ema(close, 9)
fill(bodyMiddle, downTrend, color.new(color.red, 90), fillgaps=false)
plotshape(ta.change(direction) < 0 and close>MA9 and close>vwapval, style=shape.labelup, location=location.belowbar, color=color.new(#009900, 0), size=size.large, text='Scalp \n Buy', textcolor=color.new(color.white, 0))
plotshape(ta.change(direction) > 0 and close<MA9 and close<vwapval, style=shape.labeldown, location=location.abovebar, color=color.new(#CC0000, 0), size=size.large, text='Scalp \n Sell', textcolor=color.new(color.white, 0))


plot(vwapval, color=color.black, title="vwapval")

plot(MA9, color=color.orange, title="sma20")