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

贡献3个函数:量比,钱龙短线指标,钱龙长线指标 #23

Open
chorespore opened this issue Dec 6, 2021 · 1 comment
Open

Comments

@chorespore
Copy link

chorespore commented Dec 6, 2021

def QRR(VOL):  # 量比(Quantity Relative Ratio)
    return (VOL / MA(REF(VOL), 5)).values


def SHO(CLOSE, VOL, N=5):  # 钱龙短线指标(Short)
    VAR1 = MA((VOL - REF(VOL, 1)) / REF(VOL, 1), 5)
    VAR2 = (CLOSE - MA(CLOSE, 24)) / MA(CLOSE, 24) * 100
    SHT = VAR2 * (1 + VAR1)
    SHTMA = MA(SHT, N)
    return SHT, SHTMA


def LON(CLOSE, HIGH, LOW, VOL):  # 钱龙长线指标(Long)
    LC = REF(CLOSE, 1)
    VID = SUM(VOL, 2) / (((HHV(HIGH, 2) - LLV(LOW, 2))) * 100)
    RC = (CLOSE - LC) * VID
    LONG = SUM(RC, 0)
    DIFF = SMA(LONG, 10, 1)
    DEA = SMA(LONG, 20, 1)
    LON = DIFF - DEA
    LONMA = MA(LON, 10)
    return LON, LONMA
@chorespore chorespore changed the title 贡献两个函数:动量指标及钱龙短线指标 贡献两个函数:量比及钱龙短线指标 Dec 6, 2021
@chorespore chorespore changed the title 贡献两个函数:量比及钱龙短线指标 贡献3个函数:量比,钱龙短线指标,钱龙长线指标 Dec 6, 2021
@mpquant
Copy link
Owner

mpquant commented Dec 6, 2021

感谢分享!

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

2 participants