TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
XD:=CROSS(CCI,3);
STICKLINE(XD,L*0.99,L*0.97,3,0),LINETHICK1,COLORRED;
STICKLINE(XD,L*0.99,L*0.97,1,0),LINETHICK1,COLORYELLOW;
XG:=((HIGH+LOW+CLOSE)/3-MA((HIGH+LOW+CLOSE)/3,14))/(0.015*AVEDEV((HIGH+LOW+CLOSE)/3,14)),COLORRED,LINETHICK0;
CD1:=IF(REF(XG,1)<-99 AND XG>-98,1,0);
CD2:=IF(REF(CD1,1)=1 AND XG>-50,1,0);
CD3:=IF(REF(CD1,2)=1 AND XG>-50 AND REF(XG,1)>-50,1,0);
CD4:=IF(REF(CD1,3)=1 AND XG>-50 AND REF(XG,1)>-50,1,0);
CD5:=IF(REF(CD1,4)=1 AND XG>-50 AND REF(XG,1)>-50 AND REF(XG,2)>-50,1,0);
STICKLINE(CD2,L*0.99,L*0.97,3,0),LINETHICK1,COLORRED;
STICKLINE(CD3,L*0.99,L*0.97,3,0),LINETHICK1,COLORRED;
STICKLINE(CD3,L*0.99,L*0.97,1,0),LINETHICK1,COLORYELLOW;
STICKLINE(CD4,L*0.99,L*0.97,3,0),LINETHICK1,COLORRED;
STICKLINE(CD5,L*0.99,L*0.97,3,0),LINETHICK1,COLORRED;
STICKLINE(CD5,L*0.99,L*0.97,1,0),LINETHICK1,COLORYELLOW;
DRAWTEXT(CROSS(-100,CCI) AND CCI<REF(CCI,1),L,'■===股价上线同时CCI大于0方可买入==='),COLORWHITE;
DRAWTEXT(CROSS(200,CCI) AND CCI<REF(CCI,1),L,'◆■■■强势反转,破位止盈■■■'),COLORYELLOW;
DRAWTEXT(CROSS(100,CCI) AND CCI<REF(CCI,1),L,'◢分批卖◣'),COLORGREEN;
再送[能量评台]请配合成交量使用
{能量评台,N缺省值55}
PE:=VOL*ABS((C-REF(C,1))/REF(C,1));
PEP:=IF(PE<REF(PE,1) AND REF(PE,1)>REF(PE,2),REF(PE,1),DRAWNULL);
XD1:=BARSLAST(PEP=CONST(FINDHIGH(PEP,1,N,1)));
EP1:IF(CURRBARSCOUNT<=N+2,CONST(REF(C,XD1+1)),DRAWNULL),COLOR4171FE;
IF(CURRBARSCOUNT=CONST(XD1+1+1),EP1,DRAWNULL),CIRCLEDOT,COLOR4171FE;
DRAWTEXT(CURRBARSCOUNT=5,EP1,'EP1'),COLOR4171FE;
XD2:=BARSLAST(PEP=CONST(FINDHIGH(PEP,1,N,2)));
EP2:IF(CURRBARSCOUNT<=N+2,CONST(REF(C,XD2+1)),DRAWNULL),COLOR00ECEC;
IF(CURRBARSCOUNT=CONST(XD2+1+1),EP2,DRAWNULL),CIRCLEDOT,COLOR00ECEC;
DRAWTEXT(CURRBARSCOUNT=5,EP2,'EP2'),COLOR00ECEC;
XD3:=BARSLAST(PEP=CONST(FINDHIGH(PEP,1,N,3)));
EP3:IF(CURRBARSCOUNT<=N+2,CONST(REF(C,XD3+1)),DRAWNULL),COLORFEFEFE;
IF(CURRBARSCOUNT=CONST(XD3+1+1),EP3,DRAWNULL),CIRCLEDOT,COLORFEFEFE;
DRAWTEXT(CURRBARSCOUNT=5,EP3,'EP3'),COLORFEFEFE; |