最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 把KDJ共振金叉指标改写成选股公式

    正文概述    2024-04-14 09:37:12  

    九毛八公式指标

    当月金叉,周金叉,日金叉三个信号中满足任意两个信号同时出现,请帮忙改成选股公式!!以解决,谢谢休闲2010老师!!! 共振金叉KDJ源码: 月K:"KDJ.K"(89,3,3),COLOR00FF00; 月D:"KDJ.D"(89,3,3),COLOR00FF00,LINETHICK2; 周K:"KDJ.K"(27,3,3),COLORRED; 周D:"KDJ.D"(27,3,3),COLORRED,LINETHICK2; 日K:"KD.K"(5,3,3),COLORWHITE; 日D:"KD.D"(5,3,3),COLORWHITE,LINETHICK2; 日金叉:IF(CROSS(日K,日D),50,0),COLORFFFFFF; DRAWTEXT(日金叉,50,'日叉'),COLORFFFFFF; 周金叉:IF(CROSS(周K,周D),30,0),COLORRED; DRAWTEXT(周金叉,30,'周叉'),COLORRED; 月金叉:IF(CROSS(月K,月D),20,0),COLOR0080FF; DRAWTEXT(月金叉,20,'月叉'),COLORYELLOW; {KD在30以下多次金叉} JM:=CROSS("KDJ.K"(5,3,3),"KDJ.D"(5,3,3)); JMCOUNT:=COUNT(JM,BARSLAST("KDJ.D"(5,3,3)>=30)); JMTJ:=28*("KDJ.D"(5,3,3)<30 and count(jmcount=1,21)=1);DRAWTEXT (jmtj,70,'①'),colorwhite; jmtj2:=28*("KDJ.D"(5,3,3)<30 count(jmcount5 =2,21)=1);DRAWTEXT (jmtj2,70,'②'),coloryellow; jmtj3:=28*("KDJ.D"(5,3,3)<30 count(jmcount8=3,21)=1);DRAWTEXT (jmtj3,70,'③'),coloryellow; jmtj4: =28*("KDJ.D"(5,3,3)<30 count(jmcount11=4,21)=1);DRAWTEXT (jmtj4,70,'④'),coloryellow; jmtj5:=28*("KDJ.D"(5,3,3)<30 count(jmcount14 =5,21)=1);DRAWTEXT (jmtj5,70,'⑤'),coloryellow; 0,coloryellow; diff:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)0,5),0,0.75,3,0),COLORGREEN; DRAWTEXT(FILTER(B1>0,5),0.57,'MACD底背离'),COLORGREEN; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100; K:=SMA(RSV,3,1); D:=SMA(K,3,1); A2:=BARSLAST(REF(CROSS(K,D),1)); B2:=REF(C,A2+1)>C AND REF(K,A2+1)0,5),0,1,3,0),COLORYELLOW; DRAWTEXT(FILTER(B2>0,5),0.80,'KDJ底背离'),COLORYELLOW; LC :=REF(CLOSE,1); 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)0,5),0,0.5,3,0),COLORWHITE; DRAWTEXT(FILTER(B3>0,5),0.25,'RSI底背离'),COLORWHITE; 2,COLORRED; C1:=BARSLAST(REF(CROSS(DEA,DIFF),1)); D1:=REF(C,C1+1)DIFF AND CROSS(DEA,DIFF); MACD顶背离:STICKLINE(FILTER(D1>0,5),2,1.25,3,0),COLOR0066FF; DRAWTEXT(FILTER(D1>0,5),1.47,'MACD顶背离'),COLOR0066FF; C2:=BARSLAST(REF(CROSS(D,K),1));D2:=REF(C,C2+1)K AND CROSS(D,K); KDJ顶背离:STICKLINE(FILTER(D2>0,5),2,1,3,0),COLORRED; DRAWTEXT(FILTER(D2>0,5),1.2,'KDJ顶背离'),COLORRED; C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1)); D3:=REF(C,C3+1)RSI1 AND CROSS(RSI2,RSI1); RSI顶背离:STICKLINE(FILTER(D3>0,5),2,1.5,3,0),COLORFF00FF; DRAWTEXT(FILTER(D3>0,5),1.75,'RSI顶背离'),COLORFF00FF; 0,COLORFFA2AF; 20,COLORFFA2AF,POINTDOT; 50,COLORFFA2AF; 80,COLORFFA2AF,POINTDOT;

    公式模块:

    月K:="kdj.K"(89,3,3);

    月D:="kdJ.D"(89,3,3); 周K:="KDJ.K"(27,3,3); 周D:="KDJ.D"(27,3,3); 日K:="KD.K"(5,3,3); 日D:="KD.D"(5,3,3); 日金叉:=crOSS(日K,日D); 周金叉:=CROSS(周K,周D); 月金叉:=CROSS(月K,月D); 日金叉+周金叉+月金叉>1;

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 把KDJ共振金叉指标改写成选股公式 加入收藏