Momentum / Reference
alerta.ta.specialK
TradingView-compatible spelling: ta.specialK, runs without warnings
Martin J. Pring's Special K: twelve simple averages of rates of change, from a 10-bar to a 530-bar ROC, weighted 1-2-3-4 within the short, medium and long groups and summed, with a signal line that is a simple average of a simple average of it. Needs about 725 bars of history before its first value.
alerta.ta.specialK(source, length1, length2) → [specialK, signal]Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
source | series | Yes | — | Series of values to process. |
length1 | int | No | 100 | Length of the first simple average of the signal line. |
length2 | int | No | 100 | Length of the second simple average of the signal line. |
Returns
[specialK, signal]Example
alerta.ta.specialK
[sk, signal] = ta.specialK(close, 100, 100)plot(sk, { title: "Special K", pane: "oscillator" })plot(signal, { title: "Signal", pane: "oscillator" })Notes
- Special K = Σ w·SMA(ROC(n), m) over (n, m, w) = (10,10,1) (15,10,2) (20,10,3) (30,15,4) (40,50,1) (65,65,2) (75,75,3) (100,100,4) (195,130,1) (265,130,2) (390,130,3) (530,195,4), ROC in percent; signal = SMA(SMA(Special K, length1), length2). Source: Martin J. Pring, "Technical Analysis Explained", 5th ed.
- Reached through a `TradingView/ta` import alias too (`TVta.specialK`).
Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.