通達信乾坤雙線優化買賣操盤指標公式
- 指標類別: 通達信指標公式
- 授權方式: 免費版
- 指標評級: ★★★★★
- 指標分類: 趨勢
- 畫線方法: 副圖
- 日期:2020-02-17 來源:互聯網
通達信乾坤雙線優化買賣操盤指標公式:
高1:=REF(HHV(H,150),3);
低1:=REF(LLV(L,150),3);
H3:=高1-(高1-低1)*0.5;
中軸:REFDATE(H3,DATE),POINTDOT,COLORLIGRAY,LINETHICK3;
B1:=EMA(C,12);
B2:=EMA(C,26);
B3:=B1-B2;
WDIF:=EMA(EMA(EMA(C,3),3),3)+B3;
WDEA:=EMA(WDIF,9);
MACD:=2*(WDIF-WDEA);
STICKLINE(MACD>0,中軸,中軸+MACD,0,1),COLORRED;
STICKLINE(MACD<0,中軸,中軸+MACD,0,1),COLORLIBLUE;
STICKLINE(MACD0,中軸,中軸+MACD,0,0 ),COLOR00BBFF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,中軸,中軸+MACD,0,0 ),COLOR0011BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,中軸,中軸+MACD,0,0),COLORBB11BB;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,中軸,中軸+MACD,0,0),COLORFFBB11;
乾線: MA(C,3),COLORRED,LINETHICK2;
坤線:XMA(REF(LLV(C,3),2),2),COLOR00FF00,LINETHICK2;
STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;
STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;
DRAWICON(CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1)) ,LOW*0.98,1);
DRAWICON(CROSS(REF(ZIG(3,10),1),ZIG(3,10)) ,HIGH*1.02,2);
DRAWTEXT(REF(CLOSE,2)/REF(OPEN,2)<0.95 AND
REF(C,2) REF(CLOSE,1)>REF(CLOSE,2) AND
REF(CLOSE,1)>(REF(CLOSE,2)+REF(OPEN,2))/2 AND
CLOSE>REF(CLOSE,1) AND
LLV(LOW,13)=REF(LOW,1),LOW*0.96,'上升'), COLORYELLOW;
DRAWTEXT(REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND
REF(OPEN,1) < REF(CLOSE,2) AND
ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 AND
CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2),LOW*0.96 ,'進場' ) ,COLORYELLOW;
DRAWICON(REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND
REF(OPEN,1) < REF(CLOSE,2) AND
ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 AND
CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2),C,1);
QC:=REF(CLOSE,1);
{MA10:MA(CLOSE,10);}
RSV:=(((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*100);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
YX:=((CLOSE>QC) AND C>O);
KK:=HHV(K,5);
HH:=HHV(D,5);
D1:=REF(D,1);
K1:=REF(K,1);
DRAWTEXT((((D1<30) AND CROSS(K,D)) AND YX),(LOW * 0.96),'←短買!'),COLORYELLOW;
{DRAWTEXT(((HH>70) AND CROSS(D,K)),(LOW * 1.13),'←減倉!'),COLORFF00CC;};
VAR31:=((((HHV((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),4)<0) AND ((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2)>REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1))) AND (REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1) DRAWTEXT(CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O,L*1.00,'←加倉!'),COLORMAGENTA;
AA1:=AMOUNT/V;
BB1:=L CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L
DRAWTEXT(FF1,(LOW* 0.97),'老鼠倉'),COLOR4080FF;
獲利:WINNER(CLOSE)*100,NODRAW,COLORRED;
KDJ_K:="KDJ.K"(9,3,3);KDJ_D:="KDJ.D"(9,3,3);KDJ_J:="KDJ.J"(9,3,3);
買1:=CROSS(KDJ_J,0) OR (CROSS(KDJ_J,KDJ_K) AND KDJ_D<26);
買2:=CROSS("RSI.RSI1"(6,2,2),20) OR CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
買3:=CROSS("MACD.DIF","MACD.DEA") OR CROSS("MACD.MACD",0);
買0:=買1+買2+買3;
買9:=IF(買0>1,買0,0);
底:IF(買9,L*0.9978-0.03,DRAWNULL),POINTDOT,COLOR00FFFF,LINETHICK5;
選股:=FILTER(CROSS("KDJ.K","KDJ.D")&& CROSS("MACD.DIF","MACD.DEA"),50);
吸:IF(選股,L*0.988-0.01,DRAWNULL),POINTDOT,COLORFF00FF,LINETHICK7;
DRAWICON(買9>0,L/1.0,9);
MA05:=MA(C,3);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
五日乖離率:=(C-MA05)/MA05*100;
BB05:=ATAN((MA05/REF(MA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((MA05-REF(MA05,1))/REF(MA05,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;
IF(BB05>30 AND MA05>REF(MA05,1), MA05,DRAWNULL),LINETHICK2,COLORRED;
BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;
IF(BB05<0 AND MA05 三拾日乖離率:=(C-MA30)/MA30*100,NODRAW;
VAR1:=(MA20-MA30)>REF((MA20-MA30),1) AND MA20>REF(MA20,1) AND MA30>REF(MA30,1);
VAR2:=(MA30-MA20) BB30:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416;
強勢狙擊:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);
加倉:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND MA05>REF(MA05,1) AND 三拾日乖離率>REF(三拾日乖離率,1) AND MA10>REF(MA10,1)
AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;
清倉:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>MA30 OR O>MA30) AND MA05 DRAWTEXT(加倉 ,LOW*0.98,'◆加二'),COLORYELLOW;
JC:=CROSS(0,五日乖離率) AND 三拾日乖離率REF(MA10,1) ;
減倉:=FILTER(JC,10);
MR:=COUNT(CROSS(五日乖離率,0),3)>=1 AND 三拾日乖離率>REF(三拾日乖離率,1) AND MA05>REF(MA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)
DRAWTEXT(減倉,HIGH*1.02,'◆風險'),COLORCYAN;
DRAWTEXT(買入,LOW*0.96,'◆買二'),COLORYELLOW;
DRAWTEXT(清倉 ,HIGH*1.00,'◆清倉'),COLORGREEN;
A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
B11:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
DRAWTEXT(B11>0,L-0.02,'★M'),COLOR00FFFF;{MACD底背離}
A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
B22:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
DRAWTEXT(B22,L-0.10,'◎K'),COLORFF00FF;{KDJ底背離};
通達信乾坤雙線優化買賣操盤指標公式實例圖解:
通達信乾坤雙線優化買賣操盤指標公式