ma
Syntax
ma(X, window, maType)
Please see TALib for the parameters and windowing logic.
Details
Calculate the moving average (whose type is determined by maType) in a sliding window of the given length.
Differences from TA-Lib
MA: - DolphinDB ma does not currently support MAMA.
- Missing-value handling differs: DolphinDB
maand TA-LibMAbehave similarly for leading missing values by preserving them and starting the window calculation from the first non-missing value. However, they differ when missing values appear in the middle of the series. DolphinDBmatypically continues the moving average calculation according to its rules and produces results, whereas some TA-Lib indicators may start returning NaN from the first NaN encountered after the initial non-missing value, which can also affect subsequent results.
Parameters
Returns
A DOUBLE vector.
