OPEN-SOURCE SCRIPT
Bitcoin Compressing Power Law Channel

Bitcoin Compressing Power Law Channel
Most Bitcoin power-law channels draw bands of a fixed width around a long-term trendline. This one is different: the channel width is not constant. It starts wide and compresses exponentially as Bitcoin matures, modeling the idea that long-term volatility around the trend tends to shrink over time. That decaying width is the core idea of this indicator.
Why a compressing channel
A standard power-law channel assumes the spread between its upper and lower bounds stays the same across Bitcoin's entire history. In practice, an asset's relative volatility tends to fall as it grows larger and more liquid. This indicator captures that by letting the channel narrow over time toward a configurable floor, so the bounds reflect a maturing market rather than a permanently fixed range.
How it works
The model assumes log(price) scales linearly with log(days since the genesis block), producing a fair-value trendline: logFair = intercept + slope * log10(days). A lower bound is offset below that line, and the upper bound is placed above the lower bound at a distance set by the channel width.
The width itself is the original part: width = minWidth + startWidth * exp(-decaySpeed * yearsSinceGenesis). Early in Bitcoin's history the exponential term is large and the channel is wide. As years pass, that term shrinks toward zero and the width converges to a minimum floor (minWidth). The result is a channel whose envelope tightens over time instead of staying fixed.
What it plots
Three lines in price space (upper, middle, lower) with a shaded fill between the upper and lower bounds. Optionally, a 200 SMA of the current timeframe and a 200 SMA from the weekly timeframe, each toggleable. The weekly SMA is requested from a higher timeframe with lookahead disabled, so it does not repaint using future data. A normalized "Decay Channel Oscillator" is exposed in the Data Window, showing where the current close sits within the channel on a 0 to 1 scale (0 = lower bound, 1 = upper bound).
Inputs
Every model parameter is adjustable: the genesis date, the power-law intercept and slope, the lower offset, the initial and minimum channel widths, and the decay speed that controls how fast the channel compresses. Colors for each line, the fill, and both SMAs are configurable.
How to use it
Apply it to a Bitcoin chart on a longer timeframe such as Daily or Weekly, where a power-law model is most meaningful. The middle line is the model's central estimate; the upper and lower lines describe the expected long-term range, narrowing as time goes on. The Data Window oscillator lets you read how stretched price is within the channel numerically.
Parameters and calibration
The default intercept and slope are starting values that approximate Bitcoin's historical power-law fit. They are not fixed truths. You should re-evaluate them and adjust them, along with the offset, widths, and decay speed, to suit your own analysis and the data range you are studying. Different calibrations will move the channel and change how aggressively it compresses.
Limitations and cautions
This is a model, not a prediction. The power-law relationship is an empirical observation that may break down at any time, and the decay parameters are assumptions, not facts. The compressing width is a hypothesis about volatility maturing over time; it may not hold. This indicator is built for Bitcoin and is not intended for other assets. Nothing here forecasts future prices, and the past behavior of the channel does not guarantee anything about how price will behave going forward.
The code is open-source under the Mozilla Public License 2.0. You are welcome to study it and build on it.
Most Bitcoin power-law channels draw bands of a fixed width around a long-term trendline. This one is different: the channel width is not constant. It starts wide and compresses exponentially as Bitcoin matures, modeling the idea that long-term volatility around the trend tends to shrink over time. That decaying width is the core idea of this indicator.
Why a compressing channel
A standard power-law channel assumes the spread between its upper and lower bounds stays the same across Bitcoin's entire history. In practice, an asset's relative volatility tends to fall as it grows larger and more liquid. This indicator captures that by letting the channel narrow over time toward a configurable floor, so the bounds reflect a maturing market rather than a permanently fixed range.
How it works
The model assumes log(price) scales linearly with log(days since the genesis block), producing a fair-value trendline: logFair = intercept + slope * log10(days). A lower bound is offset below that line, and the upper bound is placed above the lower bound at a distance set by the channel width.
The width itself is the original part: width = minWidth + startWidth * exp(-decaySpeed * yearsSinceGenesis). Early in Bitcoin's history the exponential term is large and the channel is wide. As years pass, that term shrinks toward zero and the width converges to a minimum floor (minWidth). The result is a channel whose envelope tightens over time instead of staying fixed.
What it plots
Three lines in price space (upper, middle, lower) with a shaded fill between the upper and lower bounds. Optionally, a 200 SMA of the current timeframe and a 200 SMA from the weekly timeframe, each toggleable. The weekly SMA is requested from a higher timeframe with lookahead disabled, so it does not repaint using future data. A normalized "Decay Channel Oscillator" is exposed in the Data Window, showing where the current close sits within the channel on a 0 to 1 scale (0 = lower bound, 1 = upper bound).
Inputs
Every model parameter is adjustable: the genesis date, the power-law intercept and slope, the lower offset, the initial and minimum channel widths, and the decay speed that controls how fast the channel compresses. Colors for each line, the fill, and both SMAs are configurable.
How to use it
Apply it to a Bitcoin chart on a longer timeframe such as Daily or Weekly, where a power-law model is most meaningful. The middle line is the model's central estimate; the upper and lower lines describe the expected long-term range, narrowing as time goes on. The Data Window oscillator lets you read how stretched price is within the channel numerically.
Parameters and calibration
The default intercept and slope are starting values that approximate Bitcoin's historical power-law fit. They are not fixed truths. You should re-evaluate them and adjust them, along with the offset, widths, and decay speed, to suit your own analysis and the data range you are studying. Different calibrations will move the channel and change how aggressively it compresses.
Limitations and cautions
This is a model, not a prediction. The power-law relationship is an empirical observation that may break down at any time, and the decay parameters are assumptions, not facts. The compressing width is a hypothesis about volatility maturing over time; it may not hold. This indicator is built for Bitcoin and is not intended for other assets. Nothing here forecasts future prices, and the past behavior of the channel does not guarantee anything about how price will behave going forward.
The code is open-source under the Mozilla Public License 2.0. You are welcome to study it and build on it.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.