通達(dá)信RSI利乖離KDJMACD指標(biāo)公式
- 指標(biāo)類別: 通達(dá)信指標(biāo)公式
- 授權(quán)方式: 免費(fèi)版
- 指標(biāo)評級: ★★★★★
- 指標(biāo)分類: 趨勢
- 畫線方法: 副圖
- 日期:2018-08-28 來源:互聯(lián)網(wǎng)
通達(dá)信RSI利乖離KDJMACD指標(biāo)公式:理想論壇臥龍先生2009作品,全網(wǎng)最牛的通達(dá)信8個綜合指標(biāo):RSI+獲利率+乖離24+KDJ+MACD+A股溫度+換10+大盤監(jiān)控,8個不同坐標(biāo)的指標(biāo)融合于一身。
{8個綜合指標(biāo): RSI利乖離KDJ}
利:IF(WINNER(CLOSE),WINNER(CLOSE)*100,20),COLOR0000FF,COLORFFCC00,COLORE67010,NODRAW;
LC:=REF(CLOSE,1);
RSI:SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100,COLORCC3299,NODRAW;
乖離4:=(CLOSE-MA(CLOSE,4))/MA(CLOSE,4)*100,COLORYELLOW,NODRAW;
乖離6:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100,COLORYELLOW,NODRAW;
乖離8:=(CLOSE-MA(CLOSE,8))/MA(CLOSE,8)*100,COLORYELLOW,NODRAW;
乖離12:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100,COLORYELLOW,NODRAW;
乖離24:(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100,COLORYELLOW,NODRAW;
乖離:=IF(乖離24=DRAWNULL,乖離12,IF(乖離12=DRAWNULL,乖離8,IF(乖離8=DRAWNULL,乖離6,
IF(乖離6=DRAWNULL,乖離4,乖離24)))),COLORYELLOW,NODRAW;
{畫藍(lán)色背景}
DRAWBAND(50,RGB(0,0,100),RSI,RGB(0,0,0));
{KDJ: 參數(shù)9、3、3}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1),COLORWHITE;
D:=SMA(K,3,1),COLORYELLOW;
J:=3*K-2*D,COLORMAGENTA,NODRAW;
DIF:=(EMA(C,12)-EMA(C,26))*100,NODRAW;
DEA:=EMA(DIF,9),NODRAW;
MACD:(DIF-DEA)*2,COLORMAGENTA,NODRAW;
LGD:=MAX(DIF,DEA);
MACDB:=IF(CURRBARSCOUNT<=100,CONST(IF(ISLASTBAR=1,
HHV(LGD,BARSLAST(CURRBARSCOUNT=100)),1)),DRAWNULL);
DIFA:=IF(MACDB>500,DIF/10,IF(MACDB>100 AND MACDB<200,DIF/2,DIF/5));
DEAA:=IF(MACDB>500,DEA/10,IF(MACDB>100 AND MACDB<200,DEA/2,DEA/5));
MACDA:=IF(FINANCE(2)=27,(DIFA-DEAA)/10,(DIFA-DEAA)*2),COLORMAGENTA,NODRAW;
{畫KJ彩帶線}
DRAWBAND(J,RGB(139,0,0),D,RGB(0,100,0));
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)
量比:IF(ISLASTBAR,DYNAINFO(17),V/REF(MA(V,5),1)),COLORCYAN,NODRAW;
開%:(O-REF(C,1))/REF(C,1)*100,COLOR6699FF,NODRAW;
高%:(H-REF(C,1))/REF(C,1)*100,COLORMAGENTA,NODRAW;
低%:(L-REF(C,1))/REF(C,1)*100,COLORFFCC00,NODRAW;
換10:SUM(VOL/CAPITAL*100,10),COLORYELLOW,NODRAW;
總漲家:="999999$ADVANCE"+"399001$ADVANCE"; 總跌家:="999999$DECLINE"+"399001$DECLINE";
A股溫度:總漲家/(總漲家+總跌家)*100,COLORGREEN,DOTLINE;
乖離低距今:BARSLAST(乖離24=LLV(乖離24,10)),COLORYELLOW,NODRAW;
利低距今:BARSLAST(利=LLV(利,10)),COLOR0000FF,NODRAW;
RSI低距今:BARSLAST(RSI=LLV(RSI,10)),COLORCC3299,NODRAW;
乖離A:=IF(乖離>0,乖離*2,IF(乖離<0,乖離*2,乖離)),COLORYELLOW;
STICKLINE(C>O,0,RSI,3,1),COLORRED;
STICKLINE(C<=O,0,RSI,3,1),COLORGREEN,COLOR008800;
STICKLINE(C>O,0,利,1.2,0),COLOR0000FF,COLOR000088;
STICKLINE(C<=O,0,利,1.2,0),COLOR004000,COLORLICYAN;
{乖離柱狀圖}
STICKLINE(MACDA,0,MACDA,1.6,0),COLORFF7700;{0軸線下MACD天藍(lán)};
STICKLINE(乖離>0,0,乖離A,0.6,0),COLOR000088,COLORCC3299;
STICKLINE(乖離<0,0,乖離A,0.8.0,0),COLOR004000,COLORBLUE;
{重畫線段}
B:RSI,COLORLIGRAY,COLORGREEN,COLORLIGREEN;
A1:利,COLOR0000FF,COLORE67010;
AB:乖離A,COLORYELLOW,COLOR6699FF,DOTLINE;
A股溫度,COLORGREEN,DOTLINE;
{重畫KDJ線}
K,COLORWHITE; D,COLORYELLOW; J,COLORMAGENTA,LINETHICK2; J,COLORWHITE,DOTLINE;
DD:=IF(CURRBARSCOUNT<=200,CONST(IF(ISLASTBAR=1,
HHV(換10,BARSLAST(CURRBARSCOUNT=120)),1)),DRAWNULL),COLORBROWN,DOTLINE;
DDB:=100/DD,COLOR0000FF,NODRAW;
換10_:IF(DDB>0,換10*DDB,IF(DDB>3,換10*DDB*0.6,IF(DDB<0,換10/DDB,DRAWNULL))),COLORYELLOW;
換10_,COLORFF6600,LINETHICK2; 換10_,COLORWHITE;
{顯示文字}
DRAWTEXT(ISLASTBAR=1,乖離A,' 乖離24'),COLORYELLOW,COLOR6699FF;
DRAWTEXT(ISLASTBAR=1,利,' 利'),COLOR0000FF,COLORE67010;
DRAWTEXT(ISLASTBAR=1,RSI,' RSI'),COLORCC3299;
DRAWTEXT(ISLASTBAR=1,J,' KDJ'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR=1,A股溫度,'A股溫度'),COLORGREEN;
DRAWTEXT(ISLASTBAR=1,MACDA,' MACD'),COLORFFCC00;
{DRAWTEXT(ISLASTBAR=1,換10_,' 換10'),COLORYELLOW;}
DRAWTEXT(ISLASTBAR,換10_,STRCAT(STRCAT(VAR2STR(換10,0),''),'換10')),COLORYELLOW;
{左上角不同顏色分別提示字符串: 滬指高開紅色/低開綠色}
滬指開%:=("999999$O"-REF("999999$C",1))/REF("999999$C",1)*100,NODRAW;
DRAWTEXT_FIX(ISLASTBAR AND 滬指開%<0,0,0,0,'★今滬指低開,市場做空氛圍較重'),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR AND 滬指開%>0,0,0,0,'★今滬指高開,市場做多情緒較大'),COLORRED;
滬漲%:=("999999$C"-REF("999999$C",1))/REF("999999$C",1)*100,COLORMAGENTA,NODRAW;
深漲%:=("399001$C"-REF("399001$C",1))/REF("399001$C",1)*100,COLORWHITE,NODRAW;
本市大盤漲%:IF(CODELIKE('6'),滬漲%,深漲%),COLORWHITE,NODRAW;
字符串DP:=STRCAT(STRCAT(' ☆本市大盤漲%:',VAR2STR(本市大盤漲%,2)),'%');
DRAWTEXT_FIX(ISLASTBAR,0.2,0,0,字符串DP),,COLORYELLOW;
{左下角顯示:所屬行業(yè)、所屬概念}
DRAWTEXT_FIX(C>0,0,1,0, STRCAT('行業(yè):',HYBLOCK)),COLORYELLOW;
DRAWTEXT_FIX(C>0,0.09,1,0,STRCAT('概念:',GNBLOCK)),COLORCYAN;
通達(dá)信RSI利乖離KDJMACD指標(biāo)公式實例圖解
通達(dá)信RSI利乖離KDJMACD指標(biāo)公式