Add Yang-Zhang Volatility (YZV) Indicator Implementation

- Introduced YZV class for calculating Yang-Zhang Volatility, a comprehensive volatility measure that incorporates overnight, open-to-close, and high-low components.
- Implemented calculation methods, including batch processing for TBarSeries and spans.
- Added documentation for YZV, detailing its mathematical foundation, performance profile, and trading applications.
- Updated volume index documentation to reflect changes in file paths.
- Refactored VWMA calculation method to use a more generic source parameter instead of price.
This commit is contained in:
Miha Kralj
2026-02-02 19:47:21 -08:00
parent a03d7aa0ce
commit c034cbd5e5
78 changed files with 16662 additions and 366 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ The indicator forms a set of bands around a central line, creating a "zone" that
| --------- | ------- | -------- | -------------- |
| Period | 20 | Controls the lookback period for calculations (sqrt applied internally) | Increase (30-50) for longer-term analysis and smoother bands; decrease (10-15) for more responsive, shorter-term signals |
| Band Multiplier | 2.0 | Multiplier for band width based on adaptive range | Increase (2.5-3.0) for wider bands in more volatile markets; decrease (1.5-1.8) for tighter bands and more frequent signals |
| Source | close | Price series used for middle line calculation | Use 'typical price' (hlc3) for incorporating full bar range; use 'close' for end-of-period focus |
| Source | source | Data source for middle line calculation | Use 'typical price' (hlc3) for incorporating full bar range; use 'close' for end-of-period focus |
**Pro Tip:** Start with the default settings (period=20, multiplier=2.0) and adjust based on your trading timeframe and market conditions. For intraday trading on choppy markets, consider period=30 with multiplier=1.8 for more frequent signals. For daily charts in range-bound markets, period=20 with multiplier=2.2 provides reliable reversal points. Always combine with a trend filter (ADX < 30) to avoid using the APZ in strongly trending conditions where it may generate false signals.
+1 -1
View File
@@ -34,7 +34,7 @@ volatility—creating a more responsive and market-adaptive trading framework.
| --------- | ------- | -------- | -------------- |
| Period | 20 | Lookback period for both SMA and ATR calculations | Shorter (10-15) for more responsiveness to recent volatility; longer (30-50) for more stable bands and filtered signals |
| ATR Multiplier | 2.0 | Determines band width as a multiple of ATR | Higher (2.5-3.0) for wider bands and fewer signals; lower (1.0-1.5) for tighter bands and more frequent signals |
| Source | Close | Price data for the center line calculation | Can be modified to use typical price (hlc3) for a more balanced view of price action |
| Source | source | Data source for center line calculation | Can be modified to use typical price (hlc3) for a more balanced view of price action |
**Pro Tip:** For a comprehensive trading framework, try using multiple ATR Band settings simultaneously. A narrower band (1.0-1.5× ATR)
can help identify minor retracements and short-term entry points, while a wider band (2.5-3.0× ATR) can be used for major
+1 -1
View File
@@ -21,7 +21,7 @@ STARCHANNEL improves upon traditional percentage-based channels by incorporating
| ------ | ------ | ------ | ------ |
| Period | 20 | Lookback period for both SMA and ATR calculations | Shorter (10-15) for more responsiveness to recent volatility; longer (30-50) for more stable channel and filtered signals |
| ATR Multiplier | 2.0 | Determines channel width as a multiple of ATR | Higher (2.5-3.0) for wider channel and fewer signals; lower (1.0-1.5) for tighter channel and more frequent signals |
| Source | Close | Price data for the centerline calculation | Can be modified to use typical price (hlc3) for a more balanced view of price action |
| Source | source | Data source for centerline calculation | Can be modified to use typical price (hlc3) for a more balanced view of price action |
**Pro Tip:** For a comprehensive trading framework, try using multiple STARCHANNEL settings simultaneously. A narrower channel (1.0-1.5× ATR) can help identify minor retracements and short-term entry points, while a wider channel (2.5-3.0× ATR) can be used for major support/resistance zones and stop placement.
+1 -1
View File
@@ -24,7 +24,7 @@ VWAPSD is primarily used as an intraday indicator, resetting at the beginning of
| Parameter | Default | Function | When to Adjust |
| ------ | ------ | ------ | ------ |
| Source | hlc3 | Price data to use for VWAP calculation | Use 'close' for closing prices only, 'hlc3' for typical price (most common), 'ohlc4' for full bar average |
| Source | source | Data source for VWAP calculation | Use 'close' for closing prices only, 'hlc3' for typical price (most common), 'ohlc4' for full bar average |
| Session Reset | 1D | Determines when VWAP resets | Use '1D' for daily intraday trading, '1W' for weekly swing trading, '1H' for hourly scalping, 'Never' for cumulative since chart start |
| Standard Deviations | 2.0 | Number of standard deviations for upper and lower bands | Use 1.0 for tighter bands (more signals), 2.0 for standard volatility context (95% confidence), 3.0 for extreme moves only (99.7% confidence) |