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

Function WR

MyTT.py:100–103  ·  view source on GitHub ↗
(CLOSE, HIGH, LOW, N=10, N1=6)

Source from the content-addressed store, hash-verified

98 return RD(SMA(MAX(DIF,0), N) / SMA(ABS(DIF), N) * 100)
99
100def WR(CLOSE, HIGH, LOW, N=10, N1=6): #W&R 威廉指标
101 WR = (HHV(HIGH, N) - CLOSE) / (HHV(HIGH, N) - LLV(LOW, N)) * 100
102 WR1 = (HHV(HIGH, N1) - CLOSE) / (HHV(HIGH, N1) - LLV(LOW, N1)) * 100
103 return RD(WR), RD(WR1)
104
105def BIAS(CLOSE,L1=6, L2=12, L3=24): # BIAS乖离率
106 BIAS1 = (CLOSE - MA(CLOSE, L1)) / MA(CLOSE, L1) * 100

Callers

nothing calls this directly

Calls 3

HHVFunction · 0.85
LLVFunction · 0.85
RDFunction · 0.85

Tested by

no test coverage detected