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;

//以下为主动攻击

r0:=((IF(ISNULL(ZDMR[-1]),0,ZDMR)+IF(ISNULL(BDMR[-1]),0,BDMR))-(IF(ISNULL(ZDMC[-1]),0,ZDMC)+IF(ISNULL(BDMC[-1]),0,BDMC)))/SHGZG*100;

MA5:=MA(r0,5);

中位线:=1.75;

最小值:=LLV(LOW,10);

最大值:=HHV(HIGH,25);

波动线:=EMA((CLOSE-最小值)/(最大值-最小值)*4,4);

平均线:=EMA(波动线,3);

//以下为红绿参考

PARTLINE(0,平均线>=REF(平均线,1),colorred,平均线<REF(平均线,1),colorgreen),LINETHICK8;

主力动能:=MA(r0,5);

主力攻击:=r0-(ABS(REF(r0,1))+ABS(REF(r0,2))+ABS(REF(r0,3))+ABS(REF(r0,4))+ABS(REF(r0,5))/2)>0 AND 平均线>=REF(平均线,1) AND REF(平均线,1)<REF(平均线,2);

主力撤退:=-((r0+(ABS(REF(r0,1))+ABS(REF(r0,2))+ABS(REF(r0,3))+ABS(REF(r0,4))+ABS(REF(r0,5))/2)<0) AND 平均线<=REF(平均线,1) AND REF(平均线,1)>REF(平均线,2));

DRAWTEXT(主力攻击>0,5," 主力攻击"),colorred;

DRAWTEXT(主力撤退<0,5," 主力撤退"),colorgreen;

STICKLINE(主力攻击>0,0,8,1,0),colorred,LINETHICK5;

STICKLINE(主力撤退<0,0,8,1,0),colorgreen,LINETHICK5;

//ZLDX买入条件;

BB1:=IF(GG>=REF(GG,1),1,0) ;//ZLDX为红;

BB2:=IF(CROSS(C1,ZLDX),1,0);//金叉 公式指标网 www.gszb.com

//BB3:=IF((ZLDX-REF(ZLDX,1))>(REF(ZLDX,1)-REF(ZLDX,1)),1,0);//ZLDX增加;

SIGNALBUY=(BB1=1 AND BB2=1);

X=(SIGNALBUY AND COUNT(SIGNALBUY,2)=1);

DRAWICON(X,ZLDX,"buy");

//卖出条件;

SS1:=IF(GG<REF(GG,1),1,0) ;//ZLDX为红;

SS2:=IF((ZLDX-REF(ZLDX,1))<(REF(ZLDX,1)-REF(ZLDX,1)),1,0);//ZLDX增加;

SIGNALSELL=(SS1=1 OR SS2=1);

Y=(SIGNALSELL AND COUNT(SIGNALSELL,2)=1);

DRAWICON(Y,C1+1,"SELL");
 

 


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。