mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-20 19:48:05 +00:00
docs: add PineScript links to all indicator .md files, docsify .pine renderer with comprehensive Prism v6 syntax highlighting
- Added PineScript row to property tables in 375 .md files linking to companion .pine files - Docsify plugin intercepts .pine link clicks, fetches and renders content as syntax-highlighted code blocks - Comprehensive Prism.languages.pine grammar covering 18 token categories: annotations, types, qualifiers, namespaces, OHLCV builtins, functions, keywords, operators - Custom CSS tokens using GitHub dark palette for Pine-specific visual differentiation
This commit is contained in:
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Adr) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `ma.WarmupPeriod` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [adr.pine](adr.pine) |
|
||||
|
||||
- The Average Daily Range (ADR) measures the average distance between High and Low prices over a specified period.
|
||||
- Parameterized by `period`, `method` (default adrmethod.sma).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Atr) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `rma.WarmupPeriod` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [atr.pine](atr.pine) |
|
||||
|
||||
- The Average True Range measures market "heat" with complete disregard for direction.
|
||||
- Parameterized by `period`.
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Atrn) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [atrn.pine](atrn.pine) |
|
||||
|
||||
- ATRN transforms the absolute ATR into a relative measure by normalizing it to a [0,1] scale using min-max scaling over a lookback window.
|
||||
- Parameterized by `period`.
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Bbw) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [bbw.pine](bbw.pine) |
|
||||
|
||||
- Bollinger Band Width measures the distance between upper and lower Bollinger Bands, normalized by the middle band.
|
||||
- Parameterized by `period`, `multiplier` (default 2.0).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Bbwn) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period + lookback` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [bbwn.pine](bbwn.pine) |
|
||||
|
||||
- Bollinger Band Width Normalized (BBWN) extends the standard BBW by normalizing it to a [0,1] range based on historical minimum and maximum values o...
|
||||
- Parameterized by `period`, `multiplier` (default 2.0), `lookback` (default 252).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Bbwp) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period + lookback` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [bbwp.pine](bbwp.pine) |
|
||||
|
||||
- BBWP (Bollinger Band Width Percentile) measures where the current Bollinger Band Width falls within its historical distribution, expressing the res...
|
||||
- Parameterized by `period`, `multiplier` (default 2.0), `lookback` (default 252).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Ccv) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period + 1` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [ccv.pine](ccv.pine) |
|
||||
|
||||
- Close-to-Close Volatility (CCV) calculates the annualized standard deviation of logarithmic returns using only closing prices.
|
||||
- Parameterized by `period`, `method` (default 1).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Cv) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period + 1` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [cv.pine](cv.pine) |
|
||||
|
||||
- Conditional Volatility (CV) implements the GARCH(1,1) model for volatility forecasting, the most widely used time-varying volatility model in finan...
|
||||
- Parameterized by `period` (default 20), `alpha` (default 0.2), `beta` (default 0.7).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Cvi) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [cvi.pine](cvi.pine) |
|
||||
|
||||
- Chaikin's Volatility (CVI) measures the rate of change of the EMA-smoothed high-low trading range.
|
||||
- Parameterized by `roclength` (default 10), `smoothlength` (default 10).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Temperature + Signal (EMA) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [etherm.pine](etherm.pine) |
|
||||
|
||||
- Elder's Thermometer (ETHERM) measures how far today's price bar protrudes beyond yesterday's range, capturing the maximum outward extension in either direction.
|
||||
- Parameterized by `period` (default 22) for the EMA signal line.
|
||||
@@ -123,4 +122,4 @@ Not beneficial — the recursive EMA dependency prevents vectorization. Each bar
|
||||
## References
|
||||
|
||||
- **Elder, Alexander** (2002). *Come Into My Trading Room: A Complete Guide to Trading*, Wiley. p. 162.
|
||||
- **Elder, Alexander** (1993). *Trading for a Living*, Wiley. (Earlier discussion of volatility-based stops.)
|
||||
- **Elder, Alexander** (1993). *Trading for a Living*, Wiley. (Earlier discussion of volatility-based stops.)
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (EWMA) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [ewma.pine](ewma.pine) |
|
||||
|
||||
- EWMA Volatility calculates market volatility using an exponentially weighted moving average of squared log returns with bias correction.
|
||||
- Parameterized by `period` (default 20), `annualize` (default true), `annualperiods` (default 252).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Gkv) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [gkv.pine](gkv.pine) |
|
||||
|
||||
- Garman-Klass Volatility (GKV) is a range-based volatility estimator that uses all four OHLC prices to provide more efficient volatility estimates t...
|
||||
- Parameterized by `period` (default 20), `annualize` (default true), `annualperiods` (default 252).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Hlv) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [hlv.pine](hlv.pine) |
|
||||
|
||||
- *Also known as: PV (Parkinson Volatility)*
|
||||
- Parameterized by `period` (default 20), `annualize` (default true), `annualperiods` (default 252).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Hv) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period + 1` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [hv.pine](hv.pine) |
|
||||
|
||||
- Historical Volatility (HV), also known as close-to-close volatility or realized volatility, is the classical measure of price volatility using the ...
|
||||
- Parameterized by `period` (default 20), `annualize` (default true), `annualperiods` (default 252).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Jvolty) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [jvolty.pine](jvolty.pine) |
|
||||
|
||||
- Jurik Volatility (JVOLTY) is the adaptive volatility component extracted from Mark Jurik's JMA algorithm.
|
||||
- Parameterized by `period`.
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Jvoltyn) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [jvoltyn.pine](jvoltyn.pine) |
|
||||
|
||||
- Normalized Jurik Volatility (JVOLTYN) maps the raw JVOLTY dynamic exponent to a 0-100 scale.
|
||||
- Parameterized by `period`.
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Massi) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [massi.pine](massi.pine) |
|
||||
|
||||
- The Mass Index, developed by Donald Dorsey and introduced in the June 1992 issue of *Technical Analysis of Stocks & Commodities*, identifies potent...
|
||||
- Parameterized by `emalength` (default 9), `sumlength` (default 25).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Natr) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [natr.pine](natr.pine) |
|
||||
|
||||
- NATR normalizes the Average True Range (ATR) as a percentage of the closing price.
|
||||
- Parameterized by `period` (default 14).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Rsv) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [rsv.pine](rsv.pine) |
|
||||
|
||||
- Rogers-Satchell Volatility (RSV) is a drift-adjusted OHLC-based volatility estimator that uses all four price points (Open, High, Low, Close) to pr...
|
||||
- Parameterized by `period` (default 20), `annualize` (default true), `annualperiods` (default 252).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Rv) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [rv.pine](rv.pine) |
|
||||
|
||||
- Realized Volatility (RV) measures price volatility using the sum of squared logarithmic returns over a rolling window, then applying SMA smoothing ...
|
||||
- Parameterized by `period` (default 5), `smoothingperiod` (default 20), `annualize` (default true), `annualperiods` (default 252).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Rvi) |
|
||||
| **Output range** | $0$ to $100$ |
|
||||
| **Warmup** | 1 bar |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [rvi.pine](rvi.pine) |
|
||||
|
||||
- The Relative Volatility Index (RVI) implements Dorsey's **revised (1995)** version: computes original RVI separately on High and Low series, then averages.
|
||||
- When fed single-price data (TValue), both channels receive the same value, reducing to the original (1993) formula.
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (TR) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `1` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [tr.pine](tr.pine) |
|
||||
|
||||
- True Range (TR) is a volatility measure that captures the maximum price movement for each bar, including any gap from the previous close.
|
||||
- No configurable parameters; computation is stateless per bar.
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Ui) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [ui.pine](ui.pine) |
|
||||
|
||||
- Ulcer Index (UI) is a downside volatility measure that quantifies the depth and duration of drawdowns from recent highs.
|
||||
- Parameterized by `period` (default 14).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Vov) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `volatilityPeriod + vovPeriod - 1` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [vov.pine](vov.pine) |
|
||||
|
||||
- Volatility of Volatility (VOV) measures the standard deviation of volatility itself, quantifying how much volatility fluctuates over time.
|
||||
- Parameterized by `volatilityperiod` (default 20), `vovperiod` (default 10).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Vr) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [vr.pine](vr.pine) |
|
||||
|
||||
- Volatility Ratio (VR) measures the current bar's True Range relative to its Average True Range (ATR), providing a normalized indicator of short-ter...
|
||||
- Parameterized by `period` (default 14).
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
| **Outputs** | Single series (Yzv) |
|
||||
| **Output range** | $\geq 0$ |
|
||||
| **Warmup** | `period` bars |
|
||||
|
||||
### TL;DR
|
||||
| **PineScript** | [yzv.pine](yzv.pine) |
|
||||
|
||||
- Yang-Zhang Volatility is a sophisticated volatility estimator that combines overnight (close-to-open) returns with Rogers-Satchell intraday volatil...
|
||||
- Parameterized by `period` (default 20).
|
||||
|
||||
@@ -27,7 +27,7 @@ yzv(int length) =>
|
||||
raw_rma_val := (nz(raw_rma_val[1]) * (length - 1) + s_sq_daily) / length
|
||||
e_comp_val := (1.0 - rma_alpha) * e_comp_val
|
||||
smoothed_s_sq := e_comp_val > EPSILON_YZV ? raw_rma_val / (1.0 - e_comp_val) : raw_rma_val
|
||||
result = math.sqrt(smoothed_s_sq)
|
||||
result = math.sqrt(math.max(0.0, nz(smoothed_s_sq)))
|
||||
result
|
||||
|
||||
// Inputs
|
||||
|
||||
Reference in New Issue
Block a user