This is just a couple of custom indicators to plot TROLOLO logarithmic regression and the relative valuation of bitcoin against it.
Hope you find it useful.
Hope you find it useful.
註釋
study("TROLOLO RELATIVE VALUATION")// thi is to count days since bitcoin launch
is_newbar(res) =>
t = time(res)
change(t) != 0 ? 1 : 0
count=549+cum(is_newbar("D"))
//this is to calculate trololo valuation per day
TROLOLO2 = pow(10,(2.66167155005961*log(count) - 17.9183761889864))
//this is to get bitcoin price each day
btcprice=tickerid("BNC","BLX")
btcprice2 = security(btcprice,"D",ohlc4,true)
//this is to get the relative value of bitcoin vs trololo valuation
RELATIVEVAL = (btcprice2-TROLOLO2)/TROLOLO2*100
//this is just a reference line
BASELINE = 0
plot(RELATIVEVAL,title='trololoregression',color=red, linewidth=3)
plot(BASELINE, title='baseline',color=black,linewidth=2)
註釋
//version=3study("TROLOLO DAILY LINE")
//calculate how many days since bitcoin launch
is_newbar(res) =>
t = time(res)
change(t) != 0 ? 1 : 0
count=549+cum(is_newbar("D"))
//calculate trololo valuation (log regression)
TROLOLO2 = pow(10,(2.66167155005961*log(count) - 17.9183761889864))
plot(TROLOLO2,title='trololodaily',color=red,linewidht=4)
註釋
These scripts only work in BNC:BLX symbol for daily timeframe. It could be easily adapted for other symbols and timeframes just editing the calculation of days since bitcoin launch免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。