ma
forge.tafunctionSince Forge API 1
Functionpython
forge.ta.ma(source: ArrayLike,period: int = 14,method: str = 'sma') -> np.ndarrayThe moving average named by method: one of sma, ema, smma, lwma, wma, hma, dema, tema.
Parameters
| Name | Type | Default |
|---|---|---|
| source | ArrayLike | |
| period | int | 14 |
| method | str | 'sma' |
Classpython
forge.ta.MA(**inputs: Any) -> NoneAny of the eight moving averages, chosen by name.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | close | |
| period | int | 14 | 1 to 5000 |
| method | ma_method | sma |
MA = the average named by method: sma, ema, smma, lwma, wma, hma, dema or tema.
Each one follows its own formula and warm-up.