通达信威廉加心理线,根据谦班指标而成副图源码
N:=14;
均价:=(2*C+(H-L)/2+L)/3;
价差:=SUM(均价-REF(均价,1),2)/2;
高低:=(均价+价差);
实价:=(高低+均价)/2;
aa:=ema(((SLOPE(实价,N)*20)+实价),N*3);
bb:=ema(((SLOPE(均价,N)*20)+均价),N*3);
多空线:=(AA+bb)/2;{公式在线提供:www.xg51.cn}
市场心理:COUNT(C>多空线,n)/n*100,COLORWHITE,LINETHICK2;
威廉波段:(HHV(HIGH,63)-CLOSE)/(HHV(HIGH,63)-LLV(LOW,63))*100,COLOR00bb00,LINETHICK2;
风险1:IF(市场心理>95,市场心理+5,120),COLORLIMAGENTA,LINETHICK1;
底部1:IF(市场心理<5,市场心理-5,0),COLORBROWN,LINETHICK2;
STICKLINE(C>0,80,80,5,0),COLORWHITE;
STICKLINE(C>0,50,50,10,0),COLORRED;
STICKLINE(C>0,20,20,5,0),COLORWHITE;
风险2:IF(威廉波段<5,100,120),COLOR00FFFF,LINETHICK1;
底部2:IF(威廉波段>99,20,0),COLORAAAA00,LINETHICK2;
抄底:IF(crOSS(市场心理,7),25,0),COLORLIMAGENTA;
STICKLINE(C>0,99,99,5,0),COLORFF00FF;
STICKLINE(C>0,5,5,5,0),COLORFF00FF;