資源描述:
《【通達(dá)信】(底背離、頂背離、macd、kdj、rsi)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫(kù)。
1、【通達(dá)信】(底背離、頂背離、macd、kdj、rsi)-指標(biāo)公式源碼?{參數(shù)N為5,10,5}?DIFIF1:=EMA(CLOSE,12)?-?EMA(CLOSE,26);??DEAEA1:=EMA(DIFIF1,9);??MACD1:=2*(DIFIF1-DEAEA1),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;??STICKL
2、INE(MACD1=0?OR?MACD1<=0,0,0,50,1),COLORWHITE;??DIFIF1,COLOR33FF33,LINETHICK2;??DEAEA1,COLORYELLOW,LINETHICK2;??MACD:MACD1,NODRAW,COLORMAGENTA;??強(qiáng):IF(DIFIF1>=DEAEA1,DIFIF1,DRAWNULL),COLORRED,LINETHICK2;??弱:=IF(DEAEA1>=DIFIF1,DEAEA1,DRAWNULL),
3、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));??B1:=REF(C,A1+1)>C?AND?REF("MACD.DIF",A1+1)<"MACD.DIF"?AND?CROSS("MACD.DIF","MACD.DEA");??DRAWTEXT(B1>0,-0.8,'MACD底背'),COLORFF00FF
4、;??A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));??B2:=REF(C,A2+1)>C?AND?REF("KDJ.K",A2+1)<"KDJ.K"?AND?CROSS("KDJ.K","KDJ.D");??DRAWTEXT(B2,-0.6,'KDJ底離'),COLORYELLOW;{KDJ底背離};??A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));??B3:=REF(C,A3+1)>C?AND?REF("RSI.RSI1",A3+1)<"RSI.RSI1"?AND?CROSS(
5、"RSI.RSI1","RSI.RSI2");??DRAWTEXT(B3>0,-0.3,'RSI底離'),COLORCYAN;{RSI底背離};??C1:=BARSLAST(REF(CROSS("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;{MACD頂背離}??C2:=BARSLAST(REF(CROSS("KDJ
6、.D","KDJ.K"),1));??D2:=REF(C,C2+1)"KDJ.K"?AND?CROSS("KDJ.D","KDJ.K");??DRAWTEXT(D2>0,0.6,'KDJ頂離'),COLORLIGRAY;{KDJ頂背離}??C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));??D3:=REF(C,C3+1)"RSI.RSI1"?AND?CROSS("RSI.RSI2","RSI.RSI1");??DRAWT
7、EXT(D3>0,0.8,'RSI頂離'),COLORGREEN;{RSI頂背離};?【通達(dá)信】纏論MACD(低位金叉、二次金叉、底背離)-指標(biāo)公式源碼?參數(shù)Short220012Long220026Mid22009DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);?DEA:EMA(DIFF,6);?MACD:(DIFF-DEA)*2,?COLORSTICK,LINETHICK2;?低位金叉:=CROSS(DIFF,DEA)?AND?DIFF<-0.1;?STICKLINE(低位金叉,0