您现在的位置:程序化交易>> 期货公式>> 文华财经>> 文华财经知识>>正文内容

麻烦老师转文华指标,谢谢! [文华财经]

  • 咨询内容:  
    NF:=1;Z1:=(REF(H,NF)-REF(L,NF))/REF(C,NF+1)*100;Z2:=(REF(H,NF+1)-REF(L,NF+1))/REF(C,NF+2)*100;Z3:=(REF(H,NF+2)-REF(L,NF+2))/REF(C,NF+3)*100;前三日均振:(Z1+Z2+Z3)/3,NODRAW;
    P3:EMA(CLOSE,43),COLORGREEN,LINETHICK1;IF(P3>REF(P3,1), P3,DRAWNULL),COLORRED,LINETHICK1;
    C2:= O<=REF(L,1)*0.98 AND CLOSE/OPEN>=1.05 AND  REF(SUM((C-REF(C,1))/C*100,3)<-7,1) ;DRAWICON(C2,LOW*0.97,38);AP1:=MA(C,1);BP1:=SMA(SMA(SMA(AP1,2,1),2,1),2,1);CP1:=MA(BP1,3);DRAWBAND(BP1,RGB(255,0,0),CP1,RGB(0,255,0));
    BDGD:=C=HHV(C,40);GDSJ:=BARSLAST(FILTER(CROSS(0.8,BDGD),20))+1;GD:REF(H,GDSJ),COLOR00FF00,POINTDOT,LINETHICK1;TTP:=CROSS(C,REF(GD,1)),COLOR00FFFF,POINTDOT,LINETHICK0;STICKLINE(GDSJ<=6,GD,GD,8,0),COLORFF00FF;BDDD:=C=LLV(C,N1);DDSJ:=BARSLAST(FILTER(CROSS(0.8,BDDD),N2))+1;DDD1:REF(L,DDSJ),COLOR00FFFF,POINTDOT,LINETHICK1;STICKLINE(DDSJ<=6,DDD1,DDD1,8,0),COLOR00FF00;
    XG6:=DDSJ=1;DRAWICON(XG6,L*0.99,1);
    XGT6:=BARSLAST(XG6);{ZSJ:IF(XGT6<=30,REF(L,XGT6),DRAWNULL),COLORRED,DOTLINE;}
    DPD:=C=LLV(C,60);DPD2:=FILTER(CROSS(0.8,DPD),10) AND REF(SUM((C-REF(C,1))/C*100,3)<-10,1) ;DRAWICON(DPD2,L*0.95,17);
    VAR1:=REF(CLOSE,1);VAR2:=((SMA(MAX((CLOSE - VAR1),0),6,1) / SMA(ABS((CLOSE - VAR1)),6,1)) * 100);
    MC:=CROSS(90,VAR2);DRAWICON(MC,H*1.005,2);
    A11:=H>MAX(O,C)*1.03; A12:=V=HHV(V,30);XG11:=A11 AND A12 AND C/REF(C,5)>1.081;DRAWICON(XG11,H*1.005,2);A13:=V=HHV(V,40) AND C<O AND C/REF(C,11)>1.1  ;DRAWICON(A13,H*1.005,12);
    DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26); DEA2:=EMA(DIFF,9);MACDD:=(DIFF-DEA2)*2; RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));K:=SMA(RSV,9,3);D:=SMA(K,9,3);J:=3*K-2*D;AP:=CROSS(DIFF,DEA2) AND CROSS(K,D) AND CROSS(J,D) AND DIFF<0;A7:=FILTER(AP,20);DRAWTEXT(A7,L*0.991,'金振',COLOR80FFFF;SA:=CROSS(DEA2,DIFF) AND CROSS(D,K) AND CROSS(D,J) AND DIFF>0;A8:=FILTER(SA,20);DRAWTEXT(A8,H,'死振',COLORWHITE;
    B:=C/REF(C,1)>1.095 AND H=O AND L=H;B1:=NOT(B); B2:=FINANCE(42)>360;
    E2:=DDSJ=1  AND B1;{E3:=DDSJ=2 AND B1;E4:=E2 OR E3;E5:=H>MAX(O,C)*1.03 OR L<MIN(O,C)*0.97 ;E6:=REF(E5,1);E9:=E5 OR E6;}A1:=REF(SUM((C-REF(C,1))/C*100,3)<-10,1) OR REF(SUM((C-REF(C,1))/C*100,4)<-10,1) OR REF(SUM((C-REF(C,1))/C*100,5)<-15,1);A3:=REF(SUM((C-REF(C,1))/C*100,3)<-10,1);A2:=DDSJ=1 AND B1;DDD2:=REF(C,DDSJ);A4:=DDD2>REF(DDD2,1);
    XGT:=BARSLAST(A2);AD:=REF(L,REF(XGT,1)+1);XG7:=BETWEEN(L,AD,AD*1.06)  AND XGT=0 AND REF(XGT,1)<=30 AND E2 ;
    XG8:= XG7 AND B2  AND A1  ;DRAWICON(XG8,L*0.95,23);
    {J3:=SUM((C-REF(C,1))/C*100,3)<-15 OR SUM((C-REF(C,1))/C*100,4)<-15 OR SUM((C-REF(C,1))/C*100,5)<-20;J5:= EVERY(CLOSE<OPEN,3) OR EVERY(CLOSE<OPEN,4)  OR EVERY(CLOSE<OPEN,5);J4:=REF(O,1)<REF(C,2)*0.98 OR O<REF(C,1)*0.98  OR REF(O,2)<REF(C,3)*0.98; ;J6:=J3 AND  J5;J9:=J3 AND J4 AND J5;J10:=J6 OR J9;J11:=FILTER(J10,5);DRAWICON(J11,L*0.97,41);}
    BAA:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;BAB:=BAA>=9.6 AND CLOSE=HIGH;STICKLINE(BAB,CLOSE,OPEN,3,0 ),COLOR000085;STICKLINE(BAB,CLOSE,OPEN,2.6,0 ),COLOR0000A5;STICKLINE(BAB,CLOSE,OPEN,2.2,0 ),COLOR0005B5;STICKLINE(BAB,CLOSE,OPEN,1.8,0 ),COLOR0015D5;STICKLINE(BAB,CLOSE,OPEN,1.4,0 ),COLOR0025F5;STICKLINE(BAB,CLOSE,OPEN,1,0 ),COLOR0035FF;STICKLINE(BAB,CLOSE,OPEN,0.5,0 ),COLOR0045FF;STICKLINE(BAB,HIGH,LOW,0,0 ),COLOR0055FF;
    DRAWTEXT_FIX(1,0,0,0,'区:',COLOR99CC32;DRAWTEXT_FIX(1,0.03,0,0,DYBLOCK),COLOR99CC32;DRAWTEXT_FIX(1,0.1,0,0,'业:',COLORGREEN;DRAWTEXT_FIX(1,0.13,0,0,HYBLOCK),COLORGREEN;DRAWTEXT_FIX(1,0.19,0,0,'念:',COLORFF00FF;DRAWTEXT_FIX(1,0.22,0,0,GNBLOCK),COLORFF00FF;

    MTM:=C-REF(C,1);ZLGJ:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
    买1:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ<0,2) AND CROSS(ZLGJ,MA(ZLGJ,2)),1,0);卖1:=IF(HHV(ZLGJ,2)=HHV(ZLGJ,7) AND COUNT(ZLGJ>50,2) AND CROSS(MA(ZLGJ,2),ZLGJ),1,0);STICKLINE(FILTER(买1=1,5),C,O,1,0),COLORFF00FF;STICKLINE(FILTER(卖1=1,1),C,O,1,0),COLOR00FF00;
    CK:=C/REF(C,1)>1.095 AND H=O AND L=H;CK1:=NOT(CK);CDDD:=C=LLV(C,20);DDSJ1:=BARSLAST(FILTER(CROSS(0.8,CDDD),10))+1;

    XG10:= A2 AND MACD>-0.4 AND A3 AND  CK1;DRAWICON(XG10,L*0.97,5);
    H1:=C/REF(C,1)>1.095 AND H=O AND L=H;H2:=NOT(H1);H3:=C/REF(C,1)>1.04   ;N3:=15;H4:=COUNT(L=LLV(L,N3),3);H5:=CROSS(H4 AND C>REF(C,1)*1.095,0.5) ;H6:=REF(C,1)<REF(C,2)*0.96;
    H7:= O<REF(C,1) AND  C>REF(O,1);H8:=REF(C,1)*1.04;XG9:= H2 AND H3 AND H4 AND H5  AND H7 AND H6;
    STICKLINE(XG9,O,H8 ,3,0),COLORYELLOW;

    CD1: IF(BARSLAST(XG9)<=30 AND (REF(H8,BARSLAST(XG9)))=REF(REF(H8,BARSLAST(XG9)),1),REF(H8,BARSLAST(XG9)),DRAWNULL),DOTLINE,COLORYELLOW,LINETHICK1;
    {STICKLINE(XG9,C,O,2,0),COLORYELLOW;STICKLINE(XG9,H,L,2,0),COLORYELLOW;}
    ZT:=C/REF(C,1)>1.095;AA1:=C/REF(C,1)>1.04;AA2:=REF(C,1)<REF(C,2)*0.96 ;XG12:=AA1 AND  AA2 AND L>REF(L*0.94,BARSLAST(REF(ZT,1))+1) AND L<REF(C*0.95,BARSLAST(REF(ZT,1))+1) AND BARSLAST(REF(ZT,1))>=2 AND BARSLAST(REF(ZT,1))<=30;AA3:=REF(C,1)*1.04;
    STICKLINE(XG12,O,AA3 ,3,0),COLORWHITE;
    CD2: IF(BARSLAST(XG12)<=30 AND (REF(AA3,BARSLAST(XG12)))=REF(REF(AA3,BARSLAST(XG12)),1),REF(AA3,BARSLAST(XG12)),DRAWNULL),DOTLINE,COLORWHITE,LINETHICK1;{N:=7;BC:=(H*0.382+L*0.618+O*0.382+C*0.618)/2;LJ:=IF(INDEXC=C,BC,(BC+AMOUNT/(V*100))/2);HT:=REF((HHV(LJ,N*0.691)+HHV(LJ,N)+HHV(LJ,N*1.309))/3,1),LINETHICK,COLORRED;LT:=REF((LLV(LJ,N*0.691)+LLV(LJ,N)+LLV(LJ,N*1.309))/3,1),LINETHICK,COLORGREEN;ZT:=(HT+LT)/2,LINETHICK,COLORYELLOW;STICKLINE(ISLASTBAR=1  AND LJ<ZT,HT,LT,N*8,1),COLORGREEN;STICKLINE(ISLASTBAR=1  AND LJ=ZT,HT,LT,N*8,1),COLORRED;STICKLINE(ISLASTBAR=1  AND LJ>ZT,HT,LT,N*8,1),COLORYELLOW;STICKLINE(ISLASTBAR=1,ZT,ZT,N*8,0),COLORRED;箱顶:HT,LINETHICK,COLORRED;箱底:LT,LINETHICK,COLORGREEN;箱中:ZT,LINETHICK,COLORYELLOW;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);};

     

     来源:程序化99

  • 文华技术人员:

    请参考

     

    NF:=1;
    Z1:=(REF(H,NF)-REF(L,NF))/REF(C,NF+1)*100;
    Z2:=(REF(H,NF+1)-REF(L,NF+1))/REF(C,NF+2)*100;
    Z3:=(REF(H,NF+2)-REF(L,NF+2))/REF(C,NF+3)*100;
    前三日均振:(Z1+Z2+Z3)/3,NODRAW;


    P3:EMA(CLOSE,43),COLORGREEN,LINETHICK1;
    IF(P3>REF(P3,1), P3,NULL),COLORRED,LINETHICK1;


    C2:= O<=REF(L,1)*0.98 AND CLOSE/OPEN>=1.05 AND  REF(SUM((C-REF(C,1))/C*100,3)<-7,1) ;
    DRAWICON(C2,LOW*0.97,38);
    AP1:=MA(C,1);
    BP1:=SMA(SMA(SMA(AP1,2,1),2,1),2,1);
    CP1:=MA(BP1,3);
    //DRAWBAND(BP1,RGB(255,0,0),CP1,RGB(0,255,0));
    FILLRGN(BP1>CP1,BP1,CP1,RGB(255,0,0));
    FILLRGN(BP1>CP1,BP1,CP1,RGB(0,255,0));
    BDGD:=C=HHV(C,40);
    GDSJ:=BARSLAST(FILTER(CROSS(0.8,BDGD),20))+1;
    GD:REF(H,GDSJ),COLOR00FF00,POINTDOT,LINETHICK1;
    TTP:=CROSS(C,REF(GD,1)),COLOR00FFFF,POINTDOT,LINETHICK1;
    STICKLINE1(GDSJ<=6,GD,GD,8,0),COLORFF00FF;
    N1:=60;
    BDDD:=C=LLV(C,N1);
    N2:=20;
    DDSJ:=BARSLAST(FILTER(CROSS(0.8,BDDD),N2))+1;
    DDD1:REF(L,DDSJ),COLOR00FFFF,POINTDOT,LINETHICK1;
    STICKLINE1(DDSJ<=6,DDD1,DDD1,8,0),COLOR00FF00;


    XG6:=DDSJ=1;
    DRAWICON(XG6,L*0.99,1);


    XGT6:=BARSLAST(XG6);
    ZSJ:IF(XGT6<=30,REF(L,XGT6),NULL),COLORRED,DOT;

     

    DPD:=C=LLV(C,60);
    DPD2:=FILTER(CROSS(0.8,DPD),10) AND REF(SUM((C-REF(C,1))/C*100,3)<-10,1) ;
    DRAWICON(DPD2,L*0.95,17);


    VAR1:=REF(CLOSE,1);
    VAR2:=((SMA(MAX((CLOSE - VAR1),0),6,1) / SMA(ABS((CLOSE - VAR1)),6,1)) * 100);


    MC:=CROSS(90,VAR2);
    DRAWICON(MC,H*1.005,2);


    A11:=H>MAX(O,C)*1.03;
     A12:=V=HHV(V,30);
    XG11:=A11 AND A12 AND C/REF(C,5)>1.081;
    DRAWICON(XG11,H*1.005,2);
    A13:=V=HHV(V,40) AND C<O AND C/REF(C,11)>1.1  ;
    DRAWICON(A13,H*1.005,12);


    DIFF :EMA(CLOSE,12) - EMA(CLOSE,26);
    DEA2:=EMA(DIFF,9);
    MACDD:=(DIFF-DEA2)*2;
    RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));
    K:=SMA(RSV,9,3);
    D:=SMA(K,9,3);
    J:=3*K-2*D;
    AP:=CROSS(DIFF,DEA2) AND CROSS(K,D) AND CROSS(J,D) AND DIFF<0;
    A7:=FILTER(AP,20);
    DRAWTEXT(A7,L*0.991,'↑金振'),COLOR80FFFF;
    SA:=CROSS(DEA2,DIFF) AND CROSS(D,K) AND CROSS(D,J) AND DIFF>0;
    A8:=FILTER(SA,20);
    DRAWTEXT(A8,H,'↓死振'),COLORWHITE;


    B:=C/REF(C,1)>1.095 AND H=O AND L=H;
    B1:=NOT(B);
    B2:=1;


    E2:=DDSJ=1  AND B1;
    E3:=DDSJ=2 AND B1;
    E4:=E2 OR E3;
    E5:=H>MAX(O,C)*1.03 OR L<MIN(O,C)*0.97 ;
    E6:=REF(E5,1);
    E9:=E5 OR E6;

    A1:=REF(SUM((C-REF(C,1))/C*100,3)<-10,1) OR REF(SUM((C-REF(C,1))/C*100,4)<-10,1) OR REF(SUM((C-REF(C,1))/C*100,5)<-15,1);
    A3:=REF(SUM((C-REF(C,1))/C*100,3)<-10,1);
    A2:=DDSJ=1 AND B1;
    DDD2:=REF(C,DDSJ);
    A4:=DDD2>REF(DDD2,1);


    XGT:=BARSLAST(A2);
    AD:=REF(L,REF(XGT,1)+1);
    XG7:=BETWEEN(L,AD,AD*1.06)  AND XGT=0 AND REF(XGT,1)<=30 AND E2 ;


    XG8:= XG7 AND B2  AND A1  ;
    DRAWICON(XG8,L*0.95,23);


    J3:=SUM((C-REF(C,1))/C*100,3)<-15 OR SUM((C-REF(C,1))/C*100,4)<-15 OR SUM((C-REF(C,1))/C*100,5)<-20;
    J5:= EVERY(CLOSE<OPEN,3) OR EVERY(CLOSE<OPEN,4)  OR EVERY(CLOSE<OPEN,5);
    J4:=REF(O,1)<REF(C,2)*0.98 OR O<REF(C,1)*0.98  OR REF(O,2)<REF(C,3)*0.98;

    J6:=J3 AND  J5;
    J9:=J3 AND J4 AND J5;
    J10:=J6 OR J9;
    J11:=FILTER(J10,5);
    DRAWICON(J11,L*0.97,41);


    BAA:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
    BAB:=BAA>=9.6 AND CLOSE=HIGH;
    STICKLINE1(BAB,CLOSE,OPEN,3,0 ),COLOR000085;
    STICKLINE1(BAB,CLOSE,OPEN,2.6,0 ),COLOR0000A5;
    STICKLINE1(BAB,CLOSE,OPEN,2.2,0 ),COLOR0005B5;
    STICKLINE1(BAB,CLOSE,OPEN,1.8,0 ),COLOR0015D5;
    STICKLINE1(BAB,CLOSE,OPEN,1.4,0 ),COLOR0025F5;
    STICKLINE1(BAB,CLOSE,OPEN,1,0 ),COLOR0035FF;
    STICKLINE1(BAB,CLOSE,OPEN,0.5,0 ),COLOR0045FF;
    STICKLINE1(BAB,HIGH,LOW,0,0 ),COLOR0055FF;

     

     


    MTM:=C-REF(C,1);
    ZLGJ:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);


    买1:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ<0,2) AND CROSS(ZLGJ,MA(ZLGJ,2)),1,0);
    卖1:=IF(HHV(ZLGJ,2)=HHV(ZLGJ,7) AND COUNT(ZLGJ>50,2) AND CROSS(MA(ZLGJ,2),ZLGJ),1,0);
    STICKLINE1(FILTER(买1=1,5),C,O,1,0),COLORFF00FF;
    STICKLINE1(FILTER(卖1=1,1),C,O,1,0),COLOR00FF00;


    CK:=C/REF(C,1)>1.095 AND H=O AND L=H;
    CK1:=NOT(CK);
    CDDD:=C=LLV(C,20);
    DDSJ1:=BARSLAST(FILTER(CROSS(0.8,CDDD),10))+1;

     

    DEA  :=EMA(DIFF,9);
    MACD:=2*(DIFF-DEA),COLORSTICK;

    XG10:= A2 AND MACD>-0.4 AND A3 AND  CK1;
    DRAWICON(XG10,L*0.97,5);


    H1:=C/REF(C,1)>1.095 AND H=O AND L=H;
    H2:=NOT(H1);
    H3:=C/REF(C,1)>1.04   ;
    N3:=15;
    H4:=COUNT(L=LLV(L,N3),3);
    H5:=CROSS(H4 AND C>REF(C,1)*1.095,0.5) ;
    H6:=REF(C,1)<REF(C,2)*0.96;


    H7:= O<REF(C,1) AND  C>REF(O,1);
    H8:=REF(C,1)*1.04;
    XG9:= H2 AND H3 AND H4 AND H5  AND H7 AND H6;


    STICKLINE1(XG9,O,H8 ,3,0),COLORYELLOW;

     


    CD1: IF(BARSLAST(XG9)<=30
    AND (REF(H8,BARSLAST(XG9)))=REF(REF(H8,BARSLAST(XG9)),1)
    ,REF(H8,BARSLAST(XG9)),NULL),DOT,COLORYELLOW,LINETHICK1;


    STICKLINE1(XG9,C,O,2,0),COLORYELLOW;
    STICKLINE1(XG9,H,L,2,0),COLORYELLOW;

     

    ZT:=C/REF(C,1)>1.095;
    AA1:=C/REF(C,1)>1.04;
    AA2:=REF(C,1)<REF(C,2)*0.96 ;
    XG12:=AA1 AND  AA2 AND L>REF(L*0.94,BARSLAST(REF(ZT,1))+1) AND L<REF(C*0.95,BARSLAST(REF(ZT,1))+1)
    AND BARSLAST(REF(ZT,1))>=2 AND BARSLAST(REF(ZT,1))<=30;
    AA3:=REF(C,1)*1.04;


    STICKLINE1(XG12,O,AA3 ,3,0),COLORWHITE;

    AMOUNT:=AVPRICE*V;
    INDEXC:="999001$C";

    CD2: IF(BARSLAST(XG12)<=30
    AND (REF(AA3,BARSLAST(XG12)))=REF(REF(AA3,BARSLAST(XG12)),1)
    ,REF(AA3,BARSLAST(XG12)),NULL),DOT,COLORWHITE,LINETHICK1;
    N:=7;
    BC:=(H*0.382+L*0.618+O*0.382+C*0.618)/2;
    LJ:=IF(INDEXC=C,BC,(BC+AMOUNT/(V*100))/2);
    HT:=REF((HHV(LJ,N*0.691)+HHV(LJ,N)+HHV(LJ,N*1.309))/3,1),LINETHICK1,COLORRED;
    LT:=REF((LLV(LJ,N*0.691)+LLV(LJ,N)+LLV(LJ,N*1.309))/3,1),LINETHICK1,COLORGREEN;
    ZT1:=(HT+LT)/2,LINETHICK1,COLORYELLOW;
    STICKLINE1(ISLASTBAR=1  AND LJ<ZT1,HT,LT,N*8,1),COLORGREEN;
    STICKLINE1(ISLASTBAR=1  AND LJ=ZT1,HT,LT,N*8,1),COLORRED;
    STICKLINE1(ISLASTBAR=1  AND LJ>ZT1,HT,LT,N*8,1),COLORYELLOW;
    STICKLINE1(ISLASTBAR=1,ZT1,ZT1,N*8,0),COLORRED;
    箱顶:HT,LINETHICK1,COLORRED;
    箱底:LT,LINETHICK1,COLORGREEN;
    箱中:ZT1,LINETHICK1,COLORYELLOW;
    DRAWKLINE1(HIGH,OPEN,LOW,CLOSE);

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信号:cxh99cxh99  进行 有偿收费 编写!

怎么收费,代编流程等详情请点击阅读!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容