MACD使用标准参数

This commit is contained in:
jackyu66git
2025-08-10 19:55:26 +08:00
parent 05942fed8e
commit 285f62f1ab
15 changed files with 1281 additions and 39 deletions
+3 -3
View File
@@ -1130,9 +1130,9 @@ class ChanLun():
def get_decimal(self, value):
return Decimal("{:.2f}".format(value))
def add_indicators(self, df):
fast = 8
slow = 16
period = 6
fast = 12
slow = 26
period = 9
macd = ta.MACD(df, fastperiod=fast, slowperiod=slow, signalperiod=period)
bb365 = ta.BBANDS(df, timeperiod=365, nbdevup=3.0, nbdevdn=3.0, matype=0)
bbp365 = ta.BBP(df, timeperiod=365)