去除macd hist的保留2位小数,例如ADA的hist值太小,四舍五入没有区分度

This commit is contained in:
2025-10-19 11:15:35 +08:00
parent 643c99341e
commit bcfffe4181

View File

@@ -93,7 +93,7 @@ def add_macd(
df["DIF"] = macd
df["DEA"] = signal
macd_name = f"MACD_{fastperiod}_{slowperiod}_{signalperiod}"
df[macd_name] = np.round(hist * 2, 2)
df[macd_name] = hist * 2
macd_chart = chart.create_subchart(
position=position, width=1, height=height, sync=True
)