红色表示上升趋势,可重仓持有;绿色表示下跌趋势,宜空仓观望;灰色表示上升趋势可能发生反转,宜减轻仓位以防范风险;粉色表示下跌趋势可能发生反转,宜轻仓试探把握机会;
资金流出:=-ZJLC[-1];
资金流入:=ZJLR[-1];
r:=资金流出+资金流入;
avgprice:=(H+L+2*C);
yg1:=IF(avgprice>REF(avgprice,1) AND VOL>REF(VOL,1) AND r>0,4,0);
yg2:=IF(avgprice>REF(avgprice,1) AND VOL<REF(VOL,1) AND r>0,2,0);
yg3:=IF(avgprice<REF(avgprice,1) AND VOL<REF(VOL,1) AND r<0,-2,0);
yg4:=IF(avgprice<REF(avgprice,1) AND VOL>REF(VOL,1) AND r<0,-4,0);
yg:=yg1+yg2+yg3+yg4;
zhpf:0.5*SMA(yg,3,1)+0.31*MA(yg,5,1)+0.19*SMA(yg,8,1);
STICKLINE(zhpf>REF(zhpf,1) AND zhpf>0,0,zhpf,8),color0000ff;
STICKLINE(zhpf<REF(zhpf,1) AND zhpf<0,0,zhpf,8),color00ff00;
STICKLINE(zhpf>REF(zhpf,1) AND zhpf<0,0,zhpf,8),colorlired;
STICKLINE(zhpf<REF(zhpf,1) AND zhpf>0,0,zhpf,8),colorgray;