1、红线+红柱,持股;
红线+蓝柱,离场;
2、原则上绿线空仓:
绿线+红柱,观望;
绿线+蓝柱,离场;
但绿线向上,且白线并未下穿绿线,仍然持股;
3、股价上涨,但红柱并未随着增长,动向线由向上趋势而走平甚至向下,后市看跌;
股价创新高,而红柱消失,立即清仓;
4、股价下跌,但红柱增长,动向线由向下趋势而走平甚至向上,后市看涨;
股价创新低而蓝柱消失,立即全仓。
C1:10000*C/INDEXC;
O1:=10000*O/INDEXO;
ZLDX:=MA(C1,5);
STICKLINE(C1>=O1 AND C1>ZLDX,C1,ZLDX,1,0),colorred;
STICKLINE(C1<O1 AND C1<=ZLDX ,ZLDX,C1,1,0),colorcyan;
V1:=(2*C+H+L+O)/5;
V2:=LLV(L,21);
V3:=HHV(H,21);
GG:=EMA((V1-V2)/(V3-V2),5);
{PARTLINE(ZLDX,GG>=REF(GG,1),RGB(255,0,0),GG<=REF(GG,1),RGB(0,255,0)),LINETHICK3;};
IF(GG>=REF(GG,1),ZLDX,DRAWNULL),colorred,LINETHICK1;
IF(GG<REF(GG,1),ZLDX,DRAWNULL),colorgreen,LINETHICK1;
//买入条件;
BB1:=IF(GG>=REF(GG,1),1,0) ;//ZLDX为红;
BB2:=IF(CROSS(C1,ZLDX),1,0);//金叉;
BB3:=IF((ZLDX-REF(ZLDX,1))>(REF(ZLDX,1)-REF(ZLDX,1)),1,0);//ZLDX增加;
SIGNALBUY=(BB1=1 AND BB2=1 AND BB3);
X=(SIGNALBUY AND COUNT(SIGNALBUY,3)=1);
DRAWICON(X,ZLDX,"buy");