ma

forge.tafunctionSince Forge API 1
Functionpython
forge.ta.ma(source: ArrayLike,period: int = 14,method: str = 'sma') -> np.ndarray

The moving average named by method: one of sma, ema, smma, lwma, wma, hma, dema, tema.

Parameters

NameTypeDefault
sourceArrayLike
periodint14
methodstr'sma'

Indicator: Moving average

Classpython
forge.ta.MA(**inputs: Any) -> None

Any of the eight moving averages, chosen by name.

Inputs

NameTypeDefaultRange
sourcesourceclose
periodint141 to 5000
methodma_methodsma

MA = the average named by method: sma, ema, smma, lwma, wma, hma, dema or tema.

Each one follows its own formula and warm-up.