贡献3个函数:量比,钱龙短线指标,钱龙长线指标
chorespore opened this issue · comments
chorespore commented
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
dev commented
感谢分享!