Description: This indicator plots Daily Standard deviation levels on price chart based on Historical Volatility (HV). It uses the most common approach for calculating historical volatility as standard deviation of logarithmic returns, based on daily closing/settlement prices.
Assets: Currency Pairs, Commodities, also works on stocks, some indices. Time Frames: 5min to 60min. This will also work on Daily Chart, by setting "DaystoExpire" to 21
Options:
Use Daily Data to Calculate StdDev HV (default), otherwise use the charts Time Frame
Lookback = number of days/periods to calculate stddev of HV (21 by default)
Annual = number of trading days in a calender year (252 by default)
Days to Expiry = number of days for the life of this option ( for auto calculation this is 1 for intraday, 21 for daily and annual when chart TF used)
Settlement Source = close price by default, can use another source.
Settlement Volume Weighted Average Length = by setting this to >1 then an average is used for settlement.
Display ### Standard Deviation Levels = select what levels are to be displayed.
Long waiting for this script to be here in TV. Thanks JustUncleL for your effort and generosity making this available for the whole community. Each line represents the EXPECTED move of the price based on the standard deviation formula using the historical volatility data of the underlying. Just drop the indicator on any chart and see for your self how nicely the price has reacted when has reached those lines. Nicely done UncleL thank you very much!
in_victa
⋅
Good afternoon, thank you very much, I went to the parcels on YouTube, I wanted to watch and study the video for you, but the videos have been removed from YouTube, you can give links to relevant videos, thank you very much
pankiilathi
⋅
Sir source changing is not working what's going on ..plz do something
mohammad_tlha
⋅
- Settlement Source = close price by default, can use another source.
hi sir can u tell me how can i change Previous day's closing price for intra day use
JustUncleL
⋅
@talha8751, Just select a different source in the scripts settings.
SureVik
⋅
@JustUncleL this is epic! Thank you for sharing with us.
B0000000
⋅
THANKS PAPA
syracusepro
⋅
Question: if you state: // get the Daily Settlement
// Calculate STDdev over life of the option (generally this is one day for 5min to 60min TFs,
// and 21 days for Daily TF)
stdhv = 0.0
DaystoExpire = DaystoExpire_==0? isintraday? useDaily? 1 : min(annual,1440/interval) : 21 : DaystoExpire_
stdhv := newDay? settlement*hv*sqrt(DaystoExpire/annual) : nz(stdhv[1])
To which of the settlements then the program is referring to?
Thanks.
JustUncleL
⋅
@syracusepro, Settlement is generally the last close (src) value of the previous Day, there is an option to create a volume weighted average of close instead. So basically the value for settlement used in subsequent calculations is always the same until the next change of Day.