ATR DeltaThe ATR Delta indicator is based on the concept of Average True Range (ATR), which reflects the average price range over a specified period. By calculating the difference between current and previous ATR values, the ATR Delta provides valuable insights into volatility shifts in the market. This information can help traders identify periods of heightened or diminished price movement, enabling them to adjust their strategies accordingly.
The ATR Delta indicator consists of two main calculations:
-- ATR Calculation : The Average True Range (ATR) is calculated using the specified length parameter. It measures the average price range (including gaps) during that period. A larger ATR value indicates higher volatility, while a smaller value indicates lower volatility.
-- ATR Delta Calculation : The ATR Delta is calculated by subtracting the ATR value of the previous bar from the current ATR value. This calculation captures the change in volatility between the two periods, providing a measure of how volatility has evolved.
Positive ATR Delta values indicate an increase in volatility compared to the previous period. It suggests that price movements have expanded, potentially indicating a more active market. On the other hand, negative ATR Delta values indicate a decrease in volatility compared to the previous period. It suggests that price movements have contracted, potentially signaling a calmer or range-bound market.
The ATR Delta indicator uses coloration to visually represent the relationship between the ATR Delta, zero, and a signal line:
-- Green color is assigned when the ATR Delta is positive, above the signal line, and increasing. This coloration suggests a scenario of higher volatility, as the market is experiencing upward momentum in price swings.
-- Red color is assigned when the ATR Delta is negative, below the signal line, and decreasing. This coloration suggests a scenario of lower volatility, as the market is experiencing downward momentum in price swings.
-- Gray color is assigned for other cases when the ATR Delta and signal line relationship does not meet the above conditions.
These colors are reflected in the columns of the ATR Delta as well as the bar coloration.
The ATR Delta indicator includes a signal line, which acts as a reference for interpreting the ATR Delta values. The signal line is calculated as a moving average (EMA) of the ATR Delta over a specified length. It helps smooth out the ATR Delta fluctuations, providing a clearer indication of the underlying trend in volatility changes. When the ATR Delta crosses above the signal line, it may suggest a potential increase in volatility, indicating a market that is becoming more active. Conversely, when the ATR Delta crosses below the signal line, it may suggest a potential decrease in volatility, indicating a market that is becoming less active.
The coloration of the signal line in the ATR Delta indicator helps to differentiate between positive and negative values and provides further insight into market sentiment. When the signal line is positive, indicating increasing volatility, it is colored lime. This color choice reinforces the bullish sentiment and signifies potential opportunities for trend continuation or breakouts. On the other hand, when the signal line is negative, indicating decreasing volatility, it is colored fuchsia. This color choice highlights the bearish sentiment and suggests potential range-bound or consolidation periods. These colors are reflected in the background of the indicator.
The ATR Delta indicator offers several potential applications for traders:
-- Volatility Analysis : The ATR Delta is invaluable for understanding and analyzing volatility dynamics in the market. Traders can observe the changes in ATR Delta values and use them to assess the current level of price movement. This information can help determine the appropriate strategies and risk management approaches.
-- Breakout Strategies : Traders often use the ATR Delta to identify periods of increased volatility, which frequently accompany breakouts. By monitoring the ATR Delta, traders can anticipate potential price breakouts and adjust their entry and exit levels accordingly.
-- Trend Confirmation : Combining the ATR Delta with trend-following indicators allows traders to validate the strength of a trend. Higher ATR Delta values during an uptrend may indicate stronger momentum and a higher likelihood of continuation. Conversely, lower ATR Delta values during a downtrend may suggest a potential consolidation phase or trend reversal.
Limitations :
-- Lagging Indicator : The ATR Delta indicator is based on historical data and calculates the difference between current and previous ATR values. As a result, it may lag behind real-time market conditions. Traders should be aware of this delay and consider it when making trading decisions. It is advisable to combine the ATR Delta with other indicators or price action analysis for a more comprehensive assessment of market conditions.
-- Parameter Sensitivity : The ATR Delta indicator's effectiveness can be influenced by the selection of its parameters, such as the length of the ATR and signal line. Different market conditions may require adjustments to these parameters to better capture volatility changes. Traders should carefully test and optimize the indicator's parameters to align with the characteristics of the specific market or asset they are trading.
-- Market Regime Changes : The ATR Delta indicator assumes that volatility changes occur gradually. However, in rapidly changing market regimes or during news events, volatility can spike or drop abruptly, potentially rendering the indicator less effective. Traders should exercise caution and consider using additional tools or techniques to identify and adapt to such market conditions.
The ATR Delta indicator is a valuable tool for traders seeking to analyze and monitor volatility dynamics in the market. By calculating the difference between current and previous ATR values, it provides insights into changes in price movement and helps identify periods of increased or decreased volatility. Traders can leverage the ATR Delta to fine-tune their strategies, validate trend strength, and identify potential breakout opportunities. However, it is essential to recognize the limitations of the indicator, including its lagging nature and sensitivity to parameter selection. By combining the ATR Delta with other technical analysis tools and applying sound risk management practices, traders can enhance their decision-making process and potentially improve their trading outcomes.
ATR
VIX, ATR, and Volatility Indicatorhere what the indictor do !
The "VIX, ATR, and Volatility Indicator" combines the Volatility Index (VIX), Average True Range (ATR), and moving averages to provide insights into market volatility.
VIX (Volatility Index):
The VIX measures the expected volatility in the market over the next 30 days. A higher VIX value indicates increased market volatility, while a lower value suggests lower volatility.
ATR (Average True Range):
The ATR is a technical indicator that measures the average range between high and low prices over a specified period. It provides a sense of the market's volatility by considering price movements. Higher ATR values indicate greater volatility, while lower values indicate lower volatility.
Moving Averages:
The indicator calculates both an Exponential Moving Average (EMA) and Simple Moving Average (SMA) with a specific period (e.g., 50).
Moving averages smooth out price data to identify trends and potential areas of support or resistance.
Volatility Detection:
By comparing the current closing price to the EMA and SMA, the indicator determines if there is high volatility.
If the current closing price is higher than either the EMA or SMA, it indicates potential high volatility.
Visualization:
The VIX and ATR are typically plotted on the chart, providing a visual representation of market volatility and price range.
Additionally, markers or labels may be used to highlight periods of high volatility when the current price exceeds the moving averages.
what are the VIX and ATR
Volatility Index (VIX):
Monitor the VIX value from financial platforms or market data providers. A higher VIX value indicates increased market volatility, suggesting potential trading opportunities. Conversely, a lower VIX value indicates lower volatility, which may influence your trading strategy.
Average True Range (ATR):
Calculate the ATR manually or use charting platforms that provide ATR as an indicator.
Plot the ATR on your trading chart to visualize the range of price movements.
Determine suitable entry and exit points based on ATR values. For example, higher ATR values may indicate larger potential price swings, while lower ATR values may suggest a more stable market.
how it work
Fetching VIX Data:
The request.security function is used to fetch the daily VIX data from the "CBOE:VIX" symbol. It retrieves the closing price of the VIX for each day.
Calculating ATR:
The ta.atr function calculates the Average True Range (ATR) with a period of 14. ATR measures the average range between the high and low prices over the specified period, providing an indication of market volatility.
Calculating Moving Averages:
Two types of moving averages are calculated: Exponential Moving Average (EMA) and Simple Moving Average (SMA). Both moving averages are calculated using a period of 50, but you can adjust the period as needed.
The ta.ema function calculates the Exponential Moving Average, which places greater weight on recent prices.
The ta.sma function calculates the Simple Moving Average, which gives equal weight to all prices in the period.
Identifying High Volatility:
The indicator determines if there is high volatility by comparing the current closing price to both the EMA and SMA.
If the current closing price is higher than either the EMA or SMA, the isHighVolatility variable is set to true, indicating potential high volatility.
Plotting the Indicators:
The VIX and ATR are plotted using the plot function, assigning colors and line widths for visual differentiation.
The plotshape function is used to plot markers below the bars to indicate highly volatile periods. The isHighVolatility variable determines when the markers appear.
ATR Momentum [QuantVue]ATR Momentum is a dynamic technical analysis tool designed to assess the momentum of a securities price movement. It utilizes the comparison between a faster short-term Average True Range (ATR) and a slower long-term ATR to determine whether momentum is increasing or decreasing.
This indicator visually represents the momentum relationship by plotting both ATR values as lines on a chart and applying color fill between the lines based on if momentum is increasing or decreasing.
When the short-term ATR is greater than the long-term ATR, representing increasing momentum, the area between them is filled with green.
Conversely, when the short-term ATR is less than the long-term ATR line, the area between them is filled with red. This red fill indicates decreasing momentum.
Don't hesitate to reach out with any questions or concerns.
We hope you enjoy!
Cheers.
VolatilityIndicatorsLibrary "VolatilityIndicators"
This is a library of Volatility Indicators .
It aims to facilitate the grouping of this category of indicators, and also offer the customized supply of
the parameters and sources, not being restricted to just the closing price.
@Thanks and credits:
1. Dynamic Zones: Leo Zamansky, Ph.D., and David Stendahl
2. Deviation: Karl Pearson (code by TradingView)
3. Variance: Ronald Fisher (code by TradingView)
4. Z-score: Veronique Valcu (code by HPotter)
5. Standard deviation: Ronald Fisher (code by TradingView)
6. ATR (Average True Range): J. Welles Wilder (code by TradingView)
7. ATRP (Average True Range Percent): millerrh
8. Historical Volatility: HPotter
9. Min-Max Scale Normalization: gorx1
10. Mean Normalization: gorx1
11. Standardization: gorx1
12. Scaling to unit length: gorx1
13. LS Volatility Index: Alexandre Wolwacz (Stormer), Fabrício Lorenz, Fábio Figueiredo (Vlad) (code by me)
14. Bollinger Bands: John Bollinger (code by TradingView)
15. Bollinger Bands %: John Bollinger (code by TradingView)
16. Bollinger Bands Width: John Bollinger (code by TradingView)
dev(source, length, anotherSource)
Deviation. Measure the difference between a source in relation to another source
Parameters:
source (float)
length (simple int) : (int) Sequential period to calculate the deviation
anotherSource (float) : (float) Source to compare
Returns: (float) Bollinger Bands Width
variance(src, mean, length, biased, degreesOfFreedom)
Variance. A statistical measurement of the spread between numbers in a data set. More specifically,
variance measures how far each number in the set is from the mean (average), and thus from every other number in the set.
Variance is often depicted by this symbol: σ2. It is used by both analysts and traders to determine volatility and market security.
Parameters:
src (float) : (float) Source to calculate variance
mean (float) : (float) Mean (Moving average)
length (simple int) : (int) The sequential period to calcule the variance (number of values in data set)
biased (simple bool) : (bool) Defines the type of standard deviation. If true, uses biased sample variance (n),
degreesOfFreedom (simple int) : (int) Degrees of freedom. The number of values in the final calculation of a statistic that are free to vary.
Default value is n-1, where n here is length. Only applies when biased parameter is defined as true.
Returns: (float) Standard deviation
stDev(src, length, mean, biased, degreesOfFreedom)
Measure the Standard deviation from a source in relation to it's moving average.
In this implementation, you pass the average as a parameter, allowing a more personalized calculation.
Parameters:
src (float) : (float) Source to calculate standard deviation
length (simple int) : (int) The sequential period to calcule the standard deviation
mean (float) : (float) Moving average.
biased (simple bool) : (bool) Defines the type of standard deviation. If true, uses biased sample variance (n),
else uses unbiased sample variance (n-1 or another value, as long as it is in the range between 1 and n-1), where n=length.
degreesOfFreedom (simple int) : (int) Degrees of freedom. The number of values in the final calculation of a statistic that are free to vary.
Default value is n-1, where n here is length.
Returns: (float) Standard deviation
zscore(src, mean, length, biased, degreesOfFreedom)
Z-Score. A z-score is a statistical measurement that indicates how many standard deviations a data point is from
the mean of a data set. It is also known as a standard score. The formula for calculating a z-score is (x - μ) / σ,
where x is the individual data point, μ is the mean of the data set, and σ is the standard deviation of the data set.
Z-scores are useful in identifying outliers or extreme values in a data set. A positive z-score indicates that the
data point is above the mean, while a negative z-score indicates that the data point is below the mean. A z-score of
0 indicates that the data point is equal to the mean.
Z-scores are often used in hypothesis testing and determining confidence intervals. They can also be used to compare
data sets with different units or scales, as the z-score standardizes the data. Overall, z-scores provide a way to
measure the relative position of a data point in a data
Parameters:
src (float) : (float) Source to calculate z-score
mean (float) : (float) Moving average.
length (simple int) : (int) The sequential period to calcule the standard deviation
biased (simple bool) : (bool) Defines the type of standard deviation. If true, uses biased sample variance (n),
else uses unbiased sample variance (n-1 or another value, as long as it is in the range between 1 and n-1), where n=length.
degreesOfFreedom (simple int) : (int) Degrees of freedom. The number of values in the final calculation of a statistic that are free to vary.
Default value is n-1, where n here is length.
Returns: (float) Z-score
atr(source, length)
ATR: Average True Range. Customized version with source parameter.
Parameters:
source (float) : (float) Source
length (simple int) : (int) Length (number of bars back)
Returns: (float) ATR
atrp(length, sourceP)
ATRP (Average True Range Percent)
Parameters:
length (simple int) : (int) Length (number of bars back) for ATR
sourceP (float) : (float) Source for calculating percentage relativity
Returns: (float) ATRP
atrp(source, length, sourceP)
ATRP (Average True Range Percent). Customized version with source parameter.
Parameters:
source (float) : (float) Source for ATR
length (simple int) : (int) Length (number of bars back) for ATR
sourceP (float) : (float) Source for calculating percentage relativity
Returns: (float) ATRP
historicalVolatility(lengthATR, lengthHist)
Historical Volatility
Parameters:
lengthATR (simple int) : (int) Length (number of bars back) for ATR
lengthHist (simple int) : (int) Length (number of bars back) for Historical Volatility
Returns: (float) Historical Volatility
historicalVolatility(source, lengthATR, lengthHist)
Historical Volatility
Parameters:
source (float) : (float) Source for ATR
lengthATR (simple int) : (int) Length (number of bars back) for ATR
lengthHist (simple int) : (int) Length (number of bars back) for Historical Volatility
Returns: (float) Historical Volatility
minMaxNormalization(src, numbars)
Min-Max Scale Normalization. Maximum and minimum values are taken from the sequential range of
numbars bars back, where numbars is a number defined by the user.
Parameters:
src (float) : (float) Source to normalize
numbars (simple int) : (int) Numbers of sequential bars back to seek for lowest and hightest values.
Returns: (float) Normalized value
minMaxNormalization(src, numbars, minimumLimit, maximumLimit)
Min-Max Scale Normalization. Maximum and minimum values are taken from the sequential range of
numbars bars back, where numbars is a number defined by the user.
In this implementation, the user explicitly provides the desired minimum (min) and maximum (max) values for the scale,
rather than using the minimum and maximum values from the data.
Parameters:
src (float) : (float) Source to normalize
numbars (simple int) : (int) Numbers of sequential bars back to seek for lowest and hightest values.
minimumLimit (simple float) : (float) Minimum value to scale
maximumLimit (simple float) : (float) Maximum value to scale
Returns: (float) Normalized value
meanNormalization(src, numbars, mean)
Mean Normalization
Parameters:
src (float) : (float) Source to normalize
numbars (simple int) : (int) Numbers of sequential bars back to seek for lowest and hightest values.
mean (float) : (float) Mean of source
Returns: (float) Normalized value
standardization(src, mean, stDev)
Standardization (Z-score Normalization). How "outside the mean" values relate to the standard deviation (ratio between first and second)
Parameters:
src (float) : (float) Source to normalize
mean (float) : (float) Mean of source
stDev (float) : (float) Standard Deviation
Returns: (float) Normalized value
scalingToUnitLength(src, numbars)
Scaling to unit length
Parameters:
src (float) : (float) Source to normalize
numbars (simple int) : (int) Numbers of sequential bars back to seek for lowest and hightest values.
Returns: (float) Normalized value
lsVolatilityIndex(movingAverage, sourceHvol, lengthATR, lengthHist, lenNormal, lowerLimit, upperLimit)
LS Volatility Index. Measures the volatility of price in relation to an average.
Parameters:
movingAverage (float) : (float) A moving average
sourceHvol (float) : (float) Source for calculating the historical volatility
lengthATR (simple int) : (float) Length for calculating the ATR (Average True Range)
lengthHist (simple int) : (float) Length for calculating the historical volatility
lenNormal (simple int) : (float) Length for normalization
lowerLimit (simple int)
upperLimit (simple int)
Returns: (float) LS Volatility Index
lsVolatilityIndex(sourcePrice, movingAverage, sourceHvol, lengthATR, lengthHist, lenNormal, lowerLimit, upperLimit)
LS Volatility Index. Measures the volatility of price in relation to an average.
Parameters:
sourcePrice (float) : (float) Source for measure the distance
movingAverage (float) : (float) A moving average
sourceHvol (float) : (float) Source for calculating the historical volatility
lengthATR (simple int) : (float) Length for calculating the ATR (Average True Range)
lengthHist (simple int) : (float) Length for calculating the historical volatility
lenNormal (simple int)
lowerLimit (simple int)
upperLimit (simple int)
Returns: (float) LS Volatility Index
bollingerBands(src, length, mult, basis)
Bollinger Bands. A Bollinger Band is a technical analysis tool defined by a set of lines plotted
two standard deviations (positively and negatively) away from a simple moving average (SMA) of the security's price,
but can be adjusted to user preferences. In this version you can pass a customized basis (moving average), not only SMA.
Parameters:
src (float) : (float) Source to calculate standard deviation used in Bollinger Bands
length (simple int) : (int) The time period to be used in calculating the standard deviation
mult (simple float) : (float) Multiplier used in standard deviation. Basically, the upper/lower bands are standard deviation multiplied by this.
basis (float) : (float) Basis of Bollinger Bands (a moving average)
Returns: (float) A tuple of Bollinger Bands, where index 1=basis; 2=basis+dev; 3=basis-dev; and dev=multiplier*stdev
bollingerBands(src, length, aMult, basis)
Bollinger Bands. A Bollinger Band is a technical analysis tool defined by a set of lines plotted
two standard deviations (positively and negatively) away from a simple moving average (SMA) of the security's price,
but can be adjusted to user preferences. In this version you can pass a customized basis (moving average), not only SMA.
Also, various multipliers can be passed, thus getting more bands (instead of just 2).
Parameters:
src (float) : (float) Source to calculate standard deviation used in Bollinger Bands
length (simple int) : (int) The time period to be used in calculating the standard deviation
aMult (float ) : (float ) An array of multiplies used in standard deviation. Basically, the upper/lower bands are standard deviation multiplied by this.
This array of multipliers permit the use of various bands, not only 2.
basis (float) : (float) Basis of Bollinger Bands (a moving average)
Returns: (float ) An array of Bollinger Bands, where:
index 1=basis; 2=basis+dev1; 3=basis-dev1; 4=basis+dev2, 5=basis-dev2, 6=basis+dev2, 7=basis-dev2, Nup=basis+devN, Nlow=basis-devN
and dev1, dev2, devN are ```multiplier N * stdev```
bollingerBandsB(src, length, mult, basis)
Bollinger Bands %B - or Percent Bandwidth (%B).
Quantify or display where price (or another source) is in relation to the bands.
%B can be useful in identifying trends and trading signals.
Calculation:
%B = (Current Price - Lower Band) / (Upper Band - Lower Band)
Parameters:
src (float) : (float) Source to calculate standard deviation used in Bollinger Bands
length (simple int) : (int) The time period to be used in calculating the standard deviation
mult (simple float) : (float) Multiplier used in standard deviation
basis (float) : (float) Basis of Bollinger Bands (a moving average)
Returns: (float) Bollinger Bands %B
bollingerBandsB(src, length, aMult, basis)
Bollinger Bands %B - or Percent Bandwidth (%B).
Quantify or display where price (or another source) is in relation to the bands.
%B can be useful in identifying trends and trading signals.
Calculation
%B = (Current Price - Lower Band) / (Upper Band - Lower Band)
Parameters:
src (float) : (float) Source to calculate standard deviation used in Bollinger Bands
length (simple int) : (int) The time period to be used in calculating the standard deviation
aMult (float ) : (float ) Array of multiplier used in standard deviation. Basically, the upper/lower bands are standard deviation multiplied by this.
This array of multipliers permit the use of various bands, not only 2.
basis (float) : (float) Basis of Bollinger Bands (a moving average)
Returns: (float ) An array of Bollinger Bands %B. The number of results in this array is equal the numbers of multipliers passed via parameter.
bollingerBandsW(src, length, mult, basis)
Bollinger Bands Width. Serve as a way to quantitatively measure the width between the Upper and Lower Bands
Calculation:
Bollinger Bands Width = (Upper Band - Lower Band) / Middle Band
Parameters:
src (float) : (float) Source to calculate standard deviation used in Bollinger Bands
length (simple int) : (int) Sequential period to calculate the standard deviation
mult (simple float) : (float) Multiplier used in standard deviation
basis (float) : (float) Basis of Bollinger Bands (a moving average)
Returns: (float) Bollinger Bands Width
bollingerBandsW(src, length, aMult, basis)
Bollinger Bands Width. Serve as a way to quantitatively measure the width between the Upper and Lower Bands
Calculation
Bollinger Bands Width = (Upper Band - Lower Band) / Middle Band
Parameters:
src (float) : (float) Source to calculate standard deviation used in Bollinger Bands
length (simple int) : (int) Sequential period to calculate the standard deviation
aMult (float ) : (float ) Array of multiplier used in standard deviation. Basically, the upper/lower bands are standard deviation multiplied by this.
This array of multipliers permit the use of various bands, not only 2.
basis (float) : (float) Basis of Bollinger Bands (a moving average)
Returns: (float ) An array of Bollinger Bands Width. The number of results in this array is equal the numbers of multipliers passed via parameter.
dinamicZone(source, sampleLength, pcntAbove, pcntBelow)
Get Dynamic Zones
Parameters:
source (float) : (float) Source
sampleLength (simple int) : (int) Sample Length
pcntAbove (simple float) : (float) Calculates the top of the dynamic zone, considering that the maximum values are above x% of the sample
pcntBelow (simple float) : (float) Calculates the bottom of the dynamic zone, considering that the minimum values are below x% of the sample
Returns: A tuple with 3 series of values: (1) Upper Line of Dynamic Zone;
(2) Lower Line of Dynamic Zone; (3) Center of Dynamic Zone (x = 50%)
Examples:
Volume Spike, Price Move >3% Spike with Vol & Gap Up IdentifierTitle: Identifying Volume Spikes, Price Movements and Gap Ups: A TradingView Script
Introduction:
In the world of trading, identifying volume spikes and price movements can provide valuable insights into market trends and potential trading opportunities. In this article, we'll explore a TradingView script that helps traders visualize volume spikes, price up moves with volume spikes, and gap-up days on their charts.
Detecting Price Up Moves:
The script starts by calculating price up moves. It compares the current day's closing price with the previous day's closing price and checks if it has increased by 3% or more. This helps traders spot significant upward price movements.
Detecting Volume Spurts:
Next, the script focuses on detecting volume spikes, which are often associated with increased market activity and potential trading opportunities. It compares the current day's volume with the highest volume of the previous nine sessions. If the current volume exceeds all the volumes of the previous nine sessions, it is considered a volume spurt.
Example:
Let's consider a hypothetical scenario where we have the following volume data for a stock:
Day 1: 100,000
Day 2: 80,000
Day 3: 120,000
Day 4: 150,000
Day 5: 200,000
Day 6: 90,000
Day 7: 110,000
Day 8: 130,000
Day 9: 140,000
Day 10: 250,000 (current day)
To determine if there is a volume spurt on Day 10, the script compares the current day's volume (250,000) with the highest volume of the previous nine sessions. In this case, the highest volume among the previous nine sessions is 200,000 (on Day 5). Since the current day's volume (250,000) exceeds the highest volume of the previous nine sessions (200,000), it is considered a volume spurt.
Identifying Gap-Up Days:
Gap-up days occur when the market opens significantly higher than the previous day's close. To identify these days, the script compares the current day's low price with the previous day's high price. If the low price is greater than the previous day's high, it is marked as a gap-up day.
Visualizing the Findings:
To provide a clear visual representation of the identified patterns, the script uses different shapes and colors. First, it plots small red dots above the candles whenever a volume spurt is detected. These dots help traders quickly identify periods of increased volume activity.
For price up moves with volume spikes, the script utilizes blue triangular shapes below the candles. This allows traders to pinpoint instances where both price and volume are showing positive signs, indicating potential bullish movements.
Additionally, the script incorporates green candles to represent gap-up days. These candles help traders recognize days when the market opens with a significant upward gap, suggesting a potential shift in market sentiment.
Conclusion:
The TradingView script discussed in this article provides traders with a visual representation of volume spikes , price up moves with volume spikes , and gap-up days . By incorporating these visual cues into their analysis, traders can gain valuable insights into market trends and potential trading opportunities.
Remember, this script should be used for educational and informational purposes only and does not serve as financial advice or recommendations. Traders are encouraged to customize and modify the script according to their specific trading strategies and risk tolerance.
Share this script with other traders on TradingView to enhance their chart analysis and trading decisions.
PS: This TradingView script is designed to work specifically on the daily timeframe (daily candles). It calculates and identifies volume spurts based on the volume data of the daily timeframe. Since it is designed for the daily timeframe, it may not produce accurate results or work as intended on other timeframes.
Focused Average True RangeThe Focused Average True Range (FATR) is a modified version of the classic Average True Range (ATR) indicator. It is designed to provide traders with more accurate data on volatility, minimizing the impact of sharp spikes in volatility.
The main distinction between the Focused ATR and the standard ATR lies in the utilization of percentiles. Instead of calculating the average price change as the regular ATR does, the Focused ATR selects a value in the middle of the range of price changes. This makes it less sensitive to sharp changes in volatility, which can be beneficial in certain trading scenarios.
Settings:
Percentile. This parameter determines which value in the series of price changes will be used. For example, if the percentile is set to 50, the indicator will use the median value of the series of price changes. This is the default value. Imagine a class of students lined up by height, and instead of calculating the average height of all students, we take the height of the students in the middle of the line. Similarly here, we take the ATR from the middle of the series. Increasing the percentile will lead to the use of a value closer to the upper bound of the range, while decreasing the percentile will lead to the use of a value closer to the lower bound.
How to Use:
The Focused ATR is especially useful for determining the sizes of stop-losses and take-profits, thanks to its ability to consider the value in the middle of the series of price changes rather than the average value. This allows traders to more accurately assess volatility and risk, which in turn can assist in optimizing trading strategies
---
Фокусированный Средний Истинный Диапазон (Focused ATR) представляет собой модифицированную версию классического индикатора ATR. Он разработан с целью предоставления трейдерам более точных данных о волатильности, минимизируя влияние резких скачков волатильности.
Основное отличие Фокусированного ATR от стандартного ATR заключается в использовании процентиля. Вместо того, чтобы рассчитывать среднее значение изменений цены, как это делает обычный ATR, Фокусированный ATR выбирает значение в середине диапазона изменений цены. Это делает его менее чувствительным к резким изменениям волатильности, что может быть полезно в некоторых торговых сценариях.
Настройки:
Процентиль. Этот параметр определяет, какое значение в ряду изменений цены будет использоваться. Например, если процентиль равен 50, то индикатор будет использовать медианное значение ряда изменений цены. Это стандартное значение. Представьте себе, что ученики класса выстроились по росту, и мы считаем не средний рост всех учеников, а берем рост учеников из середины колонны. Так и тут. Мы берем ATR из середины ряда. Увеличение процентиля приведет к использованию значения, ближе к верхней границе диапазона, в то время как уменьшение процентиля приведет к использованию значения, ближе к нижней границе.
Как использовать:
Фокусированный ATR особенно полезен для определения размеров стоп-лоссов и тейк-профитов, благодаря своей способности учитывать значение в середине ряда изменений цены, а не среднее значение. Это позволяет трейдерам более точно оценить волатильность и риск, что в свою очередь может помочь в оптимизации торговых стратегий.
.
Donchian Volatility Indicator - Adaptive Channel WidthThis indicator is designed to help traders assess and analyze market volatility. By calculating the width of the Donchian channels, it provides valuable insights into the range of price movements over a specified period. This indicator helps traders identify periods of high and low volatility, enabling them to make more informed trading decisions.
The indicator is based on the concept of Donchian channels, which consist of the highest high and lowest low over a specified lookback period. The channel width is calculated as the difference between the upper and lower channels. A wider channel indicates higher volatility, suggesting potentially larger price movements and increased trading opportunities. On the other hand, a narrower channel suggests lower volatility, indicating a relatively calmer market environment with potentially fewer trading opportunities.
The adaptive aspect of the indicator refers to its ability to adjust the width of the channels dynamically based on market conditions. The indicator calculates the width of the channels using the Average True Range (ATR) indicator, which measures the average range of price movements over a specified period. By multiplying the ATR value with the user-defined ATR multiplier, the indicator adapts the width of the channels to reflect the current level of volatility. During periods of higher volatility, the channels expand to accommodate larger price movements, providing a broader range for assessing volatility. Conversely, during periods of lower volatility, the channels contract, reflecting the narrower price ranges and signaling a decrease in volatility. This adaptive nature allows traders to have a flexible and responsive measure of volatility, ensuring that the indicator reflects the current market conditions accurately.
To provide further insights, the indicator includes a signal line. The signal line is derived from the channel width and is calculated as a simple moving average over a specified signal period. This signal line acts as a reference level, allowing traders to compare the current channel width with the average width over a given time frame. By assessing whether the current channel width is above or below the signal line, traders can gain additional context on the volatility level in the market.
The colors used in the Donchian Volatility Indicator - Adaptive Channel Width play a vital role in visualizing the volatility levels:
-- Lime Color : When the channel width is above the signal line, it is colored lime. This color signifies that volatility has entered the market, indicating potentially higher price movements and increased trading opportunities. Traders can pay closer attention to the lime-colored channel width as it may suggest favorable conditions for trend-following or breakout trading strategies.
-- Fuchsia Color : When the channel width is below the signal line, it is colored fuchsia. This color represents relatively low volatility, suggesting a calmer market environment with potentially fewer trading opportunities. Traders may consider adjusting their strategies during periods of low volatility, such as employing range-bound or mean-reversion strategies.
-- Aqua Color : The signal line is represented by the aqua color. This color allows traders to easily identify the signal line amidst the channel width. The aqua color provides a visual reference for the average channel width and helps traders assess whether the current width is above or below this average.
The Donchian Volatility Indicator - Adaptive Channel Width has several practical applications for traders:
-- Volatility Assessment : Traders can use this indicator to assess the level of volatility in the market. By observing the width of the Donchian channels and comparing it to the signal line, they can determine whether the current volatility is relatively high or low. This information helps traders set appropriate expectations and adjust their trading strategies accordingly.
-- Breakout Trading : Wide channel widths may indicate an increased likelihood of price breakouts. Traders can use the Donchian Volatility Indicator - Adaptive Channel Width to identify potential breakout opportunities. When the channel width exceeds the signal line, it suggests a higher probability of significant price movements, potentially signaling a breakout. Traders may consider entering trades in the direction of the breakout.
-- Risk Management : The indicator can assist in setting appropriate stop-loss levels based on the current volatility. During periods of high volatility (lime-colored channel width), wider stop-loss orders may be warranted to account for larger price swings. Conversely, during periods of low volatility (fuchsia-colored channel width), narrower stop-loss orders may be appropriate to limit risk in a more range-bound market.
While the Donchian Volatility Indicator - Adaptive Channel Width is a valuable tool, it is important to consider its limitations:
-- Lagging Indicator : The indicator relies on historical price data, making it a lagging indicator. It provides insights based on past price movements and may not capture sudden changes or shifts in volatility. Traders should be aware that the indicator may not generate real-time signals and should be used in conjunction with other indicators and analysis tools.
-- False Signals : Like any technical indicator, the Donchian Volatility Indicator - Adaptive Channel Width is not immune to generating false signals. Traders should exercise caution and use additional analysis to confirm the signals generated by the indicator. Considering the broader market context and employing risk management techniques can help mitigate the impact of false signals.
-- Market Conditions : Market conditions can vary, and volatility levels can differ across different assets and timeframes. Traders should adapt their strategies and consider other market factors when interpreting the signals provided by the indicator. It is crucial to avoid relying solely on the indicator and to incorporate a comprehensive analysis of the market environment.
In conclusion, this indicator is a powerful tool for assessing market volatility. By examining the width of the Donchian channels and comparing it to the signal line, traders can gain insights into the level of volatility and adjust their trading strategies accordingly. The color-coded representation of the channel width and signal line allows for easy visualization and interpretation of the volatility dynamics. Traders should utilize this indicator as part of a broader trading approach, incorporating other technical analysis tools and considering market conditions for a comprehensive assessment of market volatility.
ADW - Volatility MapThe ADW - Volatility Map script is a tool for traders to measure and visualize the volatility of a specific asset. It uses both the Average True Range (ATR) and True Range (TR) values in combination with the Commodity Channel Index (CCI) to provide a comprehensive map of the market's volatility.
Average True Range (ATR) : ATR is a measure of market volatility. It measures the average of true price ranges over a time period. In this script, we use it to calculate the ATR-CCI which gives us a more precise measure of volatility.
True Range (TR) : TR is the greatest distance the price moved during a period. It is used in this script to calculate the TR-CCI, adding another level of detail to our volatility measurement.
Commodity Channel Index (CCI) : CCI is a versatile indicator that can be used to identify a new trend or warn of extreme conditions. We use it to scale and compare the ATR and TR values, hence providing a relative measure of volatility.
The script interprets the CCI values and provides four different conditions for both ATR and TR:
Is Low (CCI < 0)
Is High (CCI > 0)
Is Extremely Low (CCI <= -100)
Is Extremely High (CCI >= 100)
The interpretation of these conditions is displayed on the chart using colour highlighting. When the ATR or TR are low, high, extremely low, or extremely high, the script fills the chart accordingly.
In addition, the script has an option `awaitBarConfirmation` set at the beginning. If this is true, the script will only display indicators for fully formed bars, ensuring that the indicators you see are based on confirmed information.
Note: The colours for different conditions can be customized at the beginning of the script, allowing you to personalize the visual output to match your preferences.
This script is designed to provide a visually clear and immediate understanding of the market's volatility. Use it to enhance your decision-making process and adapt your trading strategy to the current market conditions.
Volatility Compression BreakoutThe Volatility Compression Breakout indicator is designed to identify periods of low volatility followed by potential breakout opportunities in the market. It aims to capture moments when the price consolidates within a narrow range, indicating a decrease in volatility, and anticipates a subsequent expansion in price movement. This indicator can be applied to any financial instrument and timeframe.
When the close price is above both the Keltner Middle line and the Exponential Moving Average (EMA), the bars are colored lime green, indicating a potential bullish market sentiment. When the close price is positioned above the Keltner Middle but below the EMA, or below the Keltner Middle but above the EMA, the bars are colored yellow, signifying a neutral or indecisive market condition. Conversely, when the close price falls below both the Keltner Middle and the EMA, the bars are colored fuchsia, suggesting a potential bearish market sentiment.
Additionally, the coloration of the Keltner Middle line and the EMA provides further visual cues for assessing the trend. When the close price is above the Keltner Middle, the line is colored lime green, indicating a bullish trend. Conversely, when the close price is below the Keltner Middle, the line is colored fuchsia, highlighting a bearish trend. Similarly, the EMA line is colored lime green when the close price is above it, representing a bullish trend, and fuchsia when the close price is below it, indicating a bearish trend.
Parameters
-- Compression Period : This parameter determines the lookback period used to calculate the volatility compression. A larger value will consider a longer historical period for volatility analysis, potentially capturing broader market conditions. Conversely, a smaller value focuses on more recent price action, providing a more responsive signal to current market conditions.
-- Compression Multiplier : The compression multiplier is a factor applied to the Average True Range (ATR) to determine the width of the Keltner Channels. Increasing the multiplier expands the width of the channels, allowing for a larger price range before a breakout is triggered. Decreasing the multiplier tightens the channels and requires a narrower price range for a breakout signal.
-- EMA Period : This parameter sets the period for the Exponential Moving Average (EMA), which acts as a trend filter. The EMA helps identify the overall market trend and provides additional confirmation for potential breakouts. Adjusting the period allows you to capture shorter or longer-term trends, depending on your trading preferences.
How Changing Parameters Can Be Beneficial
Modifying the parameters allows you to adapt the indicator to different market conditions and trading styles. Increasing the compression period can help identify broader volatility patterns and major market shifts. On the other hand, decreasing the compression period provides more precise and timely signals for short-term traders.
Adjusting the compression multiplier affects the width of the Keltner Channels. Higher multipliers increase the breakout threshold, filtering out smaller price movements and providing more reliable signals during significant market shifts. Lower multipliers make the indicator more sensitive to smaller price ranges, generating more frequent but potentially less reliable signals.
The EMA period in the trend filter helps you align your trades with the prevailing market direction. Increasing the EMA period smoothes out the trend, filtering out shorter-term fluctuations and focusing on more sustained moves. Decreasing the EMA period allows for quicker responses to changes in trend, capturing shorter-term price swings.
Potential Downsides
While the Volatility Compression Breakout indicator can provide valuable insights into potential breakouts, it's important to note that no indicator guarantees accuracy or eliminates risk. False breakouts and whipsaw movements can occur, especially in volatile or choppy market conditions. It is recommended to combine this indicator with other technical analysis tools and consider fundamental factors to validate potential trade opportunities.
Making It Work for You
To maximize the effectiveness of the Volatility Compression Breakout indicator, consider the following:
-- Combine it with other indicators : Use complementary indicators such as trend lines, oscillators, or support and resistance levels to confirm signals and increase the probability of successful trades.
-- Practice risk management : Set appropriate stop-loss levels to protect your capital in case of false breakouts or adverse price movements. Consider implementing trailing stops or adjusting stop-loss levels as the trade progresses.
-- Validate with price action : Analyze the price action within the compression phase and look for signs of building momentum or weakening trends. Support your decisions by observing candlestick patterns and volume behavior during the breakout.
-- Backtest and optimize : Test the indicator's performance across different timeframes and market conditions. Optimize the parameters based on historical data to find the most suitable settings for your trading strategy.
Remember, no single indicator can guarantee consistent profitability, and it's essential to use the Volatility Compression Breakout indicator as part of a comprehensive trading plan. Regularly review and adapt your strategy based on market conditions and your trading experience. Monitor the indicator's performance and make necessary adjustments to parameter values if the market dynamics change.
By adjusting the parameters and incorporating additional analysis techniques, you can customize the indicator to suit your trading style and preferences. However, it is crucial to exercise caution, conduct thorough analysis, and practice proper risk management to increase the likelihood of successful trades. Remember that no indicator can guarantee profits, and continuous learning and adaptation are key to long-term trading success.
Volatility SpeedometerThe Volatility Speedometer indicator provides a visual representation of the rate of change of volatility in the market. It helps traders identify periods of high or low volatility and potential trading opportunities. The indicator consists of a histogram that depicts the volatility speed and an average line that smoothes out the volatility changes.
The histogram displayed by the Volatility Speedometer represents the rate of change of volatility. Positive values indicate an increase in volatility, while negative values indicate a decrease. The height of the histogram bars represents the magnitude of the volatility change. A higher histogram bar suggests a more significant change in volatility.
Additionally, the Volatility Speedometer includes a customizable average line that smoothes out the volatility changes over the specified lookback period. This average line helps traders identify the overall trend of volatility and its direction.
To enhance the interpretation of the Volatility Speedometer, color zones are used to indicate different levels of volatility speed. These color zones are based on predefined threshold levels. For example, green may represent high volatility speed, yellow for moderate speed, and fuchsia for low speed. Traders can customize these threshold levels based on their preference and trading strategy.
By monitoring the Volatility Speedometer, traders can gain insights into changes in market volatility and adjust their trading strategies accordingly. For example, during periods of high volatility speed, traders may consider employing strategies that capitalize on price swings, while during low volatility speed, they may opt for strategies that focus on range-bound price action.
Adjusting the inputs of the Volatility Speedometer indicator can provide valuable insights and flexibility to traders. By modifying the inputs, traders can customize the indicator to suit their specific trading style and preferences.
One input that can be adjusted is the "Lookback Period." This parameter determines the number of periods considered when calculating the rate of change of volatility. Increasing the lookback period can provide a broader perspective of volatility changes over a longer time frame. This can be beneficial for swing traders or those focusing on longer-term trends. On the other hand, reducing the lookback period can provide more responsiveness to recent volatility changes, making it suitable for day traders or those looking for short-term opportunities.
Another adjustable input is the "Volatility Measure." In the provided code, the Average True Range (ATR) is used as the volatility measure. However, traders can choose other volatility indicators such as Bollinger Bands, Standard Deviation, or custom volatility measures. By experimenting with different volatility measures, traders can gain a deeper understanding of market dynamics and select the indicator that best aligns with their trading strategy.
Additionally, the "Thresholds" inputs allow traders to define specific levels of volatility speed that are considered significant. Modifying these thresholds enables traders to adapt the indicator to different market conditions and their risk tolerance. For instance, increasing the thresholds may highlight periods of extreme volatility and help identify potential breakout opportunities, while lowering the thresholds may focus on more moderate volatility shifts suitable for range trading or trend-following strategies.
Remember, it is essential to combine the Volatility Speedometer with other technical analysis tools and indicators to make informed trading decisions.
Cumulative TICK Trend[Pt]Cumulative TICK Trend indicator is a comprehensive trading tool that uses TICK data to define the market's cumulative trend. Trend is shown on ATR EMA bands, which is overlaid on the price chart. Cumulative TICK shown on the bottom pane is for reference only.
Main features of the Cumulative TICK Trend Indicator include:
Selectable TICK Source: You have the flexibility to choose your preferred TICK source from the following options, depending on the market you trade: USI:TICK, USI:TICKQ, USI:TICKI, and USI:TICKA.
TICK Data Type: Select the type of TICK data to use, options include: Close, Open, hl2, ohlc4, hlc3.
Simple Moving Average (SMA): You can choose to apply an SMA on the calculated Cumulative TICK values with a customizable length.
Average True Range (ATR) Bands: It provides the option to display ATR bands with adjustable settings. This includes the ATR period, EMA period, source for the ATR calculation, and the ATR multiplier for the upper band.
Trend Color Customization: You can customize the color of the bull and bear trends according to your preference.
Smooth Line Option: This setting allows you to smooth the ATR Bands with a customizable length.
How it Works:
This indicator accumulates TICK data during market hours (9:30-16:00) as per the New York time zone and resets at the start of a new session or the end of the regular session. This cumulative TICK value is then used to determine the trend.
The trend is defined as bullish if the SMA of cumulative TICK is equal to or greater than zero and bearish if it's less than zero. Additionally, this indicator plots the ATR bands, which can be used as volatility measures. The Upper ATR Band and Lower ATR Band can be made smoother using the SMA, according to the trader's preference.
The plot includes two parts for each trend: a stronger color (Red for bear, Green for bull) when the trend is ongoing, and a lighter color when the trend seems to be changing.
Remember, this tool is intended to be used as part of a comprehensive trading strategy. Always ensure you are managing risk appropriately and consulting various data sources to make informed trading decisions.
custom Bollinger bands with filters - indicator (AS)-----------Description-------------
This indicator is basically Bollinger bands with many ways to customize. It uses highest and lowest values of upper and lower band for exits. I think something is wrong with the script but cant find any mistakes – most probably smoothing. The ATR filter is implemented but is working incorrectly. In code you can also turn it into strategy but I do not recommend it for now as it is not ready yet.
So this is my first script and I am looking for any advice, ideas to improve this script, sets of parameters, markets to apply, logical mistakes in code or any ideas that you may have. Indicator was initially designed for EURUSD 5MIN but I would be interested in other ideas.
-----------SETTINGS--------------
---START - In starting settings we can choose
Line 1: what parts to use BB/DC/ATR
Line 2: what parts to plot on chart
Line 3 Whether or not apply smoothing to BB or ATR filter
Line 4 Calculate deviation for BB from price or Moving average
Line 5 Fill colors and plot other parts for debug (overlay=false)
Line 6:( for strategy) – enable Long/Short Trades
---BB and DC – here we modify Bollinger bands and Donchian
Line 1: Length and type of BB middle line and also length of DC from BB
Line 2: Length and type of BB standard deviation and multiplier
Line 3: Length and type of BB smoothing and %width for BB filter
---ATR filter – (not ready fully yet)
Line 1: type and length of ATR
Line 2: threshold and smoothing value of ATR
---DATE and SESSION
Line 1: apply custom date or session?
Line 2: session hours settings
Line 3:Custom starting date
Line 4: Custom Ending date
-----------HOW TO USE--------------
We open Long if BB width is bigger than threshold and close when upper band is no longer highest in the period set. Exact opposite with Short
Limit Order + ATR Stop-Loss [TANHEF]This indicator enables interactive placement of limit or stop-limit orders with a trailing ATR stop-loss and optional profit target (with alerts). Refer to the images below for further clarification.
Why use a trailing stop-loss?
A trailing stop-loss serves as an exit strategy when price moves against you, while also allowing you to adjust the exit point further into profit when price moves favorably. The ATR (Average True Range), a reliable measure of volatility, acts as an effective risk management tool, functioning as a trailing stop-loss.
Indicator Explanation
Initial indicator placement: Select Long Limit or Long-Stop Limit order.
Change Entry Type: Switch between Long and Short within settings.
Modify entry price: Drag circle, adjust in settings, or re-add indicator to chart.
Optional Profit Target: Use Risk/Reward ratio or specify price.
Entry anticipation: Estimated ATR stop-loss and profit target as blue circles (fluctuates with volatility changes).
Entry triggered: Actual ATR stop-loss and profit target plotted.
Exit conditions: Stop-loss or profit target hit, exit entry.
Update Frequency: Continuously, Bar Open, or Bar Open on entry then continuously.
ATR Overlap: no entry occurs if the ATR overlaps with price (stop-loss 'hit' already on entry bar)
Table: Displays input settings selected.
Show Only On Ticker: Ability to hide indicator on other tickers.
Long Limit
Long Stop-Limit
Short Limit
Short Stop-Limit
Alerts
1. 'Check' alerts to use within indicator settings (entry, trailing stop hit, profit target hit, and failed entry).
2. Select 'Create Alert'
3. Set the condition to 'Limit Order + ATR Stop-Loss''
4. Select create.
Additional details can be added to the alert message using these words in between Curly (Brace) Brackets:
{{trail}} = ATR trailing stop-loss (price)
{{target}} = Price target (price)
{{type}} = Long or Short stop-loss (word)
{{traildistance}} = Trailing Distance (%)
{{targetdistance}} = Target Distance (%)
{{starttime}} = Start time of position (day:hr:min)
{{maxdrawdown}} = max loss
{{maxprofit}} = max profit
{{update}} = stoploss update frequency
{{entrysource}} = entry as 1st bar source (yes/no)
{{triggerentry}} = Wick/Close Trigger entry input
{{triggerexit}} = Wick/Close Trigger exit input
{{triggertarget}} = Wick/Close Trigger target input
{{atrlength}} = ATR length input
{{atrmultiplier}} = ATR multiplier input
{{atrtype}} = ATR type input
{{ticker}} = Ticker of chart (word)
{{exchange}} = Exchange of chart (word)
{{description}} = Description of ticker (words)
{{close}} = Bar close (price)
{{open}} = Bar open (price)
{{high}} = Bar high (price)
{{low}} = Bar low (price)
{{hl2}} = Bar HL2 (price)
{{volume}} = Bar volume (value)
{{time}} = Current time (day:hr:min)
{{interval}} = Chart timeframe
{{newline}} = New line for text
ATR CandlesAverage true range (ATR) is a market volatility indicator used to show the average range prices swing over a specified period.
The ATR Candles indicator has two primary functions. First, it measures a short-term ATR against a longer-term ATR to show if volatility is contracting or expanding.
Secondly, this indicator goes a step further by highlighting individual candles that exceed or fall below user selected ATR thresholds.
Moments of volatility contraction often lead to expansion and vice versa. By using the ATR Candles traders can identify potential imminent breakouts/breakdowns or healthy pullbacks vs a volatile correction.
Indicator Features
Selectable ATR lengths
Selectable threshold limits (1 contraction / 2 expansion)
Calculate current candles range from open / previous close / daily range
Custom colors
Show or hide every element
Chandelier Exit ZLSMA StrategyIntroducing a Powerful Trading Indicator: Chandelier Exit with ZLSMA
If you're a trader, you know the importance of having the right tools and indicators to make informed decisions. That's why we're excited to introduce a powerful new trading indicator that combines the Chandelier Exit and ZLSMA: two widely-used and effective indicators for technical analysis.
The Chandelier Exit (CE) is a popular trailing stop-loss indicator developed by Chuck LeBeau. It's designed to follow the price trend of a security and provide an exit signal when the price crosses below the CE line. The CE line is based on the Average True Range (ATR), which is a measure of volatility. This means that the CE line adjusts to the volatility of the security, making it a reliable indicator for trailing stop-losses.
The ZLEMA (Zero Lag Exponential Moving Average) is a type of exponential moving average that's designed to reduce lag and improve signal accuracy. The ZLSMA takes into account not only the current price but also past prices, using a weighted formula to calculate the moving average. This makes it a smoother indicator than traditional moving averages, and less prone to giving false signals.
When combined, the CE and ZLSMA create a powerful indicator that can help traders identify trend changes and make more informed trading decisions. The CE provides the trailing stop-loss signal, while the ZLSMA provides a smoother trend line to help identify potential entry and exit points.
In our indicator, the CE and ZLSMA are plotted together on the chart, making it easy to see both the trailing stop-loss and the trend line at the same time. The CE line is displayed as a dotted line, while the ZLSMA line is displayed as a solid line.
Using this indicator, traders can set their stop-loss levels based on the CE line, while also using the ZLSMA line to identify potential entry and exit points. The combination of these two indicators can help traders reduce their risk and improve their trading performance.
In conclusion, the Chandelier Exit with ZLSMA is a powerful trading indicator that combines two effective technical analysis tools. By using this indicator, traders can identify trend changes, set stop-loss levels, and make more informed trading decisions. Try it out for yourself and see how it can improve your trading performance.
Warning: The results in the backtest are from a repainting strategy. Don't take them seriously. You need to do a dry live test in order to test it for its useability.
-
Here is a description of each input field in the provided source code:
length: An integer input used as the period for the ATR (Average True Range) calculation. Default value is 1.
mult: A float input used as a multiplier for the ATR value. Default value is 2.
showLabels: A boolean input that determines whether to display buy/sell labels on the chart. Default value is false.
isSignalLabelEnabled: A boolean input that determines whether to display signal labels on the chart. Default value is true.
useClose: A boolean input that determines whether to use the close price for extrema calculations. Default value is true.
zcolorchange: A boolean input that determines whether to enable rising/decreasing highlighting for the ZLSMA (Zero-Lag Exponential Moving Average) line. Default value is false.
zlsmaLength: An integer input used as the length for the ZLSMA calculation. Default value is 50.
offset: An integer input used as an offset for the ZLSMA calculation. Default value is 0.
-
Ty for checking this out and good luck on your trading journey! Likes and comments are appreciated. 👍
--
Credits to:
▪ @everget – Chandelier Exit (CE)
▪ @netweaver2022 – ZLSMA
Fetch ATR + MA StrategyA trend following indicator that allows traders/investors to enter trades for the long term, as it is mainly tested on the daily chart. The indicator fires off buy and sell signals. The sell signals can be turned off as trader can decide to use this indicator for long term buy signals. The buy signals are indicated by the green diamonds, and the red diamonds show the points on then chart where the asset can be sold.
The indicator uses a couple indicators in order to generate the buy signals:
- ADX
- ATR
- Moving Average of ATR
- 50 SMA
- 200 SMA
The buy signal is generated at the cross overs of the 50 and 200 SMA's while the ATR is lower than then Moving Average of the ATR. The buy signal is fired when these conditions are met and if the ADX is lower than 30.
The thought process is as follows:
When the ATR is lower than its moving average, the price should be in a low volatilty environment. An ADX between 25 and 50 signals a Strong trend. Every value below 25 is an absent or weak trend. So entering a trade when the volatilty is still low but increasing, you'll be entering a trade at the start of a new uptrend. This mechanism also filters out lots of false signals of the simple cross overs.
The sell signals are fired every time the 50 SMA drops below the 200 SMA.
Directional ATROANDA:EURUSD
TLDR: A custom volatility indicator that combines Average True Range with candle direction.
The Directional ATR (DATR) is an indicator that enhances the traditional Average True Range (ATR) by incorporating the direction of the candle (bullish or bearish).
This indicator is designed to help traders identify trend strength, potential trend reversals, and market volatility.
Key Features:
Trend Confirmation: Positive and increasing DATR values suggest a bullish trend, while negative and decreasing values indicate a bearish trend. A higher absolute DATR value signifies a stronger trend.
Trend Reversal: A change in the direction of the DATR from positive to negative or vice versa may signal a potential trend reversal.
Volatility: Like the standard ATR, the DATR can be used to gauge market volatility, with larger absolute values indicating higher volatility and smaller values suggesting lower volatility.
Divergence: Divergence between the price and the DATR could signal a potential weakening of the trend and an upcoming reversal.
Overbought/Oversold Levels: Extreme DATR values can be used to identify overbought or oversold market conditions, signaling potential reversals or corrections.
Please note that the Directional ATR is just an indicator, and the interpretations provided are based on its underlying logic.
It is essential to combine the DATR with other technical analysis tools and test the indicator on historical data before using it in your trading strategy. Additionally, consider other factors such as risk management, and your own trading style.
ATR ControlThis indicator shows the following values:
ATR value of the current symbol
Size of the full position based on the maximum risk set
Three sizes that are percents of the full size already present in this indicator
Customizable settings are:
Show/hide single rows
ATR Timeframe
ATR Lenght
First percent of the split to apply
Second percent of the split to apply
Maximum risk
The last percent is automatically calculated using the first two.
Example:
Full size: 500
First percent: 10
Second percent: 40
The third percent is calculated as 100 - first percent - second percent = 50
The split sizes shown are: 50/200/250
JS-TechTrading: Supertrend-Strategy_Basic versionAre you looking for a reliable and profitable algorithmic trading strategy for TradingView? If so, you might be interested in our Supertrend basic strategy, which is based on three powerful indicators: Supertrend (ATR), RSI and EMA.
Supertrend is a trend-following indicator that helps you identify the direction and strength of the market. It also gives you clear signals for entry and exit points based on price movements.
RSI is a momentum indicator that measures the speed and change of price movements. It helps you filter out false signals and avoid overbought or oversold conditions.
EMA is a moving average indicator that smooths out price fluctuations and shows you the long-term trend of the market. It helps you confirm the validity of your trades and avoid trading against the trend.
Our Supertrend basic strategy combines these three indicators to give you a simple yet effective way to trade any market. Here's how it works:
- For long trades, you enter when the price is above Supertrend and pulls back below it (the low of the candle crosses Supertrend) and then rebounds above it (the high of the next candle goes above the pullback candle). You exit when the price closes below Supertrend or when you reach your target profit or stop loss.
- For short trades, you enter when the price is below Supertrend and pulls back above it (the high of the candle crosses Supertrend) and then drops below it (the low of the next candle goes below the pullback candle). You exit when the price closes above Supertrend or when you reach your target profit or stop loss.
- You can also use RSI and EMA filters to improve your results. For long trades, you only enter if RSI is above 50 and price is above 200 EMA. For short trades, you only enter if RSI is below 50 and price is below 200 EMA.
- You can set your stop loss and target profit as a percentage of your entry price or based on other criteria. You can also adjust the parameters of each indicator according to your preferences and risk tolerance.
Our Supertrend basic strategy is easy to use and has been tested on various markets and time frames. It can help you capture consistent profits while minimizing your losses.
Double Supertrend Entry with ADX Filter and ATR Exits/EntriesThe Double Supertrend Entry with ADX Filter and ATR Exits/Entries indicator is a custom trading strategy designed to help traders identify potential buy and sell signals in trending markets. This indicator combines the strengths of multiple technical analysis tools, enhancing the effectiveness of the overall strategy.
Key features:
Two Supertrend Indicators - The indicator includes two Supertrend indicators with customizable parameters. These trend-following indicators calculate upper and lower trendlines based on the ATR and price. Buy signals are generated when the price crosses above both trendlines, and sell signals are generated when the price crosses below both trendlines.
ADX Filter - The Average Directional Index (ADX) is used to filter out weak trends and only generate buy/sell signals when the market exhibits a strong trend. The ADX measures the strength of the trend, and a customizable threshold level ensures that trades are only entered during strong trends.
ATR-based Exits and Entries - The indicator uses the Average True Range (ATR) to set profit target and stop-loss levels. ATR is a measure of market volatility, and these levels help traders determine when to exit a trade to secure profit or minimize loss.
Performance Statistics Table - A table is displayed on the chart, recording and showing the total number of winning trades, losing trades, percentage of profitable trades, average profit, and average loss. This information helps traders evaluate the performance of the strategy over time.
The Double Supertrend Entry with ADX Filter and ATR Exits/Entries indicator is a powerful trend-following strategy that can assist traders in making more informed decisions in the financial markets. By combining multiple technical analysis tools and providing performance statistics, this indicator helps traders improve their trading strategy and evaluate its success.
Moonhub IndexMoonhub Index combines several popular technical indicators to create an aggregated index that aims to give a clearer overall picture of the market. The index takes into account the current market condition (trending, ranging, or volatile) to adjust its calculations accordingly.
The indicators used in this composite index are:
Hull Moving Average (HMA)
Fisher Transform (FT)
Williams Alligator
Moving Average Convergence Divergence (MACD)
Average True Range (ATR)
On-Balance Volume (OBV)
Money Flow Index (MFI)
Accumulation/Distribution (AD)
Pivot Points
True Strength Index (TSI)
Volume-Weighted Average Price (VWAP)
The script calculates the values of each indicator and then normalizes and weighs them according to predefined weights. The composite index is formed by summing the weighted values of each indicator. The final Moon Index is plotted on the chart, along with several other related lines like the exponential moving averages (EMA) and simple moving averages (SMA) of the index.
This custom index can be used by traders to get a more comprehensive view of the market and make better-informed trading decisions based on the combined insights of multiple indicators.
Scalper's toolkit - ATR WidgetWidget specifically designed for scalping. Many settings to fit the instrument and view preferences to make it fit into your chart window how you like, even on mobile.
** I have 5 other features to add into this in the very near future, as I use this as my primary tool for Risk reward. This script will be updated in the near future as more features are coded into it. See bottom for notes on plans
Features:
Displays a quick view of the ATR value on the chart, in decimal PIPs or directly in Points - a key value for scalping using the DOM for point value settings and one click trading on fast time frames.
Automatic calculation of stop and target distance for a predetermined Risk Reward Ratio (Set with the settings panel), and then also displayed in PIPs or Points for easy use in quick trading.
Works on most all instruments/pairs/cryptos with multiple precision levels for correct values to be shown in the widget.
Fully customizable -
ATR period Base setting, just like a normal ATR indicator
Display in : PIPs or Points
ATR based stop distance, using a multiplier. 2 is the most common multiplier used, and the default setting.
Risk Reward Calculation using the Stop Loss value.
-Quickly helps with proper target and stop sizing for the volatility in the price on the current trade entry point.
-Set to any ratio you wish, from 1:0.1 all the way to 1:100 or more, unlimited R ratio settings to fit your strategy and risk tolerances.
Position anywhere on the chart window with 9 preset locations available (Pine script limitation)
Show as a column layout or a row layout
Customize the Size, with 5 preset widget sizes, from tiny to huge (Pine script limitation)
-Mobile Friendly - Tiny or Small may be too small on PC, but can be used for Mobile so the widget does not become too large over the chart.
Custom text, background, and boarder colors
Custom Boarder Size - 0 size is no boarder
Set up:
-Open the settings panel.
First section is the basic settings for the ATR - the length (Default is 14) and to use a PIP value display, or Point value display.
Here you also see a "Precision" Setting. **Because each instrument returns different precision ATR values, it is difficult to determine with code what those values will be ahead of time to do the math in the background. Even some 2 decimal instruments return 5 decimal ATR values, so this setting filters that** Just use the dropdown and choose how many decimal places the instrument has from 2 - 5 decimals
The second section is for risk and reward calculations, and can be disabled if you do not want to see these values.
The first value is the "ATR Multiplier" Typically, a 2x multiplier is used on the ATR to determine how far away to place your stop loss from the entry, placing it out of harm's way from normal market activity.
The second value is the Reward target distance, based from the stop loss size. This quickly calculates your target to match your intended reward ratio, saving some manual work to calculate this by hand every trade.
** Note: because of the math used in the code, you may see odd values on some instruments, like indexes. If you have the precision correct, try changing the "Show in Pips" to "Show in Points", as this may solve the issue.
The last two sections are purely for how the widget looks and how/where it shows on the screen. These can be set however you like. To have no boarder, just set the "Frame size" value to 0.
Additional Updates planned:
Pip value calculation (2 feature uses)
-This will serve 2 purposes. The widget will calculate the value of the trade based on the lot size. It will also have a risk limit, so if the ATR get's too high for the current risk settings, It will show red to warn you of a high risk situation before you trade.
Example, you have a set limit of 3 dollars per trade using .02 lot sizing. If the ATR get's too high, The Stop value will be more risk than you would like to use at that trade sizing. Reduce the trade size, or wait for ATR to come lower.
Purpose 2: lot size calculation, so if you wanted to maximize the use of risk available. If you wanted to risk 600 for example, it would use the ATR you have set for the risk, and determine the proper lot size for the amount of volatility in the market. This way, you Risk Exactly, or as close as possible to 600 for the the current trade conditions.
Extra use for this value: Show the Current trade amounts at risk and for gain in money values on the side of the pip/point value. Know what you're risking and also trading for in monetary value.
ATR candle Comparison- Early momentum Detection (2 feature uses)
Will show an additional section on the bottom of the widget to show how each candle compares to the one before, up to the last 5, and show if ATR went down, up, or stayed the same over the last 5 candles.
Show an additional symbol to indicate the current candle status in comparison to the close of the last candle. Real time of if the ATR is getting larger, smaller, or staying the same.
Volatility Spike EstimatorPlots the Average True Range (ATR), its historical mean, the upper threshold for a volatility spike, and uses background color to show the likelihood of a volatility spike based on the current ATR value.
Green background indicates an increased likelihood of a volatility spike, while red background means a spike might have already occurred or be in progress.
Update: In this version, we added a short-term ATR calculation with an adjustable input parameter, shortTermATRLength. The likelihood of a volatility spike is now estimated based on the short-term ATR instead of the original ATR. This change makes the indicator more sensitive to recent market conditions and can help detect potential volatility spikes more quickly.