V/T Ratio: Onchain BTC Metric
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © MJShahsavar

//@version=5
indicator("V/T Ratio: Onchain BTC Metric", timeframe = "W")
R = input.symbol("BTC_TXS", "Symbol")
r = request.security(R, 'D', close)
S=input.symbol("BTC_TOTALVOLUMEUSD", "Symbol")
s = request.security(S, 'D', close)

C= s/r
D= math.log10(C) 
E= ta.sma(D, 7)

plot (E, color = color.blue, linewidth=1)
