wilderma
Wilder Moving Average (EMA with α = 1/N)
wilderma(source, periods)
Parameters
Wilder Moving Average - wilderma(source, periods)
A variant of the Exponential Moving Average using α = 1/N instead of 2/(N+1).
Provides smoother averaging than standard EMA, commonly used in RSI and ATR.
- source (source): Data series to calculate Wilder MA on - price field (close, open, high, low) or indicator output
- periods (int): Number of periods for the moving average
- Common values: 14 (standard for RSI/ATR), 20
Formula
Wilder MA = EMA with α = 1/N
Where:
- α = smoothing factor = 1/periods
- Standard EMA uses α = 2/(periods+1)
- Wilder's is smoother than standard EMA
Examples
wilderma(close, 14); # 14-period Wilder MA (used in RSI)
wilderma(close, 20); # 20-period Wilder MA
x = wilderma(close, 14); close > x; # Price above Wilder MA
Returns
Wilder moving average value