CVD - Cumulative Volume Delta (Chart)█ OVERVIEW
This indicator displays cumulative volume delta (CVD) as an on-chart oscillator. It uses intrabar analysis to obtain more precise volume delta information compared to methods that only use the chart's timeframe.
The core concepts in this script come from our first CVD indicator , which displays CVD values as plot candles in a separate indicator pane. In this script, CVD values are scaled according to price ranges and represented on the main chart pane.
█ CONCEPTS
Bar polarity
Bar polarity refers to the position of the close price relative to the open price. In other words, bar polarity is the direction of price change.
Intrabars
Intrabars are chart bars at a lower timeframe than the chart's. Each 1H chart bar of a 24x7 market will, for example, usually contain 60 bars at the lower timeframe of 1min, provided there was market activity during each minute of the hour. Mining information from intrabars can be useful in that it offers traders visibility on the activity inside a chart bar.
Lower timeframes (LTFs)
A lower timeframe is a timeframe that is smaller than the chart's timeframe. This script utilizes a LTF to analyze intrabars, or price changes within a chart bar. The lower the LTF, the more intrabars are analyzed, but the less chart bars can display information due to the limited number of intrabars that can be analyzed.
Volume delta
Volume delta is a measure that separates volume into "up" and "down" parts, then takes the difference to estimate the net demand for the asset. This approach gives traders a more detailed insight when analyzing volume and market sentiment. There are several methods for determining whether an asset's volume belongs in the "up" or "down" category. Some indicators, such as On Balance Volume and the Klinger Oscillator , use the change in price between bars to assign volume values to the appropriate category. Others, such as Chaikin Money Flow , make assumptions based on open, high, low, and close prices. The most accurate method involves using tick data to determine whether each transaction occurred at the bid or ask price and assigning the volume value to the appropriate category accordingly. However, this method requires a large amount of data on historical bars, which can limit the historical depth of charts and the number of symbols for which tick data is available.
In the context where historical tick data is not yet available on TradingView, intrabar analysis is the most precise technique to calculate volume delta on historical bars on our charts. This indicator uses intrabar analysis to achieve a compromise between simplicity and accuracy in calculating volume delta on historical bars. Our Volume Profile indicators use it as well. Other volume delta indicators in our Community Scripts , such as the Realtime 5D Profile , use real-time chart updates to achieve more precise volume delta calculations. However, these indicators aren't suitable for analyzing historical bars since they only work for real-time analysis.
This is the logic we use to assign intrabar volume to the "up" or "down" category:
• If the intrabar's open and close values are different, their relative position is used.
• If the intrabar's open and close values are the same, the difference between the intrabar's close and the previous intrabar's close is used.
• As a last resort, when there is no movement during an intrabar and it closes at the same price as the previous intrabar, the last known polarity is used.
Once all intrabars comprising a chart bar are analyzed, we calculate the net difference between "up" and "down" intrabar volume to produce the volume delta for the chart bar.
█ FEATURES
CVD resets
The "cumulative" part of the indicator's name stems from the fact that calculations accumulate during a period of time. By periodically resetting the volume delta accumulation, we can analyze the progression of volume delta across manageable chunks, which is often more useful than looking at volume delta accumulated from the beginning of a chart's history.
You can configure the reset period using the "CVD Resets" input, which offers the following selections:
• None : Calculations do not reset.
• On a fixed higher timeframe : Calculations reset on the higher timeframe you select in the "Fixed higher timeframe" field.
• At a fixed time that you specify.
• At the beginning of the regular session .
• On trend changes : Calculations reset on the direction change of either the Aroon indicator, Parabolic SAR , or Supertrend .
• On a stepped higher timeframe : Calculations reset on a higher timeframe automatically stepped using the chart's timeframe and following these rules:
Chart TF HTF
< 1min 1H
< 3H 1D
<= 12H 1W
< 1W 1M
>= 1W 1Y
Specifying intrabar precision
Ten options are included in the script to control the number of intrabars used per chart bar for calculations. The greater the number of intrabars per chart bar, the fewer chart bars can be analyzed.
The first five options allow users to specify the approximate amount of chart bars to be covered:
• Least Precise (Most chart bars) : Covers all chart bars by dividing the current timeframe by four.
This ensures the highest level of intrabar precision while achieving complete coverage for the dataset.
• Less Precise (Some chart bars) & More Precise (Less chart bars) : These options calculate a stepped LTF in relation to the current chart's timeframe.
• Very precise (2min intrabars) : Uses the second highest quantity of intrabars possible with the 2min LTF.
• Most precise (1min intrabars) : Uses the maximum quantity of intrabars possible with the 1min LTF.
The stepped lower timeframe for "Less Precise" and "More Precise" options is calculated from the current chart's timeframe as follows:
Chart Timeframe Lower Timeframe
Less Precise More Precise
< 1hr 1min 1min
< 1D 15min 1min
< 1W 2hr 30min
> 1W 1D 60min
The last five options allow users to specify an approximate fixed number of intrabars to analyze per chart bar. The available choices are 12, 24, 50, 100, and 250. The script will calculate the LTF which most closely approximates the specified number of intrabars per chart bar. Keep in mind that due to factors such as the length of a ticker's sessions and rounding of the LTF, it is not always possible to produce the exact number specified. However, the script will do its best to get as close to the value as possible.
As there is a limit to the number of intrabars that can be analyzed by a script, a tradeoff occurs between the number of intrabars analyzed per chart bar and the chart bars for which calculations are possible.
Display
This script displays raw or cumulative volume delta values on the chart as either line or histogram oscillator zones scaled according to the price chart, allowing traders to visualize volume activity on each bar or cumulatively over time. The indicator's background shows where CVD resets occur, demarcating the beginning of new zones. The vertical axis of each oscillator zone is scaled relative to the one with the highest price range, and the oscillator values are scaled relative to the highest volume delta. A vertical offset is applied to each oscillator zone so that the highest oscillator value aligns with the lowest price. This method ensures an accurate, intuitive visual comparison of volume activity within zones, as the scale is consistent across the chart, and oscillator values sit below prices. The vertical scale of oscillator zones can be adjusted using the "Zone Height" input in the script settings.
This script displays labels at the highest and lowest oscillator values in each zone, which can be enabled using the "Hi/Lo Labels" input in the "Visuals" section of the script settings. Additionally, the oscillator's value on a chart bar is displayed as a tooltip when a user hovers over the bar, which can be enabled using the "Value Tooltips" input.
Divergences occur when the polarity of volume delta does not match that of the chart bar. The script displays divergences as bar colors and background colors that can be enabled using the "Color bars on divergences" and "Color background on divergences" inputs.
An information box in the lower-left corner of the indicator displays the HTF used for resets, the LTF used for intrabars, the average quantity of intrabars per chart bar, and the number of chart bars for which there is LTF data. This is enabled using the "Show information box" input in the "Visuals" section of the script settings.
FOR Pine Script™ CODERS
• This script utilizes `ltf()` and `ltfStats()` from the lower_tf library.
The `ltf()` function determines the appropriate lower timeframe from the selected calculation mode and chart timeframe, and returns it in a format that can be used with request.security_lower_tf() .
The `ltfStats()` function, on the other hand, is used to compute and display statistical information about the lower timeframe in an information box.
• The script utilizes display.data_window and display.status_line to restrict the display of certain plots.
These new built-ins allow coders to fine-tune where a script’s plot values are displayed.
• The newly added session.isfirstbar_regular built-in allows for resetting the CVD segments at the start of the regular session.
• The VisibleChart library developed by our resident PineCoders team leverages the chart.left_visible_bar_time and chart.right_visible_bar_time variables to optimize the performance of this script.
These variables identify the opening time of the leftmost and rightmost visible bars on the chart, allowing the script to recalculate and draw objects only within the range of visible bars as the user scrolls.
This functionality also enables the scaling of the oscillator zones.
These variables are just a couple of the many new built-ins available in the chart.* namespace.
For more information, check out this blog post or look them up by typing "chart." in the Pine Script™ Reference Manual .
• Our ta library has undergone significant updates recently, including the incorporation of the `aroon()` indicator used as a method for resetting CVD segments within this script.
Revisit the library to see more of the newly added content!
Look first. Then leap.
Volatility
ka66: Alpha-Configurable EMAAllows directly modifying the Alpha/Smoothing Factor parameter of an EMA. This can allow for very close fits to price movement, instead of the more standard coarse-grained approach of adjusting smoothing via the look-back period.
Furthermore, we allow smoothing this EMA further by passing the original EMA through the EMA function again, and the output of this, yet again, to as many smoothing iterations are desired. For efficiency and practicality, limited to 10 iterations. This is inspired by indicators such as the DEMA.
Finally, we allow producing bands, with a configurable multiplier, around the final EMA. Useful for dynamic S/R levels, e.g. to use as trailing stop zones.
Volume Weighted Hull Moving Average Bollinger Bands (VWHBB)Title: "Volume Weighted Hull Moving Average Bollinger Bands Indicator for TradingView"
Abstract: This script presents a TradingView indicator that displays Bollinger Bands based on the volume weighted Hull Moving Average (VEHMA) of a financial asset. The VEHMA is a technical analysis tool that combines the reduced lag of the Hull Moving Average (HMA) with volume weighting to provide a more sensitive indicator of market trends and dynamics. The Bollinger Bands are a volatility indicator that plot upper and lower bands around a moving average, which can help traders identify potential trend changes and overbought or oversold conditions. The script allows the user to customize the VEHMA length and Bollinger Band deviation parameters.
Introduction: Bollinger Bands are a popular technical analysis tool used to identify potential trend changes and overbought or oversold conditions in the market. They are constructed by plotting upper and lower bands around a moving average, with the width of the bands determined by the volatility of the asset. The VEHMA is a variant of the Hull Moving Average (HMA) that combines the reduced lag of the HMA with volume weighting to provide a more sensitive indicator of market trends and dynamics.
Methodology: The VEHMA is calculated using a weighted average of two exponential moving averages (EMAs), with the weighting based on the volume of the asset and the length of the moving average. The Bollinger Bands are calculated by plotting the VEHMA plus and minus a standard deviation of the asset's price over a specified period. The standard deviation is a measure of the volatility of the asset and helps to adjust the width of the bands based on market conditions.
Implementation: The script is implemented in TradingView's PineScript language and can be easily added to any chart on the platform. The user can customize the VEHMA length and Bollinger Band deviation parameters to suit their trading strategy. The VEHMA, Bollinger Bands, and fill colors are plotted on the chart to provide a visual representation of the indicator.
Conclusion: The VEHMA Bollinger Bands indicator is a useful tool for traders looking to identify potential trend changes and overbought or oversold conditions in the market. This script provides a convenient and customizable implementation of the indicator for use in TradingView.
OHLC ToolOHLC Tool allows you to display Current or Historical OHLC Values as horizontal lines that extend to the right on your chart.
Features
Variable Lookback to display a specific historical bar's values. Default = 1 (Previous Candle)
Customizable Timeframe to view HTF Candle values.
Custom Line Colors, Styles, and Thicknesses.
Price Scale Value Display Capability.
For displaying the line values and labels on the price scale you will need to enable:
"Indicator and financials name labels"
and
"Indicator and financials value labels"
These options are found in the Price Scale Menu under Labels. Price Scale Menu > Labels
When you do this you will notice your other indicator values will also be on the price scale,
if you wish to disable these, go to the indicator settings under the "Style" Tab, Uncheck the "Labels on price scale" box.
Indicator Settings > Style > "Labels on price scale"
Enjoy!
BankNifty Dash
This indicator to be used only in BankNifty , shows Values of BankNifty Index & its top constituents.
Dashboard Interpretation :
LTP - Last Traded Price.
D High - Day High.
D Low - Day Low.
I Points - Shows the contribution of top BankNifty constituents according to its weightage.
PH-PL - "PH - PL" means LTP is trading between Previous Days High( PH ) & Previous Days Low( PL ) which indicates Rangebound-ness.
"+ PH" means LTP is trading above Previous Days High( PH ) which indicates Bullish-ness.
"- PL" means LTP is trading below Previous Days Low( PL ) which indicates Bearish-ness.
ATR - Displays the Daily ATR (Average True Range) (14 period).
DTR - Current Day Range.
DTR% - Current Day Range percentage.
( DTR & DTR%, changes colour based on percent value. < 61.8 is green and > 61.8 is red.)
For example if the Daily ATR is 100 and the current range of the day is 200 this would be 200% the original move.
EMA:-
Default value of 5 is used in Fast EMA.
Default value of 21 is used in Slow EMA.
Default value of 200 is used in EMA (Used for trend direction).
User can change values from input section.
If the colour filled between Fast EMA and Slow EMA is green, the market is in a uptrend
If the colour filled between Fast EMA and Slow EMA is red, the market is in a downtrend.
ADR :-
Plots ADR (Average Day Range) zones are used as support and resistance, ADR zones are calculated using a 5 or 10 day period unless you change the settings.
PDH/PDL :-
Plots Previous Day High(PDH) and Previous Day low(PDL).
Remaining ATR [vnhilton]ATR levels can be used on a trading day to look for overextensions beyond the average, where you can look to take profits. Remaining ATR is calculated as the current day range subtracted by the previous day ATR. RATR is then plotted away from the high & low lines. All lines (except for the day open) are dynamic, so RATR lines will move according to how much RATR remains.
Note: This indicator only works on intraday timeframes
(FEATURES)
- Works on either RTH or ETH sessions
- Select Day ATR period, & 3 multipliers that will be applied to RATR values away from respective intraday high & low
- Extend current lines to the right
- Show recent lines only
- Change line style, colours within & out the intraday range, & thickness
- Change label offset, size, & colours within & out the intraday range
- Hide RATR lines & labels when within intraday range
- Plot fill between lines (note: RATR plot fills are from their lines to the intraday high & low, so there'll be overlapping)
To show more lines in the past, go to higher intraday timeframes.
Same chart & timeframe as above but on RTH session only.
VIX Rule of 16There’s an interesting aspect of VIX that has to do with the number 16. (approximately the square root of the number of trading days in a year).
In any statistical model, 68.2% of price movement falls within one standard deviation (1 SD ). The rest falls into the “tails” outside of 1 SD .
When you divide any implied volatility (IV) reading (such as VIX ) by 16, the annualized number becomes a daily number
The essence of the “rule of 16.” Once you get it, you can do all sorts of tricks with it.
If the VIX is trading at 16, then one-third of the time, the market expects the S&P 500 Index (SPX) to trade up or down by more than 1% (because 16/16=1). A VIX at 32 suggests a move up or down of more than 2% a third of the time, and so on.
• VIX of 16 – 1/3 of the time the SPX will have a daily change of at least 1%
• VIX of 32 – 1/3 of the time the SPX will have a daily change of at least 2%
• VIX of 48 – 1/3 of the time the SPX will have a daily change of at least 3%
Volatility Compression Ratio by M-CarloHello traders. I created this simple indicator to use as a FILTER.
He does not provide any operational signals but tells us if we are in a period of volatility compression or expansion and it can work on all market.
This filter works great for all strategies that work on breakouts
The concept is this: I will enter at breakout of a price level that I consider important, only if there is a volatility compression and not in the case of expansion of volatility.
Technically the calculation is very simple:
Step 1: I calculate the ATR at "x" periods, I set 7 by default because I get better results but you can change it as you like using the "atr length" field. You can also choose whether to calculate the ATR via RMA, SMA or EMA.
Step 2: I Calculate a simple average of the previous ATR over a longer period, longer period than set with the "length multiplier" parameter, which multiplies the "atr length" value by "x" times. Here I set the default 3 but you can change it as you like.
Step 3: I divide the ATR value calculated in step1 by its long-term average calculated in step2, obtaining a value that will oscillate above and below the value of 1
So:
if the indicator is above the value of 1 it means that volatility is expanding
If the indicator is below the value of 1 it means that we are in a period of volatility compression (and as we know volatility explodes sooner or later)
If you have any questions write to me and I hope this filter helps you! Have good Trading!
Percent Volatility MomentumThis pine script calculates percent volatility momentum, negative percent volatility and positive percent volatility. The blue line is the overall momentum of the current percent volatility trend. The red line only includes negative movements in the percent volatility of the source. The green line includes only positive movements of the percent volatility of the source. The script also includes an angle and a normalized angle setting that allows one to determine the angle of the source curve. Note, the angle was transformed from -90 to 90 to 0 to 100. Such that an angle of -90 is transformed to 0. An angle of 0 is transformed to 50 and an angle of 90 is transformed to 100. This is the first draft of this script and my first pine script published. Any feedback is welcome. I borrowed code from TradingView's Linear Regression Channel and Relative Strength Index pine scripts.
Musashi_Fractal_Dimension === Musashi-Fractal-Dimension ===
This tool is part of my research on the fractal nature of the markets and understanding the relation between fractal dimension and chaos theory.
To take full advantage of this indicator, you need to incorporate some principles and concepts:
- Traditional Technical Analysis is linear and Euclidean, which makes very difficult its modeling.
- Linear techniques cannot quantify non-linear behavior
- Is it possible to measure accurately a wave or the surface of a mountain with a simple ruler?
- Fractals quantify what Euclidean Geometry can’t, they measure chaos, as they identify order in apparent randomness.
- Remember: Chaos is order disguised as randomness.
- Chaos is the study of unstable aperiodic behavior in deterministic non-linear dynamic systems
- Order and randomness can coexist, allowing predictability.
- There is a reason why Fractal Dimension was invented, we had no way of measuring fractal-based structures.
- Benoit Mandelbrot used to explain it by asking: How do we measure the coast of Great Britain?
- An easy way of getting the need of a dimension in between is looking at the Koch snowflake.
- Market prices tend to seek natural levels of ranges of balance. These levels can be described as attractors and are determinant.
Fractal Dimension Index ('FDI')
Determines the persistence or anti-persistence of a market.
- A persistent market follows a market trend. An anti-persistent market results in substantial volatility around the trend (with a low r2), and is more vulnerable to price reversals
- An easy way to see this is to think that fractal dimension measures what is in between mainstream dimensions. These are:
- One dimension: a line
- Two dimensions: a square
- Three dimensions: a cube.
--> This will hint you that at certain moment, if the market has a Fractal Dimension of 1.25 (which is low), the market is behaving more “line-like”, while if the market has a high Fractal Dimension, it could be interpreted as “square-like”.
- 'FDI' is trend agnostic, which means that doesn't consider trend. This makes it super useful as gives you clean information about the market without trying to include trend stuff.
Question: If we have a game where you must choose between two options.
1. a horizontal line
2. a vertical line.
Each iteration a Horizontal Line or a Square will appear as continuation of a figure. If it that iteration shows a square and you bet vertical you win, same as if it is horizontal and it is a line.
- Wouldn’t be useful to know that Fractal dimension is 1.8? This will hint square. In the markets you can use 'FD' to filter mean-reversal signals like Bollinger bands, stochastics, Regular RSI divergences, etc.
- Wouldn’t be useful to know that Fractal dimension is 1.2? This will hint Line. In the markets you can use 'FD' to confirm trend following strategies like Moving averages, MACD, Hidden RSI divergences.
Calculation method:
Fractal dimension is obtained from the ‘hurst exponent’.
'FDI' = 2 - 'Hurst Exponent'
Musashi version of the Classic 'OG' Fractal Dimension Index ('FDI')
- By default, you get 3 fast 'FDI's (11,12,13) + 1 Slow 'FDI' (21), their interaction gives useful information.
- Fast 'FDI' cross will give you gray or red dots while Slow 'FDI' cross with the slowest of the fast 'FDI's will give white and orange dots. This are great to early spot trend beginnings or trend ends.
- A baseline (purple) is also provided, this is calculated using a 21 period Bollinger bands with 1.618 'SD', once calculated, you just take midpoint, this is the 'TDI's (Traders Dynamic Index) way. The indicator will print purple dots when Slow 'FDI' and baseline crosses, I see them as Short-Term cycle changes.
- Negative slope 'FDI' means trending asset.
- Positive most of the times hints correction, but if it got overextended it might hint a rocket-shot.
TDI Ranges:
- 'FDI' between 1.0≤ 'FDI' ≤1.4 will confirm trend following continuation signals.
- 'FDI' between 1.6≥ 'FDI' ≥2.0 will confirm reversal signals.
- 'FDI' == 1.5 hints a random unpredictable market.
Fractal Attractors
- As you must know, fractals tend orbit certain spots, this are named Attractors, this happens with any fractal behavior. The market of course also shows them, in form of Support & Resistance, Supply Demand, etc. It’s obvious they are there, but now we understand that they’re not linear, as the market is fractal, so simple trendline might not be the best tool to model this.
- I’ve noticed that when the Musashi version of the 'FDI' indicator start making a cluster of multicolor dots, this end up being an attractor, I tend to draw a rectangle as that area as price tend to come back (I still researching here).
Extra useful stuff
- Momentum / speed: Included by checking RSI Study in the indicator properties. This will add two RSI’s (9 and a 7 periods) plus a baseline calculated same way as explained for 'FDI'. This gives accurate short-term trends. It also includes RSI divergences (regular and hidden), deactivate with a simple check in the RSI section of the properties.
- BBWP (Bollinger Bands with Percentile): Efficient way of visualizing volatility as the percentile of Bollinger bands expansion. This line varies color from Iced blue when low volatility and magma red when high. By default, comes with the High vols deactivated for better view of 'FDI' and RSI while all studies are included. DDWP is trend agnostic, just like 'FDI', which make it very clean at providing information.
- Ultra Slow 'FDI': I noticed that while using BBWP and RSI, the indicator gets overcrowded, so there is the possibility of adding only one 'FDI' + its baseline.
Final Note: I’ve shown you few ways of using this indicator, please backtest before using in real trading. As you know trading is more about risk and trade management than the strategy used. This still a work in progress, I really hope you find value out of it. I use it combination with a tool named “Musashi_Katana” (also found in TradingView).
Best!
Musashi
Welford Bollinger Bands (WBB)The Welford method is an algorithm for calculating the running average and variance of a series of numbers in a single pass, without the need to store all the previous values. It works by maintaining an ongoing running average and variance, updating them with each new value in the series. The running average is updated using a simple formula that adds the new value to the previous average, weighed by the number of values that have been processed so far. The variance is updated using a similar formula that takes into account the deviation of the new value from the running average.
The Welford method has several advantages that make it a good fit for use in calculating Bollinger Bands. First, it is more numerically stable than other methods, as it avoids accumulating round-off errors and can handle large numbers of data points without overflow or underflow. This is important when working with financial data, which can contain large price movements and wide ranges of values.
Second, the Welford method is well-suited for use in real-time or streaming data scenarios where all the data may not be available upfront. This is useful in the context of Bollinger Bands, which are often used to identify trend changes and trading opportunities in real-time, as the bands are updated with each new data point.
Finally, the Welford method is simple and efficient, making it easy to implement and fast to compute. This is important when creating technical indicators and trading strategies, as performance is often a critical factor.
Overall, the Welford method is a reliable and efficient way to calculate the running average and variance of a series of numbers, making it a good fit for use in calculating Bollinger Bands and other technical indicators.
Seasonal tendency: week-on-week % change and 10yr Averages-shows week-on-week % change, and 10yr averages of these % changes
-scan across the 10yr averages to get a good idea of the seasonality of an asset
-best used on commodities with strong seasonal tendencies (Gold, Wheat, Coffee, Lean hogs etc)
-works only on daily timeframe
-by default it will compare SMA(length) in the following way, BTC: Sunday cf previous Sunday | ES/Gold: Monday cf previous Monday
-for most assets, 5 daily bars in a week (SMA(5)) => that's the default. For BTC can change this to 7.
~~inputs:
-change input year to show any previous decade of asset's history; the table will display over that year on the chart
-choose expression for Average of % change week on week: SMA, ohlc4, vwma, vwap (default SMA)
-choose number of daily bars in a week (i.e. SMA length)
-change label sizes/colors
~~notes:
-When applied to current year: will print the 10yr average for previous weeks in the year; 9yr average for future weeks in the year
-drawings and SMA plot on the above chart are just to show visually how the week's average is calculated, and how this lines up with the label
-current week of year will highlight in large font orange by default
-the first 2 weeks of the year are omitted because of a bug i can't figure out, which throws out bad numbers.
-cannot print all the values for each of previous 10yrs; 'code too long' error. Could likely do this via using matrices but would require a rewrite
17th Dec 2022
@twingall
VF-ST-EMA-CPRVolatility and Fibonacci table helps to identify support and resistance for the day/week. Similarly, the CPR (Central Pivot Range) table helps to identify the support and resistance for the day/week. Additionally use SUpertrend and EMA to identify trends.
Disclaimer:
This indicator is for educational or study purposes. There is no recommendation to buy or sell any scrip here. Take your own risks and rewards and you are only
responsible for any outcome after using this indicator.
Volatility-Weighted Moving Average SystemThis simple script creates a moving average system weighted by volatility. The moving averages are less sensitive to price action than the typical moving averages we use, and their crossovers can be used to identify extended trends.
I've colored the background depending on trend. Ideally in the future, I'll draw long or short signals on-chart depending on the width between the bands, which works as a faster indicator of trend-change than crossover does.
Hope you all enjoy. Happy holidays.
Channel Based Zigzag [HeWhoMustNotBeNamed]🎲 Concept
Zigzag is built based on the price and number of offset bars. But, in this experiment, we build zigzag based on different bands such as Bollinger Band, Keltner Channel and Donchian Channel. The process is simple:
🎯 Derive bands based on input parameters
🎯 High of a bar is considered as pivot high only if the high price is above or equal to upper band.
🎯 Similarly low of a bar is considered as pivot low only if low price is below or equal to lower band.
🎯 Adding the pivot high/low follows same logic as that of regular zigzag where pivot high is always followed by pivot low and vice versa.
🎯 If the new pivot added is of same direction as that of last pivot, then both pivots are compared with each other and only the extreme one is kept. (Highest in case of pivot high and lowest in case of pivot low)
🎯 If a bar has both pivot high and pivot low - pivot with same direction as previous pivot is added to the list first before adding the pivot with opposite direction.
🎲 Use Cases
Can be used for pattern recognition algorithms instead of standard zigzag. This will help derive patterns which are relative to bands and channels.
Example: John Bollinger explains how to manually scan double tap using Bollinger Bands in this video: www.youtube.com This modified zigzag base can be used to achieve the same using algorithmic means.
🎲 Settings
Few simple configurations which will let you select the band properties. Notice that there is no zigzag length here. All the calculations depend on the bands.
With bands display, indicator looks something like this
Note that pivots do not always represent highest/lowest prices. They represent highest/lowest price relative to bands.
As mentioned many times, application of zigzag is not for buying at lower price and selling at higher price. It is mainly used for pattern recognition either manually or via algorithms. Lets build new Harmonic, Chart patterns, Trend Lines using the new zigzag?
Trend Finder with Coefficient of VariationCoefficient of variation (“COV”) is a statistical measure used to describe the variability of values within a data set, it’s calculated by taking the standard deviation divided by the mean.
Traditionally, COV is applied to the expected returns of competing investment portfolios. A risk adverse investor prefers to accept a portfolio with a relatively lower COV value.
On the other hand, when applying COV to price charts, the difference is that instead of looking at expected returns, we now treat price as the source of data. We look at price from a moving average perspective. This script purely focuses on price.
What this indicator does:
Firstly, to go over the parameters:
Let ‘n’ be the lookback period for computing COV, and ‘m’ be the period for comparing the ranking of COVs.
Logics in a nutshell:
This program will (A) calculate the COV by dividing the moving standard deviation by moving average over ‘n’ bars, and then (B) illustrate the relationship of how COV at each bar ranks compared to COVs over past ‘m’ bars. We use a color scale (default black and yellow) for visualizing ranking in terms of percentiles. If COV is below its median value, then we assume that price is consolidating.
Hypothesis:
Using COV on top of regular SMA signals should reduce a lot of unwanted noise such as consecutive crossovers during ranging-periods. Traders want volatility, but not too much of it when sniping for entry opportunities (speaking of initial position; need to add to winning positions after, but this is for another topic). For this reason, the median value of COV is suitable as a metric for signals.
Applications:
We use the median value of COV to form a decision rule. A signal is generated when COV > median(COV,m), and the direction of trend is determined based on relative position of price with respect to sma(price,n). When the value of COV is increasing, it can also be thought of seeing Bollinger Bands beginning to bulge. When trends begin, this program will plot triangles to signify entry opportunities.
Oscillator ExtremesThe Oscillator Extremes indicator plots the normalized positioning of the selected oscillator versus the Bollinger Bands' upper and lower boundaries. Currently, this indicator has four different oscillators to choose from; RSI, CMO, CCI, and ROC.
When the oscillator pushes towards one extreme, it will bring the value of the prevailing line closer to zero. If the bullish or bearish line crosses the zero line, the oscillator is past the extreme of the Bollinger Band.
Example: If the RSI crosses over the upper boundary of the Bollinger, the bullish(green) line will cross under the zero line.
Crossovers of the bullish and bearish lines can indicate a shift in momentum and are a signal. Where the line crossing under, towards zero, is the prevailing trend. The plotted lines will highlight green(bullish) or red(bearish) to show the prevailing trend. This is similar to a DI+- crossover that is commonly associated with the ADX.
We have included an optional normalized ADX to help validate signals. The ADX will change color based on the slope of the ADX. Purple indicates a positive slope and white for a negative slope.
[-_-] Volatility Calibrated ATRDescription:
An indicator based on ATR adjusted for volatility of the market. It uses Heikin Ashi data to find short and long opportunities and displays a dynamic stop loss level. Additionally, it has alerts for when the trend changes (which is an entry signal).
How it works:
It works by dynamically calculating the Period for ATR which depends on current volatility level that is calculated by a function that uses Standard Deviation of price. ATR is then smoothed by Weighted Moving Average and multiplied by ATR Factor, resulting in a plot that changes its colour to red when we're in a downtrend and green when in an uptrend. This plot should be used as a dynamic Stop Loss level. Trend change is determined by price crossing the dynamic Stop Loss level. The squared red and green labels appear when the trend changes, and should be used as Entry signals.
Parameters:
- Source -> data used for calculations
- ATR Factor -> higher values produce less noise and longer trends, lower values give more signals
Average True Range Refurbished💡 Objective
This script is a rebuild of the pre-existing ATR indicator, with improvements and fine-tuning.
🪄Improvements
1. Normalization option (range 0 to 100)
2. Optional calculation of the ratio between current volatility and average volatility
3. Optional smoothing
4. Show a moving average
5. Show Bollinger Bands with 3 bands
6. Change bar colors according to ATR and Bollinger Bands
📚 Definition
'The Average True Range (ATR) is a tool used in technical analysis to measure volatility. Unlike many of today's popular indicators, the ATR is not used to indicate the direction of price. Rather, it is a metric used solely to measure volatility, especially volatility caused by price gaps or limit moves.'
(TradingView)
Index_and_Commodity_PricesThis indicator shows real-time current day-to-day performance of 18 different indices and commodities . Here is the list of different sector ETFs that this indicator tracks
/////INDEX//////
1. BİST-100 - XU0100 - TR- Index
2. BİST-30 - XU030 - TR - Index
3. VİOP-30 - XU030D1! - Index
4. DJI - Dow Jones - Index
5. DAX - DAX Index
6. VIX - Volatilite S&P Index
//////FOREX MARKET/////
7. DXY - U.S. Dollar Index
8. EURUSD -
9. BTCUSD -
10. XAUUSD -
11. XAGUSD -
//////COMMODITY///////
12. BR1! - Brent
13. NG1! - Natural Gas
14. HRC1! -
15. ZW1! -
16. HG1! -
17. DJUSCL -
///////OTHER///////
18. US10Y -
Fixed Quantum CDVWe took the original script Cumulative delta volume from LonesomeTheBlue, here is the link:
To understand the CDV you can watch traders reality master class about CDV.
This indicator show the ratio of vector color and the ratio of the cumulative delta volume from vector color.
First you select a date range on the chart. Then it calculate all candles in that region. Let's say there is 3 green vectors and 3 red vectors in the region, the ratio of vector color will be 50% for bull and 50% for bear vector. As for the CDV ratio, it will measure the total CDV inside green vector and total CDV inside red vector and make a ratio. But it is a little different.
I twisted the calculation for the ratio of CDV a little bit to make it more comprehensive in the table. Since it's the ratio of the CDV for the bull candles versus the bear candles, the CDV is almost always a positive number for the bull candles and almost always a negative number for the bear candle. So I calculated the bear CDV as a positive number. Formula: Bull_CDV_ratio = Bull_CDV / (Bull_CDV + Bear_CDV), Bear_CDV_ratio = -Bear_CDV / (Bull_CDV - Bear_CDV).
Note that when the bull CDV and bear CDV are both a positive number or both a negative number, the ratio percentage can be over 100% and under 0%. It means that we expect volatility.
Enjoy!
Volatility Trackerhi there, fellows.
this is a very simple and quite straightforward indicator.
so far the simplest we've built.
on what it does
in regard to current chart and timeframe it plots
a. Open - Close as a percentage of the Open (we regard open as more relevant than close, for as you can use latest estimates in current candle) in daily change coloring (so one may have an idea if there is a trend or sideways move unfolding)
b. High - Low as a percentage of the Open, so one may compare extreme moves with final ones in the period
c. Volume as a percentage distance from its WMA200 (always this one, a way better reference for normalcy). (e. g. a positive value x means Volume is x% above its WMA200)
on what it means
to the best of our imperfect and incomplete understanding, we believe that low volatility periods lead to high volatility periods, so one might want to enter the market in low volatility periods to enjoy wild rides afterwards. such a trade of course would be, for the sake of making sense, a long volatility one.
the timing for entrance could be once that the volatility waves fades to chart minimums.
we're open to critics, suggestions and comments.
best regards.