CandlesticksRe: Volatility Indicators for MT4

262
(Price filter idea).

Greetings everyone I noticed  times of high volatility that even indicators that don't  reprint will   change its calculations and print multiple different colors of the same bar although this is not supposed I would recommend someone creates a price filter that use the previous 9 candles and compare their volatility to the current volatility to identify   extreme volatility and you could add a blank or white bar  instead of the bar switching between the buy and sell colors

I have been testing a lot of indicators here and I noticed they work but sometimes  when price moves fast in the opposite direction and back they almost  always provide false signals  if price Filters or not applied 

the super smooth  moving average it's the best filter for price I have encountered but I think if you use the heiken Ashi as the additional filter with the  Double super smoother. ma filter as one it could help to eliminate the  false signals in many of the indicators

in my testing  I noticed that the atr and Bollinger band  would be the perfect idea for a price filter using a laguerre filter smoothing moving average with the heikin-ashi levels to determine which signal to print.

I was wondering if someone could create a buffer price filter that use one or more previous  candlestick to create a trajectory for the indicator 

 for example I believe it could work as a good  price filter to eliminate High volatility false signals  when combined with the  double super smooth  moving average  if the indicator uses slow heiken Ashi  to look at the two previous  candlesticks as one and only change its color or  signal when the current  candlestick  closes differently then the  previous one or two candlesticks

I think you could use the  average true range  Bollinger band and the heiken Ashi levels above or below the current  candlestick to measure the distance between the  candle  position  from the top or bottom of the  Bollinger band to make so that the indicator cannot print multiple colors are signals  randomly I think it will be a good way to filter price high-volatility candles to stop many  indicator from  reprinting 

something like a super smooth heiken Ashi price filter that uses two or three additional condition to provide signal on Lower time frame when the indicator is looking at higher time frame I hope it's possible (((big big thank you in advance. i Really appreciate the awesome work you guys do.I'm hoping it couldn't help stop many indicators from Reprint



:thumbup: :idea:
These users thanked the author TE81950 for the post:
talaate

Advanced Historical Volatility Estimators

263
Advanced Historical Volatility Estimators
Let me first give you an overview of Advanced Historical Volatility Estimators.

Advanced historical volatility estimators can use open, high and
low prices in addition to closing price.
These are more efficient than conventional methods. It is said.

<Excerpts from the literature>
CLOSE-TO-CLOSE (C):
The simplest and most common type of calculation that benefits from only using reliable prices from closing auctions.

PARKINSON (HL):
The first advanced volatility estimator was created by Parkinson in 1980, and instead of using closing prices it uses the high and low price.
While other measures are more efficient based on simulated data, some
studies have shown this to be the best measure for actual empirical data.

GARMAN-KLASS (OHLC):
Later in 1980 the Garman-Klass volatility estimator was created. It is an extension of Parkinson which includes opening and closing prices. As overnight jumps are ignored, the measure underestimates volatility. Yang-Zhang modified the Garman-Klass volatility measure in order to enable it to handle jumps.

ROGERS-SATCHELL (OHLC):
The Rogers-Satchell volatility created in the early 1990s is able to properly measure the volatility for securities with non-zero mean. It does not, however, handle jumps (hence it underestimates the volatility).

EXPONENTIALLY WEIGHTED (C):
Exponentially weighted volatilities are rarely used, partly due to the fact they do not handle regular volatility driving events such as earnings very well. Previous earnings jumps will have the least weight just before an earnings date, and the most weight just after earnings. It could, however, be of some use for indices.

YANG-ZHANG (OHLC):
In 2000 Yang-Zhang created the most powerful volatility measure that handles both opening jumps and drift. It is the sum of the overnight volatility (close to open volatility) and a weighted average of the Rogers-Satchell volatility and the open to close volatility.

<Excerpts ends here.>
What is Drift?:
Average amount stocks are assumed to rise. The drift phenomenon refers to the tendency of stock. Prices and returns to continue drifting in the direction of an earnings surprise for many months subsequent to the public announcement of earnings.




I will be uploading two more indicators in addition to the six listed above.

-Adjusted Mean Absolute Deviation Estimator
-Adjusted Median Absolute Deviation Estimator


Finally,
I would like to thank you Balipour for publishing an excellent explanation and code.

Yoake


Reference document:

Balipour -Historical-Volatility-Estimators script
https://www.tradingview.com/script/nT8O ... ators-pig/

Ways to estimate volatility Historical Volatility
https://www.ivolatility.com/help/2.html

Price and Return's distribution
https://www.ivolatility.com/help/19.html

[PDF] MEASURING HISTORICAL VOLATILITY 2023/01/17
All 8 indicators are included. ( 9 type of Historical Volatility Estimators )
I forgot to include the "Garman Klass YZ extension" and have corrected it.
(2023/01/18) Corrected some file names.
These users thanked the author yoake for the post (total 3):
Ogee, ionone, Jedidiah

Re: Volatility Indicators for MT4

264
Close to Close HV estimators / Multi Symbol

Close-to-Close HV estimators are the most commonly used estimators in finance. The calculation is straightforward and easy to understand.
When people reference historical volatility , most of the time they are talking about the close to close estimator.

<Points for improvement>
  • The Close-to-close estimator only calculates volatility based on the closing price. It does not take account into intraday volatility drift such as high, low.
    It also does not take account into the jump when open and close prices are not the same.
  • It weights past volatility equally during the lookback period, while there are other ways to weight the historical data.
  • It is calculated based on standard deviation so it is vulnerable to returns that are not normally distributed and have fat tails.

<All HV Estimators Usage Notes>

[Annualizing:]
These results are not annualized. If you need, please set it in the options.

As volatility is usually quoted on an annualised basis, this volatility has be multiplied by the square root of the number of samples in a year (i.e. √252 for daily returns, √52 for weekly returns and √12 for monthly returns).

[Distribution:]
The resulting value of the calculation is a distribution scale of volatility ratio (Log return).
It can be approximated to 10% of Historical Volatility, when the log return is 0.1 .

[Percentile Rank]
Percentile Rank is a heavy processing.
So please select it when necessary, and limit the number of bars to calculate.


2023/01/17
The file name was changed because the name was not unified.
These users thanked the author yoake for the post (total 2):
ionone, Jedidiah

Re: Volatility Indicators for MT4

265
Parkinson Volatility Estimator / Multi Symbol

I converted this based on this page .
Historical-Volatility-Estimators by Balipour
https://www.tradingview.com/script/nT8O ... ators-pig/

Parkinson suggests using the High and Low of each bar can represent volatility better as it takes into account intraday volatility . So Parkinson HV is also known as Parkinson High Low HV.
It is about 5.2 times more efficient than Close-to-Close estimator.
It ignores jumps and drifts. Therefore, it underestimates volatility .
While other measures are more efficient based on simulated data, some
studies have shown this to be the best measure for actual empirical data.

[Notes]
Percentile Rank is a heavy processing.
So please select it when necessary, and limit the number of bars to calculate.


original published paper:
2023/01/17
The file name was changed because the name was not unified.
These users thanked the author yoake for the post:
Jedidiah


Re: Volatility Indicators for MT4

266
Garman Klass Yang Zhang extension / Garman Klass (Multi Symbol)

I converted this based on this page .
Historical-Volatility-Estimators by Balipour
https://www.tradingview.com/script/nT8O ... ators-pig/

This estimator can easily respond to sudden price movements.(Overnight Jump or Gap)
However, if no jump occurs, the performance is the same as conventional Garman Klass estimator.
If you want to use the conventional Garman Klass estimator, please set it in the options.


[Notes]
Percentile Rank is a heavy processing.
So please select it when necessary, and limit the number of bars to calculate.


original published paper:
2023/01/17
The file name was changed because the name was not unified.
These users thanked the author yoake for the post:
Jedidiah

Re: Volatility Indicators for MT4

267
Rogers-Satchell Estimator/ Multi Symbol

I converted this based on this page .
Historical-Volatility-Estimators by Balipour
https://www.tradingview.com/script/nT8O ... ators-pig/

The Rogers Satchell Estimator calculates based on open, close, high, and low. And it can also handle drift in the financial series.
Rogers-Satchell HV is more efficient than Garman-Klass HV when there’s drift in the data.
However, it is a little bit less efficient when drift is zero.
The estimator doesn’t handle jumps, therefore it still underestimates volatility .

[Notes]
Percentile Rank is a heavy processing.
So please select it when necessary, and limit the number of bars to calculate.


2023/01/17
The file name was changed because the name was not unified.
These users thanked the author yoake for the post:
Jedidiah

Re: Volatility Indicators for MT4

268
EWMA Volatility Estimator/ Multi Symbol

I converted this based on this page .
Historical-Volatility-Estimators by Balipour
https://www.tradingview.com/script/nT8O ... ators-pig/

EWMA stands for Exponentially Weighted Moving Average . The Close-to-Close and all other estimators here are all equally weighted.
EWMA weighs more recent volatility more and older volatility less.
At the present time, EWMA volatility is not often used because there are better options to weight volatility such as ARCH and GARCH.

But there are advantages. EWMA volatility is usually autocorrelated.
The autocorrelation has close to exponential decay as you can see using an Autocorrelation Function indicator on absolute or squared returns.
The autocorrelation causes volatility clustering which values the recent volatility more.
Therefore, exponentially weighted volatility can suit the property of volatility well.

(They do not handle regular volatility driving events such as earnings very well.
But this could be used for trading of indices, etc. )

[Notes]
Percentile Rank is a heavy processing.
So please select it when necessary, and limit the number of bars to calculate.


2023/01/17
The file name was changed because the name was not unified.
These users thanked the author yoake for the post:
Jedidiah

Re: Volatility Indicators for MT4

269
Yang-Zhang Volatility Estimator/ Multi Symbol

I converted this based on this page .
Historical-Volatility-Estimators by Balipour
https://www.tradingview.com/script/nT8O ... ators-pig/

The Yang Zhang Estimator combines Garman-Klass and Rogers-Satchell Estimator so that it is based on Open, close, high, and low and it can also handle non-zero drift.It also expands the calculation so that the estimator can also handle overnight jumps in the data.
This estimator is the most powerful estimator among the range-based estimators. It has the minimum variance error among them, and it is 14 times more efficient than the close-to-close estimator. When the overnight and daily volatility are correlated, it might underestimate volatility a little.

[Notes]
Percentile Rank is a heavy processing.
So please select it when necessary, and limit the number of bars to calculate.


original published paper:
2023/01/17
The file name was changed because the name was not unified.
These users thanked the author yoake for the post:
Jedidiah

Re: Volatility Indicators for MT4

270
Adjusted Mean Absolute Deviation Estimator/ Multi Symbol

I converted this based on this page .
Historical-Volatility-Estimators by Balipour
https://www.tradingview.com/script/nT8O ... ators-pig/

It uses the distance log return is from its moving average as volatility .
It’s a simple way to calculate volatility and it’s effective. The difference is the estimator does not have to square the log returns to get the volatility .
The paper suggests this estimator has more predictive power.
The mean absolute deviation here is adjusted to get rid of the bias. It scales the value so that it can be comparable to the other historical volatility estimators.

Close-to-Close is calculated based on standard deviation so it is vulnerable to returns that are not normally distributed and have fat tails.
Mean and Median absolute deviation makes the historical volatility more stable with extreme values.

[Notes]
Percentile Rank is a heavy processing.
So please select it when necessary, and limit the number of bars to calculate.


original published paper:
2023/01/17
The file name was changed because the name was not unified.
These users thanked the author yoake for the post:
Jedidiah


Who is online

Users browsing this forum: DotNetDotCom [Bot], Efegocmen, Majestic-12 [Bot], Ruby [Bot], Yandex [Bot] and 115 guests