最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 《金叉买入》指标中出现金叉的选股公式

    正文概述    2024-04-14 08:22:40  

    九毛八公式指标

    公式模块:

    原指标是九龙峰老师的,在此感谢九龙峰老师。请老师帮助写一个《金叉买入》指标中出现金叉的选股公式,先谢谢老师!祝老师中秋快乐!
    金叉买入源码:
    {副图}{大智慧L2新一代公式}

    {DRAWGBK((CLOSE > 0),STRIP(RGB(4,1,28),RGB(4,1,35),0));
    DRAWTEXTREL(10,900,'㊣十二星座*神獒赢富㊣'),linethick1,COLOR00EEff;}
    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;
    DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
    DEA:=EMA(DIFF,9);
    macd:=2*(DIFF-DEA);
    {YLZC:=if(close=INDEXC,(INDEXC+INDEXh+INDEXl+INDEXO)/4,AMOUNT/(vol+0.01)/100);
    阻价:=if(close=INDEXC,YLZC+INDEXC-INDEXl,YLZC+(close-low));
    支价:=if(close=INDEXC,INDEXl+INDEXC-YLZC,low+(close-YLZC));
    今压:=REF(阻价,1);
    今撑:=REF(支价,1);
    明压:=阻价;
    明撑:=支价;
    rsv1:=(hhv(h,9.8)-c)/(hhv(h,9.8)-llv(l,9.8))*101;
    kk:=sma(rsv1,3,1);
    dd:=sma(kk,3,1);
    jj:=3*kk-2*dd;
    买卖:=if(jj>=100,100,if(jj<=0,0,jj));
    明天买:=if(买卖=100,0-10,0);
    明天买1:=ref(明天买,1)=-10 and 明天买=0;
    明天卖:=if(买卖=0,90,100);
    KX:=250;
    KH:=HHV(K,KX);
    DH:=HHV(D,KX);
    JH:=HHV(J,KX);
    KL:=LLV(K,KX);
    DL:=LLV(D,KX);
    JL:=LLV(J,KX);
    HKMAX:=MAX(KH,MAX(DH,JH));
    LKMIN:=MIN(KL,MIN(DL,JL));
    KHLB:=(HKMAX+LKMIN)/2;
    KHLC:=HKMAX-LKMIN;
    MHF:=HHV(DIFF,KX);
    MHD:=HHV(DEA,KX);
    MHM:=HHV(MacD,KX);
    MLF:=LLV(DIFF,KX);
    MLD:=LLV(DEA,KX);
    MLM:=LLV(MACD,KX);
    HMAX:=MAX(MHF,MAX(MHD,MHM));
    LMIN:=MIN(MLF,MIN(MLD,MLM));
    FHLB:=(HMAX-LMIN)/100;
    FHLC:=HMAX-LMIN;
    SH:=(0-FHLB)*(KHLC/FHLC)+KHLB;
    DIFFA:=(DIFF-FHLB)*(KHLC/FHLC)+KHLB;
    DEAA:=(DEA-FHLB)*(KHLC/FHLC)+KHLB;
    MACDA:=(macd-FHLB)*(KHLC/FHLC)+KHLB;
    CDA:=MACD<ref(MACD,1) and MACD>0;
    CDB:=MACD>=ref(MACD,1) and MACD>0;
    CDC:=MACD>ref(MACD,1) and MACD<0;
    CDD:=MACD<=ref(MACD,1) and MACD<0;
    TYP:=(HIGH+LOW+CLOSE)/3;
    MACD金叉:=crOSS(MACD,DIFF) AND MACD>=(0-0.05) AND MACD<=0.02;
    XX:=ema(MA(LOW,3)*0.96,30);
    DIFF金叉:=if(CROSS(DIFF,DEA) AND XX-REF(XX,1)>0 AND MACD>=REF(MACD,1) AND DIFF<=0,1,0);
    低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
    DIFDEA:=COUNT(CROSS(DIFF,DEA),BArslAST(DEA>=0));
    二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(DIFDEA=2,21)=1;
    A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
    底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
    A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
    顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);}
    {周金叉,死叉}
    周DIFF:="MACD.DIFF#WEEK";
    周DEA:="MACD.DEA#WEEK";
    {周MACD:="MACD.MACD#WEEK";
    DIF周金叉:=CROSS(周DIFF,周DEA);
    MACD周金叉:=CROSS(周MACD,周DIFF) AND 周MACD>=(0-0.05) AND 周MACD<=0.02;}
    {月金叉,死叉}
    月DIFF:="MACD.DIFF#MONTH";
    月DEA:="MACD.DEA#MONTH";
    {DIF月金叉:=CROSS(月DIFF,月DEA);}
    周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);
    周金叉:=cross(周K,周D);
    {日金叉:=FILTER(cross(K,D) and K<20,4);
    KDB:=BARSLAST(ref(cross(k,d),1));
    KDDB:=ref(close,KDB+1)>close and ref(k,KDB+1)<k and cross(k,d);
    K底背:=if(FILTER(KDDB>0,5),1,0);
    KDD:=BARSLAST(ref(cross(d,k),1));
    K顶背:=ref(close,KDD+1)<close and ref(k,KDD+1)>k and cross(d,k);}{顶背离}
    {MD1:=MA(CLOSE,80)-MA(CLOSE,13)/3;
    MD2:=MA((CLOSE-MD1)/MD1,3);
    买点1:CROSS(MD2,0) AND LOW/REF(HIGH,1)<1.012 AND J<75 AND J>REF(J,1);
    ma12:=MA(CLOSE,12);
    佳点:=if(FILTER(MACD>=REF(MACD,5) AND open<=ref(close,1) and XX-REF(XX,1)>0 AND MACD<=0 AND ma12-REF(ma12,1)>=0,3) and J<80 and J>ref(J,1) and D>ref(D,1) and (diff>=ref(diff,1) or dea>=ref(dea,1)),1,0);
    DX0:=EMA(CLOSE,2)-EMA(OPEN,5);
    DX1:=if(CROSS(DX0,MACD) AND LOW<=XX AND MACD<=(0-0.11) and (J<20 or K<20),1,0);}{短线10%}
    {MA10:=MA(CLOSE,10);
    SS:=EMA(MA(HIGH,3)*1.05,30);
    LQS:=if(FILTER(0.7*(CROSS(DIFF,DEA) AND CLOSE<SS AND XX-REF(XX,1)>0 AND CROSS(MACD,0) AND MACD>=0 AND DIFF>0 AND ma10-REF(ma10,1)>0 AND VOL>REF(VOL,1))>=0.7 AND (CLOSE<SS AND XX-REF(XX,1)>0),5) AND J<80,1,0);}{量价齐上}
    {最佳点:=IF(COUNT(MD2>REF(MD2,1),3)=3 AND COUNT(MD2<0,10)=10 AND REF(MD2,3)=LLV(MD2,10) and J<80 and J>ref(J,1),1,0);
    买点2:=REF(MD2,2)=LLV(MD2,20) AND REF(MD2,2)<0.071 AND REF(MD2,2)<REF(MD2,1) AND
    NOT(REF(LOW,1)>REF(HIGH,2) AND LOW>REF(HIGH,1)) AND CLOSE>REF(CLOSE,1) AND J<75 AND J>REF(J,1);}
    {预涨}
    {YZ:=(INTPART(SMA(RSV,3,1))+INTPART(SMA(K,3,1)))/2;
    预涨:=cross(yz,50) and j<95 and diff>ref(diff,1) and low<ref(close,1);
    KD金叉:=cross(K,D)and J>20 and J<80;}
    金叉:月金叉 or 周金叉{ or 买点1 or 买点2 or DIF周金叉 or DIF月金叉};
    死叉:cross(月d,月k) or cross(周d,周k) or cross(月dea,月diff) or cross(周dea,周diff);
    h1:=(c-hhv(c,10))/hhv(c,10)*100<-4;
    up10:=(c-ma(c,15))/ma(c,15)*100<0.2;
    {l1:llv(l,5)>llv(l,36);}{处于上升通道}
    买入1:=金叉 and not(死叉) and h1;
    买入2:=金叉 and not(死叉) and up10;
    买入:买入1 or 买入2;
    drawtext(买入1,买入1*1.2,'买入1'),colorred;
    drawtext(买入2,买入2*1,'买入2'),colorgreen;
    drawtext(死叉,死叉*1,'死叉'),colorwhite;
    drawtext(金叉,0.2,'金叉'),coloryellow;

    周K:="KDJ.K#WEEK"(9,3,3);
    周D:="KDJ.D#WEEK"(9,3,3);
    月K:="KDJ.K#MONTH"(9,3,3);
    月D:="KDJ.D#MONTH"(9,3,3);
    月金叉:=cross(月K,月D);
    周金叉:=cross(周K,周D);
    金叉:月金叉 or 周金叉;

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 《金叉买入》指标中出现金叉的选股公式 加入收藏