BitMEX BTC Volatility Index
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © BigPhilBxl

//@version=5
indicator("BitMEX BTC Volatility Index")
btc_volatility_symbol = input.symbol(title="BTC Volatility", defval="BVOL24H")
btc_volatility = request.security(btc_volatility_symbol, timeframe=timeframe.period, expression=close)
plot(btc_volatility, color=btc_volatility > 5 ? color.red : color.green, linewidth=2)
