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

Function CCI

MyTT.py:122–124  ·  view source on GitHub ↗
(CLOSE,HIGH,LOW,N=14)

Source from the content-addressed store, hash-verified

120 return RD(PSY),RD(PSYMA)
121
122def CCI(CLOSE,HIGH,LOW,N=14):
123 TP=(HIGH+LOW+CLOSE)/3
124 return (TP-MA(TP,N))/(0.015*AVEDEV(TP,N))
125
126def ATR(CLOSE,HIGH,LOW, N=20): #真实波动N日平均值
127 TR = MAX(MAX((HIGH - LOW), ABS(REF(CLOSE, 1) - HIGH)), ABS(REF(CLOSE, 1) - LOW))

Callers

nothing calls this directly

Calls 2

MAFunction · 0.85
AVEDEVFunction · 0.85

Tested by

no test coverage detected