MA5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
MA20:MA(CLOSE,20);
MA60:MA(CLOSE,60);
MA120:MA(CLOSE,120);
{通用條件}
LAST3K:=CURRBARSCOUNT>4;
上漲:=REF(CLOSE,3)>REF(CLOSE,4);
未跌破:=REF(CLOSE,2)>REF(LOW,3) AND REF(CLOSE,1)>REF(LOW,3) AND CLOSE>REF(LOW,3);
縮量:=REF(VOL,3)>0.35*(REF(VOL,1)+REF(VOL,2)+VOL) AND REF(VOL,3)>REF(VOL,2);{1.05/3,5%}
逐級縮量:=REF(VOL,3)>=REF(VOL,2) AND REF(VOL,2)>=REF(VOL,1) AND REF(VOL,1)>=VOL;{平量也看成縮量}
逐級價升:=REF(CLOSE,3)<REF(CLOSE,2) AND REF(CLOSE,2)<=REF(CLOSE,1) AND REF(CLOSE,1)<=CLOSE;
{倍量}
倍量1:=(REF(VOL,3)>=REF(VOL,4)*1.91),NODRAW;{實(shí)際給1.91倍}
倍量:VOL>REF(VOL,1)*1.91,NODRAW,COLORWHITE;
{高量}
高量1:=REF(VOL,3)>REF(HHV(VOL,3),4) AND REF(VOL,3)>HHV(VOL,3),NODRAW,COLORWHITE;
TEMP1:=BACKSET(高量1,4);
高量:FILTER(TEMP1,3),NODRAW,COLORWHITE;
{將軍}
將軍1:=上漲 AND 未跌破 AND (倍量1 OR 高量1),NODRAW,COLORYELLOW;
{黃金}
黃金1:=將軍1 AND 縮量,NODRAW,COLORYELLOW;
{標(biāo)準(zhǔn)黃金}
標(biāo)準(zhǔn)黃金1:=黃金1 AND 逐級縮量 AND 逐級價升,NODRAW,COLORRED;
將軍2:=將軍1 AND 黃金1=0 AND BARSLAST(REF(將軍1,1))>1;
黃金2:=黃金1 AND 標(biāo)準(zhǔn)黃金1=0 AND BARSLAST(REF(將軍1,1))>1;
將軍3:=BACKSET(將軍2,4);
將軍:FILTER(將軍3,3),NODRAW,COLORWHITE;
黃金3:=BACKSET(黃金2,4);
黃金:FILTER(黃金3,3),NODRAW,COLORYELLOW;
標(biāo)準(zhǔn)黃金2:=BACKSET(標(biāo)準(zhǔn)黃金1,4);
標(biāo)準(zhǔn)黃金:FILTER(標(biāo)準(zhǔn)黃金2,3),NODRAW,COLORRED;
{輸出,規(guī)則是連續(xù)都滿足條件則取第一個}
DRAWICON(LAST3K AND 標(biāo)準(zhǔn)黃金,HIGH*1.01,26),COLORRED;
DRAWICON(LAST3K AND 黃金,HIGH*1.01,25),COLORRED;
DRAWICON(LAST3K AND 將軍,HIGH*1.01,24),COLORRED;
STICKLINE(C,REF(L,BARSLAST(標(biāo)準(zhǔn)黃金)),REF(L,BARSLAST(標(biāo)準(zhǔn)黃金)),2,0),COLORYELLOW;
STICKLINE(C,REF(L,BARSLAST(黃金)),REF(L,BARSLAST(黃金)),2,0),COLORYELLOW;
STICKLINE(C,REF(H,BARSLAST(黃金)),REF(H,BARSLAST(黃金)),2,0),COLORCYAN;
STICKLINE(LAST3K AND 黃金,O,C,0.5,0),COLORYELLOW;
STICKLINE(LAST3K AND 標(biāo)準(zhǔn)黃金,O,C,2,0),COLORYELLOW;
STICKLINE(LAST3K AND 將軍,O,C,3,0),COLORYELLOW;