请高手修改成MT4 或者mt5的都行

 
短高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;

B:=(短高H+短低L)/2;

D:=MA(B,10);

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;

D90H:=EMA(短高H,90),COLORRED,LINETHICK1;

D90L:=EMA(短低L,90),COLORRED,LINETHICK1;

D90差:=D90H-D90L;

D90顶:=D90H+D90差*2,COLORRED,LINETHICK1;

D90底:=D90L-D90差*2,COLORRED,LINETHICK1;

D90HH:=D90H-D90差*0.1,COLORRED,LINETHICK1;

D90LL:=D90L+D90差*0.1,COLORRED,LINETHICK1;

高0:=(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*1+XMA(XMA(H,30),30);

低0:=XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*1;

多头定位:=低0>=D90底 AND 高0>=D90顶;

空头定位:=高0<=D90顶 AND 低0<=D90底;

震荡定位:=低0>=D90底 AND 高0<=D90顶;

波段顶00:=(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3.5+XMA(XMA(H,60),60);

波段底00:=XMA(XMA(L,60),60)-(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3.5;

STICKLINE(多头定位=1,波段顶00,波段底00,5,0),COLOR000066;

STICKLINE(空头定位=1,波段顶00,波段底00,5,0),COLOR003300;

STICKLINE(震荡定位=1,波段顶00,波段底00,5,0),COLOR555555;

STICKLINE(1=1,D90HH,D90LL,5,0),COLORGRAY;

做空:(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*1+XMA(XMA(H,30),30),LINETHICK2,COLORWHITE;

做多:XMA(XMA(L,30),30)-(XMA(XMA(H,30),30)-XMA(XMA(L,30),30))*1,LINETHICK2,COLORWHITE;

波段顶:(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3.5+XMA(XMA(H,60),60),LINETHICK2,COLORYELLOW;

波段底:XMA(XMA(L,60),60)-(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3.5,LINETHICK2,COLORYELLOW;

B0:=(短高H+短低L)/2;

D0:=MA(B0,10);

多空中线:=(B0+D0)/2,COLORYELLOW,LINETHICK2;

布林线顶1:EMA(多空中线,10)+5*STD(EMA(多空中线,10),10),DOTLINE,COLORWHITE;

布林线底1:EMA(多空中线,10)-5*STD(EMA(多空中线,10),10),DOTLINE,COLORWHITE;

DRAWTEXT(ISLASTBAR,做空,'空'),COLORGREEN;

DRAWTEXT(ISLASTBAR,做多,'多'),COLORRED;

DRAWTEXT(ISLASTBAR,波段顶,'顶'),COLORGREEN;

DRAWTEXT(ISLASTBAR,波段底,'底'),COLORRED;

MACD价格:=EMA(CLOSE,3) - EMA(CLOSE,9);

DEA33:=EMA((EMA(MACD价格,3) - EMA(MACD价格,9)),9),COLORWHITE,LINETHICK0;

DEA333:=REF(DEA33,1),COLORWHITE,LINETHICK0;

STICKLINE(DEA333<=DEA33,LOW,HIGH,0,0),COLORRED;

STICKLINE(DEA333<=DEA33,CLOSE,OPEN,3,1),COLORRED;

STICKLINE(DEA333>=DEA33,LOW,HIGH,0,0),COLORGREEN;

STICKLINE(DEA333>=DEA33,CLOSE,OPEN,3,1),COLORGREEN;

CCI:=((H+L+C)/3-MA((H+L+C)/3,3))/(0.015*AVEDEV((H+L+C)/3,3));

STICKLINE(L<做多 AND CROSS(CCI,-50) AND REF(CCI,1)<0,LOW,HIGH,0,0),COLORMAGENTA;

STICKLINE(L<做多 AND CROSS(CCI,-50) AND REF(CCI,1)<0,CLOSE,OPEN,3,0),COLORMAGENTA;

STICKLINE(H>做空 AND CROSS(50,CCI) AND REF(CCI,1)>0,LOW,HIGH,0,0),COLORWHITE;

STICKLINE(H>做空 AND CROSS(50,CCI) AND REF(CCI,1)>0,CLOSE,OPEN,3,0),COLORWHITE;

多头趋势:=多头定位=1 OR 震荡定位=1;

空头趋势:=震荡定位=1 OR 空头定位=1;

多:=多头趋势=1 AND L<做多 AND CROSS(CCI,-50) AND REF(CCI,1)<0;

空:=空头趋势=1 AND H>做空 AND CROSS(50,CCI) AND REF(CCI,1)>0;

DRAWTEXT(多=1,L,'多') ,COLORWHITE;
DRAWTEXT(空=1,H,'空'),COLORWHITE;








 
这是文华财经还是TB的代码?
 
Yu Zhang:
这是文华财经还是TB的代码?
通达信的,我把以前通道信冠军主图自己修改了下,MT4不会编写,不太懂C语言!
 

通达信的 XMA 函数属于未来函数。

这个指标没啥实战意义。