MCPcopy Index your code
hub / github.com/mpquant/Ashare / EXIST

Function EXIST

MyTT.py:67–69  ·  view source on GitHub ↗
(S_BOOL, N=5)

Source from the content-addressed store, hash-verified

65 return S_BOOL[-A:-B].sum()==(A-B) #返回单个布尔值
66
67def EXIST(S_BOOL, N=5): # EXIST(CLOSE>3010, N=5) n日内是否存在一天大于3000点
68 R=SUM(S_BOOL,N)
69 return IF(R>0, True ,False)
70
71def BARSLAST(S_BOOL): #上一次条件成立到当前的周期
72 M=np.argwhere(S_BOOL); # BARSLAST(CLOSE/REF(CLOSE)>=1.1) 上一次涨停到今天的天数

Callers

nothing calls this directly

Calls 2

SUMFunction · 0.85
IFFunction · 0.85

Tested by

no test coverage detected