trading.indicators.calculations.wilder_average
trading.indicators.calculations.wilder_average
WilderAverage
WilderAverage(period: days)
Bases: Indicator[float | None]
Wilder's Moving Average (RMA).
Initializes WilderAverage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
days
|
Lookback period to derive the smoothing factor. Larger values -> slower to react to price changes. |
required |
Source code in src\contango\trading\indicators\calculations\wilder_average.py
32 33 34 35 36 37 38 39 40 41 42 | |
update
update(price: USD) -> float | None
Takes in a new value and return smoothed result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
price
|
USD
|
The price for the current bar. |
required |
Returns:
| Type | Description |
|---|---|
float | None
|
The current WilderAverage. Returns None if period amount of days have not been reached. |
Source code in src\contango\trading\indicators\calculations\wilder_average.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |