EnkyNakamura

Untitled

Apr 11th, 2020
1,227
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //@version=2
  2.  
  3. study("Bitcoin Price Model v1.3", overlay=true)
  4.  
  5. //stock = security(stock, period, close)
  6. stock = security("QUANDL:BCHAIN/TOTBC",'M', close)
  7.  
  8. if(isweekly)
  9. stock = security("QUANDL:BCHAIN/TOTBC",'W', close)
  10. if(isdaily)
  11. stock = security("QUANDL:BCHAIN/TOTBC",'D', close)
  12.  
  13. //T = ((time/1000)-1279324800)/86400
  14.  
  15. FairPriceLine = exp(-5.48389898381523+stock*0.000000759937156985051)
  16.  
  17. FairPriceLineLoConfLimit = exp(-5.86270418884089+stock*0.000000759937156985051)
  18. FairPriceLineUpConfLimit = exp(-5.10509377878956+stock*0.000000759937156985051)
  19.  
  20. FairPriceLineLoConfLimit1 = exp(-5.66669176679684+stock*0.000000759937156985051)
  21. FairPriceLineUpConfLimit1 = exp(-5.30110620083361+stock*0.000000759937156985051)
  22.  
  23. plot(FairPriceLine, color=gray, title="FairPriceLine", linewidth=4)
  24.  
  25. show_FPLErrorBands = input(true, type=bool, title = "Show Fair Price Line Error Bands 95% Confidence 2St.Dev.")
  26. plot(show_FPLErrorBands ? FairPriceLineLoConfLimit : na, color=gray, title="FairPriceLine Lower Limit", linewidth=2)
  27. plot(show_FPLErrorBands ? FairPriceLineUpConfLimit : na, color=gray, title="FairPriceLine Upper Limit", linewidth=2)
  28.  
  29. show_FPLErrorBands1 = input(false, type=bool, title = "Show Fair Price Line Error Bands 68% Confidence 1St.Dev.")
  30. plot(show_FPLErrorBands1 ? FairPriceLineLoConfLimit1 : na, color=gray, title="FairPriceLine Lower Limit", linewidth=1)
  31. plot(show_FPLErrorBands1 ? FairPriceLineUpConfLimit1 : na, color=gray, title="FairPriceLine Upper Limit", linewidth=1)
  32.  
  33.  
  34. TopPriceLine = exp(-30.1874869318185+pow(stock,0.221847047326554))
  35. TopPriceLineLoConfLimit = exp(-30.780909776998+pow(stock,0.220955789986605))
  36. TopPriceLineUpConfLimit = exp(-29.5940640866389+pow(stock,0.222738304666504))
  37.  
  38. TopPriceLineLoConfLimit1 = exp(-30.3683801339907+pow(stock,0.221575365176983))
  39. TopPriceLineUpConfLimit1 = exp(-30.0065937296462+pow(stock,0.222118729476125))
  40.  
  41. plot(TopPriceLine, color=white, title="TopPriceLine", linewidth=2)
  42.  
  43. show_TOPErrorBands = input(false, type=bool, title = "Show Top Price Line Error Bands 95% Confidence 1St.Dev.")
  44. plot(show_TOPErrorBands ? TopPriceLineLoConfLimit : na, color=white, title="TopPriceLine Lower Limit", linewidth=1)
  45. plot(show_TOPErrorBands ? TopPriceLineUpConfLimit : na, color=white, title="TopPriceLine Upper Limit", linewidth=1)
  46.  
  47. show_TOPErrorBands1 = input(false, type=bool, title = "Show Top Price Line Error Bands 68% Confidence 1St.Dev.")
  48. plot(show_TOPErrorBands1 ? TopPriceLineLoConfLimit1 : na, color=white, title="TopPriceLine Lower Limit", linewidth=1)
  49. plot(show_TOPErrorBands1 ? TopPriceLineUpConfLimit1 : na, color=white, title="TopPriceLine Upper Limit", linewidth=1)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×