波段王主图
2016-11-4 17:14:31点击:
红色K线上升趋势,黄色K线震荡趋势,蓝色K线下跌趋势,当买点出现时,可能出现一波主升浪
//条件设定
MA5:MA(C,5),COLORFFFFFF,LINETHICK1;
MA13:MA(C,13),COLOR4080FF,LINETHICK1;
MA21:MA(C,21),COLORFF80FF,LINETHICK2;
MA55:IF(PERIODNAME=='月线' OR PERIODNAME=='季线' OR PERIODNAME=='年线' OR BARPOS<55,MA21,MA(C,55)),colorcyan,LINETHICK2;
MA233:=MA(C,233),colorgreen,LINETHICK2;
角5:ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416,nodraw,colorwhite;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
//布林
MID:=MA21;
上:MID+2*STD(CLOSE,21),colorgreen,DOTLINE;
下:MID-2*STD(CLOSE,21),colorred,DOTLINE;
今差:=上-下;
昨差:=REF(上,1)-REF(下,1);
开口:(今差-昨差)/昨差*100,nodraw,colorwhite;
宽度:(上-下)/MID*100,nodraw,colorgreen;
//趋势判断
涨:=C>MA21 AND 开口>0 AND 角5>0;
跌:=C<MA21 AND 开口>0 AND 角5<0;
震荡:=涨=0 AND 跌=0;
//画三色K线图
STICKLINE(涨=1,H,L,0,0),colorred;
STICKLINE(涨=1 AND C>=O,C,O,10,1),colorred;
STICKLINE(涨=1 AND C<O,C,O,10,0),colorred;
STICKLINE(跌=1,H,L,0,0),COLORFF6400;
STICKLINE(跌=1 AND C>=O,C,O,10,1),COLORFF6400;
STICKLINE(跌=1 AND C<O,C,O,10,0),COLORFF6400;
STICKLINE(震荡=1,H,L,0,0),coloryellow;
STICKLINE(震荡=1 AND C>=O,C,O,10,1),coloryellow;
STICKLINE(震荡=1 AND C<O,C,O,10,0),coloryellow;
新高:=H=HHV(H,10);
CCI新高:=HHV(CCI,2)=HHV(CCI,3);
B1:=角5>0 AND 新高 AND C>MA21 AND CCI新高 AND 开口>-7;
B:=B1 AND COUNT(B1,5)=1;
DRAWICON(B,L,1);
压力位:=IF(B,MAX(REF(HHV(H,9),1),MA21),NULL);
STICKLINE(压力位,压力位,压力位,40,1),colorcyan;
介入价:=MAX(REF(HHV(H,9),1),MA21);
DRAWTEXT_FIX(ISLASTBAR AND B,0.8,0.2,0,'介入价位 -->'),colorred;
DRAWNUMBER_FIX(ISLASTBAR AND B,0.85,0.2,0,TOSTRING(介入价,2)),colorcyan;
DRAWTEXT_FIX(ISLASTBAR AND B,0.8,0.25,0,'突破幅度 -->'),colorred;
DRAWNUMBER_FIX(ISLASTBAR AND B,0.85,0.25,0,TOSTRING((C-介入价)/REF(C,1)*100,2)),colorcyan;
- 上一篇:通达信旺财主图源码 2016/11/5
- 下一篇:九转系列 趋势指标,大盘背离抄底逃顶 2016/11/4