[轉(zhuǎn)]暴好的公式-----[神之KDJ]原碼 RSV:=(CLOSE-LLV(LOW,S))/(HHV(HIGH,S)-LLV(LOW,S))*100; K:SMA(RSV,M1,1),COLORRED,LINETHICK1; D:SMA(K,M2,1),COLORGREEN,LINETHICK1; J:3*K-4*D,COLORMAGENTA,LINETHICK1; 乖離:K-D LINETHICK0; {TY:=K;{通用曲線值的引入} AA:=REF(TY,N)=HHV(TY,2*N+1); BB:=BACKSET(AA,N+1); CC:=FILTER(BB,N) AND TY=HHV(TY,N+1); DRAWICON(CC,TY*1.20,10); AA2:=REF(TY,N)=LLV(TY,2*N+1); BB2:=BACKSET(AA2,N+1); CC2:=FILTER(aa2,N) AND TY=LLV(bb2,N+1); DRAWICON(CC2,TY*0.95,11); GG:=ISLASTBAR AND REF(CC,BARSLAST(CC)); HH:=BACKSET(GG,BARSLAST(CC)+1); II:=HH>REF(HH,1); JJ:=REF(BARSLAST(CC),1); KK:=BACKSET(II,JJ+2); LL:=KK>REF(KK,1); DRAWLINE(LL,kk,II,TY,1),COLORRED; CS:=(REF(TY,BARSLAST(II))-REF(TY,BARSLAST(LL)))/(BARSLAST(kk)-BARSLAST(ll)); 阻力線:=REF(ll,BARSLAST(II))+BARSLAST(II)*CS; 阻力值:=阻力線,LINETHICK0; DRAWICON(CROSS(TY,阻力線),阻力線*0.99,12); GG2:=ISLASTBAR AND REF(CC2,BARSLAST(CC2)); HH2:=BACKSET(GG2,BARSLAST(hh2)+1); II2:=HH2>REF(HH2,1); JJ2:=REF(BARSLAST(CC2),1); KK2:=BACKSET(II2,JJ2+2); LL2:=KK2>REF(jj2,1); DRAWLINE(LL2,TY,II2,1),COLORGREEN;} DRAWTEXT( K<D and SYSPARAM(1)=BARSCOUNT(c) ,K,'KD翻黑'),SHIFT6 ALIGN4,COLORWHITE; DRAWTEXT( K>D and SYSPARAM(1)=BARSCOUNT(c) ,K,'KD翻紅'),SHIFT6 ALIGN4 COLORRED; DRAWTEXT( J>100 and SYSPARAM(1)=BARSCOUNT(c) ,J,'J值高檔'),SHIFT6 ALIGN3 ColorA17BFF; DRAWTEXT( J<-8 and SYSPARAM(1)=BARSCOUNT(c) ,J,'J值低檔'),SHIFT6 ALIGN3 COLORYELLOW; DRAWTEXT( k-d<-18 and SYSPARAM(1)=BARSCOUNT(C) ,j, '負(fù)乖離大'),SHIFT5 ALIGN5,COLORWHITE; DRAWTEXT( k-d>18 and SYSPARAM(1)=BARSCOUNT(C) ,j, '正乖離大'),SHIFT5 ALIGN5,COLORWHITE;Var1:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-4*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1); 捕食頂?shù)? EMA(Var1,N),LINETHICK0; 黃土地: 5; 進(jìn)入階段底部: IF(捕食頂?shù)?lt;9,66,0); IF(CROSS(捕食頂?shù)?N1),100,0);VAR1:=EMA(HHV(HIGH,500),21); VAR2:=EMA(HHV(HIGH,250),21); VAR3:=EMA(HHV(HIGH,90),21); VAR4:=EMA(LLV(LOW,23),21); VAR5:=EMA(LLV(LOW,250),21); VAR6:=EMA(LLV(LOW,90),21); VAR7:=EMA((VAR4*0.96+VAR5*0.96+VAR6*0.96+VAR1*0.558+VAR2*0.558+VAR3*0.558)/6,21); VAR8:=EMA((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR1*0.55+VAR2*0.55+VAR3*0.65)/6,21); VAR9:=EMA((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR1*0.68+VAR2*0.68+VAR3*0.68)/6,21); VARA:=EMA((VAR7*3+VAR8*2+VAR9)/6*1.676,21); VARB:=REF(LOW,1); VARC:=SMA(ABS(LOW-VARB),3,1)/SMA(MAX(LOW-VARB,0),3,1)*100; VARD:=EMA(IF(CLOSE*1.44<=VARA,VARC*10,VARC/10),3); VARE:=LLV(LOW,30); VARF:=HHV(VARD,30); VAR10:=IF(MA(CLOSE,43),1,0); 短線快槍:-EMA(IF(LOW<=VARE,(VARD+VARF*8)/2,0),3)/456*VARe,COLORSTICK,LINETHICK2; 短線快槍1:(短線快槍>0); 0; 短線快槍; 4; 1;股票論壇 www.55188.com |
|