{均线系统}
MA3:MA(CLOSE,3);
MA5:MA(CLOSE,5);
MA13:MA(CLOSE,13);
MA30:MA(CLOSE,30);
{通用条件}
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.8),NODRAW;{实际给1.8倍}
倍量柱:VOL>REF(VOL,1)*1.8,NODRAW,COLORWHITE;
{高量柱}
高量柱1:=REF(VOL,3)>0.25*(REF(SUM(VOL,3),4)+SUM(VOL,3)) AND REF(VOL,3)>REF(VOL,4) AND REF(VOL,3)>REF(VOL,2),NODRAW,COLORWHITE;{1.5/6,1.5倍}
TEMP1:=BACKSET(高量柱1,4);
高量柱:FILTER(TEMP1,3),NODRAW,COLORWHITE;
{平量柱}
平量柱1:=REF(VOL,3)>REF(VOL,2)*0.97 AND REF(VOL,3)<REF(VOL,2)*1.03 AND REF(VOL,3)>=1.5*REF(VOL,4),NODRAW,COLORWHITE;{平量柱取前一K线,到底是取前还是取后,你自己选}
TEMP2:=BACKSET(平量柱1,4);
平量柱:FILTER(TEMP2,3),NODRAW,COLORWHITE;
{梯量柱}
梯量柱1:=REF(VOL,3)>REF(VOL,4) AND REF(VOL,4)>REF(VOL,5) AND REF(CLOSE,3)>=REF(CLOSE,4) AND REF(CLOSE,4)>=REF(CLOSE,5),NODRAW,COLORWHITE;{虽然是梯量柱,但也不能太小}
梯量柱:VOL>REF(VOL,1) AND REF(VOL,1)>=REF(VOL,2) AND CLOSE>REF(CLOSE,1),NODRAW,COLORWHITE;
{将军柱}
将军柱1:=上涨 AND 未跌破 AND (倍量柱1 OR 高量柱1 OR 平量柱1 OR 梯量柱1),NODRAW,COLORYELLOW;
{黄金柱}
黄金柱1:=将军柱1 AND 缩量,NODRAW,COLORYELLOW;
{标准黄金柱}
标准黄金柱1:=黄金柱1 AND 逐级缩量 AND 逐级价升,NODRAW,COLORRED;
将军柱2:=将军柱1 AND 黄金柱1=0 AND BARSLAST(REF(将军柱1,1))>1;
黄金柱2:=黄金柱1 AND 标准黄金柱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;
标准黄金柱2:=BACKSET(标准黄金柱1,4);
标准黄金柱:FILTER(标准黄金柱2,3),NODRAW,COLORRED;
{输出,规则是连续都满足条件则取第一个}
DRAWICON(LAST3K AND 将军柱,HIGH*1.01,24),COLORRED;
DRAWICON(LAST3K AND 标准黄金柱,HIGH*1.01,26),COLORRED;
DRAWICON(LAST3K AND 黄金柱,HIGH*1.01,25),COLORRED; |