OPEN-SOURCE SCRIPT

Bitcoin S2F(X)

Updated
This indicator shows the BTCUSD price based on the S2F Model by PlanB.
We can see not only the S2F(Stock-to-Flow) but also the S2FX(Stock-to-Flow Cross Asset) model announced in 2020.


█ Overview
In this model, bitcoin is treated as comparable to commodities such as gold .
These commodities are known as "store of value" commodities because they retain their value over time due to their relative scarcity.
Bitcoins are scarce.
The number of coins in existence is limited, and the rate of supply is at an all-time low because mining the 2.2 million outstanding coins that have yet to be mined requires a lot of power and computing power.
The Stock-to-flow ratio is used to evaluate the current stock of a commodity (the total amount currently available) versus the flow of new production (the amount mined in a given year).
The higher this ratio, the more scarce the commodity is and the more valuable it is as a store of value.


█ How To View
On the above chart price is overlaid on top of the S2F(X) line. We can see that price has continued to follow the stock-to-flow of Bitcoin over time. By observing the S2F(X) line, we can expect to be able to predict where the price will go.
The coloured circles on the price line of this chart show the number of days until the next Bitcoin halving event. This is an event where the reward for mining new blocks is halved, meaning miners receive 50% fewer bitcoins for verifying transactions. Bitcoin halvings are scheduled to occur every 210,000 blocks until the maximum supply of 21 million bitcoins has been generated by the network. That makes stock-to-flow ratio (scarcity) higher so in theory price should go up.
The stock-to-flow line on this chart incorporates a 463-day average into the model to smooth out the changes caused in the market by the halving events.
I recommend using this indicator on a weekly or monthly basis for BTCUSD .


█ Reference Script
Bitcoin Stock to Flow Multiple by yomofoV
Bitcoin Stock to Flow Multiple
Release Notes
Changed to get the price of BTCUSD from BITSTAMP instead of QUANDL.
BTCUSDstocktoflowTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer