Ⅰ 求 通達信KDJ日、周、月金叉公式!或者其他KDJ MACD顛峰公式!
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,COLORRED,LINETHICK1;
DRAWICON(CROSS(K,D) AND K<20 AND D<20,2,23);
DRAWICON(CROSS(K,D) AND K<20 AND D<20,-2,23);
JCCOUNT:=COUNT(CROSS(K,D),BARSLAST(K>=D));
二次金:=CROSS(K,D) AND D<20 AND COUNT(JCCOUNT=2,34)=1;
STICKLINE(二次金,D,D+5,5,0),COLORFF80FF;
DRAWICON(二次金,D*0.85,1);
{DRAWTEXT(ISLASTBAR=1,J,'↖短線'),COLORRED;}
月K:MA("KDJ.K#MONTH"(9,3,3),23),LINETHICK1,COLORFF00FF;
月D:MA("KDJ.D#MONTH"(9,3,3),23),LINETHICK1,COLORFF00FF;
月J:MA("KDJ.J#MONTH"(9,3,3),23),LINETHICK1,COLORFF00FF;
周K:MA("KDJ.K#WEEK"(9,3,3),5),COLORGREEN,LINETHICK2;
周D:MA("KDJ.D#WEEK"(9,3,3),5),COLORGREEN,LINETHICK2;
A3:=周K>周D;
周J:MA("KDJ.J#WEEK"(9,3,3),5),COLORCYAN,LINETHICK2;
IF(周J>REF(周J,1),周J,DRAWNULL),COLORFF00FF,LINETHICK3;
DRAWICON(C>REF(C,1) AND 周J<REF(周J,1) AND 周J>99,周J*1.02,15);
{DRAWICON(C>REF(C,1) AND 周J<REF(周J,1) AND 周J>99,113,39);}
DRAWICON(C<REF(C,1) AND 周J>REF(周J,1) AND 周J<20, 周J*0.96,1);
{DRAWICON(C<REF(C,1) AND 周J>REF(周J,1) AND 周J<20,-2,1);}
日金叉:=CROSS(K,D);
周金叉:=CROSS(周K,周D);
月金叉:=CROSS(月K,月D);
周日金叉:COUNT(日金叉,3)=1 AND (COUNT(周金叉,3)=1 OR COUNT(月金叉,3)=1);
STICKLINE(周日金叉,0,20,3,0),COLORRED;
STICKLINE(周日金叉,20,40,2,0),COLORFF00FF;
STICKLINE(周日金叉,40,60,1,0),COLORGREEN;
{DRAWTEXT(周日金叉,45,'↖周日金叉'),COLOR00FFFF;
DRAWTEXT(ISLASTBAR=1,月J,'↖月J'),COLORGREEN;
DRAWTEXT(ISLASTBAR=1,周J,'↖周J'),COLOR00FFFF;}
100,COLORCYAN,POINTDOT;
0,COLORYELLOW,POINTDOT;
20,COLOR00FFFF,POINTDOT,LINETHICK4;
80,POINTDOT;
DRAWTEXT(ISLASTBAR=1,20,'↖變盤區'),COLORRED;
DRAWTEXT(ISLASTBAR=1,80,'↖變盤區'),COLORGREEN;
DRAWTEXT(ISLASTBAR=1,100,'↖超買區'),COLORCYAN;
DRAWTEXT(ISLASTBAR=1,0,'↖超賣區'),COLOR00FFFF;
換手:=VOL/CAPITAL*100,NODRAW,COLORMAGENTA;
六十日換手:SUM(換手,60),COLORGREEN,NODRAW;
控盤比例:SUM(換手,60)/100*20,NODRAW,COLOR00FFFF;
月建倉:=月K<20 AND 月D<20 AND 月J<20,NODRAW;
周建倉:=周K<20 AND 周D<20 AND 周J<20,NODRAW;
日建倉:=K<20 AND D<20 AND J<20,NODRAW;
STICKLINE({月建倉 AND} 周建倉 AND 日建倉,50,25,4,0),COLORGREEN;
DRAWTEXT(CROSS(周K,周D),周K,'↖周金');
DRAWTEXT(CROSS(月K,月D),月K,'↖月金'),COLOR00FFFF;
STICKLINE(C>0,115,120,2,1),COLOR00FFFF;
STICKLINE(C>0,-15,-20,2,1),COLORFFFF88;
STICKLINE(周K>=周D,110,120,2,0),COLOR6666FF;
STICKLINE(月K>=月D,-10,-20,2,0),COLOR660099;
STICKLINE(J<0 AND 周J<0 AND 月J<0,-5,110,1,0),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=10,108,'周KD金叉、死叉'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=10,-5,'月KD金叉、死叉'),COLORFFFFFF;
Ⅱ 求通達信畫線公式
這個畫線公式需要源碼,以下是通達信畫線指標:
參數設置
AA:=REF(H,N)=HHV(H,2*N+1);{N日前的最高價}
QY:=BACKSET(AA,N+1);{周期記錄}
CC:=FILTER(QY,N) AND H=HHV(H,N+1);{周期過濾 最高價最高值}
DDD:=BARSLAST(CC),NODRAW;{CC條件成立的天數}
GDTS:=IF(CC,CURRBARSCOUNT,0),NODRAW;{CC成立 返回交易日的周}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS),NODRAW;{DDD成立,返回DDD日前的GDTS,否則返回GDTS}
GDCS1:=CONST(DINGBUTS),NODRAW;{取DINGBUTS值}
GDCS13:=CONST(REF(HIGH,GDCS1-1));
DINGBUTS1:=REF(DINGBUTS,DDD+1),NODRAW;
GDCS2:=CONST(DINGBUTS1);
GDCS23:=CONST(REF(HIGH,DINGBUTS1-1));
XG1:=BACKSET(ISLASTBAR,GDCS1);{ ISLASTBAR 判斷是否為最後一個周期}
XG2:=BACKSET(ISLASTBAR,DINGBUTS1);
STICKLINE(XG2,GDCS23,GDCS23,0.5,1),COLORWHITE,LINETHICK3;{白線}
STICKLINE(XG1,GDCS13,GDCS13,0.5,1),COLORYELLOW,LINETHICK3;{黃線}
{谷線}
AA1:=REF(L,N1)=LLV(L,2*N1+1);
QY1:=BACKSET(AA1,N1+1);
CC1:=FILTER(QY1,N1) AND L=LLV(L,N1+1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
DDCS13:=CONST(REF(L,DDCS1-1));
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
DDCS23:=CONST(REF(L,DDTS2-1));
XD1:=BACKSET(ISLASTBAR,DDCS1);
XD2:=BACKSET(ISLASTBAR,DDTS2);
STICKLINE(XD2,DDCS23,DDCS23,0.5,1),COLORMAGENTA,LINETHICK3;
STICKLINE(XD1,DDCS13,DDCS13,0.5,1),COLORCYAN,LINETHICK3;
{壓力支撐}
M:=INTPART(3*N2/5);{壓力線取}
AAA:=REF(H,M)=HHV(H,2*M+1);
QYY:=BACKSET(AAA,M+1);
CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);
DDDD:=BARSLAST(CCC),NODRAW;
GDTSS:=IF(CCC,CURRBARSCOUNT,0),NODRAW;
DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS),NODRAW;
GDCS11:=CONST(DINGBUTSS),NODRAW;
DINGBUTS11:REF(DINGBUTSS,DDDD+1),NODRAW;
GDCS22:=CONST(DINGBUTS11);
高點壓力M:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORBB8000,LINETHICK2;
W:=INTPART(3*N3/5);
AA11:=REF(L,W)=LLV(L,2*W+1);
QY11:=BACKSET(AA11,W+1);
CC11:=FILTER(QY11,W) AND L=LLV(L,W+1);
DD11:=BARSLAST(CC11);
DDTSS:=IF(CC11,CURRBARSCOUNT,0);
DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);
DDCS11:=CONST(DDTS11);
DDTS22:=REF(DDTS11,DD11+1);
DDCS22:=CONST(DDTS22);
低點支撐M:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1),COLORMAGENTA,LINETHICK2;
{
ZGSTAR:=(高點壓力M+低點支撐M)/2;
ZGEND:=CONST((高點壓力M+低點支撐M)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
中軌:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORFF55BB,LINETHICK2;
}
{DRAWKLINE(H,O,L,C);}
{主圖中的倍量K線如何變黃色}
V2V:=V/REF(V,1)>=1.9 AND C>REF(C,1);
STICKLINE(V2V,O,C,-1,0),COLORYELLOW;
{漲停}
ZT:=C/REF(C,1)>1.097;
STICKLINE(ZT,O,C,-1,0),COLORMAGENTA;
ZZ:=(O+H+L)/3;
黃金買點:EMA(ZZ,7),COLORGREEN,LINETHICK1;
TT2:=DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.15),0.9);
TT1:=REF(EMA(TT2,3),1);
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;
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
BB1:=L<AA1*0.9;
EE1:=VOL<MA(V,5)*1.5;
FF1:=BB1 AND CC1 AND DD1 AND EE1;
F:=100*(C-REF(C,1))/REF(C,1);
P1:=IF(C<REF(O,1) AND F<0,1,0);
P2:=IF(C<REF(O,2) AND F<0,1,0);
TT3:=P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1 ;
TT4:=P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0 ;
Z1:=MA(C,13);
ZX:=REF(Z1,13/2+1);
DRAWICON(CROSS(ZX,C),H*1.01,2);
DRAWTEXT(CROSS(CLOSE,TT1)AND J<55,LOW,'買'),COLORRED;
DRAWTEXT(CROSS(88,RSI),HIGH * 1.02,'短頂'),COLOR00FFFF;
STICKLINE(TT3,OPEN,CLOSE,3,0),COLORFF00FF;
A1:=EMA(C,14)COLORWHITE,LINETHICK1;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
出擊:IF(A1X>=0,REF(EMA(C,14),BARSLAST(CROSS(A1X,0))+1),DRAWNULL)COLORRED,LINETHICK1;
休假:IF(A1X<0,REF(EMA(C,14),BARSLAST(CROSS(0,A1X))+1),DRAWNULL)COLORGREEN,LINETHICK1;
STICKLINE(CROSS(A1X,0),C,O,2,0)COLORYELLOW;
STICKLINE(CROSS(0,A1X),C,O,2,0)COLORGREEN;
STICKLINE(CROSS(A1X,0)OR CROSS(0,A1X),REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,2,0)COLORWHITE;
STICKLINE(ISLASTBAR,REF(EMA(C,14),1),REF(EMA(C,14),1)*0.998,5,0)COLORWHITE;
Ⅲ 日,周,月,kdj同時金叉選股公式,(用在通達信上) 請幫寫一個選股公式.謝謝!
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;
周K:= "KDJ.K#WEEK" (9,3,3);
周D:= "KDJ.D#WEEK" (9,3,3);
周J:= "KDJ.J#WEEK" (9,3,3);
月K:= "KDJ.K#MONTH" (9,3,3);
月D:= "KDJ.D#MONTH" (9,3,3);
月J:= "KDJ.J#MONTH" (9,3,3);
共振:CROSS(K,D) AND CROSS(周K,周D) AND CROSS(月K,月D) AND K<20;
KDJ月周日20以下共振選股,試試,怎麼樣,有問題再聯系
Ⅳ 知道通達信指標源碼,怎樣編出這個的選股公式如能把主圖公式指標也給改一下讓它顯示的更直觀更好。
選股公式:
JJ1:=MA(C,30);
JJ2:=MA(C,60);
入1:=IF(JJ1>REF(JJ1,1),JJ1,DRAWNULL),COLORRED,LINETHICK2;
入2:=IF(JJ1<REF(JJ1,1),JJ1,DRAWNULL),COLOR00FF00,LINETHICK2;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,Q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DY;
TT:=(V2*1.01-REF(V2,1));
TT2:=(REF(V2*1.01,1)-REF(V2,2));
YY:=TT>3*ABS(TT2);
TT1:=EMA(V2,15);
DRAWTEXT(TT>0 AND CROSS(TT,TT1) AND YY,LOW,'━買入'),COLORYELLOW;
A111:=COST(85);
A222:=COST(15);
A333:=A111-A222;
A444:=(A111+A222)/2;
單峰密集:=A333/A444*100<30,LINETHICK0;
BU1:=HHV(HIGH,250);
BU2:=LLV(LOW,250);
BU3:=BU1-BU2;
BU4:=(A444-BU2);
低位:=A444<(BU3*04+BU2),LINETHICK0;
低位單峰密集:=單峰密集 AND 低位;
BU5:=C/REF(C,1)>1.04; {AND V/REF(V,1)>2;{ AND H=C;}
主力持倉%:=EMA(100*(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30)),3);
主力持倉:=主力持倉%>=75 {AND 主力持倉%<=91} AND C>0 AND CLOSE>OPEN;
強突:=主力持倉 AND 低位單峰密集 AND BU4 AND WINNER(C)>=0.90 AND BU5;
集買:=低位單峰密集 AND TT>0 AND CROSS(TT,TT1) AND YY AND WINNER(C)>=0.90;
DRAWICON(集買,HIGH,6);