Skip to content

Commit 61bb65e

Browse files
committed
README.md: more examples about ma
1 parent 29b6438 commit 61bb65e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

docs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,9 @@ Advanced usage
498498
```py
499499
# The 5-period moving average for the upper bollinger band
500500
stock['ma:5,(boll.upper:21,2)']
501+
502+
# The change rate of the series above ↑
503+
stock['change:(ma:5,(boll.upper:21,2))']
501504
```
502505

503506
### `ema`, Exponential Moving Average

test/test_basic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ def test_ma(stock):
106106

107107
assert mama2.iloc[-1] == (ma2[-1] + ma2[-2]) / 2
108108

109+
stock['change:(ma:5,(boll.upper:21,2))']
110+
109111

110112
COMMANDS = [
111113
'ma:{}',

0 commit comments

Comments
 (0)