swma
Symmetrically Weighted Moving Average (fixed 4-period)
swma(source)
Parameters
| Name | Type | Description |
|---|---|---|
source |
field | Data series to calculate SWMA on |
Formula
SWMA = (field + 2*field[1] + 2*field[2] + field[3]) / 6
Examples
swma(close); # 4-period symmetric weighted MA of close
swma(high); # 4-period symmetric weighted MA of high
x = swma(hl2); # SWMA of typical (high+low)/2 price
Returns
float
Notes
Always uses a fixed 4-period window (not configurable)
References
TradingView: ta.swma()