TradingView
DonovanWall
12 août 2018 18:24

Interval Volatility Bands [DW] 

Bitcoin / DollarBitfinex

Description

This is an experimental study that utilizes Volume Weighted Average Price or Time Weighted Average Price calculations, Bollinger Bands, and Fibonacci numbers to estimate volatility over a specified interval.

First, the basis is calculated by selecting:
-VWAP, which has the option to be calculated using real volume or tick volume
-TWAP, which has the option to be calculated using the standard method or exponential method

Next, standard deviation from the basis is calculated and multiplied by a specified expansion coefficient. The result is then added to and subtracted from the basis to calculate the high and low bands.
There are three band calculation methods to chosse from in this script:
-Standard, which uses the default calculations
-Average, which takes a cumulative average of standard deviation
-Hybrid, which takes the maximum of the standard and average standard deviation methods

Lastly, the high and low band ranges are multiplied by Fibonacci Percentages 23.6 - 78.6.

A custom color scheme with eight default presets to choose from is included.

Notes de version

//Updates:

//I altered the inputs for a simpler experience. Calculation method, VWAP volume type, TWAP smoothing type, band calculation method, and color scheme are all controlled with easy to use dropdown menus.

//An option to use automatic interval settings is now available. You can still choose a custom interval by deselecting this option.

//Double Exponential Time Weighted Average Price (DETWAP) has been added to the script. Simply select "Double Exponential" from the TWAP Smoothing Type menu to enable it.

//I also added a couple new color schemes to the mix, Prism 1 and Prism 2, which are multicolored themes for those who like a bit of variety in their colors.

Notes de version

Updates:

In the midst of migrating the script from pine v2 to v3, I forgot that the lookahead settings need to be changed on security functions.
v3 by default turns lookahead off, resulting in the security function tracking current resolution data on the current bar, and alternate resolution data in the past.
Lookahead has been turned back on so the alternate resolution results reflect on the current bar.

Notes de version

Updates:

Fixed a repainting issue in the script by changing the interval renewal condition.

Notes de version

Updates:

-> Migrated to v4.
-> Reorganized script structure.
-> Reduced clutter for quicker compile.

Notes de version

Updates:

- Rebuilt the weighted average price functions using Pine's new array data structures.

- Condensed interval calculation options into a singular dropdown tab with 4 options to choose from:
-> Automatic Segmented - Automatically chooses a timeframe for a segmented interval.
-> Custom Segmented - Uses a user defined interval based on an input resolution.
-> Cumulative - Uses the entire chart to cumulatively calculate.
-> Time Anchored Cumulative - Cumulatively calculates from a user defined point in time. If the time is before the time of the first bar, this behaves the same as the cumulative option.

- Reorganized the GUI.
Commentaires
BorsaPanda
Donovan, thanks. This is very practical. I combine it with your Range filter to color the bars (I do not use the bar color function of IVB)
HanDollarian
you know what... i give you all my resting coins. its not much, but something
HanDollarian
TraderGxyz
These are absolutely great! Thank you for sharing them!

The only thing that could make these even cooler imo, is if you added the option to make them anchored...
DonovanWall
@TraderGxyz, Definitely a great idea. It would be a useful feature to have.

I'll be implementing anchoring options in the next update, per your suggestion.

Thanks for the valuable input!
TraderGxyz
@DonovanWall, Awesome! I can't wait!

Thanks again for all the great indicators you've so generously shared. It's very appreciated : )
DonovanWall
@TraderGxyz, Just got around to updating. The option to anchor to a specific point in time is now included in this version!
TraderGxyz
@DonovanWall, Perfect! It's safe to say, this indicator is now as cool as it gets. Thank you!

If you'll excuse me, I'm now going to pig out on halloween candy and play around with these ; )
Plus