Standard Deviation Volatility HelperHere is a simple Standard Deviation Line based on supply and demand that will help you to find expected move easily. 3 Standart Deviation merged line available. Number of days and adjustable length.
標準差(StdDev)
Varprice4 - Price is the real KingWhen you use any indicators you suffer of lagging and possibile mistakes.
In this case, higher movements of the (daily) prices (long green candle) are a signal that market is appreciating your stock. The variation of a single candle is compared to standard deviation of the stock.
Besides normal money management (on fixed percentages), we have kept the possibily of exiting the position before stop loss adding a multiplier considering that red (or black) candles are normally wider than green (white) ones.
Spread by//Every spread & central tendency measure in 1 script with comfortable visualization, including scrips's status line.
Spread measures:
- Standard deviation (for most cases);
- Average deviation (if there are extreme values);
- GstDev - Geometric Standard Deviation (exclusively for Geometric Mean);
- HstDev - Harmonic Deviation (exclusively for Harmonic Mean).
These modified functions will calculate everything right, they will take source, length, AND basis of your choice, unlike the ones from TW.
Central tendency measures:
- Mean (if everything's cool & equal);
- Median (values clustering towards low/high part of the rolling window);
- Trimean (3/more distinguishable clusters of data);
- Midhinhe (2 distinguishable clusters of data);
- Geometric Mean ( |low.. ... ... .. .... ... . . . . . . . . . . . .high| this kinda data); <- Exp law
- Harmonic Mean { |low. . . . . . . . . . . . . . .. . . .high| kinda data). <- Reciprocal law
Listen:
1) Don't hesitate using Standard Deviation with non-mean, like "Midhinge Standard Devition", despite what ol' stats gurus gonna say, it works when it's appropriate;
2) Don't check log space while using Geometric Mean & Geometric Standard Deviation, these 2 implement log stuff by design, I mean unless u wanna make it double xd
3) You can use this script, modify it how you want, ask me questions whatever, just make money using it;
4) Use Midrange & Midpoints in tandem when data follows ~addition law (like this . . . . . . . . . . . . . . . . . . . . .). <- just addition law
Look at the data, choose spread measure first, then choose central tendency measure, not vice versa.
!!!
Ain't gonna place ® sign on standard deviations like one B guy did in 1980s lmao, but if your wanna use Harmonic Deviations in science/write about/cite it/whatever, pls give me a lil credit at least, I've never seen it anywhere and unfortunately had to develop it by myself. it's useful when your data develops by reciprocals law (opposite to exponential).
Peace TW
Bollinger Bands Money Flow IndexThis script embodies the application of the Bollinger Band and Money Flow Index in John A. Bollinger's book "Bollinger on Bollinger Bands."
"Bollinger on Bollinger Bands" suggests a relatively method of analysis by applying the Bollinger Band to an indicator.
Here's one of the indicators, Money Flow Index.
Money Flow Index is an indicator of overbuying and overselling by reflecting the volume of transactions.
"Bollinger on Bollinger Bands" suggests using the Bollinger Band to create relative top and bottom lines for various indicators, such as Money Flow Index.
Original Money Flow Index is considered to be over-purchased if it is more than 80% and over-selling if it is less than 20%.
But if you put a bolinger band on it, you can set the standard for higher or lower over-selling and over-selling in a sustained bullish, bearish market.
This script uses the following values as the default values as recommended by "Bollinger on Bollinger Bands".
Money Flow Index for 10 days.
a bollinger band of forty days
standard deviation of 2
The above values are suitable for most stocks and markets, but sometimes there is too much or too little data inside the Bollinger Band.
It is recommended to modify each value little by little to adjust 85% to 90% of the total data to fit inside the Bollinger Band.
If the value is higher than the top line, it is considered over-purchased, and a red background color appears.
If the bottom line is crossed down, it is considered over-sold and the green background color appears.
MultiType Shifting Predictive Moving Averages (MA) CrossoverJust 2 Moving Averages with adjustable settings and shifting capability, plus signals and predicting continuations.
At the time of publish these different types of MAs are supported:
- SMA (Simple)
- EMA (Exponential)
- DEMA (Double Exponential)
- TEMA (Triple Exponential)
- RMA (Adjusted Exponential)
- WMA (Weighted)
- VWMA (Volume Weighted)
- SWMA (Symmetrically Weighted)
- HMA (Hull)
I'm looking forward to any idea about filtering the signals. Thanks.
Semi Deviation Point PercentThe Semi Deviation Point calculates the positive value as the standard deviation of only samples that has high value than the simple moving average. The negative value is the same standard deviation, but only uses the low value and multiply for -1.
After this calculate the value is divide by the value of simple moving average and multiplied by hundred to get a percent value from 0% to 100%.
The delta line is a simple moving average from the differences of the two values.
How it should be read?
If positive values are greater than negative values than the volatility is happen on higher prices and not lower.
If positive values are lower than negative values than the volatility is happen on lower prices and not higher.
If you know that in which market you would opt in? Is it less risk the prior?
Bollinger Band Volatility Spread VisualizerThis indicator was created to see the total dollar (or whatever currency pair) amount spread between the upper and lower Bollinger Bands. This knowledge of knowing this spread can be used to indicate upcoming periods of high volatility in a market. The fundamental idea behind predicting periods of high volatility is backed up by the idea that periods of low volatility are followed by periods of high volatility and vice versa.
Based on this knowledge, the numerical spread of the Bollinger Bands, as shown in the indicator, we can deduce that when the value is super low, we can expect a period of high volatility AKA: big move incoming.
This indicator is not fully finished because this was my first time coding in Pinescript and I wanted to post the basic indicator first.
My future plans for improving this indicator include:
Adding customization as an option to choose your personal BBands settings that this indicator is based off of
Potentially converting this indicator as a TradingView Strategy where a signal would go off when the spread reaches a certain threshold
Squeeze Momentum Indicator [LazyBear] vX by DGTModified version of Squeeze Momentum Indicator visualizing on Price Chart
author: LazyBear, modified by KıvançÖZBİLGİÇ
NSDT ES Midline Zones**DESIGNED FOR ES/MES** This script provides an easy visualization of potential reversion zones to take trades back to the intraday midline. A common use would be to enter a position once price reached the outer yellow zones and retreats to either the red zone (for a short toward the midline) or a green zone (for a long back to the midline).
NSDT NQ Midline Zones**DESIGNED FOR NQ/MNQ** This script provides an easy visualization of potential reversion zones to take trades back to the intraday midline. A common use would be to enter a position once price reached the outer yellow zones and retreats to either the red zone (for a short toward the midline) or a green zone (for a long back to the midline).
Basic BIASBasic BIAS
Deviation rate (bias), also known as deviation rate, or y-value for short, is an indicator to reflect the deviation degree between the price and MA in a certain period of time by calculating the percentage difference between the market index or closing price and a moving average, so as to obtain the possibility that the price will reverse or rebound due to deviation from moving average trend in case of severe fluctuation, and that the price will move within the normal fluctuation range Form the credibility of continuing the original potential.
The deviation rate is a percentage of the deviation degree (gap rate) between the price and ma.
The departure rate curve (bias) is a curve that connects the values of each bias into a line and obtains a wave extension curve with the value of 0 as the horizontal axis.
Trend Analysis IndicatorThe Trend Analysis Indicator was created by Adam White (Stocks & Commodities V. 10:8 (358-360)) and this is not to be confused with the Trend Analysis Index which was also created by Adam White. The stock is trending when it is above the signal and loses steam when it falls below the signal. Generally you should buy when it is above it's signal and sell when it goes below the signal.
Let me know if you would like me to write more scripts!
SPY Expected Move by VIXThis indicator shows 1 and 2 standard deviation price move from the VWAP based on VIX. Implied Volatility (IV) is being used extensively in the Option world to project the Expected Move for the underlying instrument. VIX is used as a proxy for SPY's IV for 30 days.
This indicator is meaningful only for SPY but can be used in any other instrument which has a strong correlation to SPY.
Better Bollinger BandsIt is a highly configurable Bollinger Bands implementation.
You can choose different moving averages: EMA, SMA, WMA, VWMA, RMA (Wilder's EMA), ZLEMA, HMA (Hull MA), ALMA
Select between standard or mean deviation
You can use "High" or "Low" for upper and lower bands, which makes them much better for dynamic support-resistance
You can shift (offset) right the bands to use it as support and resistance in the future
Historical Volatility Percentile + SMAHistorical Volatility Percentile tells you the percentage of the days from the past year (252 trading days) that have lower volatility than the current volatility.
I included a simple moving average as a signal line to show you how volatile the stock is at the moment.
I have included simple colors to let you know when to enter or exit a position.
Buy when price higher than EMA & historical volatility higher than SMA
Sell when price lower than EMA & historical volatility higher than SMA
Please let me know if you would like me to publish any other indicators! I always love to hear from you guys.
Volatility SkewThis indicator measure the historical skew of actual volatility for an individual security. It measure the volatility of up moves versus down moves over the period and gives a ratio. When the indicator is greater than one, it indicators that volatility is greater to the upside, when it is below 1 it indicates that volatility is skewed to the downside.
This is not comparable to the SKEW index, since that measures the implied volatility across option strikes, rather than using historical volatility.
Corrected Moving AverageThis moving average was originally developed by professor Andreas Uhl in 2005 (The paper in German: www.buero-uhl.de). Here is the guy himself: wavelab.at
The strength of the CMA is that the current value of the time series must exceed the current volatility-dependent threshold, so that the filter increases or falls, avoiding false signals in weak phases.
The straight line of CMA can be used for a ranging market identification
Mean Absolute Deviation BandsThe other way to build bands around price that uses Mean Absolute Deviation instead of Standard Deviation.
MAD is also a measure of variability, but less frequently used. MAD is better for use with distributions other than the Gaussian.
MAD is always less than or equal to Standard Deviation and the resulting bands are more tighter for the same parameters if we compare it to Bollinger Bands.
If you use band stops this can be useful.
VWAP y Standar DeviationThis script presents the real VWAP (Yellow line), in 50 period VWAP (Blue Line) and the 120 period VWAP (Red Line). Additionally, it presents the values of 1 and 1,618 standard deviations of the VWAP of 50 periods.
This confirmation allows to visualize the behavior of the price in realicon to the VWAP key indicator that represents the midpoint of the operating volumes in a period.
This script evaluates the deviation of the price in relation to the average of the volume traded in the different periods.
The indicator settings allow changing the length of the VWAP for custom settings. Standard deviations are determined based on VWAP 2. VWAP 1 is a reference for determining the global trend of movement in the established period.
The upper and lower limits of the representative Standard Deviation of 1.618 (Fibonacci Number) are used as confirmation of continuation of a trend once crossed by the price.
During the ranges the 1.618 limits of the Dev. Standard are used as entry and exit points of the operation (For this it is necessary to adjust the VWAP 2 to the studied temporality and the operated asset)
WhipLashThis is a study to determine if small candle bodies (little difference between open and close), regardless of overall candle length (high/low), can be used to filter choppy markets.
The indicator will calculate the selected average "MA Mode" of (close-open). To standardize this result and ensure any filters/thresholds do not need to be recalculated for each instrument the result will be used to calculate the Z Score.
The idea is that when candle bodies are small there is very little actual price movement, and therefore price is choppy. When considering the Z Score of that result, any outliers ie larger candle bodies, could show a potential trend forming. This indicator is similar to QStick but allows more customization by the user.
MA Mode determines which MA is used to smooth the results of (close-open)
Price Smoothing is the number of running periods the MA Mode is calculated for.
The three Thresholds are preset to the 90%, 95%, and 99% levels for Z Score. If these thresholds are altered you may wish to also alter the horizontal lines programmed for each level on the positive and negative sides.
The Z Length is the period for which the Z Score is calculated
Multiple MA Options Credits to @Fractured
Bits and Pieces from @AlexGrover, @Montyjus, and @Jiehonglim
As always, trade at your own risk.
Moving Average Adaptive FilterThe Moving Avg Adaptive Filter (MAAF) was authored by Perry Kaufman in the Stocks and Commodities Magazine 03/1998
This is a volatility based indicator so when this indicator goes up, sell in the direction of how that stock is going. In other words go short when it is rising and the stock price is below the ema or go long when it is rising and the stock price is above the ema. Lower volatility means it is trading sideways or the current price action is about to reverse.
Send me a message and let me know what other indicators you would like to see!
VQZL Z-ScoreVolatility Qaulity Zero Line attempts to keep a trader out of ranging markets, but the original calculation on TradingView had to be adjusted for each instrument. To avoid this issue, I have applied a z-score calculation to the VQZL so the result is standardized for all instruments. A Z-Score is simply a value's relationship to the mean (average) of a group of values, measured in terms of standard deviations from the mean.
This calculation allows us to compare current volatility to the mean (moving average) of the population (Z-Length). The closer the VQZL Z-Score is to the mean, the closer it will be to the Zero Line and therefore price is likely consolidating and choppy. The farther VQZL Z-Score is from the mean, the more likely price is trending.
The MA Mode determines the Moving Average used to calculate VQZL itself. The Z-Score is ALWAYS calculated with a simple moving average (as that is the standard calculation for Z-Score).
The Threshold Levels are the levels at which VQZL Z-Score will change from gray to yellow, orange, green (bullish), or red (bearish). These levels can be adjusted but you should adjust the Threshold Lines as well (in the style section), so they line up with your adjusted values.
Statistically speaking, confidence levels in relation to Z-Score are noted below. The built in Threshold Levels are the positive and negative values for 90%, 95%, and 99%. This would indicate when volatility is greater than these values they are out of the ordinary from the standard range. You may wish to adjust these levels for VQZL Z-Score to be more responsive to your trading need
80% :: 1.28
85% :: 1.44
90% :: 1.64
95% :: 1.96
99% :: 2.58
As always, trade at your own risk.
VQZL Created by Investo And Adapted From @sarangab
Multiple MA Options Credits to @Fractured
Bits and Pieces from @AlexGrover and @Montyjus
Standard Deviation Measurement ToolIf you like the script please come back and leave me a comment or find me on the interwebs. I get notified you "liked" it... but I have no idea if you actually use it. So, let me know =)
The script uses the open price as the mean and calculates the standard deviation from the open price on a per candle basis
- Goal: -
To establish a mean based on the Open Price and calculate the standard deviation.
The reason for this is if the Open is the mean, then the Standard deviation implies a standardized distance a given candle can be expected to travel
from the open price
- Edge: -
If you know that there is a 68%/95%/99.7% probability that price will NOT move more than
One Standard Deviation/Two Standard Deviations/Three Standard Deviations from the open price respectively
you can set reasonable price targets that relate to those probabilities in a given timeframe.
e.g. if you're on a 1h chart and your target is 3.5% from the open price, but 1 standard deviation of the hourly candle is equal to 0.78%.
You can make assumptions on either:
- The reasonableness of your target
or
- The holding period likely required for the trade.
Also, Standard Deviation is a function of volatility and this tool provides a unique mechanism for measuring volatility as well on a candle by candle basis
- Customization Options-
- Set 3 independent upper and lower standard deviations.
- Each set of standard deviations are on a switch so you can show 1, 2, or 3 sets of standard deviations
- You can set the distribution width
- Though it's not recommended, you can change the mean source.
- There is a switch to show the standard deviation on only the real-time bar or real-time and historical bars.
- How I Think About This Script -
This strategy is predicated the same principle as Bollinger Bands: the reality that 68% of all data points will fall within one standard deviation of the mean, 96% of all data points will fall within two standard deviations, and 98% of al data points will fall within 3 standard deviations. By understanding the standard deviation, you can possibly infer an edge by understanding the probabilistic range price will be bound to the limits of standard deviation rules according to their probabilistic outcomes for the single candle on any given timeframe. Bollinger Bands are designed to provide this information with the mean being a 20-period moving average and this indicator.
This indicator is designed to provide standard deviation information with the mean being based on the distance price travels away from the open of individual candles in the lookback period.
If you use a strategy where you enter on major candle closes, this can be useful to set targets for those entries based on the intended hold period or at least add/remove validity to other target metrics.
Example:
Your target is at the 1.618 Fibonacci level and your confirmation triggers on the 4h candle close (H4 if that's your thing lol). You set up the indicator based on the standard deviation of price movement in 4h candles over the last week.
Let's say the indicator shows that the 1.618 Fibonacci level is 3 standard deviations away.
This being the case this statistically indicates that within the next 4 hours, you have a very low probability of achieving your target (>2%). This doesn't invalidate your target, but it does indicate a low probability of achieving it in the next 4hrs. With this information, you can infer that you are either going to be (a) really lucky (b) in this trade for a lot longer than 4hrs or (c) your target is unrealistic given your intended hold period.
You can develop a more probabilistically favorable hold period calculation by looking at the standard deviation on a higher time frame (e.g. 1d-1w).
Bonus feature: You'll find that the 2 and 3 standard deviations will often "cluster" and these clusters often provide future S/R levels. That's a pretty sweet feature no one things to look for. But, try it. Find a cluster of 2nd and 3rd stdevs that are in somewhat of a horizontal pattern (usually the result of a range) and you'll find that to be a good s/r area. Even better if you use the 3.2 standard deviation, you'll find that is a fantastic breakout signal!
Summary
So, you can use it for target setting, a confluence test, a reasonableness test, or just a measurement tool.
This was the first TV script I ever wrong.. Got taken down. But, I've re-released it because there are other TV scripts that attempt to do this but are completely wrong.
Please be careful about using other people's scripts. Always validate the math of the script before you use it if possible.
Stay safe out there and I hope all your dreams come true.