MCPcopy Create free account
hub / github.com/mpquant/Ashare / EVERY

Function EVERY

MyTT.py:59–61  ·  view source on GitHub ↗
(S_BOOL, N)

Source from the content-addressed store, hash-verified

57 return SUM(S_BOOL,N)
58
59def EVERY(S_BOOL, N): # EVERY(CLOSE>O, 5) 最近N天是否都是True
60 R=SUM(S_BOOL, N)
61 return IF(R==N, True, False)
62
63def LAST(S_BOOL, A, B): #从前A日到前B日一直满足S_BOOL条件
64 if A<B: A=B #要求A>B 例:LAST(CLOSE>OPEN,5,3) 5天前到3天前是否都收阳线

Callers

nothing calls this directly

Calls 2

SUMFunction · 0.85
IFFunction · 0.85

Tested by

no test coverage detected