通达信指标:仓位与风险
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
ZJ:=(O+H+L+C)/4;
YZ:=IF(BARSCOUNT(C) 60,VOL/SUM(VOL,60),VOL/SUM(VOL,BARSCOUNT(C)));
CYC50:=DMA(ZJ,YZ/0.50);
CYC0:=DMA(ZJ,YZ);
KPXS:=(CYC50/CYC0-1)*100;
KP:=IF(KPXS 0,85,IF(KPXS =0 AND KPXS 5,60,IF(KPXS =5 AND KPXS 15,35,IF(KPXS =15,15,90))));
风险:(K+KP)/2;
仓位:100-风险;