Altcoins capitalization histogram [peregringlk]

This script superseeds "Other altcoins BTC capitalization histogram". The previous versions was a bit confusing in my opinion and lacked some generalization, so I'm now publishing this improved version.

It shows 6 pieces of info:

- Green columns: BTC price change for that day.
- Red bars: Altcoins capitalization change for that day, measured in bitcoins (altcoins_USD_capitalization / BTCUSD )
- Green/red background: green if that day the USD capitalization change was a gain, and red if it was a loss.
- Green line: accum BTC price change for the selected last days.
- Red line: accum altcoin capitalization change measured in BTC for the selected days.
- Dotted blue sequence: accum altcoin USD capitalization change for the selected days.

The base line of the histogram is 1 instead of 0, because I'm showing the price changes as multipliers (price change rates), so if there have been a +20% market movement, the calculated value will be 1.2, and if there have been a -20% market movement, then the value will be 0.8. 1 means no movement (preserved price/capitalization). Price and capitalization changes will be calculated using candle closes.

About the accumulated price changes, it will calculate the accumulated multiplication of the corresponding price change multipliers. For example, if you have set you want 3 days for the accumulation rates, and the last three days saw a -20%, +10% and +15% price/capitalization changes, the current value for the line will be 0.8*1.1*1.15 = 1.0120, or a +1.2% price change respect to the day before yesterday.

By default, if you are looking any ALTBTC market (for example, ETHBTC), instead of showing the USD and BTC capitalization of all alts, it will take the BTC and USD prices of the current market (the USD price will be calculated as ALTBTC * BTCUSD ; and the BTCUSD price will be taken from BITSTAMP , the one with the longest BTC history I know in tradingview). If you are looking any other markets that is not paired with BTC , then it will take the USD capitalization of all altcoins, and the BTC capitalization will be calculated as altcoins_USD_capitalization / BTCUSD (from BITSTAMP as well).

Also, remember that, in both cases (alts capitalization or price), the graph will consistently respect the following rule:

- btc_usd_price_change * alt/capitalization_btc_price_change = alt_usd_price_change.

That applies for both the green/red bars respect to the background, and the green/red line respect to the blue dotted sequence.

Lastly, you may want to know if, in case btc price and altbtc price or capitalization go in opposite directions, who gain the battle? For example, if BTCUSD moved +20%, and an ALTBTC price moved -20%, the result is a loss, because 1.2*0.8 = 0.96, so the ALTUSD price or capitalization moved -4% (remember that, for preserving the USD value, if today's bitcoin change rate is x, the altbtc change rate must be 1/x; so for a -20% BTCUSD price movement, there must be at least a +25% ALTBTC price change to don't loss USD value, because 1/0.8 = 1.25). The background is what shows you that: if the background is green, it means that for that day there was a total USD gain of value, and when it's red, then it was a loss of USD value.

You can customize the following things:

- Accum change rate interval: the "selected days". By default 7.
- Take alts-capitalization?: By default unmarked. The effect when is unmarked is what I have explained in the previous paragraph. If you mark it, then it will use the USD_capitalization of all alts no matter what market you are looking right now.
- Which capitalization do you want? There are three options, that applies when "Take alts-capitalization?" is marked, or otherwise, when you are not looking a BTC-paired market.
- - - All-alts (default option): take CRYPTOCAP:TOTAL2 security as reference Alts-capitalization, which represents all altcoins.
- - - Other-alts: take CRYPTOCAP:OTHERS security as reference Alts-capitalization, which represents all altcoin except the 9 most capitalized alts.
- - - Big-alts: take CRYPTOCAP:TOTAL2 - CRYPTOCAP:OTHERS as reference Alts-capitalization, which represenst only the 9 most capitalized alts.

The idea of this script is:

A) Figuring out what is causing a USD value gain or loss, the alts market movements, or the BTC price change. So you can spot if some altcoin, or all altcoins combined, are gaining or loosing value by themselves or because of bitcoin .

B) Trying to spot or discover some patterns that allows you to identify altseasons. Once an altseason has been developed, the chart will show it in a pretty obvious way (massive red line bells and dotted blue lines with very high values during a period of various weeks). The hard problem is to spot it in advance, and maybe this graph can help.

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 a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?