OPEN-SOURCE SCRIPT

Bitcoin Rainbow Wave

By leoum
Updated
Bitcoin ultimate price model:
1. Power Law + 2. Rainbow Narrowing Bands + 3. Halving Cycle Harmonic Wave + 3. Wave bands

This powerful tool is designed to help traders of all levels understand and navigate the Bitcoin market. It works exclusively with BTC on any timeframe, but looks best on weekly or daily charts. The indicator provides valuable insights into historical price behavior and offers forecasts for the next decade, making it essential for both mid-term and long-term strategies.

How the Model Works

Power Law (Logarithmic Trend): The green line represents the expected long-term price trajectory of Bitcoin based on a logarithmic regression model (power law). This suggests that Bitcoin's price generally increases as a power of 5.44 over time passed.

Rainbow Chart
: Colored bands around the power law trend line illustrate a range of potential price fluctuations. The bands narrow esponentially over time, indicating increasing model accuracy as Bitcoin matures. This chart visually identifies overbought and oversold zones, as well as fair value zones.
Blue Zone: Below the power law trend, indicating an undervalued condition and a potential buying zone.
Green Zone: Around the power law trend, suggesting fair value.
Yellow Zone: Above the power law trend, but within the rainbow bands. Exercise caution, as the price may be overextended.
Red Zone: Far above the power law trend, indicating strong overbought conditions. Consider taking profits or reducing exposure.

Halving Cycle Wave: The fuchsia line represents the cyclical wave component of the model, tied to Bitcoin's halving events (approximately every four years). This wave accounts for the price fluctuations that typically occur around halvings, with price tending to increase leading up to a halving and correct afterwards. The amplitude of the wave decreases over time as the impact of halvings potentially lessens. Additional bands around the wave show the expected range of price fluctuations, aiding traders in making informed decisions.

Customizing Parameters

You can fine-tune the model's appearance by adjusting these input parameters:

show Power Law (true/false): Toggle visibility of the power law trend line.
show Wave (true/false): Toggle visibility of the halving cycle wave.
show Rainbow Chart (true/false): Toggle visibility of the rainbow bands.
show Block Marks (true/false): Toggle visibility of the 70,000 block interval markers.

Using the Model in Your Trading Strategy

Combine this indicator with technical analysis, fundamental analysis, and risk management techniques to develop a comprehensive Bitcoin trading strategy. The model can help you identify potential entry and exit points, assess market sentiment, and manage risk based on Bitcoin's position relative to the power law trend, halving cycle wave, and rainbow chart zones.
Release Notes
The updated version of the indicator now includes predicted buy zones at the bottom and sell zones at the peak of the Bitcoin halving cycle. It is now possible to forecast the timing and levels of peaks and bottoms, as well as predict bull and bear markets.
The display of these zones can be enabled or disabled in the indicator settings.
The appearance has been improved.
Release Notes
Enhancements to the Bitcoin Rainbow Wave Indicator

This enhanced version of the Bitcoin Rainbow Wave indicator now incorporates both buy and sell zones, providing additional insights for potential trading decisions.

Buy Zones:

Past: Six distinct buy zones are identified in the historical price data. These zones are visually represented by green shaded areas between the lower wave band (wave_low_cut) and a calculated straight line based on its intersections with the first and the third rainbow level lines.
Future: Three projected buy zones are added to the chart, extending into the future projection.

Sell Zones:

Past: Four sell zones are identified in the past, indicated by red shaded areas between the upper wave band (wave_up) and a calculated straight line derived from its intersections with the seventh and eighth rainbow level lines.
Future: Three projected sell zones are included in the future projection, also shaded in red.

Interpretation:

Buy Zones: These zones suggest periods where Bitcoin might be considered undervalued or oversold, potentially offering buying opportunities and the beginning of the bull market.
Sell Zones: These zones indicate periods where Bitcoin might be considered overvalued or overbought, potentially signaling selling opportunities and the beginning of the bear market.

Important Considerations:

The Bitcoin Rainbow Wave, including the buy and sell zones, is a model based on historical price patterns and should not be the sole basis for investment decisions.
Always conduct thorough research and consider multiple factors before makingany trading or investment choices.
These zones are projections and may not accurately predict future price movements.
Release Notes
Even spaces between the lines in the rainbow chart. The total rainbow width was reduced by 1% and the wave bands width was reduced by 4%.
Better explanation of the bitcoin time calculations in the code.
Release Notes
Every line in this chart has its straightforward analytical formula.
All functions are dependent only on just one variable - h.
h - is basically a block number but normalized by dividing by 210 000.
This is to make it increase by 1 each halving cycle.
Release Notes
Thorrowly updated the script.

One new feature added - The Fair Value Model.
To see it - go into the inticator options and
select just the folowing 3 options:
Show wave
Show wave line
Show fair value
and deselect all other options.

Then play around other options at your will.
Release Notes
1) Added half the halving marks
2) Updated the average block time after halving 4.
Release Notes
This is the updated entire Rainbow Wave model which contains 5 models inside:

1.Power Law model
log(BTC) = 1.5 + 5.4 * log(h)
2.Rainbow chart model
log(price) = 1.5 + 5.4 * log(h) + k/3 * 0.8^(h+1), where k belongs to {-3, -2, -1, 0, 1, 2, 3, 4, 5}
3.Damped Harmonic oscillation model including 4.Diminishing Ignorance delay (lag) model
log(price) = 1.5 + 5.4 * log(h) + s i n (2pi*h - h^-1.4) * 0.8^(h+1)
5.Rainbow bands model +- 2/3 * 0.8^(h+1)

In the settings section you can turn on and off any part of model at your liking.

The changes implemented to the model and the code:

1) Finetuned the model to a more simplified form (I like less digits):
log(BTC) = 1.5 + 5.4 * log(h)

2) h is now in percentages and it represents the progress from halving to halving. 1 halving or 210000 blocks represents 100%.

3) Minor marks now represent 25% of the halving period (approximately 1 astronomical year).

4) There is now option to turn off the visibility of the minor block marks.

As usual - these models work just for bitcoin price. There is an issue in drawing the future lines. Most likely - the limitations on the amount of calculatioins allowed by TV.
So, it works better for weekly timeframe.
Release Notes
Corrected some visibility issues and cleared the code.
Bands and ChannelsCyclesHarmonic Patterns
leoum

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