munkeefonix

BTC Prehistoric v1

Another "hack" to overlay early BTCUSD trade data onto a daily or weekly chart. Data is a simplified high/lows from Mt. Gox. This should be easier to use than the "BTC Historic" indicator since you do not lose 2 days of the week. Also you can publish ideas where the old script you would be spamming XAUUSD or some other symbol.

Usage:
Add the indicator to your daily chart. Right click on the right axis, turn off "Scale series only"

Quick note:
Early stamp history will not align with this indicator since there are days when Stamp had no trades.
Will add another indicator soon to fill in the early data for BTCe.

Hope this helps.
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?
study("BTC Prehistoric v1", shorttitle="BTC Prehistoric", overlay=true)

//  Another "hack" to display the early BTCUSD data on btcusd charts. Best used on Daily and Weekly timeframes. 
//
//  Add the indicator to your daily chart.  Right click on the right axis, turn off "Scale series only"
//
//  Note: 
//  The early part of stamp will not align since there are days with no trades, which means no bar was generated for that day. 
//
//  inputs:
//  Offset Time:    Use this to push the timeframe backwards. 
//  Bar Correction: Shift the bars +/- 1.  
//
//  @author munkeefonix
//  https://www.tradingview.com/u/munkeefonix/
//  

_offset = input(-600.0, title="Offset Time", type=float)
_offsetTime=_offset * 86400000.0
_barCorrect= input(0, title="Bar Correction", type=integer) + round(_offset * ((ismonthly ? 1.0 / 30.0 : isweekly ? 1.0 / 7.0 : isdaily ? 1.0 : 1440.0) / interval) )

_t=(time+_offsetTime) / 1000000.0

//ratio of time.
timeRatio(startTime, endTime) => (_t - startTime) / (endTime - startTime)

_logLine(startPrice, endPrice, ratio) =>  ratio < 0.0 or ratio > 1.0 ? na : startPrice + (endPrice - startPrice) * (1.0 - (log(startPrice + (endPrice - startPrice) * (1.0 - ratio)) - log(startPrice)) / (log(endPrice) - log(startPrice)))

LL(startTime, startPrice, endTime, endPrice) => _logLine(startPrice, endPrice, timeRatio(startTime, endTime))

p0 = plot(_t < 1286668.8 ? LL(1286582.4, 0.068, 1286668.8, 0.07999) : 
	_t < 1286755.2 ? LL(1286668.8, 0.07999, 1286755.2, 0.091) : 
	_t < 1287014.4 ? LL(1286755.2, 0.091, 1287014.4, 0.065) : 
	_t < 1287100.8 ? LL(1287014.4, 0.065, 1287100.8, 0.092) : 
	_t < 1287792.0 ? LL(1287100.8, 0.092, 1287792.0, 0.10449) : 
	_t < 1287964.8 ? LL(1287792.0, 0.10449, 1287964.8, 0.09009) : 
	_t < 1288051.2 ? LL(1287964.8, 0.09009, 1288051.2, 0.133) : 
	_t < 1288137.6 ? LL(1288051.2, 0.133, 1288137.6, 0.151) : 
	_t < 1288224.0 ? LL(1288137.6, 0.151, 1288224.0, 0.1731) : 
	_t < 1288742.4 ? LL(1288224.0, 0.1731, 1288742.4, 0.125) : 
	_t < 1288828.8 ? LL(1288742.4, 0.125, 1288828.8, 0.1934) : 
	_t < 1289001.6 ? LL(1288828.8, 0.1934, 1289001.6, 0.2402) : 
	_t < 1289088.0 ? LL(1289001.6, 0.2402, 1289088.0, 0.286) : 
	_t < 1289174.4 ? LL(1289088.0, 0.286, 1289174.4, 0.2261) : 
	_t < 1289347.2 ? LL(1289174.4, 0.2261, 1289347.2, 0.14) : 
	_t < 1289433.6 ? LL(1289347.2, 0.14, 1289433.6, 0.21) : 
	_t < 1289606.4 ? LL(1289433.6, 0.21, 1289606.4, 0.2683) : 
	_t < 1289865.6 ? LL(1289606.4, 0.2683, 1289865.6, 0.223) : 
	_t < 1290124.8 ? LL(1289865.6, 0.223, 1290124.8, 0.2682) : 
	_t < 1290988.8 ? LL(1290124.8, 0.2682, 1290988.8, 0.2151) : 
	_t < 1291334.4 ? LL(1290988.8, 0.2151, 1291334.4, 0.243) : 
	_t < 1291420.8 ? LL(1291334.4, 0.243, 1291420.8, 0.205) : 
	_t < 1291680.0 ? LL(1291420.8, 0.205, 1291680.0, 0.1701) : 
	_t < 1291766.4 ? LL(1291680.0, 0.1701, 1291766.4, 0.22) : 
	_t < 1291852.8 ? LL(1291766.4, 0.22, 1291852.8, 0.1701) : 
	_t < 1292112.0 ? LL(1291852.8, 0.1701, 1292112.0, 0.20676) : 
	_t < 1292371.2 ? LL(1292112.0, 0.20676, 1292371.2, 0.238) : 
	_t < 1293580.8 ? LL(1292371.2, 0.238, 1293580.8, 0.271) : 
	_t < 1294444.8 ? LL(1293580.8, 0.271, 1294444.8, 0.309) : 
	_t < 1295049.6 ? LL(1294444.8, 0.309, 1295049.6, 0.385) : 
	_t < 1295222.4 ? LL(1295049.6, 0.385, 1295222.4, 0.315) : 
	_t < 1295568.0 ? LL(1295222.4, 0.315, 1295568.0, 0.368) : 
	_t < 1295740.8 ? LL(1295568.0, 0.368, 1295740.8, 0.42) : 
	_t < 1296518.4 ? LL(1295740.8, 0.42, 1296518.4, 0.52011) : 
	_t < 1296604.8 ? LL(1296518.4, 0.52011, 1296604.8, 0.69) : 
	_t < 1296864.0 ? LL(1296604.8, 0.69, 1296864.0, 0.8115) : 
	_t < 1297382.4 ? LL(1296864.0, 0.8115, 1297382.4, 0.9264) : 
	_t < 1297987.2 ? LL(1297382.4, 0.9264, 1297987.2, 0.78009) : 
	_t < 1298505.6 ? LL(1297987.2, 0.78009, 1298505.6, 0.9) : 
	_t < 1300406.4 ? LL(1298505.6, 0.9, 1300406.4, 0.70999) : 
	_t < 1300924.8 ? LL(1300406.4, 0.70999, 1300924.8, 0.82659) : 
	_t < 1301875.2 ? LL(1300924.8, 0.82659, 1301875.2, 0.5619) : 
	_t < 1302048.0 ? LL(1301875.2, 0.5619, 1302048.0, 0.6902) : 
	_t < 1302652.8 ? LL(1302048.0, 0.6902, 1302652.8, 0.86) : 
	_t < 1302998.4 ? LL(1302652.8, 0.86, 1302998.4, 1.0255) : 
	_t < 1303430.4 ? LL(1302998.4, 1.0255, 1303430.4, 1.189) : 
	_t < 1303603.2 ? LL(1303430.4, 1.189, 1303603.2, 1.6) : 
	_t < 1304035.2 ? LL(1303603.2, 1.6, 1304035.2, 2.21) : 
	_t < 1304121.6 ? LL(1304035.2, 2.21, 1304121.6, 2.75) : 
	_t < 1304380.8 ? LL(1304121.6, 2.75, 1304380.8, 3.11) : 
	_t < 1304812.8 ? LL(1304380.8, 3.11, 1304812.8, 3.63) : 
	_t < 1305072.0 ? LL(1304812.8, 3.63, 1305072.0, 4.6) : 
	_t < 1305158.4 ? LL(1305072.0, 4.6, 1305158.4, 5.22) : 
	_t < 1305244.8 ? LL(1305158.4, 5.22, 1305244.8, 6.3201) : 
	_t < 1306281.6 ? LL(1305244.8, 6.3201, 1306281.6, 7.21612) : 
	_t < 1306454.4 ? LL(1306281.6, 7.21612, 1306454.4, 8.5002) : 
	_t < 1307059.2 ? LL(1306454.4, 8.5002, 1307059.2, 10.5752) : 
	_t < 1307145.6 ? LL(1307059.2, 10.5752, 1307145.6, 14.04) : 
	_t < 1307232.0 ? LL(1307145.6, 14.04, 1307232.0, 16.2) : 
	_t < 1307404.8 ? LL(1307232.0, 16.2, 1307404.8, 18.26) : 
	_t < 1307491.2 ? LL(1307404.8, 18.26, 1307491.2, 22.2135) : 
	_t < 1307577.6 ? LL(1307491.2, 22.2135, 1307577.6, 26.151) : 
	_t < 1307664.0 ? LL(1307577.6, 26.151, 1307664.0, 20.01) : 
	_t < 1307750.4 ? LL(1307664.0, 20.01, 1307750.4, 13) : 
	_t < 1307836.8 ? LL(1307750.4, 13, 1307836.8, 10.25) : 
	_t < 1307923.2 ? LL(1307836.8, 10.25, 1307923.2, 16) : 
	_t < 1308009.6 ? LL(1307923.2, 16, 1308009.6, 18.001) : 
	_t < 1308268.8 ? LL(1308009.6, 18.001, 1308268.8, 13) : 
	_t < 1308355.2 ? LL(1308268.8, 13, 1308355.2, 15.052) : 
	_t < 1309737.6 ? LL(1308355.2, 15.052, 1309737.6, 13.14) : 
	_t < 1309824.0 ? LL(1309737.6, 13.14, 1309824.0, 11) : 
	_t < 1309910.4 ? LL(1309824.0, 11, 1309910.4, 12.67132) : 
	_t < 1309996.8 ? LL(1309910.4, 12.67132, 1309996.8, 14.5) : 
	_t < 1310947.2 ? LL(1309996.8, 14.5, 1310947.2, 12.51) : 
	_t < 1312329.6 ? LL(1310947.2, 12.51, 1312329.6, 8.7) : 
	_t < 1312588.8 ? LL(1312329.6, 8.7, 1312588.8, 5.742) : 
	_t < 1312761.6 ? LL(1312588.8, 5.742, 1312761.6, 7.055) : 
	_t < 1312934.4 ? LL(1312761.6, 7.055, 1312934.4, 9.5) : 
	_t < 1313366.4 ? LL(1312934.4, 9.5, 1313366.4, 10.72151) : 
	_t < 1314230.4 ? LL(1313366.4, 10.72151, 1314230.4, 9.1) : 
	_t < 1314316.8 ? LL(1314230.4, 9.1, 1314316.8, 7.642) : 
	_t < 1314576.0 ? LL(1314316.8, 7.642, 1314576.0, 8.65) : 
	_t < 1315180.8 ? LL(1314576.0, 8.65, 1315180.8, 7.25) : 
	_t < 1315267.2 ? LL(1315180.8, 7.25, 1315267.2, 6.122) : 
	_t < 1315526.4 ? LL(1315267.2, 6.122, 1315526.4, 4.18) : 
	_t < 1315785.6 ? LL(1315526.4, 4.18, 1315785.6, 5.4121) : 
	_t < 1316044.8 ? LL(1315785.6, 5.4121, 1316044.8, 4.44) : 
	_t < 1316476.8 ? LL(1316044.8, 4.44, 1316476.8, 5.4511) : 
	_t < 1316995.2 ? LL(1316476.8, 5.4511, 1316995.2, 4.721) : 
	_t < 1317945.6 ? LL(1316995.2, 4.721, 1317945.6, 3.7819) : 
	_t < 1318809.6 ? LL(1317945.6, 3.7819, 1318809.6, 2.26) : 
	_t < 1319241.6 ? LL(1318809.6, 2.26, 1319241.6, 2.5515) : 
	_t < 1319328.0 ? LL(1319241.6, 2.5515, 1319328.0, 2.95) : 
	_t < 1319414.4 ? LL(1319328.0, 2.95, 1319414.4, 2.481) : 
	_t < 1319760.0 ? LL(1319414.4, 2.481, 1319760.0, 2.90501) : 
	_t < 1321228.8 ? LL(1319760.0, 2.90501, 1321228.8, 2.09995) : 
	_t < 1322179.2 ? LL(1321228.8, 2.09995, 1322179.2, 2.374) : 
	_t < 1322611.2 ? LL(1322179.2, 2.374, 1322611.2, 2.73225) : 
	_t < 1323648.0 ? LL(1322611.2, 2.73225, 1323648.0, 3.08414) : 
	_t < 1324339.2 ? LL(1323648.0, 3.08414, 1324339.2, 3.483) : 
	_t < 1324944.0 ? LL(1324339.2, 3.483, 1324944.0, 3.962) : 
	_t < 1325376.0 ? LL(1324944.0, 3.962, 1325376.0, 4.615) : 
	_t < 1325721.6 ? LL(1325376.0, 4.615, 1325721.6, 5.57401) : 
    LL(1325721.6, 5.57401, 1325894.4, 6.38), offset=round(_barCorrect), linewidth=2, color=black)

p1=plot(_t < 1286582.4 ? LL(1286496.0, 0.088, 1286582.4, 0.12001) : 
	_t < 1286755.2 ? LL(1286582.4, 0.12001, 1286755.2, 0.103) : 
	_t < 1287100.8 ? LL(1286755.2, 0.103, 1287100.8, 0.119) : 
	_t < 1287187.2 ? LL(1287100.8, 0.119, 1287187.2, 0.103) : 
	_t < 1287878.4 ? LL(1287187.2, 0.103, 1287878.4, 0.19) : 
	_t < 1288742.4 ? LL(1287878.4, 0.19, 1288742.4, 0.275) : 
	_t < 1288828.8 ? LL(1288742.4, 0.275, 1288828.8, 0.23601) : 
	_t < 1289001.6 ? LL(1288828.8, 0.23601, 1289001.6, 0.5) : 
	_t < 1289174.4 ? LL(1289001.6, 0.5, 1289174.4, 0.37) : 
	_t < 1289260.8 ? LL(1289174.4, 0.37, 1289260.8, 0.323) : 
	_t < 1289347.2 ? LL(1289260.8, 0.323, 1289347.2, 0.24) : 
	_t < 1289520.0 ? LL(1289347.2, 0.24, 1289520.0, 0.29) : 
	_t < 1291075.2 ? LL(1289520.0, 0.29, 1291075.2, 0.2299) : 
	_t < 1291420.8 ? LL(1291075.2, 0.2299, 1291420.8, 0.2589) : 
	_t < 1291593.6 ? LL(1291420.8, 0.2589, 1291593.6, 0.225) : 
	_t < 1292457.6 ? LL(1291593.6, 0.225, 1292457.6, 0.255) : 
	_t < 1293580.8 ? LL(1292457.6, 0.255, 1293580.8, 0.301) : 
	_t < 1294790.4 ? LL(1293580.8, 0.301, 1294790.4, 0.3557) : 
	_t < 1294876.8 ? LL(1294790.4, 0.3557, 1294876.8, 0.405) : 
	_t < 1295308.8 ? LL(1294876.8, 0.405, 1295308.8, 0.3495) : 
	_t < 1295568.0 ? LL(1295308.8, 0.3495, 1295568.0, 0.44) : 
	_t < 1296432.0 ? LL(1295568.0, 0.44, 1296432.0, 0.95) : 
	_t < 1296604.8 ? LL(1296432.0, 0.95, 1296604.8, 0.76001) : 
	_t < 1296777.6 ? LL(1296604.8, 0.76001, 1296777.6, 0.88) : 
	_t < 1297209.6 ? LL(1296777.6, 0.88, 1297209.6, 1.09) : 
	_t < 1298160.0 ? LL(1297209.6, 1.09, 1298160.0, 0.94898) : 
	_t < 1300492.8 ? LL(1298160.0, 0.94898, 1300492.8, 0.797) : 
	_t < 1300924.8 ? LL(1300492.8, 0.797, 1300924.8, 0.9) : 
	_t < 1301875.2 ? LL(1300924.8, 0.9, 1301875.2, 0.785) : 
	_t < 1302566.4 ? LL(1301875.2, 0.785, 1302566.4, 0.899) : 
	_t < 1302825.6 ? LL(1302566.4, 0.899, 1302825.6, 1.08999) : 
	_t < 1303430.4 ? LL(1302825.6, 1.08999, 1303430.4, 1.41) : 
	_t < 1303516.8 ? LL(1303430.4, 1.41, 1303516.8, 1.95) : 
	_t < 1303689.6 ? LL(1303516.8, 1.95, 1303689.6, 1.701) : 
	_t < 1303862.4 ? LL(1303689.6, 1.701, 1303862.4, 1.95) : 
	_t < 1303948.8 ? LL(1303862.4, 1.95, 1303948.8, 2.65) : 
	_t < 1304121.6 ? LL(1303948.8, 2.65, 1304121.6, 4.14996) : 
	_t < 1304294.4 ? LL(1304121.6, 4.14996, 1304294.4, 3.495) : 
	_t < 1304812.8 ? LL(1304294.4, 3.495, 1304812.8, 3.937) : 
	_t < 1304985.6 ? LL(1304812.8, 3.937, 1304985.6, 5.99001) : 
	_t < 1305244.8 ? LL(1304985.6, 5.99001, 1305244.8, 8.45) : 
	_t < 1305763.2 ? LL(1305244.8, 8.45, 1305763.2, 7.34) : 
	_t < 1306281.6 ? LL(1305763.2, 7.34, 1306281.6, 9.33) : 
	_t < 1306972.8 ? LL(1306281.6, 9.33, 1306972.8, 10.888) : 
	_t < 1307059.2 ? LL(1306972.8, 10.888, 1307059.2, 14.499) : 
	_t < 1307145.6 ? LL(1307059.2, 14.499, 1307145.6, 18.89) : 
	_t < 1307404.8 ? LL(1307145.6, 18.89, 1307404.8, 24.32) : 
	_t < 1307491.2 ? LL(1307404.8, 24.32, 1307491.2, 31.9099) : 
	_t < 1307750.4 ? LL(1307491.2, 31.9099, 1307750.4, 23.99) : 
	_t < 1308009.6 ? LL(1307750.4, 23.99, 1308009.6, 20.5) : 
	_t < 1308355.2 ? LL(1308009.6, 20.5, 1308355.2, 16.9499) : 
	_t < 1310169.6 ? LL(1308355.2, 16.9499, 1310169.6, 14.6999) : 
	_t < 1312329.6 ? LL(1310169.6, 14.6999, 1312329.6, 12.16) : 
	_t < 1312588.8 ? LL(1312329.6, 12.16, 1312588.8, 9.95) : 
	_t < 1312761.6 ? LL(1312588.8, 9.95, 1312761.6, 8.15998) : 
	_t < 1312848.0 ? LL(1312761.6, 8.15998, 1312848.0, 12.1) : 
	_t < 1312934.4 ? LL(1312848.0, 12.1, 1312934.4, 10.40001) : 
	_t < 1313366.4 ? LL(1312934.4, 10.40001, 1313366.4, 11.89) : 
	_t < 1314316.8 ? LL(1313366.4, 11.89, 1314316.8, 9.889) : 
	_t < 1314835.2 ? LL(1314316.8, 9.889, 1314835.2, 8.35994) : 
	_t < 1315440.0 ? LL(1314835.2, 8.35994, 1315440.0, 7.19786) : 
	_t < 1315612.8 ? LL(1315440.0, 7.19786, 1315612.8, 5.49) : 
	_t < 1315699.2 ? LL(1315612.8, 5.49, 1315699.2, 7.4) : 
	_t < 1315872.0 ? LL(1315699.2, 7.4, 1315872.0, 6.085) : 
	_t < 1316131.2 ? LL(1315872.0, 6.085, 1316131.2, 4.99) : 
	_t < 1316390.4 ? LL(1316131.2, 4.99, 1316390.4, 5.64399) : 
	_t < 1316476.8 ? LL(1316390.4, 5.64399, 1316476.8, 6.795) : 
	_t < 1316649.6 ? LL(1316476.8, 6.795, 1316649.6, 5.83001) : 
	_t < 1317168.0 ? LL(1316649.6, 5.83001, 1317168.0, 4.969) : 
	_t < 1318032.0 ? LL(1317168.0, 4.969, 1318032.0, 4.3399) : 
	_t < 1318809.6 ? LL(1318032.0, 4.3399, 1318809.6, 3.74) : 
	_t < 1318896.0 ? LL(1318809.6, 3.74, 1318896.0, 2.9) : 
	_t < 1318982.4 ? LL(1318896.0, 2.9, 1318982.4, 2.536) : 
	_t < 1319241.6 ? LL(1318982.4, 2.536, 1319241.6, 3.3) : 
	_t < 1319587.2 ? LL(1319241.6, 3.3, 1319587.2, 2.8485) : 
	_t < 1319760.0 ? LL(1319587.2, 2.8485, 1319760.0, 3.255) : 
	_t < 1319846.4 ? LL(1319760.0, 3.255, 1319846.4, 3.82717) : 
	_t < 1320019.2 ? LL(1319846.4, 3.82717, 1320019.2, 3.31589) : 
	_t < 1321315.2 ? LL(1320019.2, 3.31589, 1321315.2, 2.49) : 
	_t < 1322524.8 ? LL(1321315.2, 2.49, 1322524.8, 2.981) : 
	_t < 1323561.6 ? LL(1322524.8, 2.981, 1323561.6, 3.38) : 
	_t < 1324339.2 ? LL(1323561.6, 3.38, 1324339.2, 4.5) : 
	_t < 1325376.0 ? LL(1324339.2, 4.5, 1325376.0, 5.4999) : 
	LL(1325376.0, 5.4999, 1325721.6, 7.22), offset=round(_barCorrect), linewidth=2, color=gray)
fill(p0,p1,color=gray)