添加小周期勾选
This commit is contained in:
+2
-2
@@ -288,11 +288,11 @@ def add_indicators(df):
|
||||
df['bb_middle'] = bb['middleband'].fillna(0)
|
||||
df['bb_lower'] = bb['lowerband'].fillna(0)
|
||||
bb30 = ta.BBANDS(df, timeperiod=41, nbdevup=2.3, nbdevdn=2.3, matype=0)
|
||||
bb30 = ta.BBANDS(df, timeperiod=20, nbdevup=2.0, nbdevdn=2.0, matype=0)
|
||||
#bb30 = ta.BBANDS(df, timeperiod=20, nbdevup=2.0, nbdevdn=2.0, matype=0)
|
||||
df['bbup30'] = bb30['upperband'].fillna(0)
|
||||
df['bblow30'] = bb30['lowerband'].fillna(0)
|
||||
bb302 = ta.BBANDS(df, timeperiod=41, nbdevup=2.0, nbdevdn=2.0, matype=0)
|
||||
bb302 = ta.BBANDS(df, timeperiod=20, nbdevup=2.0, nbdevdn=2.0, matype=0)
|
||||
#bb302 = ta.BBANDS(df, timeperiod=20, nbdevup=2.0, nbdevdn=2.0, matype=0)
|
||||
df['bbup302'] = bb302['upperband'].fillna(0)
|
||||
df['bblow302'] = bb302['lowerband'].fillna(0)
|
||||
# 计算次周期布林带 (14周期,2标准差)
|
||||
|
||||
Reference in New Issue
Block a user