Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOLL 指标与主流行情软件如东方财富,算出来的不一样 #52

Open
gongwlin opened this issue Sep 24, 2023 · 2 comments
Open

Comments

@gongwlin
Copy link

BOLL 指标与主流行情软件如东方财富,算出来的不一样,数值相差3左右

@nanasemaik
Copy link

BOLL 指标与主流行情软件如东方财富,算出来的不一样,数值相差3左右

嗯,请问有没有解决了?

@Wa-JHH
Copy link

Wa-JHH commented Nov 30, 2024

同样是算出来和行情软件对不上, 目前检查过5、60条K线的CLOSE价,都和行情软件是一样的,但算出来的就是不一致

补充更新,刚才用gemini,然后使用了以下的代码,算出来的就和同花顺一致了

def BOLL(self, CLOSE, N=20, P=2): 
        # 计算中轨线(MA)
        MA = CLOSE.rolling(window=N).mean()

        # 计算标准差
        STD = CLOSE.rolling(window=N).std()

        # 计算上轨线和下轨线
        UPPER = MA + (P * STD)
        LOWER = MA - (P * STD)

        return UPPER, MA, LOWER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants