From 7fe2633c6ea25de3e4b0d3fcbe92a900e7f72b69 Mon Sep 17 00:00:00 2001 From: mario4tier Date: Thu, 22 Oct 2026 20:29:18 -0400 Subject: [PATCH] docs: say matype arguments take MA_Type values Refs #77. --- docs/func.md | 5 +++++ docs/func_groups/momentum_indicators.md | 1 + 2 files changed, 6 insertions(+) diff --git a/docs/func.md b/docs/func.md index 0e25d7bda..6ddd985b5 100644 --- a/docs/func.md +++ b/docs/func.md @@ -35,6 +35,11 @@ from talib import MA_Type upper, middle, lower = talib.BBANDS(close, matype=MA_Type.T3) ``` +Every `matype` argument (for example `STOCH`'s `slowk_matype` and +`slowd_matype`) takes an `MA_Type` value. The integer defaults shown in the +function docs are those values: `0` is `MA_Type.SMA`, and `MA_Type[n]` names +value `n`. + Calculating momentum of the close prices, with a time period of 5: ```python diff --git a/docs/func_groups/momentum_indicators.md b/docs/func_groups/momentum_indicators.md index 7db9fac82..adb48718f 100644 --- a/docs/func_groups/momentum_indicators.md +++ b/docs/func_groups/momentum_indicators.md @@ -193,6 +193,7 @@ smi, smisignal = SMI(high, low, close, timeperiod=13, fastperiod=2, slowperiod=2 ``` ### STOCH - Stochastic +NOTE: `slowk_matype` and `slowd_matype` take an `MA_Type` value. See [STOCH](https://ta-lib.org/functions/stoch) for the formula. ```python slowk, slowd = STOCH(high, low, close, fastk_period=5, slowk_period=3, slowk_matype=0, slowd_period=3, slowd_matype=0) ```