CofG Oscillator w/ Added Normalizations/TransformationsThis indicator is a unique study in normalization/transformation techniques, which are applied to the CG (center of gravity) Oscillator, a popular oscillator made by John Ehlers.
The idea to transform the data from this oscillator originated from observing the original indicator, which exhibited numerous whips. Curious about the potential outcomes, I began experimenting with various normalization/transformation methods and discovered a plethora of interesting results.
The indicator offers 10 different types of normalization/transformation, each with its own set of benefits and drawbacks. My personal favorites are the Quantile Transformation , which converts the dataset into one that is mostly normally distributed, and the Z-Score , which I have found tends to provide better signaling than the original indicator.
I've also included the option of showing the mean, median, and mode of the data over the period specified by the transformation period. Using this will allow you to gather additional insights into how these transformations effect the distribution of the data series.
I've also included some notes on what each transformation does, how it is useful, where it fails, and what I've found to be the best inputs for it (though I'd encourage you to play around with it yourself).
Types of Normalization/Transformation:
1. Z-Score
Overview: Standardizes the data by subtracting the mean and dividing by the standard deviation.
Benefits: Centers the data around 0 with a standard deviation of 1, reducing the impact of outliers.
Disadvantages: Works best on data that is normally distributed
Notes: Best used with a mid-longer transformation period.
2. Min-Max
Overview: Scales the data to fit within a specified range, typically 0 to 1.
Benefits: Simple and fast to compute, preserves the relationships among data points.
Disadvantages: Sensitive to outliers, which can skew the normalization.
Notes: Best used with mid-longer transformation period.
3. Decimal Scaling
Overview: Normalizes data by moving the decimal point of values.
Benefits: Simple and straightforward, useful for data with varying scales.
Disadvantages: Not commonly used, less intuitive, less advantageous.
Notes: Best used with a mid-longer transformation period.
4. Mean Normalization
Overview: Subtracts the mean and divides by the range (max - min).
Benefits: Centers data around 0, making it easier to compare different datasets.
Disadvantages: Can be affected by outliers, which influence the range.
Notes: Best used with a mid-longer transformation period.
5. Log Transformation
Overview: Applies the logarithm function to compress the data range.
Benefits: Reduces skewness, making the data more normally distributed.
Disadvantages: Only applicable to positive data, breaks on zero and negative values.
Notes: Works with varied transformation period.
6. Max Abs Scaler
Overview: Scales each feature by its maximum absolute value.
Benefits: Retains sparsity and is robust to large outliers.
Disadvantages: Only shifts data to the range , which might not always be desirable.
Notes: Best used with a mid-longer transformation period.
7. Robust Scaler
Overview: Uses the median and the interquartile range for scaling.
Benefits: Robust to outliers, does not shift data as much as other methods.
Disadvantages: May not perform well with small datasets.
Notes: Best used with a longer transformation period.
8. Feature Scaling to Unit Norm
Overview: Scales data such that the norm (magnitude) of each feature is 1.
Benefits: Useful for models that rely on the magnitude of feature vectors.
Disadvantages: Sensitive to outliers, which can disproportionately affect the norm. Not normally used in this context, though it provides some interesting transformations.
Notes: Best used with a shorter transformation period.
9. Logistic Function
Overview: Applies the logistic function to squash data into the range .
Benefits: Smoothly compresses extreme values, handling skewed distributions well.
Disadvantages: May not preserve the relative distances between data points as effectively.
Notes: Best used with a shorter transformation period. This feature is actually two layered, we first put it through the mean normalization to ensure that it's generally centered around 0.
10. Quantile Transformation
Overview: Maps data to a uniform or normal distribution using quantiles.
Benefits: Makes data follow a specified distribution, useful for non-linear scaling.
Disadvantages: Can distort relationships between features, computationally expensive.
Notes: Best used with a very long transformation period.
Conclusion
Feel free to explore these normalization/transformation techniques to see how they impact the performance of the CG Oscillator. Each method offers unique insights and benefits, making this study a valuable tool for traders, especially those with a passion for data analysis.
M-oscillator
Advanced ADX [CryptoSea]The Advanced ADX Analysis is a sophisticated tool designed to enhance market analysis through detailed ADX calculations. This tool is built for traders who seek to identify market trends, strength, and potential reversals with higher accuracy. By leveraging the Average Directional Index (ADX), Directional Indicator Plus (DI+), and Directional Indicator Minus (DI-), this indicator offers a comprehensive view of market dynamics.
New Overlay Feature: This script uses the new 'force overlay' feature which lets you plot on the chart as well as plotting in an oscillator pane at the same time.
force_overlay=true
Key Features
Comprehensive ADX Tracking: Tracks ADX values along with DI+ and DI- to provide a complete view of market trend strength and direction. The ADX measures the strength of the trend, while DI+ and DI- indicate the trend direction. This combined analysis helps traders identify strong and weak trends with precision.
Trend Duration Monitoring: Monitors the duration of strong and weak trends, offering insights into trend persistence and potential reversals. By keeping track of how long the ADX has been above or below a certain threshold, traders can gauge the sustainability of the current trend.
Customizable Alerts: Features multiple alert options for strong trends, weak trends, and DI crossovers, ensuring traders are notified of significant market events. These alerts can be tailored to notify traders when certain conditions are met, such as when the ADX crosses a threshold or when DI+ crosses DI-.
Adaptive Display Options: Includes customizable background color settings and extended statistics display for in-depth market analysis. Users can choose to highlight strong or weak trends on the chart background, making it easier to visualize market conditions at a glance.
In the example below, we have a bullish scenario play out where the DI+ has been above the DI- for 11 candles and our dashboard shows the average is 10.48 candles. With the ADX above its threshold this would be a bullish signal.
This ended up in a 20%+ move to the upside. The dashboard will help point out things to consider when looking to exit the position, the DI+ getting close to the max DI+ duration would be a sign that momentum is weakening and that price may cool off or even reverse.
How it Works
ADX Calculation: Computes the ADX, DI+, and DI- values using a user-defined period. The ADX is derived from the smoothed average of the absolute difference between DI+ and DI-. This calculation helps determine the strength of a trend without considering its direction.
Trend Duration Analysis: Tracks and calculates the duration of strong and weak trends, as well as DI+ and DI- durations. This analysis provides a detailed view of how long a trend has been in place, helping traders assess the reliability of the trend.
Alert System: Provides a robust alert system that triggers notifications for strong trends, weak trends, and DI crossovers. The alerts are based on specific conditions such as the duration of the trend or the crossover of directional indicators, ensuring traders are informed about critical market movements.
Visual Enhancements: Utilizes color gradients and background settings to visually represent trend strength and duration. This feature enhances the visual analysis of trends, making it easier for traders to identify significant market changes at a glance.
In the example below, we see the ADX weakening after we have just had a move up, if you are looking to get into this position you want to see the ADX growing with either the DI+ or DI- breaking their average durations.
As you can see below, although the ADX manages to move above the threshold, there are no DI+/- breaks which is shown by price moving sideways. Not something most traders would be interested in.
Application
Strategic Decision-Making: Assists traders in making informed decisions by providing detailed analysis of ADX movements and trend durations. By understanding the strength and direction of trends, traders can better time their entries and exits.
Trend Confirmation: Reinforces trading strategies by confirming potential reversals and trend strength through ADX and DI analysis. This confirmation helps traders validate their trading signals, reducing the risk of false signals.
Customized Analysis: Adapts to various trading styles with extensive input settings that control the display and sensitivity of trend data. Traders can customize the indicator to suit their specific needs, making it a versatile tool for different trading strategies.
The Advanced ADX Analysis by is an invaluable addition to a trader's toolkit, offering depth and precision in market trend analysis to navigate complex market conditions effectively. With its comprehensive tracking, alert system, and customizable display options, this indicator provides traders with the tools they need to stay ahead of the market.
Multiple Divergences [UAlgo]🔶 Description:
"Multiple Divergences " is providing insights into potential divergences across multiple indicators. Divergence, a concept in technical analysis, occurs when the price of an asset diverges from the direction of an accompanying indicator, suggesting a possible reversal or continuation in the price trend.
🔶 Key Features:
Customizable Divergence Settings: Users can adjust parameters such as the minimum number of divergences required to display labels, pivot lookback periods, and plot options for various types of divergences (regular or hidden) and bullish/bearish labels.
Multiple Technical Indicators: The script supports a wide range of popular indicators, including MACD, RSI, Stochastic, CCI, Momentum, OBV, DMI Oscillator, VWmacd, Chaikin Money Flow, Money Flow Index, and Awesome Oscillator. You can choose any of the above-mentioned technical indicators for which you want to capture divergences.
🔶 Purpose of Using Multiple Technical Indicators
In the complex and volatile world of trading, relying on a single indicator can provide an incomplete or misleading picture of market conditions. Different technical indicators analyze various aspects of price movement, volume, and momentum, offering unique insights that can complement each other. By utilizing multiple indicators, traders can cross-verify signals, reduce false positives, and increase the reliability of their trading decisions.
Identifying divergences across multiple indicators further enhances this reliability, as a divergence spotted in several indicators simultaneously is a stronger signal than one found in isolation. This comprehensive approach helps traders to anticipate potential market turning points with greater confidence and precision.
By integrating multiple technical indicators and meticulously tracking their divergences, this script aims traders with a robust tool for navigating the complexities of financial markets.
🔶 How to Obtain Divergences
Regular Bullish Divergence:
This occurs when the price makes a new lower low compared to a previous pivot low, indicating a downward trend. Simultaneously, the selected oscillator makes a higher low compared to its previous pivot low, indicating a potential upward momentum. This divergence suggests that, despite the falling price, the underlying momentum is strengthening, potentially signaling a reversal to an upward trend.
Regular Bearish Divergence:
This happens when the price makes a new higher high compared to a previous pivot high, indicating an upward trend. Concurrently, the selected oscillator makes a lower high compared to its previous pivot high, indicating weakening momentum. This divergence suggests that, despite the rising price, the underlying momentum is weakening, potentially signaling a reversal to a downward trend.
Example for Regular Bullish and Regular Bearish Divergences (Minimum Divergenes Count to Display = 3, All Selected):
Hidden Bullish Divergence:
Hidden bullish divergence is observed when the price makes a higher low compared to a previous pivot low, indicating an upward trend. At the same time, the oscillator makes a lower low compared to its previous pivot low, indicating a potential strengthening momentum. This condition suggests that the underlying strength of the upward trend is intact, despite the oscillator indicating otherwise.
Hidden Bearish Divergence:
This occurs when the price makes a lower high compared to a previous pivot high, indicating a downward trend. Simultaneously, the oscillator makes a higher high compared to its previous pivot high, indicating a potential weakening momentum. This divergence suggests that the underlying weakness of the downward trend is intact, despite the oscillator indicating otherwise.
Divergence Labeling: The script dynamically generates labels on the chart to visually highlight detected divergences based on user-defined criteria. (E.g. "5 Regular Bullish Divs." , "1 Hidden Bearish Div")
🔶 Disclaimer:
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
Auto Fitting GARCH OscillatorOverview
The Auto Fitting GARCH Oscillator is a sophisticated volatility indicator that dynamically fits GARCH (Generalized Autoregressive Conditional Heteroskedasticity) models to the price data. It optimizes the parameters of the GARCH model to provide a reliable measure of volatility, which is then normalized to fit within a 0-100 range, making it easy to interpret as an oscillator. This indicator helps traders identify periods of high and low volatility, which can be crucial for making informed trading decisions.
Key Features
Dynamic GARCH(p, q) Fitting: Automatically optimizes the GARCH model parameters for the best fit.
Volatility Oscillator: Normalizes the volatility measure to a 0-100 range, indicating overbought and oversold conditions.
Customizable Timeframes: Adapts to various chart timeframes, from intraday to monthly data.
Projected Volatility: Provides options for projecting future volatility based on the optimized GARCH model.
User-friendly Visualization: Displays the oscillator with clear overbought and oversold levels.
Concepts Underlying the Calculations
The indicator leverages the GARCH model, which is widely used in financial time series analysis to model volatility clustering. The GARCH model considers past variances and returns to predict future volatility. This indicator dynamically adjusts the p and q parameters of the GARCH model within a specified range to find the optimal fit, minimizing the sum of squared errors (SSE).
How It Works
Data Preparation: Calculates the logarithmic returns and lagged variances from the price data.
SSE Optimization: Iterates through different p and q values to find the best GARCH parameters that minimize the SSE.
GARCH Calculation: Uses the optimized parameters to calculate the GARCH-based volatility.
Normalization: Normalizes the calculated volatility to a 0-100 range to form an oscillator.
Visualization: Plots the oscillator with overbought (70) and oversold (30) levels for easy interpretation.
How Traders Can Use It
Volatility Analysis: Identify periods of high and low volatility to adjust trading strategies accordingly.
Overbought/Oversold Conditions: Use the oscillator levels to identify potential reversal points in the market.
Risk Management: Incorporate volatility measures into risk management strategies to avoid trades during highly volatile periods.
Projection: Use the projected volatility feature to anticipate future market conditions.
Example Usage Instructions
Add the Indicator: Apply the "Auto Fitting GARCH Oscillator" to your chart from the Pine Script editor or TradingView library.
Customize Parameters: Adjust the maxP and maxQ values to set the range for GARCH model optimization.
Select Data Type: Choose between "Projected Variance in %" or "Projected Deviation in %" based on your analysis preference.
Set Projection Periods: Use the perForward input to specify how many periods forward you want to project the volatility.
Interpret the Oscillator: Observe the oscillator line and the overbought/oversold levels to make informed trading decisions.
Efficiency Weighted OrderFlow [AlgoAlpha]Introducing the Efficiency Weighted Orderflow Indicator by AlgoAlpha! 📈✨
Elevate your trading game with our cutting-edge Efficiency Weighted Orderflow Indicator, designed to provide clear insights into market trends and potential reversals. This tool is perfect for traders seeking to understand the underlying market dynamics through efficiency-weighted volume calculations.
🌟 Key Features 🌟
✨ Smooth OrderFlow Calculation : Option to smooth order flow data for more consistent signals.
🔧 Customizable Parameters : Adjust the Order Flow Period and HMA Smoothing Length to fit your trading strategy.
🔍 Visual Clarity : Easily distinguish between bullish and bearish trends with customizable colors.
📊 Standard Deviation Normalization : Keeps order flow values normalized for better comparison across different market conditions.
🔔 Trend Reversal Alerts : Stay ahead with built-in alert conditions for significant order flow changes.
🚀 Quick Guide to Using the Efficiency Weighted Orderflow Indicator
🛠 Add the Indicator: Search for "Efficiency Weighted Orderflow " in TradingView's Indicators & Strategies. Customize settings like smoothing and order flow period to fit your trading style.
📊 Market Analysis: Watch for trend reversal alerts to capture trading opportunities by studying the behaviour of the indicator.
🔔 Alerts: Enable notifications for significant order flow changes to stay updated on market trends.
🔍 How It Works
The Efficiency Weighted Orderflow Indicator starts by calculating the efficiency of price movements using the absolute difference between the close and open prices, divided by volume. The order flow is then computed by summing these efficiency-weighted volumes over a specified period, with an option to apply Hull Moving Average (HMA) smoothing for enhanced signal stability. To ensure robust comparison, the order flow is normalized using standard deviation. The indicator plots these values as columns, with distinct colors representing bullish and bearish trends. Customizable parameters for period length and smoothing allow traders to tailor the indicator to their strategies. Additionally, visual cues and alert conditions for trend reversals and significant order flow changes keep traders informed and ready to act. This indicator improves on the Orderflow aspect of our Standardized Orderflow indicator. The Efficiency Weighted Orderflow is less susceptible to noise and is also quicker at detecting trend changes.
Moving Average Z-Score Suite [BackQuant]Moving Average Z-Score Suite
1. What is this indicator
The Moving Average Z-Score Suite is a versatile indicator designed to help traders identify and capitalize on market trends by utilizing a variety of moving averages. This indicator transforms selected moving averages into a Z-Score oscillator, providing clear signals for potential buy and sell opportunities. The indicator includes options to choose from eleven different moving average types, each offering unique benefits and characteristics. It also provides additional features such as standard deviation levels, extreme levels, and divergence detection, enhancing its utility in various market conditions.
2. What is a Z-Score
A Z-Score is a statistical measurement that describes a value's relationship to the mean of a group of values. It is measured in terms of standard deviations from the mean. For instance, a Z-Score of 1.0 means the value is one standard deviation above the mean, while a Z-Score of -1.0 indicates it is one standard deviation below the mean. In the context of financial markets, Z-Scores can be used to identify overbought or oversold conditions by determining how far a particular value (such as a moving average) deviates from its historical mean.
3. What moving averages can be used
The Moving Average Z-Score Suite allows users to select from the following eleven moving averages:
Simple Moving Average (SMA)
Hull Moving Average (HMA)
Exponential Moving Average (EMA)
Weighted Moving Average (WMA)
Double Exponential Moving Average (DEMA)
Running Moving Average (RMA)
Linear Regression Curve (LINREG) (This script can be found standalone )
Triple Exponential Moving Average (TEMA)
Arnaud Legoux Moving Average (ALMA)
Kalman Hull Moving Average (KHMA)
T3 Moving Average
Each of these moving averages has distinct properties and reacts differently to price changes, allowing traders to select the one that best fits their trading style and market conditions.
4. Why Turning a Moving Average into a Z-Score is Innovative and Its Benefits
Transforming a moving average into a Z-Score is an innovative approach because it normalizes the moving average values, making them more comparable across different periods and instruments. This normalization process helps in identifying extreme price movements and mean-reversion opportunities more effectively. By converting the moving average into a Z-Score, traders can better gauge the relative strength or weakness of a trend and detect potential reversals. This method enhances the traditional moving average analysis by adding a statistical perspective, providing clearer and more objective trading signals.
5. How It Can Be Used in the Context of a Trading System
In a trading system, it can be used to generate buy and sell signals based on the Z-Score values. When the Z-Score crosses above zero, it indicates a potential buying opportunity, suggesting that the price is above its mean and possibly trending upward. Conversely, a Z-Score crossing below zero signals a potential selling opportunity, indicating that the price is below its mean and might be trending downward. Additionally, the indicator's ability to show standard deviation levels and extreme levels helps traders set profit targets and stop-loss levels, improving risk management and trade planning.
6. How It Can Be Used for Trend Following
For trend-following strategies, it can be particularly useful. The Z-Score oscillator helps traders identify the strength and direction of a trend. By monitoring the Z-Score and its rate of change, traders can confirm the persistence of a trend and make informed decisions to enter or exit trades. The indicator's divergence detection feature further enhances trend-following by identifying potential reversals before they occur, allowing traders to capitalize on trend shifts. By providing a clear and quantifiable measure of trend strength, this indicator supports disciplined and systematic trend-following strategies.
No backtests for this indicator due to the many options and ways it can be used,
Enjoy
FX Index Curve Oscillator (FICO)We can approximate the TVC:DXY with simple multiplication, rather than using geometric weighted averages; the values will be different, but the charts will look almost the same. Because we can make a "good enough" version of DXY, we can also extend this concept to the other major currencies:
AUD - Yellow
CAD - Red
CHF - Orange
EUR - Purple
GBP - Green
JPY - White
NZD - Lime green
USD - Blue
This indicator works by constructing an "index" for each currency, performing a lookback to figure out the rate of change, and then smoothing the values. These values are fed through an oscillator to normalize them between -1.00 and +1.00, before finally being smoothed again. Interestingly, using HMA to smooth them the second time will cause the values to leak past 1.00, which we can also use as a signal.
If you want to change the values, I find that the biggest difference comes from the lookback and oscillator settings; the MA/smoothing is probably good enough. The default settings are for doing forex trades on the daily chart. Other timeframes are possible, but I could not find any settings that work. It might also be possible to use a similar approach on other assets (crypto, metals, indexes, etc) but I have not tried yet.
In my own testing, what I found to be a good approach is to look for a currency to be above +1 and another to be below -1, and then look for color changes; ideally this will happen on the same bar/candle.
You can also consider two line crosses, breaking above or below 1, etc as other entry signals. I find that price will either move immediately, or take a candle or two to retrace and then start moving.
Happy trading!
Unfortunately, the indicator pane can get quite crowded; if you're testing for a single currency pair, you may want to disable some of the plotted lines:
Bitcoin Power Law Global Liqudity Model by G. SantostasiIn recent studies, we've observed a notable correlation between Bitcoin's price and global liquidity metrics. This relationship reveals significant insights into Bitcoin's price movements and offers a new perspective on using macroeconomic indicators to understand and predict Bitcoin's market trends.
Our analysis shows that Bitcoin's price exhibits periodic bubbles, which seem closely associated with oscillations in global liquidity. Notably, the overall price path of Bitcoin appears to be a complex function of global liquidity. This relationship is not as simple as the Bitcoin Power Law in time that can be described with a simple equation, Price ∼ time⁶.
Instead, we have developed a polynomial model to describe this complex relationship between liquidity and Bitcoin price. With a 4-degree polynomial (with 5 different parameters needed to fit the data), we can get a decent fit to the data.
The fit is obtained using 500 data points by polynomial regression. The vector coefficients of the polynomial are obtained such that the sum of squared error between the observations and theoretical polynomial model is minimized.
This model needs to be taken with a grain of salt given the warning by famous mathematician Von Neumann: "With four parameters I can fit an elephant, and with five I can make him wiggle his trunk." discussing a model created by Italian Physicist Fermi. By this he meant that the Fermi simulations relied on too many input parameters, presupposing an overfitting phenomenon.
We can still gain some insights into the relationship between Global Liquidity and the price evolution of Bitcoin using this complex model.
When the price of Bitcoin is plotted against our global liquidity index, we observe a polynomial relationship. This model allows us to see when Bitcoin's price deviates significantly from the predicted value based on global liquidity:
Above the Model: When Bitcoin's price is above the polynomial fit, it indicates a potential lack of sufficient liquidity to support the current price level, suggesting a likely correction.
Below the Model: Conversely, when the price is below the fit, it implies that liquidity might be higher than what is reflected in the price, indicating potential upward movement.
Our global liquidity index comprises several key macroeconomic metrics from major financial institutions worldwide. Here are some of the major components:
RRP (Reverse Repurchase Agreements): This metric indicates the level of liquidity in the financial system through temporary sales of securities with an agreement to repurchase them.
FED (Federal Reserve System): Represents the balance sheet of the US central bank, reflecting its monetary policy actions.
TGA (Treasury General Account): Reflects the US Treasury’s cash balance, impacting the liquidity in the banking system.
PBC (People's Bank of China): Shows the monetary policy actions and liquidity management by China’s central bank.
ECB (European Central Bank): Represents the balance sheet and liquidity management actions of the Eurozone's central bank.
BOJ (Bank of Japan): Reflects Japan's central bank's monetary policy and liquidity measures.
Other Central Banks: Includes metrics from various other central banks like the Bank of England, Bank of Canada, Reserve Bank of Australia, etc.
M2 Money Supply: This includes money supply metrics from various countries like the USA, Europe, China, Japan, and other significant economies.
These components collectively provide a comprehensive view of global liquidity, which is crucial for understanding its impact on Bitcoin's price.
Using the polynomial model and the author's Bitcoin power law model we can create 2 oscillators, one that shows deviations from the trend (normalized to the price to make the peaks more uniform) and the other showing deviations of the polynomial liquidity model from the power law trend.
The oscillators show the difference between the price and the power law model relative to the price, Orange Line. The Blue Line is instead the difference between the Global Liquidity Model of the price and the power law model relative to the model itself. The two oscillators can be overlayed to show their differences and similarities.
Analysis: In addition to similar observations from the discussion above we can see that most Bitcoin bottoms are not directly associated with bottoms in the liquidity model indicating a different mechanism at play that determines Bitcoin bottoms (probably due to miners' capitulation).
Using the new force_overlay function we plot the polynomial liquidity model directly over the Bitcoin price chart while we display the 2 oscillators in a separate panel.
Biquad MACDThis indicator reimagines the traditional MACD by incorporating a biquad band pass filter, offering a refined approach to identifying momentum and trend changes in price data. The standard MACD is essentially a band pass filter, but often it lacks precision. The biquad band pass filter addresses this limitation by providing a more focused frequency range, enhancing the quality of signals.
The MACD Length parameter determines the length of the band pass filter, influencing the frequency range that is isolated. Adjusting this length allows you to focus on different parts of the price movement spectrum.
The Bandwidth (BW) setting controls the width of the frequency band in octaves. It affects the smoothness of the MACD line. A larger bandwidth results in less smooth output, capturing a broader range of frequencies, while a smaller bandwidth focuses on a narrower range, providing a smoother signal.
The Signal Length parameter sets the period for the exponential moving average of the MACD line, which acts as a signal line to identify potential buy and sell points.
Key Features of the Biquad MACD
The MACD is a well-known momentum indicator used to identify changes in the strength, direction, momentum, and duration of a trend in a stock's price. By applying a biquad band pass filter, this version of the MACD provides a more refined and accurate representation of price movements.
The biquad filter offers smooth response and minimal phase distortion, making it ideal for technical analysis. The customizable MACD length and bandwidth allow for flexible adaptation to different trading strategies and market conditions. The signal line smooths the MACD values, providing clear crossover points to indicate potential market entry and exit signals.
The histogram visually represents the difference between the MACD and the signal line, changing colors to indicate rising or falling momentum, which helps in quickly identifying trend changes.
By incorporating the Biquad MACD into your trading toolkit, you can enhance your chart analysis with clearer insights into momentum and trend changes, leading to more informed trading decisions.
Biquad Band Pass FilterThis indicator utilizes a biquad band pass filter to isolate and highlight a specific frequency band in price data, helping traders focus on price movements within a targeted frequency range.
The Length parameter determines the center frequency of the filter, affecting which frequency band is isolated. Adjusting this parameter allows you to focus on different parts of the price movement spectrum.
The Bandwidth (BW) controls the width of the frequency band in octaves. It represents the bandwidth between -3 dB frequencies for the band pass filter. A narrower bandwidth results in a more focused filtering effect, isolating a tighter range of frequencies.
Key Features of Biquad Filters
Biquad filters are a type of digital filter that provides a combination of low-pass, high-pass, band-pass, and notch filtering capabilities. In this implementation, the biquad filter is configured as a band pass filter, which allows frequencies within a specified band to pass while attenuating frequencies outside this band. This is particularly useful in trading to isolate specific price movements, making it easier to detect patterns and trends within a targeted frequency range.
Biquad filters are known for their smooth response and minimal phase distortion, making them ideal for technical analysis. The customizable length and bandwidth allow for flexible adaptation to different trading strategies and market conditions. Designed for real-time charting, the biquad filter operates efficiently without significant lag, ensuring timely analysis.
By incorporating this biquad band pass filter into your trading toolkit, you can enhance your chart analysis with clearer insights into specific frequency bands of price movements, leading to more informed trading decisions.
Biquad High Pass FilterThis indicator utilizes a biquad high pass filter to filter out low-frequency components from price data, helping traders focus on high-frequency movements and detect rapid changes in trends.
The Length parameter determines the cutoff frequency of the filter, affecting how quickly the filter responds to changes in price. A shorter length allows the filter to react more quickly to high-frequency movements.
The Q Factor controls the sharpness of the filter. A higher Q value results in a more precise filtering effect by narrowing the frequency band. However, be cautious when setting the Q factor too high, as it can induce resonance, amplifying certain frequencies and potentially making the filter less effective by introducing unwanted noise.
Key Features of Biquad Filters
Biquad filters are a type of digital filter that provides a combination of low-pass, high-pass, band-pass, and notch filtering capabilities. In this implementation, the biquad filter is configured as a high pass filter, which allows high-frequency signals to pass while attenuating lower-frequency components. This is particularly useful in trading to highlight rapid price movements, making it easier to spot short-term trends and patterns.
Biquad filters are known for their smooth response and minimal phase distortion, making them ideal for technical analysis. The customizable length and Q factor allow for flexible adaptation to different trading strategies and market conditions. Designed for real-time charting, the biquad filter operates efficiently without significant lag, ensuring timely analysis.
By incorporating this biquad high pass filter into your trading toolkit, you can enhance your chart analysis with clearer insights into rapid price movements, leading to more informed trading decisions.
Internal Bar Strength IBS [Anan]This indicator calculates and displays the Internal Bar Strength (IBS) along with its moving average. The IBS is a measure that represents where the closing price is relative to the high-low range of a given period.
█ Main Formula
The core of this indicator is the Internal Bar Strength (IBS) calculation. The basic IBS formula is:
ibs = (close - low) / (high - low)
I enhanced the original formula by incorporating a user-defined length parameter. This modification allows for greater flexibility in analysis and interpretation. The extended version enables users to adjust the indicator's length according to their specific needs or market conditions. Notably, setting the length parameter to 1 reproduces the behavior of the original formula, maintaining backward compatibility while offering expanded functionality:
ibs = (close - ta.lowest(low, ibs_length)) / (ta.highest(high, ibs_length) - ta.lowest(low, ibs_length))
Where:
- `close` is the closing price of the current bar
- `lowest low` is the lowest low price over the specified IBS length
- `highest high` is the highest high price over the specified IBS length
█ Key Features
- Calculates IBS using a user-defined length
- Applies a moving average to the IBS values
- Offers multiple moving average types
- Includes optional Bollinger Bands or Donchian Channel overlays
- Visualizes bull and bear areas
█ Inputs
- IBS Length: The period used for IBS calculation
- MA Type: The type of moving average applied to IBS (options: SMA, EMA, SMMA, WMA, VWMA, Bollinger Bands, Donchian)
- MA Length: The period used for the moving average calculation
- BB StdDev: Standard deviation multiplier for Bollinger Bands
█ How to Use and Interpret
1. IBS Line Interpretation:
- IBS values range from 0 to 1
- Values close to 1 indicate the close was near the high, suggesting a bullish sentiment
- Values close to 0 indicate the close was near the low, suggesting a bearish sentiment
- Values around 0.5 suggest the close was near the middle of the range
2. Overbought/Oversold Conditions:
- IBS values above 0.8 (teal zone) may indicate overbought conditions
- IBS values below 0.2 (red zone) may indicate oversold conditions
- These zones can be used to identify potential reversal points
3. Trend Identification:
- Consistent IBS values above 0.5 may indicate an uptrend
- Consistent IBS values below 0.5 may indicate a downtrend
4. Using Moving Averages:
- The yellow MA line can help smooth out IBS fluctuations
- Crossovers between the IBS and its MA can signal potential trend changes
5. Bollinger Bands/Donchian Channel:
- When enabled, these can provide additional context for overbought/oversold conditions
- IBS touching or exceeding the upper band may indicate overbought conditions
- IBS touching or falling below the lower band may indicate oversold conditions
Remember that no single indicator should be used in isolation. Always combine IBS analysis with other technical indicators, price action analysis, and broader market context for more reliable trading decisions.
MTF-Colored EMA Difference and Stochastic indicatorThis indicator combines two popular technical analysis tools: the Exponential Moving Average (EMA) and the Stochastic Oscillator, with the added flexibility of analyzing them across multiple time frames. It visually represents the difference between two EMAs and the crossover signals from the Stochastic Oscillator, providing a comprehensive view of the market conditions.
Components:
EMA Difference Histogram :
EMA Calculation : The indicator calculates two EMAs (EMA1 and EMA2) for the selected time frame.
EMA Difference : The difference between EMA1 and EMA2 is plotted as a 4 coloured histogram.
Stochastic Oscillato r:
Calculation : The %K and %D lines of the Stochastic Oscillator are calculated for the selected time frame.
Additional Confirmation via Colors :
Green: %K is above %D, indicating a bullish signal.
Red: %K is below %D, indicating a bearish signal.
Entry and Exit Strategies
Entry Strategy :
Bullish Entry :
Condition 1: The histogram is Dark green (indicating a strong upward trend).
Condition 2: The Stochastic colour is green (%K is above %D).
Bearish Entry :
Condition 1: The histogram is Dark Red (indicating a strong downward trend).
Condition 2: The Stochastic colour is red (%K is below %D).
Exit Strategy:
Bullish Exit:
Condition: The Stochastic colour turns red (%K crosses below %D).
Bearish Exit:
Condition: The Stochastic colour turns green (%K crosses above %D).
Additional Considerations:
Time Frame Selection : The chosen time frame for both the EMA and Stochastic calculations should align with the trader’s strategy (e.g., daily for swing trading, hourly for intraday trading).
Risk Management : Implement stop-loss orders to manage risk effectively. The stop-loss can be placed below the recent swing low for long positions and above the recent swing high for short positions.
Confirmation : Consider using this indicator in conjunction with other technical analysis tools to confirm signals and reduce the likelihood of false entries and exits.
Nebula SAR Echo📈 Overview:
The "Nebula SAR Echo" is a sophisticated technical analysis tool designed for traders seeking enhanced trend detection. This indicator combines the robust Parabolic SAR mechanism with gradient color coding to provide clear visual insights into market trends.
🎯 Key Features:
Advanced Parabolic SAR Calculation:
Utilizes dynamic coefficients for more responsive and accurate trend detection.
Highlights trend reversals with visual markers for immediate identification.
Gradient Color Coding:
Gradient colors dynamically reflect the strength and direction of the trend.
Bullish trends are represented in shades of green, while bearish trends are shown in shades of red.
User-Friendly Customization:
Easily adjustable parameters for acceleration factors and gradient color use.
💡 Benefits:
Enhanced Decision Making:
Combines real-time trend analysis to assist traders in making more informed decisions.
Visual Clarity:
Clear visual markers and gradient color coding simplify the interpretation of market trends.
Helps traders quickly identify key turning points and potential future price paths.
🔍 Use Cases:
Trend Identification:
Ideal for identifying ongoing trends and potential reversals in various market conditions.
Useful for both short-term trading strategies and long-term investment planning.
Risk Management:
Gradient color coding aids in assessing trend strength and potential volatility.
Traders can set more precise stop-loss and take-profit levels based on the trend strength.
⚙️ How to Use:
1. Parameter Setup:
Set the desired acceleration factors (start, increment, and max) for the Parabolic SAR.
Enable or disable gradient colors based on personal preference.
2. Interpretation:
Use the SAR values and gradient colors to gauge current market trends.
3. Alerts:
Set up alert conditions for bullish and bearish reversals to stay notified of significant market changes.
🔹 Conclusion:
The "Nebula SAR Echo" is a versatile and powerful tool for traders who require an in-depth analysis of market trends. By leveraging the advanced Parabolic SAR calculation and gradient color coding, this indicator provides a comprehensive view of market conditions, making it an indispensable addition to any trader's toolkit.
Bitcoin Puell Multiple (BPM)The Bitcoin Puell Multiple is a key indicator for evaluating buying and selling opportunities based on the profitability of Bitcoin miners.
The Idea
The Bitcoin Puell Multiple is a ratio that measures the daily profitability of Bitcoin miners in relation to the historical annual average of this profitability. It is calculated by dividing the amount of newly issued Bitcoins (in USD) each day by the 365-day moving average of that same amount. This indicator provides valuable information on Bitcoin's market cycles, helping investors to identify periods when Bitcoin is potentially undervalued or overvalued.
How to Use
To use the Bitcoin Puell Multiple, investors watch for extreme levels of the indicator. A high Puell Multiple suggests that miners are making exceptionally high profits compared to the previous year, which could indicate an overvaluation of Bitcoin and a selling opportunity (red zones). Conversely, a low Puell Multiple indicates that miners' earnings are low relative to history, suggesting an undervaluation of Bitcoin and a potential buying opportunity (green zones). The trigger thresholds for these zones can be configured in the tool's parameters.
What makes this tool different from the other "Puell Multiple" scripts available is that it is up to date in terms of its data sources, with a more precise calculation, and allows you to view the entire history.
Zone trigger limits and their visualization, as well as colors, are all configurable via the tool parameters.
Here, for example, is a configuration with more sensitive trigger levels and a different color:
Consecutive Closes Above/Below 3 SMA with Z-Score BandsA simple indicator that measures consecutive closes above & below the 3-period simple moving average. An upper and lower Z-score has been calculated to indicate where the 4 standard deviations of the last 60 bars sits.
Useful for identifying directional runs in price.
D2MAThe script is called "D2MA" (Distance to Moving Average). It calculates the distance between the closing price and a user-selected type of moving average (MA). It also plots this distance on a chart, allowing users to see how far the price is from the chosen moving average. Users can choose to display this distance as either an absolute value or as a percentage.
Input Parameters
Length (len): The number of bars (or periods) used to calculate the moving average.
Source (src): The price data used for calculations, typically the closing price.
Percentage Distance (pc): A boolean option to display the distance as a percentage instead of an absolute value.
MA Type (maType): The type of moving average to use.
Simple Moving Average (SMA)
Exponential Moving Average (EMA)
Hull Moving Average (HMA)
Arnaud Legoux Moving Average (ALMA)
Triple Exponential Moving Average (T3)
Power Weighted Moving Average (PWMA)
The script includes functions to calculate different types of moving averages:
The difference between the source price (e.g., closing price) and the calculated moving average. if Distance as Percentage , the distance expressed as a percentage of the moving average value.
Plotting the Data
Signal Line: The signal line changes colour (green or red) based on whether the distance is increasing or decreasing.
Visual Representation
How to Use
Identify Trends: By seeing how far the price is from a selected moving average, traders can gauge the strength of a trend.
Spot Reversals: Significant deviations from the moving average can signal potential reversals.
Empirical Kaspa Power Law Full Model v3.1🔶 First we need to understand what Power Laws are.
Power laws are mathematical relationships where one quantity varies as a power of another. They are prevalent in both natural and social systems, describing phenomena such as earthquake magnitudes, word frequencies, and wealth distributions. In a power-law relationship, a change in one quantity results in a proportional change in another, typically following a consistent and predictable mathematical pattern.
🔶 Why Do Power Laws work for Bitcoin and Kaspa?
Power laws work for Bitcoin and Kaspa due to the underlying principles of network dynamics and growth patterns that these cryptocurrencies exhibit. Here's how:
1. Network Growth and User Adoption:
Both Bitcoin and Kaspa grow as more users join their networks. The value of these networks often increases in a manner consistent with Metcalfe’s Law, which states that the value of a network is proportional to the square of its number of users. This relationship is a form of a power law, where network effects lead to exponential growth as more users participate.
2. Mining and Hash Rate:
The mining difficulty and hash rate in cryptocurrencies like Bitcoin and Kaspa adjust based on network activity. As more miners join, the difficulty increases to maintain a stable rate of block production. This self-adjusting mechanism creates feedback loops that can be described by power laws, ensuring the stability and security of the network over time.
3. Price Behavior:
Astrophysicist Giovanni Santostasi discovered that Bitcoin’s price follows a power-law distribution over time. This means that despite short-term volatility, Bitcoin’s long-term price behavior is predictable and adheres to specific mathematical patterns. Santostasi's model provides a framework for understanding Bitcoin’s price movements and forecasting future trends. He also discovered that Kaspa might be following a power-law aswell but it might be to early to tell because Kaspa hasn't been around for too long(2years).
4. Resource Allocation and System Stability:
As the price of Bitcoin or Kaspa increases, more resources are allocated to mining, leading to more sophisticated mining operations. This iterative process of investment and technological advancement follows a power-law pattern, driving the growth and stability of the network.
In summary, the application of power laws to Bitcoin and Kaspa offers a structured framework for understanding their price movements, network growth, and overall stability. These principles provide valuable predictive tools for long-term forecasting, helping to explain the dynamic behavior of these cryptocurrencies.
🔶 What does it look like on a chart?
Here is the Kaspa power law plotted on the KaspaUSD chart. Notice that the y-axis is in logarithmic scale. Unfortunately, TradingView does not allow the x-axis to be in logarithmic scale, which would otherwise make the power law appear as a straight line.
🔶 All the features of the Empirical Kaspa Power Law Full Model
This indicator includes a variety of scripts and tools, meticulously designed and developed to navigate the Kaspa market effectively.
🔹 Power Law & Deviation bands
The decision to use the lower two bands, marking an area between -40% to -50% below the power law, is based on historical analysis. Historically, this range has proven to be a great buying opportunity. In the case of Bitcoin, the bottom typically lies around -60% from the power law. However, for Kaspa, the bottom appears to be less distant from the power law. This discrepancy can be attributed to the differing supply dynamics of the two. Bitcoin undergoes a halving event approximately every four years, significantly reducing the rate at which new coins are introduced into circulation. This cyclical halving can lead to larger price fluctuations and a greater deviation from the power law. In contrast, Kaspa employs a more gradual reduction in its emission rate, with a 5% decrease each month. This consistent and incremental reduction helps Kaspa's price follow the power law more closely, resulting in less pronounced deviations. Consequently, the bottom for Kaspa tends to be closer to the power law, typically around -40% to -50%, rather than the -60% observed with Bitcoin.
The top two deviation bands are fitted to a few bubble data points, which are honestly not very reliable compared to the bottom bands that are based on a larger number of data points. When examining Bitcoin, we see that the bottoms are quite predictable due to the availability of thousands of data points, making it easier to identify patterns and trends.
However, predicting the tops is significantly more challenging because we lack a substantial amount of data for the peaks. This limited data makes it difficult to draw reliable conclusions about the upper deviation bands. As a result, while the bottom bands offer a robust framework for analysis, the top bands should be approached with caution due to their lesser reliability.
🔹 Alternating Sine wave
In observing the price behavior of Kaspa, an intriguing pattern emerges: it tends to follow a roughly four-month cycle. This cycle appears to alternate between smaller and larger waves. To capture this pattern, the sine wave in our indicator is designed to follow the power law, with both the top and bottom of the wave adjusting according to it.
Here's a simple explanation of how this works:
1. Four-Month Cycle: Empirically, Kaspa’s price seems to oscillate over approximately 120 days. This cycle includes periods of growth and decline, repeating every four months. Within these cycles, we observe alternating phases one smaller and one larger in amplitude.
2. Power Law Influence: The sine wave component of our indicator is not arbitrary; it follows a power law that predicts the general price trend of Kaspa. The power law essentially provides a baseline that reflects the longer-term price trajectory.
3. Diminishing Returns and Smoothing: To model diminishing returns, we adjust the amplitude of the sine wave over time, making it smaller as the cycle progresses. This helps to capture the natural tendency for price movements to become less volatile over longer periods. Additionally, the bottom of the sine wave adheres to the power law, ensuring it remains consistent with the overall trend.
🔹 Sine wave Cycle Start & End
Color transitions play a crucial role in visualizing different phases of the four-month cycle.
Based on empirical data, Kaspa experiences approximately 60 days of downward price action following each cycle peak, a period we refer to as the bear phase. This phase is followed by the bull phase, which also lasts around 60 days. To indicate the cycle peak, we have added a colored warning on the sine wave.
Cycle Start (Purple): The sine wave starts with a purple color, marking the beginning of a new cycle. This bull phase often represents a potential bottom or accumulation zone where prices are lower and stable, offering a strategic point for entering the market.
Cycle Top (Red): As the cycle progresses, the sine wave transitions through colors until it reaches red. This red phase indicates the top of the cycle, where the price is likely peaking. It's a critical area for investors to consider dollar-cost averaging (DCA) out of Kaspa, as it signifies a period of potential overvaluation and heightened risk.
These color transitions provide a visual guide to the market's cyclical nature, helping investors identify optimal entry and exit points. By following the sine wave's color changes, you can better time your investments, entering at the start of the cycle and considering exits as the cycle tops out.
🔹 Colored Deviation from the Power Law Bubbles
In trading, having a clear visual signal can significantly enhance decision-making, especially when dealing with complex models like power laws. This inspired the creation of the "deviation bubbles" in my indicator, which provides an intuitive, color-coded visual queue to help me, and other traders, better grasp market deviations and make timely trading decisions.
Here's a breakdown of how the deviation bubbles work:
1. Power Law Reference: The core of the indicator calculates a theoretical price level (the power law price) for Kaspa.
2. Deviation Calculation: For each day, the indicator computes the percentage deviation of the actual closing price from this power law price. This tells how much the market price diverges from the theoretically expected level.
3. Color-Coding Based on Deviation:
The deviation is categorized into various ranges (e.g., ≥ 100%, 90-100%, 80-90%, etc.).
Each range is assigned a distinct color, from red for extreme positive deviations to blue for extreme negative deviations.
This gradient helps in quickly identifying significant market deviations.
By integrating these bubbles into the chart, the indicator offers a simple yet powerful visual tool, aiding in recognizing critical market conditions without the need to delve into complex calculations manually. This approach not only enhances the ease of trading but also helps in overcoming the hesitation often faced when pulling the trigger on trades.
🔹 Projected Power Law Bands
Extends the current power law bands into the future using the same formula that defines the current power law.
Visual Representation: Dotted lines on the chart indicate the projected power law price and deviation bands.
Limitations: TradingView restricts how far these projections can extend, typically up to a reasonable future period.
These projected bands help anticipate future price movements, aiding in more informed trading decisions.
🔹 Projected Sine Wave
This projection continues to calculate the phase and amplitude, adjusting for diminishing returns and cycle transitions. It also estimates the future power law price, ensuring the projection reflects potential market dynamics.
Visual Representation: The projected sine wave is shown with dotted blue lines, providing a clear visual of the expected trend, aiding traders in their decision-making process.
Limitations: Again, TradingView restricts how far these projections can extend, typically up to a reasonable future period.
🔶 Why are all these different scripts made into one indicator?
As a trader and crypto analyst, I needed specific tools and customizations that no other indicator offered. Being a visual person, I rely heavily on visual triggers such as colors and patterns to make trading decisions. Initially, I developed this indicator for my personal use to enhance my market analysis with these visual cues. However, after sharing my insights, other traders expressed interest in using it. In response, I expanded the functionality and added various options to cater to a broader range of users.
This comprehensive indicator integrates multiple features into one tool, providing a powerful and flexible solution for analyzing market trends and making informed trading decisions. The use of colors and visual elements helps in quickly identifying key signals and market phases. The customizable options allow you to fine-tune the indicator to suit your specific needs, making it a versatile tool for both novice and experienced traders.
🔶 Usage & Settings:
This indicator is best used on the Daily chart for KASUSD - crypto because it uses a power law formula based on days.
🔹 Using the Indicator for 4-Month Cycles:
For traders interested in playing the 4-month cycles, this indicator provides a straightforward strategy. When the bubbles turn purple or the sine wave shows the purple start color, it signals a good time to dollar-cost average (DCA) into the market. Conversely, when the bubbles turn red or the cycle top is near, indicated by a red color, it’s time to DCA out of the Kaspa market. This visual approach helps traders make timely decisions based on color-coded signals, simplifying the trading process.
Historically, it was nearly impossible to accurately time all the 4-month cycle tops because they alternate each time. Without the combination of multiple scripts in this indicator, identifying these cyclical patterns and their respective peaks was extremely challenging. This integrated tool now provides a clear and reliable method for detecting these critical points, enhancing trading effectiveness.
🔹 Combining the visual queues for market extremes
The chart above illustrates the alignment of visual cues indicating market extremes. Notably, these visual cues—marked by red and purple boxes—historically pinpoint areas of extreme value or opportunities. When red aligns with red and purple aligns with purple, these zones have consistently indicated significant market extremes.
Understanding and recognizing these patterns provides a strategic advantage. By identifying these visual triggers, traders can plan and execute informed trades with greater confidence whenever similar scenarios unfold in the future.
Kaspa is perhaps one of the most cyclical and predictable cryptocurrencies in the market. Given its consistent behavior, traders might wonder why they would trade anything else. As long as there are no signs indicating a change in Kaspa's cyclical nature, there is no reason to make significant alterations to our predictions. This makes Kaspa an attractive option for traders seeking reliable and repeatable trading opportunities.
🔹 Settings & customization:
As a visually-oriented trader, it is essential to customize the appearance of indicators to effectively navigate the Kaspa market. The Indicator offers extensive customization options, allowing users to modify the colors of various elements to suit their preferences. For example, users can adjust the colors of the deviation bubbles, deviation bands, sine wave, and power law to enhance visual clarity and focus on specific data points. This level of personalization not only enhances the overall user experience but also ensures that the visual representation aligns with unique trading strategies, making it easier to interpret complex market data.
Additionally, users can change the power law inputs and other parameters as shown in the image. For instance, the Power Law Intercept and Power Law Slope can be manually adjusted, allowing traders to update these values. This flexibility is crucial as the future power law for Kaspa may evolve/change.
🔶 Limitations
Like any technical analysis tool, the Empirical Kaspa Power Law Full Model indicator has limitations. It's based on historical data, which may not always accurately predict future market movements.
🔶 Credits
I want to thank Dr. Giovanni Santostasi · Professor of physics and Mathematics.
He was one of the first who applied the concept of the power law to Bitcoin's price movements, which has been instrumental in providing insights into the long-term growth and potential future value of Bitcoin. Giovanni also offers coding classes on his Discord, which I attended. He personally taught me how to code specific things in Pine Editor and Python, sparking my interest in developing my own indicator.
Additionally, I would like to extend my gratitude to the following individuals for their invaluable contributions in terms of ideas, theories, formulas, testing, and guidance:
Forgowork, PlanC, Miko Genno, Chancellor, SavingFace, Kaspapero, JJ Venema.
HRC - Hash Rate Capitulation [Da_Prof]The HRC (Hash Rate Capitulation) indicator is a measure of hash rate trend strength. It is the fractional difference between a long and a short simple moving average (SMA) of the bitcoin hash rate. Historically, the 21-day and 105-day SMA work well for this indicator. The hash rate generally increases over time, but when the short SMA crosses below the longer-term SMA, it shows that miners are removing significant hash from the system. This state can be considered a miner "capitulation". Historically, this has marked depressed BTC prices and has led to higher prices within some months. Shout out to foosmoo, the hash rate oscillator indicator prompted this presentation.
Flush Percent RangeFans of Woodies CCI may recognize the approach to this one. This is my attempt at using the same methods but for taking the highs and lows into account without the standard deviation of the CCI. The smoothness of other oscillators may not be ideal however the Williams Percent Range is a fast stochastic that also operates within a channel. This provides an alternative yet still complex view for the virtuoso. A unique feature is total utilization of the weighted moving average, from the standard to the more complex. A fun fact is the Hull Moving Average is actually calculated using weighted moving averages.
How to use:
The base length is for accuracy, the fast length is for catching all the moves(even the wrong ones sometimes.)
The bars back option will not flip the histogram/base trend to its bullish/bearish alternative until the base plot remains on the latter half of the oscillator for a certain number of bars. This can be set to zero if desired.
The factor controls the chop on the various levels. A higher number will increase it.
The oscillator levels are measuring slope, price relative to the average, and a summation of percent changes between the two. Both the baseline/histogram and the levels have color coding for bullishness, bearishness, and indecision(depending on the factor.) The fast line matches the indecision color by default. This is all customizable.
There are many potential ways to trade with this indicator. From hooks back toward the trend and range line crossovers to divergence and reversals. It's important to note the current performance of the oscillator levels. Time cycles may come in handy along with other forecasting tools.
Lastly, there are optional linear regression lines plotted on the chart. They're synchronized to the lengths in the oscillator. This is an additional visual aid to provide context to the direction of the channel.
Overall the Flush Percent Range is for analyzing multiple regression models within a single price channel. No smoothing, fast averages, and specified timeframes of highs/lows. Credit to Larry Williams for the original calculation and Ken Woods for design/methodology inspiration.
Deviation in Euclidean Distance from the Kaspa Power Law v3.0🔶 First we need to understand what Power Laws are.
Power laws are mathematical relationships where one quantity varies as a power of another. They are prevalent in both natural and social systems, describing phenomena such as earthquake magnitudes, word frequencies, and wealth distributions. In a power-law relationship, a change in one quantity results in a proportional change in another, typically following a consistent and predictable mathematical pattern.
🔶 Why Do Power Laws work for Bitcoin and Kaspa?
Power laws work for Bitcoin and Kaspa due to the underlying principles of network dynamics and growth patterns that these cryptocurrencies exhibit. Here's how:
1. Network Growth and User Adoption:
Both Bitcoin and Kaspa grow as more users join their networks. The value of these networks often increases in a manner consistent with Metcalfe’s Law, which states that the value of a network is proportional to the square of its number of users. This relationship is a form of a power law, where network effects lead to exponential growth as more users participate.
2. Mining and Hash Rate:
The mining difficulty and hash rate in cryptocurrencies like Bitcoin and Kaspa adjust based on network activity. As more miners join, the difficulty increases to maintain a stable rate of block production. This self-adjusting mechanism creates feedback loops that can be described by power laws, ensuring the stability and security of the network over time.
3. Price Behavior:
Astrophysicist Giovanni Santostasi discovered that Bitcoin’s price follows a power-law distribution over time. This means that despite short-term volatility, Bitcoin’s long-term price behavior is predictable and adheres to specific mathematical patterns. Santostasi's model provides a framework for understanding Bitcoin’s price movements and forecasting future trends. He also discovered that Kaspa might be following a power-law aswell but it might be to early to tell because Kaspa hasn't been around for too long(2years).
4. Resource Allocation and System Stability:
As the price of Bitcoin or Kaspa increases, more resources are allocated to mining, leading to more sophisticated mining operations. This iterative process of investment and technological advancement follows a power-law pattern, driving the growth and stability of the network.
In summary, the application of power laws to Bitcoin and Kaspa offers a structured framework for understanding their price movements, network growth, and overall stability. These principles provide valuable predictive tools for long-term forecasting, helping to explain the dynamic behavior of these cryptocurrencies.
🔶 What does it look like on a chart?
Here is the Kaspa power law plotted on the KaspaUSD chart. Notice that the y-axis is in logarithmic scale. Unfortunately, TradingView does not allow the x-axis to be in logarithmic scale, which would otherwise make the power law appear as a straight line.
🔶 What is the deviation in Euclidean Distance from the Power Law?
Euclidean distance is a way to measure the straight-line distance between two points in a multi-dimensional space. When applied to a power law, it measures how far a data point is from the value predicted by the power-law formula.
🔶 Why are we measuring the Euclidean Distance from the Power Law & Discovery
On June 2, 2024, Plan C on Twitter announced a significant discovery: he and Dr. Giovanni Santostasi found that by examining the Euclidean distance from the Bitcoin power law, normalizing the data, and plotting it on an oscillator, it is possible to predict or time the market. In his post, Plan C hinted at the concept of "two-dimensional deviation," describing the result as the ultimate tool for navigating Bitcoin cycles. So, applying this technique to Kaspa, the only other cryptocurrency that might follow a power law might be a great idea!
This discovery leverages the power-law principles to create a sophisticated market timing tool, potentially offering insights into both Bitcoin and Kaspa's price movements.
🔶 Visual Representation of the Normalized Deviation in Euclidean Distance from the Kaspa Power Law
Steps Involved to visualize the indicator/oscillator:
1. Power Law Calculation:
The theoretical price is computed using the Power Law formula. This formula is based on the number of days since Kaspa's genesis block, simulating an ideal price growth trajectory.
2. Deviation Calculation:
For each day, the actual price is compared against the power law price for a range of days around the current date. The Euclidean Distance in days is the smallest number of days (either past or future) where this deviation is minimized.
3. Normalization:
The raw deviations over a fixed window are scaled to fit within a range of -100, 100. This normalized value is then smoothed using a simple moving average to produce a more readable oscillator.
4. Dynamic Coloring:
The oscillator's line color changes dynamically based on its value, providing an intuitive visual cue for traders.
🔶 Using the Oscillator
This indicator is best used on the Daily chart for KASUSD - crypto because it uses a power law formula based on days.
Identify Extremes:
When the oscillator shows high positive or negative values, it signals potential market extremes. This can help traders decide when to buy (when the market is oversold) or sell (when the market is overbought).
Values near -100 or 100 indicate significant deviation from the power law, highlighting potential market extremes.
🔶 Indicator Option's & Settings
Smooth Trends:
The smoothed line of the oscillator helps filter out market noise, allowing traders to focus on broader trends rather than short-term fluctuations.
Customize Your Analysis with Adjustable Price Sources:
One of the standout features of the Oscillator is its flexibility in using different price sources. You can customize the price source to better suit your trading style and analysis needs.
Price Source Selection:
The indicator allows you to choose the price source for its calculations. By default, it uses the average price of the daily candle (OHLC4), but you can adjust this to other price metrics such as the closing price, opening price, or any custom input.
Using Different Price Sources:
Using the daily candle average provides a balanced view of the day's trading activity, smoothing out intraday volatility.
Custom daily price sources:
Daily Highs:
Setting the price source to the daily high can help identify the maximum deviation when the market reaches its highest point during the day. This can be useful for spotting overbought conditions and potential resistance levels.
Daily Lows:
Conversely, using the daily low as the price source can highlight when the market hits its lowest point, indicating potential oversold conditions and support levels.
This flexibility ensures that the oscillator can be tailored to different trading strategies, allowing you to refine your analysis and make more informed decisions based on the price metrics most relevant to you.
By leveraging the Kaspa Power Law Deviation Oscillator, traders can gain a clearer perspective on market movements, making more informed decisions based on the deviation from a theoretically ideal price path. This tool adds another layer of insight to your trading strategy, helping you navigate the market with greater confidence.
🔶 LIMITATIONS
Like any technical analysis tool, the Deviation in Euclidean distance from the Kaspa Power law indicator has limitations. It's based on historical data, which may not always accurately predict future market movements.
ADX with Donchian Channels
The "ADX with Donchian Channels" indicator combines the Average Directional Index (ADX) with Donchian Channels to provide traders with a powerful tool for identifying trends and potential breakouts.
Features:
Average Directional Index (ADX):
The ADX is used to quantify the strength of a trend. It helps traders determine whether a market is trending or ranging.
Adjustable parameters for ADX smoothing and DI length allow traders to fine-tune the sensitivity of the trend strength measurement.
Donchian Channels on ADX:
Donchian Channels are applied directly to the ADX values to highlight the highest high and lowest low of the ADX over a specified period.
The upper and lower Donchian Channels can signal potential trend breakouts when the ADX value moves outside these bounds.
The middle Donchian Channel provides a reference for the average trend strength.
Visualization:
The indicator plots the ADX line in red to clearly display the trend strength.
The upper and lower Donchian Channels are plotted in blue, with a green middle line to represent the average.
The area between the upper and lower Donchian Channels is filled with a blue shade to visually emphasize the range of ADX values.
Default Settings for Scalping:
Donchian Channel Length: 10
Standard Deviation Multiplier: 1.58
ADX Length: 2
ADX Smoothing Length: 2
These default settings are optimized for scalping, offering a quick response to changes in trend strength and potential breakout signals. However, traders can adjust these settings to suit different trading styles and market conditions.
How to Use:
Trend Strength Identification: Use the ADX line to identify the strength of the current trend. Higher ADX values indicate stronger trends.
Breakout Signals: Monitor the ADX value in relation to the Donchian Channels. A breakout above the upper channel or below the lower channel can signal a potential trend continuation or reversal.
Range Identification: The filled area between the Donchian Channels provides a visual representation of the ADX range, helping traders identify when the market is ranging or trending.
This indicator is designed to enhance your trading strategy by combining trend strength measurement with breakout signals, making it a versatile tool for various market conditions.
Glitch IndexGlitch Index is an oscillator from an unknown origin that is discovered in 2013 as a lua indicator taken from MetaStock days and we are not really sure how far back the original idea goes.
How it Works?
As I found this indicator and looking at it's code in different platform I can see it comes back from a basic idea of getting a price value, calculating it's smoothed average with a set multiplier and getting the difference then presenting it on a simplified scale. It appears to be another interpretation of figuring out price acceleration and velocity. The main logic is calculated as below:
price = priceSet(priceType)
_ma = getAverageName(price, MaMethod, MaPeriod)
rocma = ((_ma - _ma ) * 0.1) + 1
maMul = _ma * rocma
diff = price - maMul
gli_ind = (diff / price) * -10
How to Use?
Glitch Index can be used based on different implementations and along with your already existing trading system as a confirmation. Yoıu can use it as a Long signal when the histogram crosses inner levels or you can use it as an overbough and oversold signals when the histogram crosses above outter levels and gets back in the range between outter and inner levels.
You can customise the settings and set your prefered inner and outter levels in indicator settings along with gradient or static based coloring and modify the code as you see fit. The coloring code is set below:
gli_col = gli_ind > outterLevel ? color.green : gli_ind < -outterLevel ? color.red : gli_ind > innerLevel ? color.rgb(106, 185, 109, 57) : gli_ind < -innerLevel ? color.rgb(233, 111, 111, 40) : color.new(color.yellow, 60)
gradcol = color.from_gradient(gli_ind, -outterLevel, outterLevel, color.red, color.green)
colorSelect = colorType == "Gradient" ? gradcol : gli_col