Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/func.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/func_groups/momentum_indicators.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand Down
Loading