求助 老师 2个代码加在一起 放在MT4 主图用

要添加评论,请登录注册
lianghuiyuan
47
lianghuiyuan  
CURRBARSCOUNT:=DATACOUNT - BARPOS;
主趋势线:EMA(EMA(C,10),10),COLORRED,LINETHICK3;
B:=主趋势线>REF(主趋势线,1);
IF(B-1,主趋势线,NULL),COLORBLUE,LINETHICK3;
AA:=EMA(C,5) > EMA(C,20);
BB:=EMA(C,5) < EMA(C,20);
CC:= EMA(C,5) > EMA(C,10);
CC1:=EMA(C,5) < EMA(C,10);
DD:=CLOSE<OPEN;
STICKLINE1(AA,H,L,0,0),COLORRED;
STICKLINE1(AA,O,C,3,1),COLORRED;
STICKLINE1(AA AND DD,O,C,3,0),COLORRED;
STICKLINE1(BB,H,L,0,0),COLORGREEN;
STICKLINE1(BB,O,C,3,1),COLORGREEN;
STICKLINE1(BB AND DD,O,C,3,0),COLORGREEN;
STICKLINE1(BB AND CC,H,L,0,1),COLORWHITE;
STICKLINE1(BB AND CC,O,C,3,1),COLORWHITE;
STICKLINE1(BB AND CC AND DD,O,C,3,0),COLORWHITE;
STICKLINE1(AA AND CC1,H,L,0,0),COLORWHITE;
STICKLINE1(AA AND CC1,O,C,3,1),COLORWHITE;
STICKLINE1(AA AND CC1 AND DD,O,C,3,0),COLORWHITE;
AAA:=REFX1(HHV(C,90),10000);
BBB:=BACKSET(ISLASTBAR,80);

DRAWTEXT(CROSS(BBB,0.5) ,AAA, '红色K线做多,绿色K线做空,白色K线观望。 '),COLORYELLOW;



E1:EMA(C,10);

E2:EMA(C,60);

DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);

DEA  : =EMA(DIFF,9);

MACD:=2*(DIFF-DEA),COLORSTICK;


DRAWTEXT(CROSS(E1,E2)&&BARSLAST(DIFF>0)<BARSLAST(DIFF<0),E1,'多');


DRAWTEXT(CROSSDOWN(E1,E2)&&BARSLAST(DIFF>0)>BARSLAST(DIFF<0),E1,'空');



DRAWTEXT(CROSS(BARSLAST(CROSS(E1,E2))<BARSLAST(CROSSDOWN(E1,E2))&&DIFF>0,0.5),E1,'多');


DRAWTEXT(CROSS(BARSLAST(CROSS(E1,E2))>BARSLAST(CROSSDOWN(E1,E2))&&DIFF<0,0.5),E1,'空');








 
附加的文件:
要添加评论,请登录注册