P:=21;
WH1:=IF(L=LLV(L,P),L,DRAWNULL);
WH2:=CONST(BARSLAST(WH1!=DRAWNULL));
WH3:=CONST(IF(WH2=0,H,REF(H,WH2)));
WH4:=CONST(REF(BARSLAST(H>WH3),WH2+1)+WH2+1);
WH5:=CONST(IF(WH4=0,H,REF(H,WH4)));
WH6:=CONST(REF(BARSLAST(H>WH5),WH4+1)+WH4+1);
建仓:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH6=0,H,REF(H,WH6))),DRAWNULL),COLORRED;
IF(CURRBARSCOUNT<=WH2+1,IF(L=LLV(L,P),L,DRAWNULL),DRAWNULL),CIRCLEDOT,COLORRED;
DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),建仓,'建仓线'),COLORRED;
超跌建仓:IF(CURRBARSCOUNT<=WH2+21,CONST(IF(WH4=0,H,REF(H,WH4))),DRAWNULL),COLORCB21BE;
DRAWTEXT(CURRBARSCOUNT=INTPART((WH2+21)*0.618),超跌建仓,'超跌建仓线'),COLORCB21BE;
H1:=IF(H=HHV(H,P),H,DRAWNULL);
H2:=CONST(BARSLAST(H1!=DRAWNULL));
H3:=CONST(IF(H2=0,L,REF(L,H2)));
H4:=CONST(REF(BARSLAST(L<H3),H2+1)+H2+1);
H5:=CONST(IF(H4=0,L,REF(L,H4)));
H6:=CONST(REF(BARSLAST(L<H5),H4+1)+H4+1);
止损:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H6=0,L,REF(L,H6))),DRAWNULL),COLORYELLOW;
IF(CURRBARSCOUNT<=H2+1,IF(H=HHV(H,P),H,DRAWNULL),DRAWNULL),CIRCLEDOT,COLORBLUE;
DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),止损,'止损线'),COLORYELLOW;
止盈:IF(CURRBARSCOUNT<=H2+21,CONST(IF(H4=0,L,REF(L,H4))),DRAWNULL),COLORCB21BE;
DRAWTEXT(CURRBARSCOUNT=INTPART((H2+21)*0.618),止盈,'止盈线'),COLORCB21BE;
V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
V2:=(1-7/100)*(DMA(CLOSE,V1));
V3:=(1+7/100)*(DMA(CLOSE,V1));
V5:=MA((LOW+HIGH+CLOSE)/3,5);
箱体支撑:REFDATE(V2,DATE),POINTDOT,LINETHICK3,COLORCC66FF;
箱体阻力:REFDATE(V3,DATE),POINTDOT,LINETHICK3,COLORGREEN;
本文来自: 股海明灯论坛 详细文章参考:http://www.178448.com/thread-445156-1-1.html
|