Nami Bands with Future Projection [FXSMARTLAB]The Nami Bands ( Inspired by "Nami", meaning "wave" in Japanese) are two dynamic bands around price data: an upper band and a lower band. These bands are calculated based on an Asymmetric Linear Weighted Moving Average of price and a similarly asymmetric weighted standard deviation. This weighting method emphasizes recent data without overreacting to short-term price changes, thus smoothing the bands in line with prevailing market conditions.
Advantages and Benefits of Using the Indicator
* Volatility Analysis: The bands expand and contract with market volatility, helping traders assess periods of high and low volatility. Narrow bands indicate low volatility and potential consolidation, while wide bands suggest increased volatility and potential price movement.
* Dynamic Support and Resistance Levels: By adapting to recent trends, the bands serve as dynamic support (lower band) and resistance (upper band) levels, which traders can use for entry and exit signals.
* Overbought and Oversold Conditions: When prices reach or cross the bands’ outer limits, it may signal overbought (upper band) or oversold (lower band) conditions, suggesting possible reversals or trend slowdowns.
* Trend Confirmation and Continuation: The slope of the central moving average confirms trend direction. An upward slope generally indicates a bullish trend, while a downward slope suggests a bearish trend.
* Anticipating Breakouts and Reversals: The projected bands help identify where price movements may head, allowing traders to anticipate potential breakouts or reversals based on projected support and resistance.
Indicator Parameters
Source (src): The price data used for calculations, by default set to the average of high, low, and close (hlc3).
Length: The period over which calculations are made, defaulted to 50 periods.
Projection Length: The length for future band projection, defaulted to 20 periods.
StdDev Multiplier (mult): A multiplier for the standard deviation, defaulted to 2.0.
Internal Calculations
1. Asymmetric Linear Weighted Moving Average of Price
The indicator uses an Asymmetric Linear Weighted Moving Average (ALWMA) to calculate a central value for the price.
Asymmetric Weighting: This weighting technique assigns the highest weight to the most recent value, with weights decreasing linearly as the data points become older. This structure provides a nuanced focus on recent price trends, while still reflecting historical price levels.
2. Asymmetric Weighted Standard Deviation
The standard deviation in this indicator is also calculated using asymmetric weighting:
Purpose of Asymmetric Weighted Standard Deviation: Rather than aiming for high sensitivity to recent data, this standard deviation measure smooths out volatility by integrating weighted values across the length period, stabilizing the overall measurement of price variability.
This approach yields a balanced view of volatility, capturing broader market trends without being overly reactive to short-lived changes.
3. Upper and Lower Bands
The upper and lower bands are created by adding and subtracting the asymmetric weighted standard deviation from the asymmetric weighted average of price. This creates a dynamic envelope that adjusts to both recent price trends and the smoothed volatility measure:
These bands represent adaptable support and resistance levels that shift with recent market volatility.
Future Band Projection
The indicator provides a projection of the bands based on their current slope.
1. Calculating the Slope of the Bands
The slope for each band is derived from the difference between the current and previous values of each band.
2. Projecting the Bands into the Future
For each period into the future, up to the defined Projection Length, the bands are projected using the current slope.
This feature offers an anticipated view of where support and resistance levels may move, providing insight for future market behavior based on current trends.
Bands
Fibonacci BandsDescription
This indicator dynamically calculates Fibonacci retracement levels based on the highest high and lowest low over a specified lookback period. The key Fibonacci levels (0.236, 0.382, 0.5, 0.618, and 0.786) are plotted on the chart, with shaded areas between these levels for visual guidance.
How it works
The script computes the highest high (hh) and the lowest low (ll) over the defined length.
It calculates the price range (delta) as the difference between the highest high and the lowest low.
Fibonacci levels are then determined using the formula: ℎℎ − (delta × Fibonacci ratio)
Each Fibonacci level is then plotted as a line with a specific color.
Key Features
Customizable Length: Users can adjust the lookback period to suit their trading strategy.
Multiple Fibonacci Levels: Includes common Fibonacci retracement levels, providing traders with a comprehensive view of potential support and resistance areas.
Visual Fillings: The script includes customizable shading between levels, which helps traders quickly identify key zones (like the "Golden Zone" between 0.5 and 0.618).
Unique Points
Fibonacci Focus: This script is specifically designed around Fibonacci retracement levels, which are popular among technical traders for identifying potential reversal points.
Dynamic Range Calculation: The use of the highest high and lowest low within a user-defined period offers a dynamic approach to adapting to changing market conditions.
How to use it
Adjust the length parameter (default is 60) to determine how many bars back the indicator will calculate the highest high and lowest low. A longer length may provide a broader perspective of price action, while a shorter length may react more quickly to recent price changes.
Observe the plotted Fibonacci levels: 0.236, 0.382, 0.5, 0.618, and 0.786. These levels often act as potential support and resistance points. Pay attention to how price interacts with these levels.
When the price approaches a Fibonacci level, consider it a potential reversal point. The filled areas between the Fibonacci levels indicate zones where price might consolidate or reverse. The "Golden Zone" (between 0.5 and 0.618) is particularly significant; many traders watch this area closely for potential entry points in an uptrend or exit points in a downtrend.
E9 Bollinger RangeThe E9 Bollinger Range is a technical trading tool that leverages Bollinger Bands to track volatility and price deviations, along with additional trend filtering via EMAs.
The script visually enhances price action with a combination of trend-filtering EMAs, bar colouring for trend direction, signals to indicate potential buy and sell points based on price extension and engulfing patterns.
Here’s a breakdown of its key components:
Bollinger Bands: The strategy plots multiple Bollinger Band deviations to create different price levels. The furthest deviation bands act as warning signs for traders when price extends significantly, signaling potential overbought or oversold conditions.
Bar Colouring: Visual bar colouring is applied to clearly indicate trend direction: green bars for an uptrend and red bars for a downtrend.
EMA Filtering: Two EMAs (50 and 200) are used to help filter out false signals, giving traders a better sense of the underlying trend.
This combination of signals, visual elements, and trend filtering provides traders with a systematic approach to identifying price deviations and taking advantage of market corrections.
Brief History of Bollinger Bands
Bollinger Bands were developed by John Bollinger in the early 1980s as a tool to measure price volatility in financial markets. The bands consist of a moving average (typically 20 periods) with upper and lower bands placed two standard deviations away. These bands expand and contract based on market volatility, offering traders a visual representation of price extremes and potential reversal zones.
John Bollinger’s work revolutionized technical analysis by incorporating volatility into trend detection. His bands remain widely used across markets, including stocks, commodities, and cryptocurrencies. With the ability to highlight overbought and oversold conditions, Bollinger Bands have become a staple in many trading strategies.
Linear Regression ChannelLinear Regression Channel Indicator
Overview:
The Linear Regression Channel Indicator is a versatile tool designed for TradingView to help traders visualize price trends and potential reversal points. By calculating and plotting linear regression channels, bands, and future projections, this indicator provides comprehensive insights into market dynamics. It can highlight overbought and oversold conditions, identify trend direction, and offer visual cues for future price movements.
Key Features:
Linear Regression Bands:
Input: Plot Linear Regression Bands
Description: Draws bands based on linear regression calculations, representing overbought and oversold levels.
Customizable Parameters:
Length: Defines the look-back period for the regression calculation.
Deviation: Determines the width of the bands based on standard deviations.
Linear Regression Channel:
Input: Plot Linear Regression Channel
Description: Plots a channel using linear regression to visualize the main trend.
Customizable Parameters:
Channel Length: Defines the look-back period for the channel calculation.
Deviation: Determines the channel's width.
Future Projection Channel:
Input: Plot Future Projection of Linear Regression
Description: Projects a linear regression channel into the future, aiding in forecasting potential price movements.
Customizable Parameters:
Length: Defines the look-back period for the projection calculation.
Deviation: Determines the width of the projected channel.
Arrow Direction Indicator:
Input: Plot Arrow Direction
Description: Displays directional arrows based on future projection, indicating expected price movement direction.
Color-Coded Price Bars:
Description: Colors the price bars based on their position within the regression bands or channel, providing a heatmap-like visualization.
Dynamic Visualization:
Colors: Uses a gradient color scheme to highlight different conditions, such as uptrend, downtrend, and mid-levels.
Labels and Markers: Plots visual markers for significant price levels and conditions, enhancing interpretability.
Usage Notes
Setting the Length:
Adjust the look-back period (Length) to suit the timeframe you are analyzing. Shorter lengths are responsive to recent price changes, while longer lengths provide a broader view of the trend.
Interpreting Bands and Channels:
The bands and channels help identify overbought and oversold conditions. Price moving above the upper band or channel suggests overbought conditions, while moving below the lower band or channel indicates oversold conditions.
Using the Future Projection:
Enable the future projection channel to anticipate potential price movements. This can be particularly useful for setting target prices or stop-loss levels based on expected trends.
Arrow Direction Indicator:
Use the arrow direction indicator to quickly grasp the expected price movement direction. An upward arrow indicates a potential uptrend, while a downward arrow suggests a potential downtrend.
Color-Coded Price Bars:
The color of the price bars changes based on their relative position within the regression bands or channel. This heatmap visualization helps quickly identify bullish, bearish, and neutral conditions.
Dynamic Adjustments:
The indicator dynamically adjusts its visual elements based on user settings and market conditions, ensuring that the most relevant information is always displayed.
Visual Alerts:
Pay attention to the labels and markers on the chart indicating significant events, such as crossovers and breakouts. These visual alerts help in making informed trading decisions.
The Linear Regression Channel Indicator is a powerful tool for traders looking to enhance their technical analysis. By offering multiple regression-based visualizations and customizable parameters, it helps identify key market conditions, trends, and potential reversal points. Whether you are a day trader or a long-term investor, this indicator can provide valuable insights to improve your trading strategy.
FVG Channel [LuxAlgo]The FVG Channel indicator displays a channel constructed from the averages of unmitigated historical fair value gaps (FVG), allowing to identify trends and potential reversals in the market.
Users can control the amount of FVGs to consider for the calculation of the channels, as well as their degree of smoothness through user settings.
🔶 USAGE
The FVG Channel is constructed by averaging together recent unmitigated Bullish FVGs (contributing to the creation of the upper bands), and Bearish unmitigated FVGs (contributing to the creation of the lower bands) within a lookback determined by the user. A higher lookback will return longer-term indications from the indicator.
The channel includes 5 bands, with one upper and one lower outer extremities, as well as an inner series of values determined using the Fibonacci ratios (respectively 0.786, 0.5, 0.236) from the channel's outer extremities.
An uptrend can be identified by price holding above the inner upper band (obtained from the 0.786 ratio), this band can also provide occasional support when the price retraces to it while in an uptrend.
Breaking below the inner upper band with an unwillingness to reach above again is a clear sign of hesitation in the market and can be indicative of an upcoming consolidation or reversal.
This can directly be applied to downtrends as well, below are examples displaying both scenarios.
Uptrend Example:
Downtrend Example:
🔹 Breakout Levels
When the price mitigates all FVGs in a single direction except for 1, the indicator will display a "Breakout Level". This is the level that price will need to cross in order for all FVGs in that direction to be mitigated, because of this they can also be aptly called "Last Stand Levels".
These levels can be considered as potential support and resistance levels, however, should always be monitored for breakouts since a substantial push above or below these points would indicate strong momentum.
🔹 Signals
The indicator includes Bullish and Bearish Signals, these signals fire when all FVGs for a single direction have been mitigated and an engulfing candle occurs in the opposite direction. These are reversal signals and should be used alongside other indicators to appropriately manage risk.
Note: When all FVGs in a single direction have been mitigated, the candles will change colors accordingly.
🔶 DETAILS
The script uses a typical identification method for FVGs. Once identified, the script collects and stores the mitigation levels of the respective bullish and bearish FVGs:
For Bullish FVGs this is the bottom of the FVG.
For Bearish FVGs this is the top of the FVG.
The data is managed to only consider a specific amount of FVG mitigation levels, determined by the set "Unmitigated FVG Lookback". If an FVG is mitigated, it frees up a spot in the memory for a new FVG, however, if the memory is full, the oldest will be deleted.
The averages displayed (Channel Upper and Lower) are created from 2 calculation steps, the first step involves taking the raw average of the FVG mitigation levels, and the second step applies a simple moving average (SMA) smoothing of the precedent obtained averages.
Note: To view the mitigation levels average obtained in the first step, the "Smoothing Length" can be set to 1.
🔶 SETTINGS
Unmitigated FVG Lookback: Sets the maximum number of Unmitigated FVG mitigation levels that the script will use to calculate the channel.
Smoothing Length: Sets the smoothing length for the channel to reduce noise from the raw data.
Periodic Linear Regressions [LuxAlgo]The Periodic Linear Regressions (PLR) indicator calculates linear regressions periodically (similar to the VWAP indicator) based on a user-set period (anchor).
This allows for estimating underlying trends in the price, as well as providing potential supports/resistances.
🔶 USAGE
The Periodic Linear Regressions indicator calculates a linear regression over a user-selected interval determined from the selected "Anchor Period".
The PLR can be visualized as a regular linear regression (Static), with a fit readjusting for new data points until the end of the selected period, or as a moving average (Rolling), with new values obtained from the last point of a linear regression fitted over the calculation interval. While the static method line is prone to repainting, it has value since it can further emphasize the linearity of an underlying trend, as well as suggest future trend directions by extrapolating the fit.
Extremities are included in the indicator, these are obtained from the root mean squared error (RMSE) between the price and calculated linear regression. The Multiple setting allows the users to control how far each extremity is from the other.
Periodic Linear Regressions can be helpful in finding support/resistance areas or even opportunities when ranging in a channel.
The anchor - where a new period starts - can be shown (in this case in the top right corner).
The shown bands can be visualized by enabling Show Extremities in settings ( Rolling or Static method).
The script includes a background gradient color option for the bands, which only applies when using the Rolling method.
The indicator colors can be suggestive of the detected trend and are determined as follows:
Method Rolling: a gradient color between red and green indicates the trend; more green if the output is rising, suggesting an uptrend, and more red if it is decreasing, suggesting a downtrend.
Method Static: green if the slope of the line is positive, suggesting an uptrend, red if negative, suggesting a downtrend.
🔶 DETAILS
🔹 Anchor Type
When the Anchor Type is set to Periodic , the indicator will be reset when the "Anchor Period" changes, after which calculations will start again.
An anchored rolling line set at First Bar won't reset at a new session; it will continue calculating the linear regression from the first bar to the last; in other words, every bar is included in the calculation. This can be useful to detect potential long-term tops/bottoms.
Note that a linear regression needs at least two values for its calculation, which explains why you won't see a static line at the first bar of the session. The rolling linear regression will only show from the 3rd bar of the session since it also needs a previous value.
🔹 Rolling/Static
When Anchor Type is set at Periodic , a linear regression is calculated between the first bar of the chosen session and the current bar, aiming to find the line that best fits the dataset.
The example above shows the lines drawn during the session. The offered script, though, shows the last calculated point connected to the previous point when the Rolling method is chosen, while the Static method shows the latest line.
Note that linear regression needs at least two values, which explains why you won't see a static line at the first bar of the session. The rolling line will only show from the 3rd bar of the session since it also needs a previous value.
🔶 SETTINGS
Method: Indicator method used, with options: "Static" (straight line) / "Rolling" (rolling linear regression).
Anchor Type: "Periodic / First Bar" (the latter works only when "Method" is set to "Rolling").
Anchor Period: Only applicable when "Anchor Type" is set at "Periodic".
Source: open, high, low, close, ...
Multiple: Alters the width of the bands when "Show Extremities" is enabled.
Show Extremities: Display one upper and one lower extremity.
🔹 Color Settings
Mono Color: color when "Bicolor" is disabled
Bicolor: Toggle on/off + Colors
Gradient: Background color when "Show extremities" is enabled + level of gradient
🔹 Dashboard
Show Dashboard
Location of dashboard
Text size
Bitcoin Logarithmic Growth Curve 2024The Bitcoin logarithmic growth curve is a concept used to analyze Bitcoin's price movements over time. The idea is based on the observation that Bitcoin's price tends to grow exponentially, particularly during bull markets. It attempts to give a long-term perspective on the Bitcoin price movements.
The curve includes an upper and lower band. These bands often represent zones where Bitcoin's price is overextended (upper band) or undervalued (lower band) relative to its historical growth trajectory. When the price touches or exceeds the upper band, it may indicate a speculative bubble, while prices near the lower band may suggest a buying opportunity.
Unlike most Bitcoin growth curve indicators, this one includes a logarithmic growth curve optimized using the latest 2024 price data, making it, in our view, superior to previous models. Additionally, it features statistical confidence intervals derived from linear regression, compatible across all timeframes, and extrapolates the data far into the future. Finally, this model allows users the flexibility to manually adjust the function parameters to suit their preferences.
The Bitcoin logarithmic growth curve has the following function:
y = 10^(a * log10(x) - b)
In the context of this formula, the y value represents the Bitcoin price, while the x value corresponds to the time, specifically indicated by the weekly bar number on the chart.
How is it made (You can skip this section if you’re not a fan of math):
To optimize the fit of this function and determine the optimal values of a and b, the previous weekly cycle peak values were analyzed. The corresponding x and y values were recorded as follows:
113, 18.55
240, 1004.42
451, 19128.27
655, 65502.47
The same process was applied to the bear market low values:
103, 2.48
267, 211.03
471, 3192.87
676, 16255.15
Next, these values were converted to their linear form by applying the base-10 logarithm. This transformation allows the function to be expressed in a linear state: y = a * x − b. This step is essential for enabling linear regression on these values.
For the cycle peak (x,y) values:
2.053, 1.268
2.380, 3.002
2.654, 4.282
2.816, 4.816
And for the bear market low (x,y) values:
2.013, 0.394
2.427, 2.324
2.673, 3.504
2.830, 4.211
Next, linear regression was performed on both these datasets. (Numerous tools are available online for linear regression calculations, making manual computations unnecessary).
Linear regression is a method used to find a straight line that best represents the relationship between two variables. It looks at how changes in one variable affect another and tries to predict values based on that relationship.
The goal is to minimize the differences between the actual data points and the points predicted by the line. Essentially, it aims to optimize for the highest R-Square value.
Below are the results:
It is important to note that both the slope (a-value) and the y-intercept (b-value) have associated standard errors. These standard errors can be used to calculate confidence intervals by multiplying them by the t-values (two degrees of freedom) from the linear regression.
These t-values can be found in a t-distribution table. For the top cycle confidence intervals, we used t10% (0.133), t25% (0.323), and t33% (0.414). For the bottom cycle confidence intervals, the t-values used were t10% (0.133), t25% (0.323), t33% (0.414), t50% (0.765), and t67% (1.063).
The final bull cycle function is:
y = 10^(4.058 ± 0.133 * log10(x) – 6.44 ± 0.324)
The final bear cycle function is:
y = 10^(4.684 ± 0.025 * log10(x) – -9.034 ± 0.063)
The main Criticisms of growth curve models:
The Bitcoin logarithmic growth curve model faces several general criticisms that we’d like to highlight briefly. The most significant, in our view, is its heavy reliance on past price data, which may not accurately forecast future trends. For instance, previous growth curve models from 2020 on TradingView were overly optimistic in predicting the last cycle’s peak.
This is why we aimed to present our process for deriving the final functions in a transparent, step-by-step scientific manner, including statistical confidence intervals. It's important to note that the bull cycle function is less reliable than the bear cycle function, as the top band is significantly wider than the bottom band.
Even so, we still believe that the Bitcoin logarithmic growth curve presented in this script is overly optimistic since it goes parly against the concept of diminishing returns which we discussed in this post:
This is why we also propose alternative parameter settings that align more closely with the theory of diminishing returns.
Our recommendations:
Drawing on the concept of diminishing returns, we propose alternative settings for this model that we believe provide a more realistic forecast aligned with this theory. The adjusted parameters apply only to the top band: a-value: 3.637 ± 0.2343 and b-parameter: -5.369 ± 0.6264. However, please note that these values are highly subjective, and you should be aware of the model's limitations.
Conservative bull cycle model:
y = 10^(3.637 ± 0.2343 * log10(x) - 5.369 ± 0.6264)
Polynomial Regression Keltner Channel [ChartPrime]Polynomial Regression Keltner Channel
⯁ OVERVIEW
The Polynomial Regression Keltner Channel [ ChartPrime ] indicator is an advanced technical analysis tool that combines polynomial regression with dynamic Keltner Channels. This indicator provides traders with a sophisticated method for trend analysis, volatility assessment, and identifying potential overbought and oversold conditions.
◆ KEY FEATURES
Polynomial Regression: Uses polynomial regression for trend analysis and channel basis calculation.
Dynamic Keltner Channels: Implements Keltner Channels with adaptive volatility-based bands.
Overbought/Oversold Detection: Provides visual cues for potential overbought and oversold market conditions.
Trend Identification: Offers clear trend direction signals and change indicators.
Multiple Band Levels: Displays four levels of upper and lower bands for detailed market structure analysis.
Customizable Visualization: Allows toggling of additional indicator lines and signals for enhanced chart analysis.
◆ FUNCTIONALITY DETAILS
⬥ Polynomial Regression Calculation:
Implements a custom polynomial regression function for trend analysis.
Serves as the basis for the Keltner Channel, providing a smoothed centerline.
//@function Calculates polynomial regression
//@param src (series float) Source price series
//@param length (int) Lookback period
//@returns (float) Polynomial regression value for the current bar
polynomial_regression(src, length) =>
sumX = 0.0
sumY = 0.0
sumXY = 0.0
sumX2 = 0.0
sumX3 = 0.0
sumX4 = 0.0
sumX2Y = 0.0
n = float(length)
for i = 0 to n - 1
x = float(i)
y = src
sumX += x
sumY += y
sumXY += x * y
sumX2 += x * x
sumX3 += x * x * x
sumX4 += x * x * x * x
sumX2Y += x * x * y
slope = (n * sumXY - sumX * sumY) / (n * sumX2 - sumX * sumX)
intercept = (sumY - slope * sumX) / n
n - 1 * slope + intercept
⬥ Dynamic Keltner Channel Bands:
Calculates ATR-based volatility for dynamic band width adjustment.
Uses a base multiplier and adaptive volatility factor for flexible band calculation.
Generates four levels of upper and lower bands for detailed market structure analysis.
atr = ta.atr(length)
atr_sma = ta.sma(atr, 10)
// Calculate Keltner Channel Bands
dynamicMultiplier = (1 + (atr / atr_sma)) * baseATRMultiplier
volatility_basis = (1 + (atr / atr_sma)) * dynamicMultiplier * atr
⬥ Overbought/Oversold Indicator line and Trend Line:
Calculates an OB/OS value based on the price position relative to the innermost bands.
Provides visual representation through color gradients and optional signal markers.
Determines trend direction based on the polynomial regression line movement.
Generates signals for trend changes, overbought/oversold conditions, and band crossovers.
◆ USAGE
Trend Analysis: Use the color and direction of the basis line to identify overall trend direction.
Volatility Assessment: The width and expansion/contraction of the bands indicate market volatility.
Support/Resistance Levels: Multiple band levels can serve as potential support and resistance areas.
Overbought/Oversold Trading: Utilize OB/OS signals for potential reversal or pullback trades.
Breakout Detection: Monitor price crossovers of the outermost bands for potential breakout trades.
⯁ USER INPUTS
Length: Sets the lookback period for calculations (default: 100).
Source: Defines the price data used for calculations (default: HLC3).
Base ATR Multiplier: Adjusts the base width of the Keltner Channels (default: 0.1).
Indicator Lines: Toggle to show additional indicator lines and signals (default: false).
⯁ TECHNICAL NOTES
Implements a custom polynomial regression function for efficient trend calculation.
Uses dynamic ATR-based volatility adjustment for adaptive channel width.
Employs color gradients and opacity levels for intuitive visual representation of market conditions.
Utilizes Pine Script's plotchar function for efficient rendering of signals and heatmaps.
The Polynomial Regression Keltner Channel indicator offers traders a sophisticated tool for trend analysis, volatility assessment, and trade signal generation. By combining polynomial regression with dynamic Keltner Channels, it provides a comprehensive view of market structure and potential trading opportunities. The indicator's adaptability to different market conditions and its customizable nature make it suitable for various trading styles and timeframes.
Linear Regression ChannelLinear Regression Channel with Logarithmic Scale Option
This advanced Linear Regression Channel indicator offers traders a powerful tool for technical analysis, with unique features that set it apart from standard implementations.
Key Features:
Logarithmic Scale Option: One of the most distinctive aspects of this indicator is the ability to switch between classic and logarithmic scales. This feature is particularly valuable for long-term analysis, as it ensures that equal percentage changes are represented equally, regardless of the price level.
Flexible Start Date: Unlike many indicators that rely on a fixed number of periods, this tool allows users to set a specific start date and time. This feature provides precise control over the regression analysis timeframe, enhancing its adaptability to various trading strategies.
Customizable Channel Settings: Users can adjust the upper and lower deviation multipliers, allowing for fine-tuning of the channel width to suit different market conditions and trading styles.
Trend Strength Indicator: An optional feature that displays the strength of the trend based on the Pearson correlation coefficient, offering additional insight into the reliability of the current trend.
Comprehensive Visual Customization: The indicator offers extensive color and style options for the regression line, upper and lower channel lines, and fill areas, allowing traders to create a visually appealing and easy-to-read chart setup.
Extended Line Options: Users can choose to extend the regression lines to the left, right, or both, facilitating projection and analysis of future price movements.
Multiple Alert Conditions: The indicator includes four alert conditions for crossing the upper deviation, lower deviation, and the main regression line in both directions, enhancing its utility for active traders.
Why Choose This Indicator:
The combination of logarithmic scale option and flexible start date setting makes this Linear Regression Channel uniquely suited for both short-term and long-term analysis. The logarithmic scale is particularly beneficial for analyzing assets with significant price changes over time, as it normalizes percentage moves across different price levels. This feature, coupled with the ability to set a precise start date, allows traders to perform more accurate and relevant regression analyses, especially when studying specific market cycles or events.
Moreover, the trend strength indicator and customizable visual elements provide traders with a comprehensive tool that not only identifies potential support and resistance levels but also offers insight into the reliability and strength of the current trend.
In summary, this Linear Regression Channel indicator combines flexibility, precision, and insightful analytics, making it an invaluable tool for traders seeking to enhance their technical analysis capabilities on TradingView.
Ultimate Bands [BigBeluga]Ultimate Bands
The Ultimate Bands indicator is an advanced technical analysis tool that combines elements of volatility bands, oscillators, and trend analysis. It provides traders with a comprehensive view of market conditions, including trend direction, momentum, and potential reversal points.
🔵 KEY FEATURES
● Ultimate Bands
Consists of an upper band, lower band, and a smooth middle line
Based on John Ehler's SuperSmoother algorithm for reduced lag
Bands are calculated using Root Mean Square Deviation (RMSD) for adaptive volatility measurement
Helps identify potential support and resistance levels
● Ultimate Oscillator
Derived from the price position relative to the Ultimate Bands
Oscillates between overbought and oversold levels
Provides insights into potential reversals and trend strength
● Trend Signal Line
Based on a Hull Moving Average (HMA) of the Ultimate Oscillator
Helps identify the overall trend direction
Color-coded for easy trend interpretation
● Heatmap Visualization
Displays the current state of the oscillator and trend signal
Provides an intuitive visual representation of market conditions
Shows overbought/oversold status and trend direction at a glance
● Breakout Signals
Optional feature to detect and display breakouts beyond the Ultimate Bands
Helps identify potential trend reversals or continuations
Visualized with arrows on the chart and color-coded candles
🔵 HOW TO USE
● Trend Identification
Use the color and position of the Trend Signal Line to determine the overall market trend
Refer to the heatmap for a quick visual confirmation of trend direction
● Entry Signals
Look for price touches or breaks of the Ultimate Bands for potential entry points
Use oscillator extremes in conjunction with band touches for stronger signals
Consider breakout signals (if enabled) for trend-following entries
● Exit Signals
Use opposite band touches or breakouts as potential exit points
Monitor the oscillator for divergences or extreme readings as exit signals
● Overbought/Oversold Analysis
Use the Ultimate Oscillator and heatmap to identify overbought/oversold conditions
Look for potential reversals when the oscillator reaches extreme levels
● Confirmation
Combine Ultimate Bands, Oscillator, and Trend Signal for stronger trade confirmation
Use the heatmap for quick visual confirmation of market conditions
🔵 CUSTOMIZATION
The Ultimate Bands indicator offers several customization options:
Adjust the main calculation length for bands and oscillator
Modify the number of standard deviations for band calculation
Change the signal line length for trend analysis
Toggle the display of breakout signals and candle coloring
By fine-tuning these settings, traders can adapt the Ultimate Bands indicator to various market conditions and personal trading strategies.
The Ultimate Bands indicator provides a multi-faceted approach to market analysis, combining volatility-based bands, oscillator analysis, and trend identification in one comprehensive tool. Its adaptive nature and visual cues make it suitable for both novice and experienced traders across various timeframes and markets. The integration of multiple analytical elements offers traders a rich set of data points to inform their trading decisions.
TP RSITP RSI - Integrated Trend, Momentum, and Volatility Analyzer
The TP RSI indicator is an innovative 3-in-1 technical analysis tool that combines RSI, Bollinger Bands, and an EMA ribbon to provide traders with a comprehensive view of trend, momentum, and volatility in a single, easy-to-interpret visual display.
Why This Combination? This mashup addresses three critical aspects of market analysis simultaneously:
Trend identification and strength (EMA ribbon)
Momentum measurement (RSI)
Volatility assessment (Bollinger Bands)
By integrating these components, traders can make more informed decisions based on multiple factors without switching between different indicators.
How Components Work Together:
1. EMA Ribbon (Trend):
10 EMAs form 5 color-coded bands
Blue: Uptrend, Red: Downtrend
Provides a nuanced view of trend strength and potential reversals
2. RSI (Momentum):
Color-coded for quick interpretation
Blue: Upward momentum, Red: Downward momentum, White: Neutral
Position relative to the ribbon offers additional insight
3. Bollinger Bands (Volatility):
Applied to RSI for dynamic overbought/oversold levels
Narrow bands indicate low volatility, suggesting potential breakouts
Unique Aspects and Originality:
Synergistic visual cues: Color coordination between ribbon and RSI
Multi-factor confirmation: Requires alignment of trend, momentum, and volatility for strong signals
Volatility-adjusted momentum: RSI interpreted within the context of Bollinger Bands
How these components work together:
Buy Signal: Blue ribbon with blue RSI outside the ribbon.
Sell Signal: Red ribbon with red RSI outside the ribbon.
Neutral: White RSI or RSI inside the ribbon (not recommended for trading)
Increasing Momentum: RSI crossing above upper Bollinger Band (upward) or below lower Band (downward).
Trend Strength: RSI rejection by the ribbon, while all bands are colored along with the trend direction, identifies a strong trend.
Anchored Monte Carlo Shuffled Projection [LuxAlgo]The Anchored Monte Carlo Shuffled Projection tool randomly simulates future price points based on historical bar movements made before a user-anchored point in time.
By anchoring our data and projections to a single point in time, users can better understand and reflect on how the price played out while taking into consideration our random simulations.
🔶 USAGE
After selecting the indicator to apply to the chart, you will be prompted to "Set the Anchor Point". Do so by clicking on the desired location on your chart, only time is used as the anchor point.
Note: To select a new anchor point when applied to the chart, click on the 'More' dropdown next to the indicator status bar (○○○), then select "Reset points...".
Alternate Method: You are also able to click and drag the vertical line that displays on the anchor point bar when the indicator is highlighted.
By randomly simulating bar movements, a range is developed of potential price action which could be utilized to locate future price development as well as potential support/resistance levels.
Performing numerous simulations and taking the average at each step will converge toward the result highlighted by the "Average Line", and can point out where the price might develop, assuming the trend and amount of volatility persist.
Current closing price + Sum of changes in the calculation window
This constraint will cause the simulations always to display an endpoint consistent with the current lookback's slope.
While this may be helpful to some traders, this indicator includes an option to produce a less biased range, as seen below:
🔶 DETAILS
The Anchored Monte Carlo Shuffled Projection tool creates simulations based on prices within a user-set lookback window originating at the specified anchor point. Simulations are done as follows:
Collect each bar's price changes in the user-set window.
Randomize the order of each change in the window.
Project the cumulative sum of the shuffled changes from the current closing price.
Collect data on each point along the way.
This is the process for the Default calculation; for the 'Randomize Direction' calculation, when added onto the front for every other change, the value is inverted, creating the randomized endpoints for each simulation.
The script contains each simulation's data for that bar, with a maximum of 1000 simulations.
To get a glimpse behind the scenes, each simulation (up to 99) can be viewed using the 'Visualize Simulations' Options, as seen below.
Because the script holds the full simulation data, the script can also calculate this data, such as standard deviations.
In this script the Standard deviation lines are the average of all standard deviations across the vertical data groups, this provides a singular value that can be displayed a distance away from the simulation center line.
🔶 SETTINGS
Lookback: Sets the number of Bars to include in calculations.
Simulation Count: Sets the number of randomized simulations to calculate. (Max 1000)
Randomize Direction: See Details Above. Creates a more 'Normalized' Distribution
Visualize Simulations: See Details Above. Turns on Visualizations, and colors are randomly generated. Visualized max does not cap the calculated max. If 1000 simulations are used, the data will be from 1000 simulations, however, only the last 99 simulations will be visualized.
🔹 Standard Deviations
Standard Deviation Multiplier: Sets the multiplier to use for the Standard Deviation distance away from the center line.
🔹 Style
Extend Lines: Extends the Simulated Value Lines into the future for further reference and analysis.
MTF Bollinger BandWidth [CryptoSea]The MTF Bollinger BandWidth Indicator is an advanced analytical tool crafted for traders who need to gauge market volatility and trend strength across multiple timeframes. This powerful indicator leverages the Bollinger BandWidth concept to provide a comprehensive view of price movements and volatility changes, making it ideal for those looking to enhance their trading strategies with multi-timeframe analysis.
Key Features
Multi-Timeframe Analysis: Allows users to monitor Bollinger BandWidth across various timeframes, providing a macro and micro perspective on market volatility.
Pivot Point Detection: Identifies crucial high and low pivot points, offering insights into potential support and resistance levels. Pivot points are dynamic and adjust based on the timeframe viewed, reflecting short-term fluctuations or longer-term trends.
Customizable Parameters: Includes options to adjust the length of the moving average, the standard deviation multiplier, and more, enabling traders to tailor the tool to their specific needs.
Dynamic Color Coding: Utilizes color changes to indicate different market conditions, aiding in quick visual assessments.
In the example below, notice how changes in BBW across different timeframes provide early signals for potential volatility increases or decreases.
How it Works
Calculation of BandWidth: Measures the percentage difference between the upper and lower Bollinger Bands, which expands or contracts based on market volatility.
High and Low Pivot Tracking: Automatically calculates and tracks the pivots in BBW values, which are critical for identifying turning points in market behavior. High and low levels will change depending on the timeframe, capturing distinct market behaviors from granular movements to broad trends.
Visual Alerts and Table Display: Highlights significant changes in BBW with visual alerts and provides a detailed table view for comparison across timeframes.
In the example below, BBW identifies a significant contraction followed by an expansion, suggesting a potential breakout.
Application
Strategic Market Entry and Exit: Assists traders in making well-informed decisions about when to enter and exit trades based on volatility cues.
Trend Strength Assessment: Helps in determining the strength of the prevailing market trend through detailed analysis of expansion and contraction periods.
Adaptable to Various Trading Styles: Suitable for day traders, swing traders, and long-term investors due to its customization capabilities and effectiveness across different timeframes.
The MTF Bollinger BandWidth Indicator is a must-have in the arsenal of traders who demand depth, accuracy, and responsiveness in their market analysis tools. Enhance your trading decisions by integrating this sophisticated indicator into your strategy to navigate the complexities of various market conditions effectively.
Volatility ATR Support and Resistance Bands [Quantigenics]Volatility ATR Support and Resistance Bands
The “Volatility ATR Support and Resistance Bands” is a trend visualization tool that uses Average True Range (ATR) to create a dynamic channel around price action, adapting to changes in volatility and offering clear trend indicators. The band direction can indicate trend and the lines can indicate support and resistance levels.
The script works by calculating a series of moving averages from the highest and lowest prices, then applies an ATR-based multiplier to generate a set of bands. These bands expand and contract with the market’s volatility, providing a visual guide to the strength and potential direction of price movements.
How to Trade with Volatility ATR Band:
Identify Trend Direction: When the bands slope upwards, the market is trending upwards, which may be a good opportunity to consider a long position. When the bands slope downward, the market is trending downwards, which could be a sign to sell or short.
Volatility Awareness: The wider the bands, the higher the market volatility. Narrow bands suggest a quieter market, which might indicate consolidation or a potential breakout/breakdown.
Confirm Entries and Exits: Use the bands as dynamic support and resistance; entering trades as the price bounces off the bands and considering exits as it reaches the opposite side or breaches the bands.
Hope you enjoy this script!
Happy trading!
Relative Average Extrapolation [ChartPrime]Relative Average Extrapolation (ChartPrime) is a new take on session averages, like the famous vwap . This indicator leverages patterns in the market by leveraging average-at-time to get a footprint of the average market conditions for the current time. This allows for a great estimate of market conditions throughout the day allowing for predictive forecasting. If we know what the market conditions are at a given time of day we can use this information to make assumptions about future market conditions. This is what allows us to estimate an entire session with fair accuracy. This indicator works on any intra-day time frame and will not work on time frames less than a minute, or time frames that are a day or greater in length. A unique aspect of this indicator is that it allows for analysis of pre and post market sessions independently from regular hours. This results in a cleaner and more usable vwap for each individual session. One drawback of this is that the indicator utilizes an average for the length of a session. Because of this, some after hour sessions will only have a partial estimation. The average and deviation bands will work past the point where it has been extrapolated to in this instance however. On low time frames due to the limited number of data points, the indicator can appear noisy.
Generally crypto doesn't have a consistent footprint making this indicator less suitable in crypto markets. Because of this we have implemented other weighting schemes to allow for more flexibility in the number of use cases for this indicator. Besides volume weighting we have also included time, volatility, and linear (none) weighting. Using any one of these weighting schemes will transform the vwap into a wma, volatility adjusted ma, or a simple moving average. All of the style are still session period and will become longer as the session progresses.
Relative Average Extrapolation (ChartPrime) works by storing data for each time step throughout the day by utilizing a custom indexing system. It takes the a key , ie hour/minute, and transforms it into an array index to stor the current data point in its unique array. From there we can take the current time of day and advance it by one step to retrieve the data point for the next bar index. This allows us to utilize the footprint the extrapolate into the future. We use the relative rate of change for the average, the relative deviation, and relative price position to extrapolate from the current point to the end of the session. This process is fast and effective and possibly easier to use than the built in map feature.
If you have used vwap before you should be familiar with the general settings for this indicator. We have made a point to make it as intuitive for anyone who is already used to using the standard vwap. You can pick the source for the average and adjust/enable the deviation bands multipliers in the settings group. The average period is what determines the number of days to use for the average-at-time. When it is set to 0 it will use all available data. Under "Extrapolation" you will find the settings for the estimation. "Direction Sensitivity" adjusts how sensitive the indicator is to the direction of the vwap. A higher number will allow it to change directions faster, where a lower number will make it more stable throughout the session. Under the "Style" section you will find all of the color and style adjustments to customize the appearance of this indicator.
Relative Average Extrapolation (ChartPrime) is an advanced and customizable session average indicator with the ability to estimate the direction and volatility of intra-day sessions. We hope you will find this script fascinating and useful in your trading and decision making. With its unique take on session weighting and forecasting, we believe it will be a secret weapon for traders for years to come.
Enjoy
Quadratic Weighted Bands"Quadratic Weighted Bands" (QWB) is designed to identify and visualize market trends and volatility using quadratic weighted filtering techniques. It works by applying quadratic weighting to a selected data source over a specified length, enhancing the sensitivity and responsiveness of the indicator to recent market movements. A major advantage of this indicator is the ability to have a longer lookback period without having too much lag. This results in a smoother output that is still very responsive. Its about twice as fast as a normal average so adjust accordingly.
The indicator is customizable, allowing users to select between the normal Quadratic Weighting (QWF) and Volume Quadratic Weighting (VQWF), choose their data source, adjust the lookback period, and modify the deviation multiplier to fit their analysis needs. Additionally, users can customize the colors of the bands and center line.
The color of the central line changes based on the direction of the trend, as well as having a neutral (ranging) color. This visual aspect makes it easier for traders to quickly see the strength and direction of the market.
Style Select: Choose between "Normal Quadratic Weighting" or "Volume Quadratic Weighting" to adapt the indicator based on volume data or standard price data.
Source: This allows for the selection of the input source for the indicator, such as HL2, ensuring the analysis is aligned with specific trading preferences.
Length: Define the lookback period for the average, with the system automatically utilizing the maximum available length if the specified range exceeds available data, ensuring it always works.
Deviation Length: Optionally adjust the lookback period for calculating deviation, enhancing the indicator's sensitivity and accuracy in identifying market volatility.
Multiplier: Fine tune the deviation multiplier to control the width of the bands, allowing traders to adjust for market volatility and personal risk tolerance.
Top Color: Customize the color of the top band, which also affects the center line's appearance. Adjusting the brightness provides visual clarity and personalization.
Bottom Color: Similarly, select the color for the bottom band, which also influences the center line. The option to adjust brightness ensures the indicator's readability and aesthetic preference.
Neutral Color: Designate a color for indicating a ranging market.
Enjoy
ATR Bands with Optional Risk/Reward Colors█ OVERVIEW
This indicator projects ATR bands and, optionally, colors them based on a risk/reward advantage for those who trade breakouts/breakdowns using moving averages as partial or full exit points.
█ DEFINITIONS
► True Range
The True Range is a measure of the volatility of a financial asset and is defined as the maximum difference among one of the following values:
- The high of the current period minus the low of the current period.
- The absolute value of the high of the current period minus the closing price of the previous period.
- The absolute value of the low of the current period minus the closing price of the previous period.
► Average True Range
The Average True Range was developed by J. Welles Wilder Jr. and was introduced in his 1978 book titled "New Concepts in Technical Trading Systems". It is calculated as an average of the true range values over a certain number of periods (usually 14) and is commonly used to measure volatility and set stop-loss and profit targets (1).
For example, if you are looking at a daily chart and you want to calculate the 14-day ATR, you would take the True Range of the previous 14 days, calculate their average, and this would be the ATR for that day. The process is then repeated every day to obtain a series of ATR values over time.
The ATR can be smoothed using different methods, such as the Simple Moving Average (SMA), the Exponential Moving Average (EMA), or others, depending on the user's preferences or analysis needs.
► ATR Bands
The ATR bands are created by adding or subtracting the ATR from a reference point (usually the closing price). This process generates bands around the central point that expand and contract based on market volatility, allowing traders to assess dynamic support and resistance levels and to adapt their trading strategies to current market conditions.
█ INDICATOR
► ATR Bands
The indicator provides all the essential parameters for calculating the ATR: period length, time frame, smoothing method, and multiplier.
It is then possible to choose the reference point from which to create the bands. The most commonly used reference points are Open, High, Low, and Close, but you can also choose the commonly used candle averages: HL2, HLC3, HLCC4, OHLC4. Among these, there is also a less common "OC2", which represents the average of the candle body. Additionally, two parameters have been specifically created for this indicator: Open/Close and High/Low.
With the "Open/Close" parameter, the upper band is calculated from the higher value between Open and Close, while the lower one is calculated from the lower value between Open and Close. In the case of bullish candles, therefore, the Close value is taken as the starting point for the upper band and the Open value for the lower one; conversely, in bearish candles, the Open value is used for the upper band and the Close value for the lower band. This setting can be useful for precautionally generating broader bands when trading with candlesticks like hammers or inverted hammers.
The "High/Low" parameter calculates the upper band starting from the High and the lower band starting from the Low. Among all the available options, this one allows drawing the widest bands.
Other possible options to improve the drawing of ATR bands, aligning them with the price action, are:
• Doji Smoothing: When the current candle is a doji (having the same Open and Close price), the bands assume the values they had on the previous candle. This can be useful to avoid steep fluctuations of the bands themselves.
• Extend to High/Low: Extends the bands to the High or Low values when they exceed the value of the band.
• Round Last Cent: Expands the upper band by one cent if the price ends with x.x9, and the lower band if the price ends with x.x1. This function only works when the asset's tick is 0.01.
► Risk/Reward Advantage
The indicator optionally colors the ATR bands after setting a breakpoint, one or two risk/reward ratios, and a series of moving averages. This function allows you to know in advance whether entering a trade can provide an advantage over the risk. The band is colored when the ratio between the distance from the break point to the band and the distance from the break point to the first available moving average reaches at least the set ratio value. It is possible to set two colorings, one for a minimum risk/reward ratio and one for an optimal risk/reward ratio.
The break point can be chosen between High/Low (High in case of breakout, Low in case of breakdown) or Open/Close (on breakouts, Close with bullish candles or Open with bearish candles; on breakdowns, Close with bearish candles or Open with bullish candles).
It is possible to choose up to 10 moving averages of various types, including the VWAP with the Anchor Period (2).
Depending on the "Price to MA" setting, the bands can be individually or simultaneously colored.
By selecting "Single Direction," the risk/reward calculation is performed only when all moving averages are above or below the break point, resulting in only one band being colored at a time. For this reason, when the break point is in between the moving averages, the calculation is not executed. This setting can be useful for strategies involving price movement from a level towards a series of specific moving averages (for example, in reversals starting from a certain level towards the VWAP with possible partial take profits on some previous moving averages, or simply in trend following towards one or more moving averages).
Choosing "Both Directions" the risk/reward ratio is calculated based on the first available moving averages both above and below the price. This setting is useful for those who operate in range bound markets or simply take advantage of movements between moving averages.
█ NOTE
This script may not be suitable for scalping strategies that require immediate entries due to the inability to know the ATR of a candle in advance until its closure. Once the candle is closed, you should have time to place a stop or stop-limit order, so your strategy should not anticipate an immediate start with the next candle. Even more conveniently, if your strategy involves an entry on a pullback, you can place a limit order at the breakout level.
(1) www.tradingview.com
(2) For convenience, the code for the Anchor Period has been entirely copied from the VWAP code provided by TradingView.
Machine Learning Breakouts (from Pivots)I developed the 'Machine Learning Breakouts (from Pivots)' indicator to revolutionize the way we detect breakout opportunities and follow trend, harnessing the power of pivot points and machine learning. This tool integrates the k-Nearest Neighbors (k-NN) method with the Euclidean distance algorithm, meticulously analyzing pivot points to accurately forecast multiple breakout paths/zones. "ML Pivots Breakouts" is designed to identify and visually alert traders on bullish breakouts above high lines and bearish breakouts below low lines, offering essential insights for breakout and trend follower traders.
For traders, the instruction is clear: a bullish breakout signal is given when the price crosses above the forecasted high line, indicating potential entry points for long positions. Conversely, a bearish breakout signal is provided when the price breaks below the forecasted low line, suggesting opportunities to enter short positions. This makes the indicator a vital asset for navigating through market volatilities and capitalizing on emerging trends, designed for both long and short strategies and adeptly adapting to market shifts.
In this indicator I operate in a two-dimensional space defined by price and time. The choice of Euclidean distance as the preferred method for this analysis hinges on its simplicity and effectiveness in measuring and predicting straight-line distances between points in this space.
The Machine Learning Breakouts (from Pivots) Indicator calculations have been transitioned to the MLPivotsBreakouts library, simplifying the process of integration. Users can now seamlessly incorporate the "breakouts" function into their scripts to conduct detailed momentum analysis with ease.
Kernel Regression RibbonKernel Regression Ribbon is a flexible, visually pleasing trend identification tool. Plotting 8 different kernel regressions of different types and parameters allows the user to see where levels of support and resistance are being tested, retested and broken.
What’s Kernel Regression?
A statistical method for estimating the best fitting curve for a dataset, in this case, a time/price chart.
How’s Kernel Regression different from a Moving Average?
A Moving Average is basically a simple form of Kernel Regression, in that it uses a fixed (Retangular) Kernel function. In an MA, all data points are weighted equally over its length. However, a Kernel function reacts more to data points that are closer to the current point. This means it will adapt more quickly to changes in data than an MA. Due to this adaptability, Kernel functions often form part of Machine Learning.
Using this indicator:
Explore the default Regular mode first to get a feel for the inputs, which are more numerous than for MAs. Try out different settings, filters and intervals to get the best out of each kernel. Not all parameters are available for each KR. There are info tips to explain this in the menu, but I’ve also included handy, optional labels on the chart for each KR as a more accessible guide.
Once you know your way round the Regular mode, check out the Presets and start changing the parameters of each kernel to your liking in the “User KR1, KR2, … “ mode. Each kernel type has its strong and weak points. Blending different kernels is where this indicator comes into its own. Give your charts a funky shine!
This indicator does NOT repaint.
This script acknowledges, and hopefully showcases, the great work of @veryfid Kernel Regression Toolkit.
[blackcat] L3 Fibonacci Bands With ATRToday, what I'm going to introduce is a technical indicator that I think is quite in line with the indicator displayed by Tang - Fibonacci Bands with ATR. This indicator combines Bollinger Bands and Average True Range (ATR) to provide insights into market volatility and potential price reversals. Sounds complicated, right? Don't worry, I will explain it to you in the simplest way.
First, let's take a look at how Fibonacci Bands are constructed. They are similar to Bollinger Bands and consist of three lines: upper band, middle band (usually a 20-period simple moving average), and lower band. The difference is that Fibonacci Bands use ATR to calculate the distance between the upper and lower bands and the middle band.
Next is a key factor - ATR multiplier. We need to smooth the ATR using Welles Wilder's method. Then, by multiplying the ATR by a Fibonacci multiplier (e.g., 1.618), we get the upper band, called the upper Fibonacci channel. Similarly, multiplying the ATR by another Fibonacci multiplier (e.g., 0.618 or 1.0) gives us the lower band, called the lower Fibonacci channel.
Now, let's see how Fibonacci Bands can help us assess market volatility. When the channel widens, it means that market volatility is high, while a narrow channel indicates low market volatility. This way, we can determine the market's activity level based on the width of the channel.
In addition, when the price touches or crosses the Fibonacci channel, it may indicate a potential price reversal, similar to Bollinger Bands. Therefore, using Fibonacci Bands in trading can help us capture potential buy or sell signals.
In summary, Fibonacci Bands with ATR is an interesting and practical technical indicator that provides information about market volatility and potential price reversals by combining Bollinger Bands and ATR. Remember, make good use of these indicators and apply them flexibly in trading!
This code is a TradingView indicator script used to plot L3 Fibonacci Bands With ATR.
First, the indicator function is used to define the title and short title of the indicator, and whether it should be overlaid on the main chart.
Then, the input function is used to define three input parameters: MA type (maType), MA length (maLength), and data source (src). There are four options for MA type: SMA, EMA, WMA, and HMA. The default values are SMA, 55, and hl2 respectively.
Next, the moving average line is calculated based on the user's selected MA type. If maType is 'SMA', the ta.sma function is called to calculate the simple moving average; if maType is 'EMA', the ta.ema function is called to calculate the exponential moving average; if maType is 'WMA', the ta.wma function is called to calculate the weighted moving average; if maType is 'HMA', the ta.hma function is called to calculate the Hull moving average. The result is then assigned to the variable ma.
Then, the _atr variable is used to calculate the ATR (Average True Range) value using ta.atr, and multiplied by different coefficients to obtain four Fibonacci bias values: fibo_bias4, fibo_bias3, fibo_bias2, and fibo_bias1.
Finally, the prices of the upper and lower four Fibonacci bands are calculated by adding or subtracting the corresponding Fibonacci bias values from the current price, and plotted on the chart using the plot function.
Intraday Volatility Bands [Honestcowboy]The Intraday Volatility Bands aims to provide a better alternative to ATR in the calculation of targets or reversal points.
How are they different from ATR based bands?
While ATR and other measures of volatility base their calculations on the previous bars on the chart (for example bars 1954 to 1968). The volatility used in these bands measure expected volatility during that time of the day.
Why would you take this approach?
Markets behave different during certain times of the day, also called sessions.
Here are a couple examples.
Asian Session (generally low volatility)
London Session (bigger volatility starts)
New York Session (overlap of New York with London creates huge volatility)
Generally when using bands or channel type indicators intraday they do not account for the upcoming sessions. On London open price will quickly spike through a bollinger band and it will take some time for the bands to adjust to new volatility.
This script will show expected volatility targets at the start of each new bar and will not adjust during the bar. It already knows what price is expected to do at this time of day.
Script also plots arrows when price breaches either the top or bottom of the bands. You can also set alerts for when this occurs. These are non repainting as the script knows the level at start of the bar and does not change.
🔷 CALCULATION
Think of this script like an ATR but instead it uses past days data instead of previous bars data. Charts below should visualise this more clearly:
The scripts measure of volatility is based on a simple high-low.
The script also counts the number of bars that exist in a day on your current timeframe chart. After knowing that number it creates the matrix used in it's calculations and data storage.
See how it works perfectly on a lower timeframe chart below:
Getting this right was the hardest part, check the coding if you are interested in this type of stuff. I commented every step in the coding process.
🔷 SETTINGS
Every setting of the script has a tooltip but I provided a breakdown here:
Some more examples of different charts:
Donchian MA Bands [LuxAlgo]The Donchian MA Bands script is a complete trend indicator derived from the popular Donchian channel indicator as well as various customizable moving averages to estimate trend direction and build support/resistance levels & zones.
🔶 USAGE
The indicator outputs various elements, the main ones being a lower dynamic zone (blue by default), an upper dynamic zone (in orange by default), and one support and resistance level/zones (red/green by default).
A prominent lower zone is indicative of an uptrend, while a prominent upper zone is indicative of a downtrend. These zones can be used as support/resistance as well.
Support/resistance zones and levels can be used using a breakout methodology or to determine price bounced if a level was tested multiple times.
The indicator contains various modes affecting the output of the indicator, described below.
🔹 Clouds
Clouds return one upper/lower dynamic zone and look/act similarly to a trailing stop. Price over the lower zone is indicative of an uptrend, and price under the upper zone is indicative of a downtrend.
🔹 Upper Band
The upper band mode returns a dynamic zone closer to prices during an uptrend, and farther away during a downtrend.
This band can act as a support during uptrends.
🔹 Lower Band
The lower band mode returns a dynamic zone closer to prices during an uptrend, and farther away during a downtrend.
This band can act as a resistance during downtrends.
🔹 Bands
Bands return both upper and lower zones, the zones are more apparent depending on the price trend direction, with uptrends being indicated by a more visible lower zone, and downtrends being indicated by a more visible upper zone.
Breakout dots are highlighted when price breakout the indicator displayed extremities, and can be indicative of a confirmed trend reversal.
These breakouts can be more effective for trend following during trending markets. Ranging markets might return breakouts highlighting the top/bottom.
🔶 DETAILS
The core of this script is the highest / lowest mean average (MA) value for a given number of bars back ( Donchian lines).
This is repeated a few times with the obtained values.
When Bands are chosen ( Style ) this will be repeated 1 more time.
The type of mean average can be customized ( Type MA ), as well as the number of bars back ( Length ).
Depending on the choice of bands ( Style ) the script will focus on certain area's of interest.
When the option Clouds , Upper band or Lower band is chosen, an extra feature, support/resistance (S/R), will be shown.
These color-filled areas are visible when there is a difference between the 2nd and 3rd highest/lowest values.
The lines/areas can be used for stop loss, entry, exit,...
You can set the type of MA and Length separately ( Settings -> S/R ).
If you don't need this feature, simply set Type ( Settings -> S/R ) -> NONE
The shape sometimes resembles triangles, indicating a potential direction
Default the average of the highest and lowest values is plotted (Style -> Mid Donchian)
This can act as potential support/resistance or visualization of the trend, the mean average is not plotted but can be (Style -> MA)
🔹 Note
When the option Bands is chosen, an indication is plotted when the closing price breaks above the highest band or breaks below the lower band. This isn't necessarily a buy/sell signal, it is merely a signal that these lines are broken.
Users should decide on their own how they use the bands/lines/areas as entry, exit, trailing stop, stop loss, profit taking,...
🔶 SETTINGS
🔹 Bands
Style: Clouds (default), Upper band, Lower band, Bands
Type MA: choose between SMA, EMA, RMA, HullMA, WMA, VWMA (default), DEMA, TEMA, NONE (off)
Length: Length of moving average and Donchian calculations (default 20)
Colour Bands
🔹 S/R (Support/Resistance, visible with Clouds, Upper band or Lower band)
Type MA: choose between SMA, EMA, RMA, HullMA, WMA, VWMA (default), DEMA, TEMA, NONE (off)
Length: Length of moving average and Donchian calculations (default 20)
Colour S/R
Bitcoin wave modelBitcoin wave model is based on the logarithmic regression model and the sinusoidal waves, induced by the halving events.
This chart presents the outcome of an in-depth analysis of the complete set of Bitcoin price data available from October 2009 to August 2023.
The central concept is that the logarithm of the Bitcoin price closely adheres to the logarithmic regression model. If we plot the logarithm of the price against the logarithm of time, it forms a nearly straight line.
The parameters of this model are provided in the script as follows: log (BTCUSD) = 1.48 + 5.44log(h).
The secondary concept involves employing the inherent time unit of Bitcoin instead of days:
'h' denotes a slightly adjusted time measurement intrinsic to the Bitcoin blockchain. It can be approximated as (days since the genesis block) * 0.0007. Precisely, 'h' is defined as follows: h = 0 at the genesis block, h = 1 at the first halving block, and so forth. In general, h = block height / 210,000.
Adjustments are made to account for variations in block creation time.
The third concept revolves around investigating halving waves triggered by supply shock events resulting from the halvings. These halvings occur at regular intervals in Bitcoin's native time 'h'. All halvings transpire when 'h' is an integer. These events induce waves with intervals denoted as h = 1.
Consequently, we can model these waves using a sin(2pih - a) function. The parameter determining the time shift is assessed as 'a = 0.4', aligning with earlier expectations for halving events and their subsequent outcomes.
The fourth concept introduces the notion that the waves gradually diminish in amplitude over the progression of "time h," diminishing at a rate of 0.7^h.
Lastly, we can create bands around the modeled sinusoidal waves. The upper band is derived by multiplying the sine wave by a factor of 3.1*(1-0.16)^h, while the lower band is obtained by dividing the sine wave by the same factor, 3.1*(1-0.16)^h.
The current bandwidth is 2.5x. That means that the upper band is 2.5 times the lower band. These bands are forming an exceptionally narrow predictive channel for Bitcoin. Consequently, a highly accurate estimation of the peak of the next cycle can be derived.
The prediction indicates that the zenith past the fourth halving, expected around the summer of 2025, could result in prices ranging between 200,000 and 240,000 USD.
Enjoy the mathematical insights!