分类
加密貨幣去哪裡買

当 MACD 和 RSI 背离时平仓

通达信MACD结合RSI和KDJ主图指标公式

涨停:=IF(REF(C,1)*1.1-C stICKLINE(涨停,OPEN,CLOSE,4,2),COLORRED;
STICKLINE(涨停,OPEN,CLOSE,0.8,0),COLORYELLOW;
STICKLINE(涨停,H,L,0,0),COLORYELLOW;
ZT:=C/REF(C,1)>1.当 MACD 和 RSI 背离时平仓 095;
STICKLINE(ma(CLOSE,5)>REF(MA(当 MACD 和 RSI 背离时平仓 CLOSE,5),1) AND ZT,O,C,0.6,0),COLORYELLOW;
STICKLINE(MA(CLOSE,5) VAR6:=REF(C,1);
VAR7:=SMA(MAX(C-VAR6,0),6,1)/SMA(Abs(C-VAR6),6,1)*100;
DRAWTEXT(crOSS(82,VAR7),H*1.02,'逃顶'),COLORYELLOW;

MA5:MA(C,5)COLORYELLOW;
MA10:MA(C,10)COLORGREEN,DOTLINE;
DIF:EMA(CLOSE,7) - EMA(CLOSE,19)NODRAW;
DEA:EMA(DIF,9)NODRAW;
MacD:2*(DIF-DEA),COLORSTICK,NODRAW;
NOTEXTDIF1:MA(C,20)+(MACD.DIF)*3,COLORWHITE,NODRAW;
强:IF(NOTEXTDIF1*1.002>MA(NOTEXTDIF1,2),NOTEXTDIF1,DRAWNULL),COLORRED,LINETHICK3,NODRAW;
NOTEXTDEA1:MA(C,20)+(MACD.DEA)*3,COLORYELLOW,NODRAW;
弱:IF(NOTEXTDEA1>MA(NOTEXTDEA1,当 MACD 和 RSI 背离时平仓 当 MACD 和 RSI 背离时平仓 2),NOTEXTDEA1,DRAWNULL),COLORMAGENTA,LINETHICK1,NODRAW;
NOTEXTOZ:MA(C,20)COLORBLUE,DOTLINE;
NOTEXTMACD:=MA(C,20)+(MACD.MACD)*3;
DRAWICON(CROSS(NOTEXTDEA1,NOTEXTDIF1),NOTEXTDEA1*1.003,27);> 当 MACD 和 RSI 背离时平仓
A:=REF(NOTEXTDIF1,1)REF(NOTEXTDIF1,1); 当 MACD 和 RSI 背离时平仓
B:=REF(NOTEXTDIF1,1)>REF(NOTEXTDIF1,2) AND REF(NOTEXTDIF1,2)>REF(NOTEXTDIF1,3) AND NOTEXTDIF1 DRAWICON(B,NOTEXTDEA1,2);>
STICKLINE(MACD>REF(MACD,1) AND MACD>0,NOTEXTOZ,NOTEXTMACD,0,-1),COLORRED;
STICKLINE(NOTEXTMACD>=NOTEXTOZ AND MACD>REF(MACD,1),NOTEXTOZ,NOTEXTMACD,0,-1),COLORRED;
STICKLINE(MACD0,NOTEXTOZ,NOTEXTMACD,0,-1),当 MACD 和 RSI 背离时平仓 COLORYELLOW;
TC1:=IF(H=HHV(H,48),H,DRAWNULL);
TC2:=CONST(BArslAST(TC1=H))+1;
UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
BC1:=IF(L=LLV(L,48),L,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LOWER:=CONST(IF(当 MACD 和 RSI 背离时平仓 BC2=1,L,REF(L,BC2-1)));
LP:=CURRBARSCOUNT HP:=CURRBARSCOUNT 底:=IF(LP,150,0),当 MACD 和 RSI 背离时平仓 COLORMAGENTA;
DRAWICON(FILTER(底,10),L*0.925,1);

STICKLINE(NOTEXTMACD STICKLINE(MACD>=REF(MACD,当 MACD 和 RSI 背离时平仓 1) AND MACD <0,NOTEXTOZ,NOTEXTMACD,0,-1),COLORMAGENTA;
;

N:=9; 当 MACD 和 RSI 背离时平仓
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(当 MACD 和 RSI 背离时平仓 LOW,N))*100,NODRAW;
K:=SMA(RSV,M1,1),NODRAW;
D:=SMA(K,M2,1),NODRAW;
J:=3*K-2*D,NODRAW;
CJ_K:=MA(K,15),LINETHICK2,NODRAW;
CJ_D:=MA(D,当 MACD 和 RSI 背离时平仓 15),LINETHICK2,NODRAW;
CJ_J:=MA(J,15),LINETHICK2,NODRAW;
DRAWICON(CROSS(CJ_K,CJ_D)&&CJ_D <30,L*0.92,11);
DRAWICON(当 MACD 和 RSI 背离时平仓 当 MACD 和 RSI 背离时平仓 CROSS(CJ_D,CJ_K)&&CJ_D>70,H*1.05,12);
DRAWICON(CROSS(cci,-100),L*0.98,1);
DRAWICON(CROSS(CCI,0),L*0.98,1);
DRAWICON(CROSS(CCI,100),L*0.98,1);
DRAWICON(CROSS(100,CCI),H*1.02,2);
;
PT1:=CONST(HHV(H,20))/1.2;
IF(CURRBARSCOUNT <=10,PT1,DRAWNULL),COLORGREEN;
DRAWTEXT(ISLASTBAR,PT1,'回马枪观测'),COLORWHITE;
PT2:=CONST(HHV(H,10))/1.2;
IF(CURRBARSCOUNT <=10,PT2,DRAWNULL),COLORGREEN;
DRAWTEXT(ISLASTBAR,PT2,'回马枪观测'),COLORWHITE;

基于MACD和RSI同时背离的EA交易系统

8 、资金控制:第一账户基础资金 1000USD ,止盈 20 点,锁定止盈逐层增加 10 个点(如,盈利了 25 个点后回落到盈利 20 个点,则触发止盈,又如盈利了 45 个点后回落到盈利 40 个点,则触发止盈),最高设 20 层,止损 20 点,每次触发止损后资金自动转移到第二账户,剩余基础资金 1000USD 重新开始运作,如触发止损后资金不足 1000USD ,则短信和邮件提醒。如此反复。

真正的macd,kdj和rsi背离指标(通达信)


difIF1:=ema(CLOSE,12) - Ema(CLOSE,26);
DEAEA1:=EMA(DIFIF1,9);
MacD1:=2*(DIFIF1-DEAEA1),当 MACD 和 RSI 背离时平仓 stICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1 <0,0,MACD1,1,0),COLORGREEN;
STICKLINE(MACD1 STICKLINE(MACD1>=0 OR MACD1 <=0,0,0,50,1),COLORWHITE;
DIFIF1,COLOR33FF33,LINETHICK2;
DEAEA1,当 MACD 和 RSI 背离时平仓 COLORYELLOW,LINETHICK2;
MACD:MACD1,NODRAW,COLORMAGENTA;
强:IF(DIFIF1>=DEAEA1,DIFIF1,DRAWNULL),COLORRED,LINETHICK2;
弱:=IF(DEAEA1>=DIFIF1,DEAEA1,DRAWNULL),COLORFF9900,LINETHICK2;
DRAWICON(crOSS(DIFIF1,DEAEA1),DIFIF1+0.1,1);
DRAWICON(CROSS(DEAEA1,DIFIF1),0.4,2);
A1:=BArslAST(REF(CROSS("MACD.DIF","MACD.DEA"),1)); 当 MACD 和 RSI 背离时平仓 当 MACD 和 RSI 背离时平仓
B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1) DRAWTEXT(B1>0,-0.8,'MACD底背'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS("kdJ.K","KDJ.D"),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1) 当 MACD 和 RSI 背离时平仓 DRAWTEXT(B2,-0.6,'KDJ底离'),COLORYELLOW;;
A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1) DRAWTEXT(B3>0,-0.3,'RSI底离'),COLORCYAN;;
C1:=BARSLAST(REF(CROSS("当 MACD 和 RSI 背离时平仓 MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWTEXT(D1>0,0.4,'MACD顶离'),COLORBLUE;
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWTEXT(D2>0,0.6,'KDJ顶离'),COLORLIGRAY;
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(D3>0,0.8,'RSI顶离'),COLORGREEN;;

基于MACD和RSI同时背离的EA交易系统

8 、资金控制:第一账户基础资金 1000USD ,止盈 20 点,锁定止盈逐层增加 10 个点(如,盈利了 25 个点后回落到盈利 20 个点,则触发止盈,又如盈利了 45 个点后回落到盈利 40 个点,则触发止盈),最高设 20 层,止损 20 点,每次触发止损后资金自动转移到第二账户,剩余基础资金 1000USD 重新开始运作,如触发止损后资金不足 1000USD ,则短信和邮件提醒。如此反复。