通达信月周日MACD指标公式,通达信杂交版KDJ指标公式
admin888
|通达信月周日MACD指标公式,通达信杂交版KDJ指标公式
通达信月周日MACD指标公式
月dif:="macd.DIF#MONTH"COLOR0080FF;
月DEA:="maCD.DEA#MONTH",COLOR0080FF,LINETHICK2;
周DIF:="MacD.DIF#WEEK"COLORRED;
周DEA:="MACD.DEA#WEEK",COLORRED,LINETHICK2;
日DIF:="MACD.DIF",COLORWHITE;
日DEA:="MACD.DEA",COLORWHITE,LINETHICK2;
DRAWBAND(月DIF,RGB(100,0,100),月DEA,RGB(120,120,120));
DRAWBAND(周DIF,RGB(200,20,10),周DEA,RGB(10,100,200));
DIF:ema(CLOSE,12)-EMA(CLOSE,26),COLORMAGENTA;
DEA:EMA(DIF,9);
{MACD:(DIF-DEA)*2,COLORstICK;}
红色启动埋伏:=(EMA(IF(LOW<=LLV(LOW,30),(SMA(Abs(LOW-REF(LOW,1)),30,1))/(SMA(MAX(LOW-REF(LOW,1),0),30,1)),0),3))*(10),COLORRED,LINETHICK2;
DIFF:=EMA(CLOSE,11)-EMA(CLOSE,26);
红1柱:crOSS(DIF,DEA) AND CROSS(MACD,0),COLORBLUE;
STICKLINE(MACD>0,MACD,0,-1,1),COLORRED;
STICKLINE(MACD<0,MACD,0,-1,1),COLORCCCC00;
DRAWICON(ISLASTBAR=1 AND MACD>REF(MACD,1),HHV(MACD,60),1);
VAR1:=HHV(DEA,53);
VAR2:=LLV(DEA,55);
VAR3:=DEA-(DIFF-DEA);
UP:IF(DIFF>VAR1 AND DEA=VAR1,MAX(LLV(VAR1,10),VAR3),VAR1),COLORBB9A00;
DN:IF(DIFF
止跌:=(REF(EVERY(C
VAR1N:=MA(CLOSE,5),;
VAR2N:=MA(CLOSE,10);
VAR3N:=(VAR1N-CLOSE)/CLOSE>3/100;
VAR4N:=(VAR2N-VAR1N)/VAR1N>0.03;
VAR5N:=LLV(CLOSE,30)=LLV(CLOSE,120);
底部:=VAR3N AND VAR4N AND VAR5N;
包赚小赔:BArslAST(底部)<=2 AND 止跌,COLORMAGENTA;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1,COLORMAGENTA;
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;
DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;
埋伏金叉:红色启动埋伏 AND 低位金叉,COLORGREEN;
A:=EMA(CLOSE,2);
B:=EMA(((SLOPE(CLOSE,21)*20)+CLOSE),42);
低位金叉买:CROSS(A,B) AND 低位金叉,COLORCYAN;
日金:IF(CROSS(日DIF,日DEA),0.5,0),COLORWHITE;
周金:IF(CROSS(周DIF,周DEA),1,0),COLORLICYAN;
月金:IF(CROSS(月DIF,月DEA),1.5,0),COLORMAGENTA;
STICKLINE(周金,0,0.08,6,0),COLORLICYAN;
DRAWTEXT(周金,0.16,'周金叉'),COLORLICYAN;
STICKLINE(月金,0,0.08,6,0),COLORMAGENTA;
DRAWTEXT(月金,0.17,'月金叉'),COLORMAGENTA;
日死:IF(CROSS(日DEA,日DIF),-0.5,0),COLORYELLOW;
周死:IF(CROSS(周DEA,周DIF),-1,0),COLORBLUE;
月死:IF(CROSS(月DEA,月DIF),-1.3,0),COLORGREEN;
通达信杂交版KDJ指标公式
N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1);
D:Sma(K,3,1);
J:3*K-2*D,LINETHICK1;
IF(J<0,J,DRAWNULL),COLORGREEN,LINETHICK2;
IF(K>90,K,DRAWNULL),COLOR0000FF,LINETHICK2;
IF(D>85,D,DRAWNULL),COLORFFFF11,LINETHICK2;
DRAWICON(K>80 AND D>80 ANDcrOSS(D,K),95,2);
obv:=K;
P:=12;
A1:=REF(OBV,P)=HHV(OBV,2*P+1);
B1:=FILTER(A1,P);
C1:=BacKSET(B1,P+1);
D1:=FILTER(C1,P);
{高点1}R11:=BACKSET(ISLAstBAR,BArslAST(D1)+1);
S11:=R11>REF(R11,1);
DRAWLINE(D1,OBV,S11,OBV,1),COLORLIRED,LINETHICK1;
A2:=REF(OBV,P)=LLV(OBV,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);
{低点1}T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
DRAWLINE(D2,OBV,U11,OBV,1),COLORLIGREEN,LINETHICK1;
Q1:=INTPART(3*8/18);
A12:=REF(OBV,Q1)=HHV(OBV,2*Q1+1);
B12:=FILTER(A12,Q1);
C12:=BACKSET(B12,Q1+1);
D12:=FILTER(C12,Q1);
{高点2}R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1);
S112:=R112>REF(R112,1);
RAWLINE(S11,OBV,S112,OBV,1),COLORRED,LINETHICK1;
Q2:=INTPART(3*8/18);
A22:=REF(OBV,Q2)=LLV(OBV,2*Q2+1);
B22:=FILTER(A22,Q2);
C22:=BACKSET(B22,Q2+1);
D22:=FILTER(C22,Q2);
{低点2}T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1);
U112:=T112>REF(T112,1);
DRAWLINE(U11,OBV,U112,OBV,1),COLORGREEN,LINETHICK1;
DRAWICON(D2,OBV,1);
DRAWICON(D1,OBV,2);
压力:REF(OBV,BARSLAST(D1)),COLORFF00FF,NODRAW;
支撑:REF(OBV,BARSLAST(D2)),COLOR00FF00,NODRAW;
向上:CROSS(OBV,压力*1.01),NODRAW;
相对能量:(OBV-支撑)/(压力-支撑)*100,COLORYELLOW,NODRAW;
STICKLINE(C>0,支撑,支撑,1,0),COLORGREEN;
STICKLINE(C>0,压力,压力,1,0),COLORRED;
DRAWTEXT(CROSS(OBV,压力*1.01),压力,'压力线'),COLORRED;
DRAWTEXT(CROSS(支撑*0.99,OBV),支撑,'支撑线'),COLORGREEN;
RSVQ:=(CLOSE-LLV(LOW,INTPART(N*4.4)))/(HHV(HIGH,INTPART(N*4.4))-LLV(LOW,INTPART(N*4.4)))*100;
KQ:SMA(RSVQ,INTPART(M1*4.4),4),LINETHICK1,COLOR006FDD,NODRAW;
DQ:SMA(KQ,INTPART(M2*4.4),4),LINETHICK1,COLOR009F00,NODRAW;
JQ:3*KQ-2*DQ,LINETHICK,COLORABAB56;
RSVE:=(CLOSE-LLV(LOW,14))/(HHV(HIGH,14)-LLV(LOW,14))*100;
K0:=SMA(RSV,3,1);
D0:=SMA(K0,3,1);
JE:=3*K0-2*D0;
STICKLINE(KQ>=DQ,KQ,DQ,0.5,0),COLOR006FDD;
STICKLINE(KQ
STICKLINE(KQ>DQ,KQ,DQ,0.3,0),COLOR0000EF;
STICKLINE(KQ<=DQ,KQ,DQ,0.3,0),COLOR33AA33;
STICKLINE(J>REF(J,1),HHV(J,3),LLV(J,3),0,0),COLOR00AAFF;
STICKLINE(J>REF(J,1),J,REF(J,1),0.5,0),COLOR0044FF;
STICKLINE(J>REF(J,1),J,REF(J,1),0.3,0),COLOR0088FF;
STICKLINE(J>REF(J,1),J,REF(J,1),0,0),COLOR00AAFF;
VAR1:=C-REF(C,1);
VAR2:=100*ema(EMA(VAR1,6),6)/EMA(EMA(Abs(VAR1),6),6);
MA5:=EMA(C,5);
MA13:=EMA(C,13);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),0),COLOR0000FF;
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),0),COLOR00FF00;
BT:(LLV(VAR2,2)=LLV(VAR2,7) AND COUNT(VAR2<0,2) AND CROSS(VAR2,MA(VAR2,2))) ANDREF(DOWN,1)REF(DOWN,1);
STICKLINE(BT,0,3,2,0),COLOR0000CC;
DRAWTEXT(BT,-3,'短牛'),COLOR0000FF;
TJ1:=REF(DOWN,1)REF(DOWN,1) AND C
STICKLINE(TJ1,0,2,2,0),COLORFF00FF;
DRAWTEXT(TJ1,-5,'中牛'),COLORFF00FF;
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
TJ2:=REF(DOWN,1)REF(DOWN,1) AND C
STICKLINE(TJ2,0,2,4,0),COLORRED;
DRAWTEXT(TJ2,6,'大牛'),COLOR00FFFF;
ST:=REF(UP,1)>REF(UP,2) AND DOWN
STICKLINE(ST,100,102,2,0),COLOR00FF00;
DRAWTEXT(ST,106,'卖'),COLOR00FF00;
N1:=6;
N2:=12;
N3:=24;
LC := REF(CLOSE,1);
rsi1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
RSI3:=SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;
周RSI1:=MA("RSI.RSI1#WEEK"(N1,N2,N3) ,5),LINETHICK3,COLORYELLOW;
周RSI2:=MA("RSI.RSI2#WEEK"(N1,N2,N3) ,5),LINETHICK3,COLORFF00FF;
周RSI3:=MA("RSI.RSI3#WEEK"(N1,N2,N3) ,5),LINETHICK3,COLORGREEN;
周金▲:DRAWTEXT(CROSS("RSI.RSI1#WEEK"(N1,N2,N3),"RSI.RSI2#WEEK"(N1,N2,N3)) ,10,'▲周金'),COLORRED;
周死?:DRAWTEXT(CROSS("RSI.RSI2#WEEK"(N1,N2,N3),"RSI.RSI1#WEEK"(N1,N2,N3)) ,100,'?周死'),COLORGREEN;
牛市通网是一个牛股推荐网与低风险投资知识网,可以在线联系客服领取牛股。牛市通网从权威的投资专家、金融分析师等投资信息中挑选优质的文章进行发布。牛市通网主要为投资者提供股票知识、股票观点、股票分析和明智金融投资讨论等信息。