OPEN-SOURCE SCRIPT

Other altcoins BTC capitalization histogram [peregringlk]

Introduction
==========
This study is intented to be used in combination with my other study "Other alts compensated cap". Read its description, in particular, it's rationale, to understand why I have removed the big capitalized altcoins from these studies.

The middle indicator in the image is that other study, while the indicator in the buttom of the image is that one.

It shows, in form of histogram, the BTC capitalization change rate (per candle, using closes) of the "OTHERS" altcoins together with the inverse of the BTCUSD price change rate per candle.

NOTE: I call the change rate to the multiplier factor of price from bar to bar. For example, a change rate of 1.20 means +20% respect to "yesterday", and a change rate of 0.80 means -20%.

The idea is to know what are altcoin markets (against BTC) doing after each BTC price change.

Definitions
=========
I will use ALT from now one as the name of an index or fictional coin that represents the average price of all other altcoins combined. I'll use then ALTUSD to represent the price against USD of such fictional coin (= the OTHERS capitalization, as if the USD capitalization of altcoins were the USD price of ALT), and ALTBTC to represent the same price but against BTC (calculated by taking ALTUSD/BITSTAMP:BTCUSD; the choosing of BITSTAMP is because it's the market with a longer history in tradingview).

Since I use the "OTHERS" security, I cannot know the real altcoin index so I can only estimate by using the capitalization. CIX100 could be a solution, but it is too recent in time as to inspect past price actions.

Description
=========
For example, let's assume BTCUSD decreases by 20% today. It would cause a fall in ALTUSD of 20% (just maths). So, what should it happen in ALTBTC to preserve the original ALTUSD price? People should buy alts in BTC markets by a factor of 1/0.8 = 1.25. Or in other words, unless there are a +25% grow in ALTBTC, ALTUSD would see a decrease in value.

This is what the histogram shows. The red columns shows the ALTBTC change rate per candle, while each green column shows what is the required change rate in ALTBTC required to preserve its ALTUSD value (capitalization). In other words, the green columns are the "targets" to preserve USD capitalization in ALTBTC, while the red histogram shows the actual changes.

Also, it shows two curves. There are just the change rate accumulation during some customizable interval (the same for both lines, and 7 by default; or the "week" for daily candles).

The green line is the accumulated "target" change rate within that period of time (the accumulated product of the last `interval` change rates), and the red line is the actual change rate for the same `interval` candles.

Interpretation
============
If red column values are bigger than the green ones (green column is negative, and red column is positive; or both are positives but the red one "put outs", or both are negative but the red column doesn't "put out"), OTHERS USD capitalization has increased.

If red column values are lower than the green ones (green column is positive and red column is negative; or both are positives but the red one doesn't "put out"; or both are negative but the red column "put outs"), OTHERS USD capitalization has decreased.

The same for the continuous lines: if the red line is above the green one, OTHERS USD capitalization has increased during "the past week". Otherwise, it has decreased.

The added value of this indicator is that it allows you to know "why". For example, if a green column is positive, and its corresponding red column is positive as well, but below the green one, the capitalization has decreased but BECAUSE the btc price has fallen, not because there was a sellof in alts. Actually, there was some buys (the ALTBTC price increased); it just it was not enough to counteract the btc fall.

That can be clearly seen in the remarked candle in the plot, the "coronavirus" sellof. The BTCUSD fall was huge (the hugest in BTC history), and the green column is telling you that to preserve the capitalization a lot of buys were required. However, that didn't happen. Actually, the OTHER alts were pretty quiet (the red column is tiny), causing a massive indirect loss of capitalization.

Also, with the curves, you can know if there was a total gainning or loss of capitalization during the past few days or candles. Also you can try to spot the beginning of alts seasons by crosses between red and green lines: if the red lines crosses above the green one (because there was a continuous sequence of red columns above green ones), it means that, potentially, were are at the beginning of an alt season because people are accumulating.

Table of cases
===========

- if the green column is positive (BTCUSD is down)
- if the red column is positive (ALTBTC is up)
- bigger than the green column: ALTBTC buys are stronger than required by arbitrage and have counteracted and overcome the BTC fall.
- shorter than the green column: there have been some buys but not enough, so the BTCUSD fall has not been fully counteracted.
- if the red column is negative (ALTBTC is down): the loss is double: BTCUSD have lost value + ALTBTC is bleeding.

- If the green column is negative (BTCUSD is up)
- if the red column is negative (ALTBTC is down)
- bigger than the green column: ALTBTC sells are so strong that have counteracted the BTC increase in value, causing a loss of USD value.
- shorter than the green column: there have been sells but overall the ALTUSD price has increased.
- if the red column is positive (ALTBTC is up): the gain is double: BTCUSD has gain value + ALTBTC is also growing.




altcoinsBreadth IndicatorsCAPITALIZATION

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?

Declinazione di responsabilità