ta.skew
Measure whether the window leans toward large gains or large losses.
ta.skew(source, length, min=length)Population (biased, g1) skewness over the window: the third central moment divided by the population standard deviation cubed, m3 / m2^1.5 with both moments taken with divisor length. No sample bias correction is applied. Multiply by sqrt(n(n-1))/(n-2) for the adjusted form. na when the window has zero variance.
Parameters
A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.
| Name | Kind | Type | Default | Range | Description |
|---|---|---|---|---|---|
source | Series | number | - | - | The series to read. |
length | Constant | number | - | 1 to 10000 | Window in observed bars. |
min | Constant | number | - | 1 to 10000 | Valid values the window must hold before it reports (an option, written min=15). An na is skipped. Absent = length: the window must be full and gap-free. |
Output
| Name | Type |
|---|---|
value | number |
Warm-up and missing values
- Warm-up
lengthbars. Names in the warm-up are this operator’s parameters.- Missing values
- Returns na until
lengthconsecutive non-na observations are in the window. An na resets the accumulation. na when the window has zero variance. With min=, an na is skipped and the value is taken over the valid observations once there are at least min of them.
Example
ta.skew(close, 20)plot(ta.skew(ta.ret(close), 50), "Skew 50")