BTC Valuation
The BTC Valuation indicator
is a powerful tool designed to assist traders and analysts in evaluating the current state of Bitcoin's market valuation. By leveraging key moving averages and a logarithmic trendline, this indicator offers valuable insights into potential buying or selling opportunities based on historical price value.
Key Features:
200MA/P (200-day Moving Average to Price Ratio):
Provides a perspective on Bitcoin's long-term trend by comparing the current price to its 200-day Simple Moving Average (SMA).
A positive value suggests potential undervaluation, while a negative value may indicate overvaluation.
50MA/P (50-day Moving Average to Price Ratio):
Focuses on short-term trends, offering insights into the relationship between Bitcoin's current price and its 50-day SMA.
Helps traders identify potential bullish or bearish trends in the near term.
LTL/P (Logarithmic TrendLine to Price Ratio):
Incorporates a logarithmic trendline, considering Bitcoin's historical age in days.
Assists in evaluating whether the current price aligns with the long-term logarithmic trend, signaling potential overvaluation or undervaluation.
How to Use:
Z Score Indicator Integration:
The BTC Valuation indicator leverages the Z Score Indicator to score the ratios in a statistical way.
Statistical scoring provides a standardized measure of how far each ratio deviates from the mean, aiding in a more nuanced and objective evaluation.
Z Score Indicator
This BTC Valuation indicator provides a comprehensive view of Bitcoin's valuation dynamics, allowing traders to make informed decisions.
While indicators like BTC Valuation provide valuable insights, it's crucial to remember that no indicator guarantees market predictions.
Traders should use indicators as part of a comprehensive strategy and consider multiple factors before making trading decisions.
Historical performance is not indicative of future results. Exercise caution and continually refine your approach based on market dynamics.
Kitaran
Bitcoin Bubble Risk (Adjusted for Diminishing Returns)Description:
This indicator offers a unique lens through which traders can assess risk in the Bitcoin market, specifically tailored to recognize the phenomenon of diminishing returns. By calculating the natural logarithm of the price relative to a 20-month Simple Moving Average (SMA) and applying a dynamic normalization process, this tool highlights periods of varying risk based on historical price movements and adjusted returns. The indicator is designed to provide nuanced insights into potential risk levels, aiding traders in their decision-making processes.
Usage:
To effectively use this indicator, apply it to your chart while ensuring that Bitcoin's price is set to display in monthly candles. This setting is vital for the indicator to accurately reflect the market's risk levels, as it relies on long-term data aggregation to inform its analysis.
This tool is especially beneficial for traders focused on medium to long-term investment horizons in Bitcoin, offering insights into when the market may be entering higher or lower risk phases. By incorporating this indicator into your analysis, you can gain a deeper understanding of potential risk exposures based on the adjusted price trends and market conditions.
Originality and Utility:
This script stands out for its innovative approach to risk analysis in the cryptocurrency space. By adjusting for the diminishing returns seen in mature markets, it provides a refined perspective on risk levels, enhancing traditional methodologies. This script is a significant contribution to the TradingView community, offering a unique tool for traders aiming to navigate the complexities of the Bitcoin market with informed risk management strategies.
Important Note:
This indicator is for informational purposes only and should not be considered investment advice. Users are encouraged to conduct their own research and consult with financial professionals before making investment decisions. The accuracy of the indicator's predictions can only be ensured when applied to monthly candlestick charts of Bitcoin.
RP - Realized Price for Bitcoin (BTC) [Logue]Realized Price (RP) - The RP is summation of the value of each BTC when it last moved divided by the total number of BTC in circulation. This gives an estimation of the average "purchase" price of BTC on the bitcoin network based on when it was last transacted. This indicator tells us if the average network participant is in a state of profit or loss. This indicator is normally used to detect BTC bottoms, but an extension can be used to detect when the bitcoin network is "highly" overvalued. Because the "strength" of the BTC tops has decreased over the cycles, a logarithmic function for the extension was created by fitting past cycles as log extension = slope * time + intercept. This indicator triggers when the BTC price is above the realized price extension. For the bottoms, the RP is shifted downwards at a default value of 80%. The slope, intercept, and RP bottom shift can all be modified in the script.
CVDD - Coin Value Days Destroyed for Bitcoin (BTC) [Logue]Cumulative Value Days Destroyed (CVDD) - The CVDD was created by Willy Woo and is the ratio of the cumulative value of Coin Days Destroyed in USD and the market age (in days). While this indicator is used to detect bottoms normally, an extension is used to allow detection of BTC tops. When the BTC price goes above the CVDD extension, BTC is generally considered to be overvalued. Because the "strength" of the BTC tops has decreased over the cycles, a logarithmic function for the extension was created by fitting past cycles as log extension = slope * time + intercept. This indicator is triggered for a top when the BTC price is above the CVDD extension. For the bottoms, the CVDD is shifted upwards at a default value of 120%. The slope, intercept, and CVDD bottom shift can all be modified in the script.
PA Helper - Draw Next 5 CandlesA user-friendly tool designed for a quick visual preview of the next 5 candles on your trading chart.
Here's how to use it effortlessly:
Set Open Prices:
Adjust the open prices for the upcoming 5 candles using the inputs labeled Next close #1 to Next close #5.
Toggle Candles:
Use the checkboxes (p1 to p5) to enable or disable the drawing of each corresponding next candle.
Offset Option:
Customize your preview by toggling the offset option:
If offset is set to false, the drawing starts from the current candle's close, providing insight into the next 5 candles relative to the current one.
If offset is set to true, the drawing begins with the next candle, offering a preview of the upcoming 5 candles, effectively skipping the current one.
Visual Representation:
The indicator visually displays the next 5 candles on your chart based on your selected open prices, offering a clear and tailored insight into potential market movements.
BAERMThe Bitcoin Auto-correlation Exchange Rate Model: A Novel Two Step Approach
THIS IS NOT FINANCIAL ADVICE. THIS ARTICLE IS FOR EDUCATIONAL AND ENTERTAINMENT PURPOSES ONLY.
If you enjoy this software and information, please consider contributing to my lightning address
Prelude
It has been previously established that the Bitcoin daily USD exchange rate series is extremely auto-correlated
In this article, we will utilise this fact to build a model for Bitcoin/USD exchange rate. But not a model for predicting the exchange rate, but rather a model to understand the fundamental reasons for the Bitcoin to have this exchange rate to begin with.
This is a model of sound money, scarcity and subjective value.
Introduction
Bitcoin, a decentralised peer to peer digital value exchange network, has experienced significant exchange rate fluctuations since its inception in 2009. In this article, we explore a two-step model that reasonably accurately captures both the fundamental drivers of Bitcoin’s value and the cyclical patterns of bull and bear markets. This model, whilst it can produce forecasts, is meant more of a way of understanding past exchange rate changes and understanding the fundamental values driving the ever increasing exchange rate. The forecasts from the model are to be considered inconclusive and speculative only.
Data preparation
To develop the BAERM, we used historical Bitcoin data from Coin Metrics, a leading provider of Bitcoin market data. The dataset includes daily USD exchange rates, block counts, and other relevant information. We pre-processed the data by performing the following steps:
Fixing date formats and setting the dataset’s time index
Generating cumulative sums for blocks and halving periods
Calculating daily rewards and total supply
Computing the log-transformed price
Step 1: Building the Base Model
To build the base model, we analysed data from the first two epochs (time periods between Bitcoin mining reward halvings) and regressed the logarithm of Bitcoin’s exchange rate on the mining reward and epoch. This base model captures the fundamental relationship between Bitcoin’s exchange rate, mining reward, and halving epoch.
where Yt represents the exchange rate at day t, Epochk is the kth epoch (for that t), and epsilont is the error term. The coefficients beta0, beta1, and beta2 are estimated using ordinary least squares regression.
Base Model Regression
We use ordinary least squares regression to estimate the coefficients for the betas in figure 2. In order to reduce the possibility of over-fitting and ensure there is sufficient out of sample for testing accuracy, the base model is only trained on the first two epochs. You will notice in the code we calculate the beta2 variable prior and call it “phaseplus”.
The code below shows the regression for the base model coefficients:
\# Run the regression
mask = df\ < 2 # we only want to use Epoch's 0 and 1 to estimate the coefficients for the base model
reg\_X = df.loc\ [mask, \ \].shift(1).iloc\
reg\_y = df.loc\ .iloc\
reg\_X = sm.add\_constant(reg\_X)
ols = sm.OLS(reg\_y, reg\_X).fit()
coefs = ols.params.values
print(coefs)
The result of this regression gives us the coefficients for the betas of the base model:
\
or in more human readable form: 0.029, 0.996869586, -0.00043. NB that for the auto-correlation/momentum beta, we did NOT round the significant figures at all. Since the momentum is so important in this model, we must use all available significant figures.
Fundamental Insights from the Base Model
Momentum effect: The term 0.997 Y suggests that the exchange rate of Bitcoin on a given day (Yi) is heavily influenced by the exchange rate on the previous day. This indicates a momentum effect, where the price of Bitcoin tends to follow its recent trend.
Momentum effect is a phenomenon observed in various financial markets, including stocks and other commodities. It implies that an asset’s price is more likely to continue moving in its current direction, either upwards or downwards, over the short term.
The momentum effect can be driven by several factors:
Behavioural biases: Investors may exhibit herding behaviour or be subject to cognitive biases such as confirmation bias, which could lead them to buy or sell assets based on recent trends, reinforcing the momentum.
Positive feedback loops: As more investors notice a trend and act on it, the trend may gain even more traction, leading to a self-reinforcing positive feedback loop. This can cause prices to continue moving in the same direction, further amplifying the momentum effect.
Technical analysis: Many traders use technical analysis to make investment decisions, which often involves studying historical exchange rate trends and chart patterns to predict future exchange rate movements. When a large number of traders follow similar strategies, their collective actions can create and reinforce exchange rate momentum.
Impact of halving events: In the Bitcoin network, new bitcoins are created as a reward to miners for validating transactions and adding new blocks to the blockchain. This reward is called the block reward, and it is halved approximately every four years, or every 210,000 blocks. This event is known as a halving.
The primary purpose of halving events is to control the supply of new bitcoins entering the market, ultimately leading to a capped supply of 21 million bitcoins. As the block reward decreases, the rate at which new bitcoins are created slows down, and this can have significant implications for the price of Bitcoin.
The term -0.0004*(50/(2^epochk) — (epochk+1)²) accounts for the impact of the halving events on the Bitcoin exchange rate. The model seems to suggest that the exchange rate of Bitcoin is influenced by a function of the number of halving events that have occurred.
Exponential decay and the decreasing impact of the halvings: The first part of this term, 50/(2^epochk), indicates that the impact of each subsequent halving event decays exponentially, implying that the influence of halving events on the Bitcoin exchange rate diminishes over time. This might be due to the decreasing marginal effect of each halving event on the overall Bitcoin supply as the block reward gets smaller and smaller.
This is antithetical to the wrong and popular stock to flow model, which suggests the opposite. Given the accuracy of the BAERM, this is yet another reason to question the S2F model, from a fundamental perspective.
The second part of the term, (epochk+1)², introduces a non-linear relationship between the halving events and the exchange rate. This non-linear aspect could reflect that the impact of halving events is not constant over time and may be influenced by various factors such as market dynamics, speculation, and changing market conditions.
The combination of these two terms is expressed by the graph of the model line (see figure 3), where it can be seen the step from each halving is decaying, and the step up from each halving event is given by a parabolic curve.
NB - The base model has been trained on the first two halving epochs and then seeded (i.e. the first lag point) with the oldest data available.
Constant term: The constant term 0.03 in the equation represents an inherent baseline level of growth in the Bitcoin exchange rate.
In any linear or linear-like model, the constant term, also known as the intercept or bias, represents the value of the dependent variable (in this case, the log-scaled Bitcoin USD exchange rate) when all the independent variables are set to zero.
The constant term indicates that even without considering the effects of the previous day’s exchange rate or halving events, there is a baseline growth in the exchange rate of Bitcoin. This baseline growth could be due to factors such as the network’s overall growth or increasing adoption, or changes in the market structure (more exchanges, changes to the regulatory environment, improved liquidity, more fiat on-ramps etc).
Base Model Regression Diagnostics
Below is a summary of the model generated by the OLS function
OLS Regression Results
\==============================================================================
Dep. Variable: logprice R-squared: 0.999
Model: OLS Adj. R-squared: 0.999
Method: Least Squares F-statistic: 2.041e+06
Date: Fri, 28 Apr 2023 Prob (F-statistic): 0.00
Time: 11:06:58 Log-Likelihood: 3001.6
No. Observations: 2182 AIC: -5997.
Df Residuals: 2179 BIC: -5980.
Df Model: 2
Covariance Type: nonrobust
\==============================================================================
coef std err t P>|t| \
\------------------------------------------------------------------------------
const 0.0292 0.009 3.081 0.002 0.011 0.048
logprice 0.9969 0.001 1012.724 0.000 0.995 0.999
phaseplus -0.0004 0.000 -2.239 0.025 -0.001 -5.3e-05
\==============================================================================
Omnibus: 674.771 Durbin-Watson: 1.901
Prob(Omnibus): 0.000 Jarque-Bera (JB): 24937.353
Skew: -0.765 Prob(JB): 0.00
Kurtosis: 19.491 Cond. No. 255.
\==============================================================================
Below we see some regression diagnostics along with the regression itself.
Diagnostics: We can see that the residuals are looking a little skewed and there is some heteroskedasticity within the residuals. The coefficient of determination, or r2 is very high, but that is to be expected given the momentum term. A better r2 is manually calculated by the sum square of the difference of the model to the untrained data. This can be achieved by the following code:
\# Calculate the out-of-sample R-squared
oos\_mask = df\ >= 2
oos\_actual = df.loc\
oos\_predicted = df.loc\
residuals\_oos = oos\_actual - oos\_predicted
SSR = np.sum(residuals\_oos \*\* 2)
SST = np.sum((oos\_actual - oos\_actual.mean()) \*\* 2)
R2\_oos = 1 - SSR/SST
print("Out-of-sample R-squared:", R2\_oos)
The result is: 0.84, which indicates a very close fit to the out of sample data for the base model, which goes some way to proving our fundamental assumption around subjective value and sound money to be accurate.
Step 2: Adding the Damping Function
Next, we incorporated a damping function to capture the cyclical nature of bull and bear markets. The optimal parameters for the damping function were determined by regressing on the residuals from the base model. The damping function enhances the model’s ability to identify and predict bull and bear cycles in the Bitcoin market. The addition of the damping function to the base model is expressed as the full model equation.
This brings me to the question — why? Why add the damping function to the base model, which is arguably already performing extremely well out of sample and providing valuable insights into the exchange rate movements of Bitcoin.
Fundamental reasoning behind the addition of a damping function:
Subjective Theory of Value: The cyclical component of the damping function, represented by the cosine function, can be thought of as capturing the periodic fluctuations in market sentiment. These fluctuations may arise from various factors, such as changes in investor risk appetite, macroeconomic conditions, or technological advancements. Mathematically, the cyclical component represents the frequency of these fluctuations, while the phase shift (α and β) allows for adjustments in the alignment of these cycles with historical data. This flexibility enables the damping function to account for the heterogeneity in market participants’ preferences and expectations, which is a key aspect of the subjective theory of value.
Time Preference and Market Cycles: The exponential decay component of the damping function, represented by the term e^(-0.0004t), can be linked to the concept of time preference and its impact on market dynamics. In financial markets, the discounting of future cash flows is a common practice, reflecting the time value of money and the inherent uncertainty of future events. The exponential decay in the damping function serves a similar purpose, diminishing the influence of past market cycles as time progresses. This decay term introduces a time-dependent weight to the cyclical component, capturing the dynamic nature of the Bitcoin market and the changing relevance of past events.
Interactions between Cyclical and Exponential Decay Components: The interplay between the cyclical and exponential decay components in the damping function captures the complex dynamics of the Bitcoin market. The damping function effectively models the attenuation of past cycles while also accounting for their periodic nature. This allows the model to adapt to changing market conditions and to provide accurate predictions even in the face of significant volatility or structural shifts.
Now we have the fundamental reasoning for the addition of the function, we can explore the actual implementation and look to other analogies for guidance —
Financial and physical analogies to the damping function:
Mathematical Aspects: The exponential decay component, e^(-0.0004t), attenuates the amplitude of the cyclical component over time. This attenuation factor is crucial in modelling the diminishing influence of past market cycles. The cyclical component, represented by the cosine function, accounts for the periodic nature of market cycles, with α determining the frequency of these cycles and β representing the phase shift. The constant term (+3) ensures that the function remains positive, which is important for practical applications, as the damping function is added to the rest of the model to obtain the final predictions.
Analogies to Existing Damping Functions: The damping function in the BAERM is similar to damped harmonic oscillators found in physics. In a damped harmonic oscillator, an object in motion experiences a restoring force proportional to its displacement from equilibrium and a damping force proportional to its velocity. The equation of motion for a damped harmonic oscillator is:
x’’(t) + 2γx’(t) + ω₀²x(t) = 0
where x(t) is the displacement, ω₀ is the natural frequency, and γ is the damping coefficient. The damping function in the BAERM shares similarities with the solution to this equation, which is typically a product of an exponential decay term and a sinusoidal term. The exponential decay term in the BAERM captures the attenuation of past market cycles, while the cosine term represents the periodic nature of these cycles.
Comparisons with Financial Models: In finance, damped oscillatory models have been applied to model interest rates, stock prices, and exchange rates. The famous Black-Scholes option pricing model, for instance, assumes that stock prices follow a geometric Brownian motion, which can exhibit oscillatory behavior under certain conditions. In fixed income markets, the Cox-Ingersoll-Ross (CIR) model for interest rates also incorporates mean reversion and stochastic volatility, leading to damped oscillatory dynamics.
By drawing on these analogies, we can better understand the technical aspects of the damping function in the BAERM and appreciate its effectiveness in modelling the complex dynamics of the Bitcoin market. The damping function captures both the periodic nature of market cycles and the attenuation of past events’ influence.
Conclusion
In this article, we explored the Bitcoin Auto-correlation Exchange Rate Model (BAERM), a novel 2-step linear regression model for understanding the Bitcoin USD exchange rate. We discussed the model’s components, their interpretations, and the fundamental insights they provide about Bitcoin exchange rate dynamics.
The BAERM’s ability to capture the fundamental properties of Bitcoin is particularly interesting. The framework underlying the model emphasises the importance of individuals’ subjective valuations and preferences in determining prices. The momentum term, which accounts for auto-correlation, is a testament to this idea, as it shows that historical price trends influence market participants’ expectations and valuations. This observation is consistent with the notion that the price of Bitcoin is determined by individuals’ preferences based on past information.
Furthermore, the BAERM incorporates the impact of Bitcoin’s supply dynamics on its price through the halving epoch terms. By acknowledging the significance of supply-side factors, the model reflects the principles of sound money. A limited supply of money, such as that of Bitcoin, maintains its value and purchasing power over time. The halving events, which reduce the block reward, play a crucial role in making Bitcoin increasingly scarce, thus reinforcing its attractiveness as a store of value and a medium of exchange.
The constant term in the model serves as the baseline for the model’s predictions and can be interpreted as an inherent value attributed to Bitcoin. This value emphasizes the significance of the underlying technology, network effects, and Bitcoin’s role as a medium of exchange, store of value, and unit of account. These aspects are all essential for a sound form of money, and the model’s ability to account for them further showcases its strength in capturing the fundamental properties of Bitcoin.
The BAERM offers a potential robust and well-founded methodology for understanding the Bitcoin USD exchange rate, taking into account the key factors that drive it from both supply and demand perspectives.
In conclusion, the Bitcoin Auto-correlation Exchange Rate Model provides a comprehensive fundamentally grounded and hopefully useful framework for understanding the Bitcoin USD exchange rate.
MVRVZ - MVRVZ Top and Bottom Indicator for BTC [Logue]Market Value-Realized Value Z-score (MVRVZ) - The MVRV-Z score measures the value of the bitcoin network by comparing the market cap to the realized value and dividing by the standard deviation of the market cap (market cap – realized cap) / std(market cap)). When the market value is significantly higher than the realized value, the bitcoin network is "overvalued". Very high values have signaled cycle tops in the past and low values have signaled bottoms. For tops, the default trigger value is above 6.85. For bottoms, the indicator is triggered when the MVRVZ is below -0.25 (default).
Cycle Oscillator V2 [OmegaTools]Introducing the "Cycle Oscillator" by OmegaTools, an innovative addition to your TradingView analysis toolkit. This script is designed to offer a unique approach to understanding market cycles without the need for volume data, making it versatile across various market conditions and asset classes.
Key Features:
- Cycle Length Customization: Tailor the cycle length from 10 to 200 bars to fit the specific rhythm of the market you're analyzing, ensuring relevance and precision.
- Smoothness Adjustment: Fine-tune the oscillator's smoothness to capture the essence of market movements with options ranging from 1 to 20.
- Aesthetic Flexibility: Choose your preferred colors for the oscillator's upward and downward movements, personalizing your chart to your liking.
- Historical Mode: Toggle the historical mode to either focus on real-time analysis or review past cycle data for backtesting and study.
- Candle Color Modes: Enhance your visual analysis with optional candle coloring based on trend, signals, or extensions, providing immediate insight into market conditions.
Usage Guide:
1. Setting Up: Easily adjust the cycle length and smoothness to match the market's current volatility and your trading style.
2. Understanding Market Cycles: The oscillator plots the average deviation from three distinct moving averages, offering a clear view of potential market turns or continuations.
3. Identifying Overbought/Oversold Conditions: Utilize the upper and lower bounds to recognize extreme market conditions, guiding your entry and exit decisions.
4. Visual Enhancements: Customize the visual aspects, including colors and candle coloring, to make your analysis both effective and aesthetically pleasing.
5. Anticipating Market Movements: The script provides forward-looking lines to suggest potential future highs or lows, aiding in predictive analysis.
Designed with both novice and experienced traders in mind, the "Cycle Oscillator" is a testament to OmegaTools' commitment to providing high-quality, innovative trading tools. Whether you're looking to refine your trading strategy or seeking new analytical perspectives, this script offers a comprehensive solution to navigating the ebbs and flows of the financial markets.
Join the community of traders enhancing their TradingView experience with the "Cycle Oscillator" by OmegaTools. Start exploring deeper market insights and unlock new trading opportunities today.
Min-Max Normalization TrendPrinciple
script is using defined period of last candles
over the period it discovers minimum and maximum values
all the values within the period are normalized to that range
resulting values are in range 0-100
the shown value is average from all the candlestick data, i.e. AVG(OPEN, HIGH, LOW, CLOSE) resulting in more smoothed values which helps to filter out market volatility
How to interpret
if there is a uptrend, the new candle data will be normalized as one of the highest values, around 100
similarly if there is a downtrend, the new candle data will be normalized as one of the lowest values, around 0
to help visualize, there is a configurable threshold for bullish or bearish trends
works well on higher timeframes, e.g. BTC on 1d, but can be used on any timeframe to identify local trends
even though a lookback period of candles is used to define the normalization range, this does not mean that the indicator is lagging - this is because the lookback period only defines the range, but does not influece current value's weight
Configuration
you can configure bullish threshold as well as bearish threshold and respective colors
the range in between is considered sideways
lookback period can be also adjusted
NUPL - Net Unrealized Profit-Loss BTC Tops/Bottoms [Logue]Net Unrealized Profit Loss (NUPL) - The NUPL measures the profit state of the bitcoin network to determine if past transfers of BTC are currently in an unrealized profit or loss state.
Values above zero indicate that the network is in overall profit, while values below zero indicate the network is in overall loss. Highly positive NUPL values indicate overvaluation of the BTC network and relatively negative NUPL values indicate an undervaluation of the BTC network.
For tops: The default setting for tops is based on decreasing "strength" of BTC tops. A decreasing linear function (trigger = slope * time + intercept) was fit to past cycle tops for this indicator and is used as the default to signal macro tops. The user can change the slope and intercept of the line by changing the slope and/or intercept factor. The user also has the option to indicate tops based on a horizontal line via a settings selection. This horizontal line default value is 73. This indicator is triggered for a top when the NUPL is above the trigger value.
For bottoms: Bottoms are displayed based on a horizontal line with a default setting of -13. The indicator is triggered for a bottom when the NUPL is below the bottom trigger value.
LMACD - Logarithmic MACD Weekly BTC Index [Logue]Logarithmic Moving Average Convergence Divergence (LMACD) Weekly Indicator - The LMACD is a momentum indicator that measures the strength of a trend using 12-period and 26-period moving averages. The weekly LMACD for this indicator is calculated by determining the difference between the log (base 10) of the 12-week and 26-week exponential moving averages. Larger positive numbers indicate a larger positive momentum.
For tops: The default setting for tops is based on decreasing "strength" of BTC tops. A decreasing linear function (trigger = slope * time + intercept) was fit to past cycle tops for this indicator and is used as the default to signal macro tops. The user can change the slope and intercept of the line by changing the slope and/or intercept factor. The user also has the option to indicate tops based on a horizontal line via a settings selection. This line default value is 0.125. This indicator is triggered for a top when the LMACD is above the trigger value.
For bottoms: Bottoms are displayed based on a horizontal line with a default setting of -0.07. The indicator is triggered for a bottom when the LMACD is below the bottom trigger value.
Chethan's Price Change AlertsThis Script will alert when the stock price crosses range from 1% to 20%.
Bitcoin Halving Dates + CountdownBitcoin Halving Dates + Countdown Indicator
This unique TradingView Indicator is designed to provide traders and cryptocurrency enthusiasts with critical information about the Bitcoin halving events directly on their charts. Bitcoin halving is a significant event that reduces the reward for mining Bitcoin transactions by half, an occurrence that happens approximately every four years and is known to impact Bitcoin's price significantly.
Features:
▪ Halving Date Lines: The indicator plots vertical lines on the chart at the dates of past and the upcoming Bitcoin halving events.
Customizable Appearance: Users can personalize the look of the indicator with options to change the color of the halving lines, label background, and text for better visibility against their chart theme.
▪ Halving Event Labels: Each halving event is marked with a label indicating its sequence (e.g., 1st Halving) and the exact date it occurred or is expected to occur.
Countdown to Next Halving: For the upcoming halving event, the indicator displays a countdown in days, hours, minutes, and seconds, helping users anticipate the event with precise timing.
▪ User-friendly Options: Toggle the visibility of labels for a cleaner chart appearance and customize color schemes to match personal preferences or chart themes.
Usage:
This indicator is invaluable for those looking to understand Bitcoin's historical halving events and their timing in relation to price movements. It's also perfect for preparing for the next halving event, as the countdown feature provides a clear and timely reminder.
Customization Options:
▪ Show Labels: Toggle on/off the visibility of halving event labels.
Line Color: Choose the color of the vertical lines marking each halving event.
Label Background Color & Text Color: Customize the background and text color of the labels for better readability.
▪ Countdown Label Colors: Separate customization options for the countdown label's background and text colors, allowing for clear visibility and distinction from other chart elements.
Enhance your chart with this indicator and trade with more context and anticipation towards the future of Bitcoin.
HSI - Halving Seasonality Index for Bitcoin (BTC) [Logue]Halving Seasonality Index (HSI) for Bitcoin (BTC) - The HSI takes advantage of the consistency of BTC cycles. Past cycles have formed macro tops around 538 days after each halving. Past cycles have formed macro bottoms every 948 days after each halving. Therefore, a linear "risk" curve can be created between the bottom and top dates to measure how close BTC might be to a bottom or a top. The default triggers are set at 98% risk for tops and 5% risk for bottoms. Extensions are also added as defaults to allow easy identification of the dates of the next top or bottom according to the HSI.
CSI - Calendar Seasonality Index for Bitcoin (BTC) [Logue]Calendar Seasonality Index (CSI) for Bitcoin (BTC) - The CSI takes advantage of the consistency of BTC cycles. Past cycles have formed macro tops every four years near November 21st, starting from in 2013. Past cycles have formed macro bottoms every four years near January 15th, starting from 2011. Therefore, a linear "risk" curve can be created between the bottom and top dates to measure how close BTC might be to a bottom or a top. The default triggers are at 98% risk for tops and 5% risk for bottoms. Extensions are also added as defaults to allow easy identification of the dates of the next top or bottom according to the CSI.
PDM - Plus Directional Movement Weekly BTC Index [Logue]Plus Directional Movement (PDM) weekly BTC index - The PDM is a momentum indicator that measures the strength of a trend in the positive direction. The weekly PDM is calculated by determining the difference between the week's high price and the previous week's high price smoothed by a 14-period moving average. Higher PDM values indicate higher momentum in the positive (higher price) direction. The default triggers for this indicator are PDM values above 55 for tops and below 14 for bottoms.
AWR_WaveTrend Multitimeframe [adapted from LazyBear]I've adapted a script from Lazy Bear (WT trend oscillator)
WaveTrend Oscillator is a port of a famous TS/MT indicator.
When the oscillator (WT1 designed as a line) is above the overbought band (50 to 60) and crosses down the WT2 (dotted line), it is usually a good SELL signal. Similarly, when the oscillator crosses above the signal when below the Oversold band ( (-50 to -60)), it is a good BUY signal.
In this indicator, you can display at the same time, different time frames.
Choice possible are 1 mn, 15 mn, 30 mn, 60 mn, 120 mn, 240 mn, 1D, Week, Month.
Small time frames (1 to 30 mn) are represented by a blue lines (light to dark)
1H is in grey
2H & 4H are in purple (light to dark)
1D is in green
1W is in orange
1M is in black
You can choose which timeframes you want to display for the current period or for the last period closed.
In a few seconds, you perfectly see the selected timeframes trends.
There is also at the bottom right a table summing up all the different values of WT1, WT2 and difference between them.
Positive difference means an upside trend
Negative difference means a downside trend.
Another way of using this indicator is displaying only the difference between WT1 & WT2. It's giving the speed & the direction of all trends. Trends are our friends ...
You can observe the significent times frames and look if they are all positives or negatives or if the speed of lower timeframe cross a longer timeframe of if the speed is decreasing or increasing...
Difference values goes generaly from -20 to 20 (it can exceed a bit but really rare). 12 is already high level of speed.
Many uses possible.
In the exemple posted, I've selected WT1 and WT2 for timeframes 4H, Daily & Weekly.
Marker 1:
Orange lines (WT1) are far below - 50 (-67 here) and cross WT2 pointed lines : weekly buy signal
But this buy signal is balanced by 4H & Daily sell signal = it's marking start of hesitations of main trend !!!!
Marker 2 :
Next buy signal in 4H or daily would normaly confirm the start
Marker 3 :
Sell signal in 4H and daily but weekly has an upside trend ! Start of a counter trend in the trend. To find the perfect timing of that you have to look to lower time frames, because 4H and daily are giving many hesitations signals crossing down & crossing up many times in an overbought zone.
Marker 4 :
End of the counter trend. Most of the time, the countertrend don't go in the "over" zone. That's why if you trading in an counter trend, you have to keep it in mind.
Then a few days later you can see the sell signal. And what a sell signal ! 4H & daily are smashed down really fastly ! Trends change warning !
Marker 5
Long hesitation/change of the trend. Daily WT and 4H are below the weekly trends. Weekly start to go down.
Start of a counter trend inside the trend giving us the best selling signal at her end !
Marker 6 :
Long hesitation/change of the trend.
You have to look in lower time frames to identify the short trend. Difficult to find the best timing to get in. ....
I've add many alerts. When a time frame become positive or negative. When many time frames are positive or negative or above or below 47 level...
Please feel free to explore.
Hope it will help you.
Thanks to Lazybear ! Thousands thanks to Lazybear !
Exemple with difference
TFS - Bitcoin (BTC) Transaction Fee Spike Top Indicator [Logue]Transaction Fee Spike (TFS) - For bitcoin (BTC), transaction fees on the bitcoin network can signal a mania phase when they increase well above historical values. This mania phase may indicate we are near a top in the BTC price. The transaction fee in USD is directly retrieved from Glassnode. The default trigger for this indicator fires when the transaction fees increase above $44/transaction.
Fetch EngulfingBuysThis script makes use of bullish engulfing candles, trend analysis, and time.
The trend is devided between an up- and downtrend. This is based on a simple cross over strategy, using the 9 and 50 moving averages.
The buys are calculated based on how many times a bullish engulfing candle was displayed on the chart during a downtrend. Bullish engulfing candles in an uptrend will never result in a buy signal.
The sells are simply based on time. This means that the script counts how many days you have been in a trade. The default is 100 candles. You can tweak this in the settings of the indicator.
Finally, this script does not provide you with any stop-losses. I am planning on releasing a v2 once I figured out what a good balance is. Also, you might notice that there are more buys than sells. This is because only the first trade in the series is tracked. V2 could improve on this flaw of the indicator.
Hope you enjoy this first iteration of the indicator.
Custom Hourly Highlight PeriodsThis Pine Script indicator for TradingView allows users to visually highlight up to five distinct periods within a trading day directly on their chart. It's designed to enhance chart analysis by emphasizing specific time frames that may coincide with increased market activity, trading sessions, or personal trading strategies.
Features:
Customizable Highlight Periods: Users can define up to five separate highlight periods, specifying both start and end hours for each. This flexibility supports a wide range of trading strategies and time zones.
Individual Period Activation: Each highlight period can be individually enabled or disabled, allowing users to focus on specific times of interest without cluttering the chart.
Color-Coded Visualization: Each period is highlighted with a different transparent color (blue, red, green, purple, and orange) for clear distinction between different segments of the trading day. Colors are customizable to fit personal preferences or chart themes.
User-Friendly Inputs: Simple input fields make it easy to adjust start/end times and toggle the visibility of each period, requiring no coding experience to customize.
Use Cases:
Identifying Repeating Patterns: Certain regional markets exhibit unique behaviors, with some creating sell pressure in the morning, while others generate buy pressure. This indicator allows for clear visualization of these patterns.
Market Session Highlights: Emphasize the opening and closing hours of major markets (e.g., NYSE, NASDAQ, Forex markets) to identify potential volatility or trading opportunities.
Personal Trading Hours: Mark the time frames when you typically trade or when your trading strategy performs best.
Economic Release Times: Highlight periods when important economic reports are released, which can significantly impact market movement.
Global Liquidity Index (Candles)The Global Liquidity Index (Candles) provides a comprehensive overview of major central bank balance sheets worldwide, presenting values converted to USD for consistency and comparability, following relevant forex rates. This indicator, based on the code developed by user ingeforberg , incorporates essential US accounts including the Treasury General Account (TGA) and Reverse Repurchase Agreements (RRP), subtracted from the Federal Reserve's balance sheet to offer a nuanced perspective on US liquidity. Users can tailor their analysis by selectively enabling or disabling specific central banks and special accounts according to their preferences. The index exclusively includes central banks abstaining from currency pegging and with reliable data accessible since late 2007, ensuring a robust aggregated liquidity model.
The calculation of the Global Liquidity Index involves subtracting the Treasury General Account (TGA) and Reverse Repurchase Agreements (RRP) from the Federal Reserve System (FED) and adding the balance sheets of major central banks worldwide: the European Central Bank (ECB), the People's Bank of China (PBC), the Bank of Japan (BOJ), the Bank of England (BOE), the Bank of Canada (BOC), the Reserve Bank of Australia (RBA), the Reserve Bank of India (RBI), the Swiss National Bank (SNB), the Central Bank of the Russian Federation (CBR), the Central Bank of Brazil (BCB), the Bank of Korea (BOK), the Reserve Bank of New Zealand (RBNZ), Sweden's Central Bank (Riksbank), and the Central Bank of Malaysia (BNM).
This tool proves invaluable for individuals seeking a consolidated perspective on global liquidity to interpret macroeconomic trends. Analyzing these balance sheets enables users to discern policy trajectories and assess the global economic landscape, providing insights into asset pricing and assisting investors in making well-informed capital allocation decisions. Historically, assets perceived as riskier, such as small caps and cryptocurrencies, have tended to perform favorably during periods of escalating liquidity. Thus, investors may exercise caution regarding additional risk exposure unless a sustained upward trend in global liquidity is evident.
Main differences between the original and updated indicators:
The "Global Liquidity Index (Candles)" script, compared to the original "Global Liquidity Index" script, offers a more detailed and visually rich representation of liquidity data.
"Global Liquidity Index (Candles)" employs candlestick visualization to represent liquidity data. Each candlestick encapsulates open, high, low, and close prices over a given period. This format provides granular insights into liquidity fluctuations, facilitating a more nuanced analysis.
By using candlesticks, the script offers traders detailed information about liquidity dynamics. They can analyze the patterns formed by candlesticks to discern trends, reversals, and market sentiment shifts, aiding in making informed trading decisions.
Price and Volume Stochastic Divergence [MW]Introduction
This indicator creates signals of interest for entering and exiting long and short positions on equities. It primarily uses up and down trends defined by the change in cumulative volume with some filtering provided by a short period exponential moving average (9 EMA by default).
Settings
Moving Average Period : The moving average over which the cumulative volume delta is calculated. Default: 14
Short Period EMA : The EMA used to represent price action, and is used to generate the EMA Delta line. Default: 27 (3*3*3)
Long Period EMA : The second EMA used to calculate the EMA Delta line. Default: 108 (2*2*3*3*3)
Stochastic K Value : The value used for stochastic curve smoothing. Default: 3
Dot Size : The diameter of the larger indicator. Default: 10
Dot Transparency : The transparency level of the outer ring of the primary BUY/SELL signal. Default: 50 (0 is opaque, 100 is transparent)
Band Distance from 0 to 100 : The upper and lower band distance. Default: 20
Calculations
The cumulative volume delta (CVD) is calculated using candle bodies and wicks. For a red candle, buying volume is calculated by multiplying the volume by the spread percentage of the average of the top and bottom wicks, while Selling Volume is calculated multiplying the volume by the spread percentage of the average of the top and bottom wicks - in addition to the spread percentage of the candle body.
For a green candle, buying volume is calculated by multiplying the volume by the spread percentage of the average of the top and bottom wicks - plus the spread percentage of the candle body - while Selling Volume is calculated using only the spread percentage average of the top and bottom wicks.
Once we have the CVD, we can then perform a stochastic calculation of the CVD value.
stochastic calculation = (current value - lowest value in period) / (highest value in period - lowest value in period)
We’ll do the same stochastic calculation for the short term EMA (27 EMA default) as well as for the difference between the short term and long term EMA.
When the stochastic CVD value is rising from zero and the short term EMA stochastic value equals 100, then it’s a major bullish signal. When the stochastic CVD value is falling from 100 and the short term EMA stochastic value equals 0, then it’s a major bearish signal.
Sometimes, after a bullish or bearish signal, the stochastic CVD will reverse direction triggering a new opposing signal.
How to Interpret
The CVD indicates when there is either more buying than selling or vice versa. A value over 50 for the stochastic CVD curve represents more buying taking place. A value below 50 represents more selling. One might intuitively believe that when there is more buying volume than selling volume that the price would follow suit. This is not always the case.
Most of the time buying volume will precede consistent price movement upwards, and selling volume will precede consistent price movement downwards. When this divergence occurs, the indicator generates a signal. When this divergence begins to fail, and buying or selling volume reverses, then another signal is generated indicating that the buying/selling impulse is headed back into the direction of price action.
These interactions are visually represented on the chart with the coral line that represents CVD, and the yellow line that represents the EMA, or the average price. When the coral line goes up and the yellow line stays down, that’s the BUY signal. When the coral line goes down and the yellow line stays up, that’s the sell signal. When the coral line switches direction, the chart generates another signal showing that volume is moving in a direction that supports the price.
The orange line represents the stochastic representation of the difference between the short EMA (27 by default) and the long EMA (108 by default). EMA differences is a method that can be used to define a trend. When a short term EMA is above a longer term EMA, that may represent a bullish trend. When it is below, that may represent a bearish trend. When all 3 lines are rising or falling in the same direction at the same time, it tends to indicate a movement that has the potential to continue.
Other Usage Notes and Limitations
It's important for traders to be aware of the limitations of any indicator and to use them as part of a broader, well-rounded trading strategy that includes risk management, fundamental analysis, and other tools that can help with reducing false signals, determining trend direction, and providing additional confirmation for a trade decision. Diversifying strategies and not relying solely on one type of indicator or analysis can help mitigate some of these risks.
This indicator can be paired with the MW Volume Impulse indicator if it is desired to see the actual buying and selling cumulative volume deltas. Also, in many cases, the BUY and SELL signals tend to correspond with Keltner Bands (ATR Bands) becoming extended. Lastly, volume weighted average price (VWAP) along with other macro events can impact price and negate signals. To view VWAP lines, you may choose to use the Multi VWAP or Multi VWAP for Gaps indicator to help ensure that the signals you see in this indicator are not being affected by VWAP lines.
PCTR - Pi Cycle Top Risk [Logue]Pi-cycle Top Risk (PCTR) - The PCTR indicator uses divergence of the Pi-cycle top indicator display the risk that a macro top in Bitcoin (BTC) is near. The Pi-cycle top indicator is simply the cross of the 111-day moving average above a 2x multiple of the 350-day moving average of the BTC price. While there is no fundamental reasoning behind why this works, it has worked to indicate previous bitcoin tops by taking advantage of the cyclicality of the BTC price and measurement overextension of BTC price. This indicator triggers a top signal when the fast moving average (111-day) crosses above the 2x multiple of the slow moving average (350-day).
What's interesting is the indicator can also signal a bottom when the divergence of the fast moving average is at an extreme versus the slow moving average. The indicator signals a bottom when the fast MA is 66% away from the slow MA value.
Both the top and bottom signals are clearly shown on the chart on a scale from 100 to 0.