Skip to content

Commit 7b10a7c

Browse files
committed
docs: say matype arguments take MA_Type values
Refs #77.
1 parent e499f3f commit 7b10a7c

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎docs/func.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ from talib import MA_Type
3535
upper, middle, lower = talib.BBANDS(close, matype=MA_Type.T3)
3636
```
3737

38+
Every `matype` argument (for example `STOCH`'s `slowk_matype` and
39+
`slowd_matype`) takes an `MA_Type` value. The integer defaults shown in the
40+
function docs are those values: `0` is `MA_Type.SMA`, and `MA_Type[n]` names
41+
value `n`.
42+
3843
Calculating momentum of the close prices, with a time period of 5:
3944

4045
```python

‎docs/func_groups/momentum_indicators.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ smi, smisignal = SMI(high, low, close, timeperiod=13, fastperiod=2, slowperiod=2
193193
```
194194

195195
### STOCH - Stochastic
196+
NOTE: `slowk_matype` and `slowd_matype` take an `MA_Type` value. See [STOCH](https://ta-lib.org/functions/stoch) for the formula.
196197
```python
197198
slowk, slowd = STOCH(high, low, close, fastk_period=5, slowk_period=3, slowk_matype=0, slowd_period=3, slowd_matype=0)
198199
```

0 commit comments

Comments
 (0)