Lankou VS BTC all
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © lankou

//@version=5

// AUTO
// compare with BTC
indicator('Lankou VS any', overlay=true, precision=10)



divisor = input.symbol("BTCUSDT", 'divisor')

the_string_btc = syminfo.ticker + '/' + divisor
// UNUSED symOpen_btc = security(the_string_btc, timeframe.period, open)

ha_open = request.security(the_string_btc, timeframe.period, open)
ha_high = request.security(the_string_btc, timeframe.period, high)
ha_low = request.security(the_string_btc, timeframe.period, low)
ha_close = request.security(the_string_btc, timeframe.period, close)
_transp = 45
red = color.rgb(200, 0, 70, _transp)
green = color.rgb(0, 200, 70, _transp)
palette = ha_close >= ha_open ? green : red
plotcandle(ha_open, ha_high, ha_low, ha_close, color=palette, wickcolor=palette, bordercolor=palette)
