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

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

Ema1=input.int(title="Ema1", defval=5)
Ema2=input.int(title="Ema2", defval=20)
Ema3=input.int(title="Ema1", defval=50)
Ema4=input.int(title="Ema2", defval=200)
Sma1=input.int(title="Sma1", defval=5)
Sma2=input.int(title="Sma2", defval=20)
VWEma1=input.int(title="Volume Weighted Ema1", defval=5)
VWEma2=input.int(title="Volume Weighted Ema2", defval=20)
rsiVal=input.int(title="Volume Weighted Ema2", defval=14)
WMA1=input.int(title="Weighted MA1", defval=20)
WMA2=input.int(title="Weighted MA2", defval=20)


//Sources
WMA1source= input.source(close,"WMA Source 1")
WMA2source= input.source(close,"WMA Source 2")
VWMA1source= input.source(close,"VWMA source 1")
VWMA2source= input.source(close,"VWMA source 2")
EMA1source= input.source(close,"EMA Source 1")
EMA2source= input.source(close,"EMA Source 2")
EMA3source= input.source(close,"EMA Source 3")
EMA4source= input.source(close,"EMA Source 4")
SMA1source= input.source(close,"SMA Source 1")
SMA2source= input.source(close,"SMA Source 2")


averageEma1 = ta.ema(EMA1source, Ema1)
averageEma2 = ta.ema(EMA2source, Ema2)
averageEma3 = ta.ema(EMA3source, Ema3)
averageEma4 = ta.ema(EMA4source, Ema4)
averageSma1 = ta.sma(SMA1source, Sma1)
averageSma2 = ta.sma(SMA2source, Sma2)
vwAverageEma1 = ta.vwma(VWMA1source, VWEma1)
vwAverageEma2 = ta.vwma(VWMA2source, VWEma2)
weightedAverage1 = ta.wma(WMA1source, WMA1)
weightedAverage2 = ta.wma(WMA2source, WMA2)

plot(averageEma1, color=color.white, title="EMA 1")
plot(averageEma2, color=color.red, title="EMA 2")
plot(averageEma3, color=color.red, title="EMA 3")
plot(averageEma4, color=color.red, title="EMA 4")
plot(averageSma1, color=color.white, title="SMA 1")
plot(averageSma2, color=color.red, title="SMA 2")
plot(vwAverageEma1, color=color.white, title="VWEMA 1")
plot(vwAverageEma2, color=color.blue, title="VWEMA 2")
plot(weightedAverage1, color=color.red, title="WMA1")
plot(weightedAverage2, color=color.red, title="WMA2")

plot(ta.vwap(hlc3), color=ta.rising(ta.vwap(hlc3),2)?color.green:color.red,style=plot.style_linebr,linewidth=1,linewidth=3,title="VWAP")
plot(ta.rsi(close,rsiVal))

//superTrend
superTrendFactor=input.int(title="Super Trend Factor", defval=3)
superTrendATR=input.int(title="Super Trend ATR", defval=10)
[supertrend, direction] = ta.supertrend(superTrendFactor, superTrendATR)
plot(direction < 0 ? supertrend : na, "Super Trend Up direction", color = color.green, style=plot.style_linebr)
plot(direction > 0 ? supertrend : na, "Super Trend Down direction", color = color.red, style=plot.style_linebr)
