VIX Monitor [Zero54]
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
//@version=5
indicator('VIX Monitor')
ticker = input.string("IN VIX","Monitor",["IN VIX","NIFTY FUT","BANK NIFTY FUT"])
symbol = ticker=="IN VIX"?"INDIAVIX":ticker=="NIFTY FUT"?"NSE:NIFTY1!":ticker=="BANK NIFTY FUT"?"NSE:BANKNIFTY1!":"INDIAVIX"
vix = request.security(symbol, timeframe.period, close)
ma = ta.ema(vix, input.int(20,"EMA Length"))
plot(ma, color=color.new(color.gray, 0),display = display.all - display.price_scale)
v = plot(vix, color=vix > vix[1] ? input.color(color.rgb(243, 194, 33),"Up Color") : input.color(color.rgb(228, 226, 226),"Down Color"), linewidth=2, title='Ticker')