mirror of
https://github.com/wassname/pandas-ta.git
synced 2026-09-10 12:23:49 +08:00
Merge branch 'pr/78' into development
This commit is contained in:
@@ -18,7 +18,7 @@ def supertrend(high, low, close, length=None, multiplier=None, offset=None, **kw
|
||||
|
||||
# Calculate Results
|
||||
m = close.size
|
||||
dir_, trend = [0] * m, [0] * m
|
||||
dir_, trend = [1] * m, [0] * m
|
||||
long, short = [npNaN] * m, [npNaN] * m
|
||||
|
||||
hl2_ = hl2(high, low)
|
||||
@@ -82,7 +82,9 @@ Sources:
|
||||
Calculation:
|
||||
Default Inputs:
|
||||
length=7, multiplier=3.0
|
||||
|
||||
Default Direction:
|
||||
Set to +1 or bullish trend at start
|
||||
|
||||
MID = multiplier * ATR
|
||||
LOWERBAND = HL2 - MID
|
||||
UPPERBAND = HL2 + MID
|
||||
|
||||
@@ -68,8 +68,8 @@ Args:
|
||||
high (pd.Series): Series of 'high's
|
||||
low (pd.Series): Series of 'low's
|
||||
close (pd.Series): Series of 'close's
|
||||
open (pd.Series): Series of 'open's
|
||||
volume (pd.Series): Series of 'volume's
|
||||
open (pd.Series): Series of 'open's. Default: None
|
||||
length (int): The short period. Default: 20
|
||||
offset (int): How many periods to offset the result. Default: 0
|
||||
|
||||
@@ -79,4 +79,4 @@ Kwargs:
|
||||
|
||||
Returns:
|
||||
pd.Series: New feature generated.
|
||||
"""
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user