VIX SPX & XJO
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © mikey0888

//@version=5
indicator('VIX SPX & XJO')

index = 'CBOE:VIX'
vix = request.security(index, timeframe.period, close)
color signalColor = color.from_gradient(vix, 20, 30, color.new(color.blue, 0), color.new(color.red, 0))
vixPlot = plot(vix, "VIX SPX", signalColor, 1)
hline(30, color=color.blue)

index1 = 'ASX:XVI'
vix1 = request.security(index1, timeframe.period, close)
color signalColor1 = color.from_gradient(vix1, 10, 20, color.new(color.green, 0), color.new(color.red, 0))
vixPlot1 = plot(vix1, "VIX ASX", signalColor1, 1)
hline(20, color=color.green)
