在线检测未来函数

通达信冠军战神主图指标公式

来源:Internet,编辑:股旁网,2015-08-06

短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK1;
短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;
D90H:=EMA(短高H,90)-(EMA(短高H,90)-EMA(短低L,90))*0.2,COLORRED,LINETHICK1;
D90L:=EMA(短低L,90)+(EMA(短高H,90)-EMA(短低L,90))*0.2,COLORRED,LINETHICK1;
高0:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),LINETHICK1,COLORWHITE;
低0:=XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK1,COLORWHITE;
多头定位:=(高0+低0)/2>(D90H+D90L)/2;
空头定位:=(高0+低0)/2<(D90H+D90L)/2;
波段顶0:=(XMA(XMA(H,120),120)-XMA(XMA(L,120),120))*4+XMA(XMA(H,120),120),LINETHICK1,COLORRED;
波段底0:=XMA(XMA(L,120),120)-(XMA(XMA(H,120),120)-XMA(XMA(L,120),120))*4,LINETHICK1,COLORGREEN;
STICKLINE(多头定位=1,波段顶0,波段底0,5,0),COLOR001050;
STICKLINE(空头定位=1,波段顶0,波段底0,5,0),COLOR404050;
中中中:=((XMA(XMA(H,15),15)+XMA(XMA(H,20),20)+XMA(XMA(H,30),30)+XMA(XMA(H,40),40))/4+(XMA(XMA(L,15),15)+XMA(XMA(L,20),20)+XMA(XMA(L,30),30)+XMA(XMA(L,40),40))/4)/2,LINETHICK0,COLORGREEN;
EMA中中中:=EMA(中中中,10),LINETHICK0,COLORWHITE;
A:=(3*C+L+O+H)/6;
B:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)
+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210,COLORRED,LINETHICK1;
D:=MA(B,10),COLORRED,LINETHICK2;
D14:=MA(B,14),COLORRED,LINETHICK2;
D21:=MA(B,21),COLORRED,LINETHICK2;
A1:=MA((3*C+L+O+H)/6,28);
B1:=(20*A1+19*REF(A1,1)+18*REF(A1,2)+17*REF(A1,3)+16*REF(A1,4)+15*REF(A1,5)+14*REF(A1,6)
+13*REF(A1,7)+12*REF(A1,8)+11*REF(A1,9)+10*REF(A1,10)+9*REF(A1,11)+8*REF(A1,12)
+7*REF(A1,13)+6*REF(A1,14)+5*REF(A1,15)+4*REF(A1,16)+3*REF(A1,17)+2*REF(A1,18)+
REF(A1,12))/210,COLORGREEN,LINETHICK1;
D1:=MA(B1,14),COLORGREEN,LINETHICK2;
DRAWBAND(B1,RGB(255,0,0),D1,RGB(255,255,0));
DRAWBAND(D14,RGB(255,0,0),D21,RGB(255,255,0));
DRAWBAND(B,RGB(255,0,0),D,RGB(255,255,0));
中中顶:=(XMA(XMA(H,15),15)+XMA(XMA(H,20),20)+XMA(XMA(H,30),30)+XMA(XMA(H,40),40))/4*2-(XMA(XMA(L,15),15)+XMA(XMA(L,20),20)+XMA(XMA(L,30),30)+XMA(XMA(L,40),40))/4,LINETHICK2,COLORGREEN;
中中底:=(XMA(XMA(L,15),15)+XMA(XMA(L,20),20)+XMA(XMA(L,30),30)+XMA(XMA(L,40),40))/4*2-(XMA(XMA(H,15),15)+XMA(XMA(H,20),20)+XMA(XMA(H,30),30)+XMA(XMA(H,40),40))/4,LINETHICK2,COLORGREEN;
短中顶:=(XMA(XMA(H,5),5)+XMA(XMA(H,8),8)+XMA(XMA(H,11),11)+XMA(XMA(H,14),14)+XMA(XMA(H,4),4))/5+((XMA(XMA(H,5),5)+XMA(XMA(H,8),8)+XMA(XMA(H,11),11)+XMA(XMA(H,14),14)+XMA(XMA(H,4),4))/5-(XMA(XMA(L,5),5)+XMA(XMA(L,8),8)+XMA(XMA(L,11),11)+XMA(XMA(L,14),14)+XMA(XMA(L,4),4))/5)/2,LINETHICK0,COLORWHITE;
短中底:=(XMA(XMA(L,5),5)+XMA(XMA(L,8),8)+XMA(XMA(L,11),11)+XMA(XMA(L,14),14))/4-((XMA(XMA(H,5),5)+XMA(XMA(H,8),8)+XMA(XMA(H,11),11)+XMA(XMA(H,14),14)+XMA(XMA(H,4),4))/5-(XMA(XMA(L,5),5)+XMA(XMA(L,8),8)+XMA(XMA(L,11),11)+XMA(XMA(L,14),14)+XMA(XMA(L,4),4))/5)/2,LINETHICK0,COLORWHITE;
中顶:=(XMA(XMA(H,30),30)+XMA(XMA(H,40),40)+XMA(XMA(H,50),50)+XMA(XMA(H,60),60))/4*2.03-(XMA(XMA(L,30),30)+XMA(XMA(L,40),40)+XMA(XMA(L,50),50)+XMA(XMA(L,60),60))/4,LINETHICK2,COLORRED;
中底:=(XMA(XMA(L,30),30)+XMA(XMA(L,40),40)+XMA(XMA(L,50),50)+XMA(XMA(L,60),60))/4*1.97-(XMA(XMA(H,30),30)+XMA(XMA(H,40),40)+XMA(XMA(H,50),50)+XMA(XMA(H,60),60))/4,LINETHICK2,COLORRED;
长顶:=(XMA(XMA(H,90),90)+XMA(XMA(H,120),120)+XMA(XMA(H,150),150))/3*2.08-(XMA(XMA(L,90),90)+XMA(XMA(L,120),120)+XMA(XMA(L,150),150))/3,LINETHICK2,COLORYELLOW;
长底:=(XMA(XMA(L,90),90)+XMA(XMA(L,120),120)+XMA(XMA(L,150),150))/3*1.92-(XMA(XMA(H,90),90)+XMA(XMA(H,120),120)+XMA(XMA(H,150),150))/3,LINETHICK2,COLORYELLOW;
波段顶:(XMA(XMA(H,120),120)-XMA(XMA(L,120),120))*4+XMA(XMA(H,120),120),LINETHICK2,COLORYELLOW;
波段底:XMA(XMA(L,120),120)-(XMA(XMA(H,120),120)-XMA(XMA(L,120),120))*4,LINETHICK2,COLORYELLOW;
AF长:=EMA((CLOSE+HIGH+LOW)/3,18);
BF长:=REF(AF长,1);
AF中:=EMA((CLOSE+HIGH+LOW)/3,10);
BF中:=REF(AF中,1);
AF5:=EMA((CLOSE+HIGH+LOW)/3,6);
BF5:=REF(AF5,1);
AF3:=EMA((CLOSE+HIGH+LOW)/3,3);
BF3:=REF(AF3,1);
买入定位:=AF长>BF长 OR AF中>BF中 OR AF5>BF5 OR AF3>BF3;
卖出定位:=AF长<BF长 OR AF中<BF中 OR AF5<BF5;
顶底定位:=AF长<BF长 OR AF中<BF中 OR AF5<BF5 OR AF3<BF3;
STICKLINE(买入定位=1,LOW,HIGH,0.0,1),COLORRED;
STICKLINE(买入定位=1,CLOSE,OPEN,2,1),COLORRED;
STICKLINE(AF中<BF中,LOW,HIGH,0.0,0),COLORGREEN;
STICKLINE(AF中<BF中,CLOSE,OPEN,2,1),COLORGREEN;
STICKLINE(卖出定位=1 AND 中中顶>中顶,LOW,HIGH,0.0,1),COLORGREEN;
STICKLINE(卖出定位=1 AND 中中顶>中顶,CLOSE,OPEN,2,1),COLORGREEN;
STICKLINE(顶底定位=1 AND H>中中顶 AND H>中顶,CLOSE,OPEN,2,1),COLORGREEN;
STICKLINE(顶底定位=1 AND H>中中顶 AND H>中顶,LOW,HIGH,0.0,1),COLORGREEN;
加仓定位1:=卖出定位=1 AND 中中顶>中顶;
加仓定位2:=顶底定位=1 AND H>中中顶 AND H>中顶;
DRAWTEXT(中中中<EMA中中中 AND CROSS(AF中,BF中) AND 短中底<中中底 AND 短中底<中底,L*0.97,'↖战神推荐'),COLORFF00FF;
DRAWTEXT(中中中>=EMA中中中 AND CROSS(AF中,BF中) AND 短中底<中中底,L*0.97,'↖强烈推荐'),COLORFF00FF;
DRAWTEXT(CROSS(BF3,AF3) AND H>中中顶 AND H>中顶,H*1.03,'↙【逃顶】'),COLORGREEN;
DRAWTEXT(加仓定位1=0 AND 加仓定位2=0 AND CROSS(AF中,BF中) AND 中中中>=EMA中中中,L*0.995,'↖加'),COLORYELLOW;
DRAWTEXT(CROSS(AF长,BF长) AND 中底<长底,L*0.97,'↖【抄底】'),COLORRED;
DRAWTEXT(CROSS(AF长,BF长) AND 中底<长底 AND 中底>长底,L*0.97,'↖中底'),COLORYELLOW;
STICKLINE(AF中>BF中 AND 短中底<中底 AND 短中底<中底,CLOSE,OPEN,2,0),COLORRED;
DRAWTEXT(AF3>BF3 AND 短中底<中中底 AND H<中中底,L*0.985,'↖投机'),COLORWHITE;
STICKLINE(AF3>BF3 AND 短中底<中中底 AND H<中中底,CLOSE,OPEN,2,0),COLORRED;
STICKLINE(中中中>=EMA中中中 AND CROSS(AF中,BF中) AND AF中<中中中 AND AF中<(中顶+中底)/2 AND H<短中顶,CLOSE,OPEN,3,0),COLORRED;
DRAWTEXT(中中中>=EMA中中中 AND CROSS(AF中,BF中) AND AF中<中中中 AND AF中<(中顶+中底)/2 AND H<短中顶,L*0.97,'↖【买】'),COLORRED;
DRAWTEXT(CROSS(BF中,AF中) AND 中中中<EMA中中中,H*1.01,'↙卖'),COLORGREEN;
DRAWICON(AF中<中中中 AND AF中<(中顶+中底)/2 AND H<短中顶 AND CROSS(AF中,BF中) AND 中中中<EMA中中中,L*0.99,1);
DRAWTEXT(CROSS((高0+低0)/2,(D90H+D90L)/2),波段底0*0.965,'↖【空转多】'),COLORRED;
DRAWTEXT(CROSS((D90H+D90L)/2,(高0+低0)/2),波段顶0*1.04,'↙【多转空】'),COLORWHITE;
DX:DRAWLINE(HIGH>=HHV(HIGH,12),HIGH,LOW<=LLV(LOW,12),HHV(HIGH,4),1),LINETHICK2,COLORMAGENTA;
KX:DRAWLINE(LOW<=LLV(LOW,12),LOW,HIGH>=HHV(HIGH,12),LLV(LOW,4),1),LINETHICK2,COLORWHITE;
DRAWTEXT(ISLASTBAR,波段底,'底'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,波段顶,'顶'),COLORYELLOW;

通达信冠军战神主图指标公式

 

相关文章