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

请老师修改个指标 [文华财经]

  • 咨询内容:  

    此主题相关图片如下:000.bmp

     

     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;
     
     JM:J,COLORYELLOW,LINETHICK3,NOTEXT;
     IF(J>REF(J,1),J,NULL),COLOR8080FF,LINETHICK3,NOTEXT;
    IF(J<REF(J,1),J,NULL),COLORFFFF00,LINETHICK3,NOTEXT;
     
    P:=5;
    AA1:=REF(J,P)=HHV(J,2*P+1);
    BB1:=FILTER(AA1,P);
    CC1:=BACKSET(BB1,P+1);
    DD1:=FILTER(CC1,P);
    {高点}
    AA2:=REF(J,P)=LLV(J,2*P+1);
    BB2:=FILTER(AA2,P);
    CC2:=BACKSET(BB2,P+1);
    DD2:=FILTER(CC2,P);
    {低点}
    前期高点:=REF(J,BARSLAST(DD1)),COLORBLUE,POINTDOT;//,NODRAW;
    前期低点:=REF(J,BARSLAST(DD2)),COLORFF00FF,POINTDOT;//,NODRAW;
     A:=BACKSET(ISLASTBAR,BARSLAST(前期高点<>REF(前期高点,1))+1);
    B:=BACKSET(ISLASTBAR,BARSLAST(前期低点<>REF(前期低点,1))+1);
     IF(J>REF(J,1),J,NULL),COLOR8080FF,LINETHICK3,NOTEXT;
    IF(J<REF(J,1),J,NULL),COLORFFFF00,LINETHICK3,NOTEXT;
     
    P1:=前期高点<>REF(前期高点,1);
    AA:BACKSET(ISLASTBAR,BARSLAST(前期高点<>REF(前期高点,1))+1),NODRAW,NOTEXT;
    BB:BACKSET(ISLASTBAR,VALUEWHEN(P1,REF(BARSLAST(P1),1))+BARSLAST(P1)+2),NODRAW,NOTEXT;
    N21:=VALUEWHEN(P1,REF(BARSLAST(P1),1))+1;
    NN:=REF(BARSLAST(P1),N21+2+BARSLAST(P1))+1;
    D1:BACKSET(ISLASTBAR,NN+N21+1+BARSLAST(P1)+1),NODRAW,NOTEXT;
    N3:=SUMBARS(P1=1,4);
    R1:=BACKSET(ISLASTBAR,N3);

    DRAWLINE1(CROSS(BB,0.5),前期高点,CROSS(AA,0.5),前期高点,0),COLORGREEN,LINETHICK2;
    DRAWLINE1(CROSS(D1,0.5),前期高点,CROSS(AA,0.5),前期高点,0),COLORGREEN;
    DRAWLINE1(CROSS(R1,0.5),前期高点,CROSS(AA,0.5),前期高点,0),COLORGREEN;

    顶前J:=REF(J,BARSLAST(CROSS(BB,0.5)));
    顶后J:=REF(J,BARSLAST(CROSS(AA,0.5)));

    顶前J1:=REF(J,BARSLAST(CROSS(D1,0.5)));
    顶后J1:=REF(J,BARSLAST(CROSS(AA,0.5)));


    顶前J2:=REF(J,BARSLAST(CROSS(R1,0.5)));
    顶后J2:=REF(J,BARSLAST(CROSS(AA,0.5)));

    DRAWTEXT(CROSS(顶前J2<顶后J2 ,0.5),前期高点,'注'),ALIGN2,FONTSIZE16,COLORGREEN;//条件

     

    请在条件成立时,在图中A点 也加上文字提示  注,谢谢

     

     

  • 文华技术人员:   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;  JM:J,COLORYELLOW,LINETHICK3,NOTEXT; IF(J>REF(J,1),J,NULL),COLOR8080FF,LINETHICK3,NOTEXT;IF(J<REF(J,1),J,NULL),COLORFFFF00,LINETHICK3,NOTEXT; P:=5;AA1:=REF(J,P)=HHV(J,2*P+1);BB1:=FILTER(AA1,P);CC1:=BACKSET(BB1,P+1);DD1:=FILTER(CC1,P);{高点}AA2:=REF(J,P)=LLV(J,2*P+1);BB2:=FILTER(AA2,P);CC2:=BACKSET(BB2,P+1);DD2:=FILTER(CC2,P);{低点}前期高点:=REF(J,BARSLAST(DD1)),COLORBLUE,POINTDOT;//,NODRAW;前期低点:=REF(J,BARSLAST(DD2)),COLORFF00FF,POINTDOT;//,NODRAW; A:=BACKSET(ISLASTBAR,BARSLAST(前期高点<>REF(前期高点,1))+1);B:=BACKSET(ISLASTBAR,BARSLAST(前期低点<>REF(前期低点,1))+1); IF(J>REF(J,1),J,NULL),COLOR8080FF,LINETHICK3,NOTEXT;IF(J<REF(J,1),J,NULL),COLORFFFF00,LINETHICK3,NOTEXT; P1:=前期高点<>REF(前期高点,1);AA:BACKSET(ISLASTBAR,BARSLAST(前期高点<>REF(前期高点,1))+1),NODRAW,NOTEXT;BB:BACKSET(ISLASTBAR,VALUEWHEN(P1,REF(BARSLAST(P1),1))+BARSLAST(P1)+2),NODRAW,NOTEXT;N21:=VALUEWHEN(P1,REF(BARSLAST(P1),1))+1;NN:=REF(BARSLAST(P1),N21+2+BARSLAST(P1))+1;D1:BACKSET(ISLASTBAR,NN+N21+1+BARSLAST(P1)+1),NODRAW,NOTEXT;N3:=SUMBARS(P1=1,4);R1:=BACKSET(ISLASTBAR,N3);DRAWLINE1(CROSS(BB,0.5),前期高点,CROSS(AA,0.5),前期高点,0),COLORGREEN,LINETHICK2;DRAWLINE1(CROSS(D1,0.5),前期高点,CROSS(AA,0.5),前期高点,0),COLORGREEN;DRAWLINE1(CROSS(R1,0.5),前期高点,CROSS(AA,0.5),前期高点,0),COLORGREEN;顶前J:=REF(J,BARSLAST(CROSS(BB,0.5)));顶后J:=REF(J,BARSLAST(CROSS(AA,0.5)));顶前J1:=REF(J,BARSLAST(CROSS(D1,0.5)));顶后J1:=REF(J,BARSLAST(CROSS(AA,0.5)));
    顶前J2:=REF(J,BARSLAST(CROSS(R1,0.5)));顶后J2:=REF(J,BARSLAST(CROSS(AA,0.5)));DRAWTEXT(CROSS(顶前J2<顶后J2 ,0.5),前期高点,'注'),ALIGN2,FONTSIZE16,COLORGREEN;//条件DRAWTEXT(CROSS(R1,0.5),前期高点,'注'),ALIGN2,FONTSIZE16,COLORGREEN;

     

  • 文华客服:

     本例满足条件是  顶前J2<顶后J2  再写文字  注  ,当顶前J2>顶后J2   就不会写文字,因为条件没有成立。

    CROSS(R1,0.5),  这个是不管 顶前J2<顶后J2  条件能否成立   都写文字

     

    请老师修改下   在满足  顶前J2<顶后J2  的条件下   在图中A点  写文字   谢谢

     

  • 网友回复:    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;  JM:J,COLORYELLOW,LINETHICK3,NOTEXT; IF(J>REF(J,1),J,NULL),COLOR8080FF,LINETHICK3,NOTEXT;IF(J<REF(J,1),J,NULL),COLORFFFF00,LINETHICK3,NOTEXT; P:=5;AA1:=REF(J,P)=HHV(J,2*P+1);BB1:=FILTER(AA1,P);CC1:=BACKSET(BB1,P+1);DD1:=FILTER(CC1,P);{高点}AA2:=REF(J,P)=LLV(J,2*P+1);BB2:=FILTER(AA2,P);CC2:=BACKSET(BB2,P+1);DD2:=FILTER(CC2,P);{低点}前期高点:=REF(J,BARSLAST(DD1)),COLORBLUE,POINTDOT;//,NODRAW;前期低点:=REF(J,BARSLAST(DD2)),COLORFF00FF,POINTDOT;//,NODRAW; A:=BACKSET(ISLASTBAR,BARSLAST(前期高点<>REF(前期高点,1))+1);B:=BACKSET(ISLASTBAR,BARSLAST(前期低点<>REF(前期低点,1))+1); IF(J>REF(J,1),J,NULL),COLOR8080FF,LINETHICK3,NOTEXT;IF(J<REF(J,1),J,NULL),COLORFFFF00,LINETHICK3,NOTEXT; P1:=前期高点<>REF(前期高点,1);AA:BACKSET(ISLASTBAR,BARSLAST(前期高点<>REF(前期高点,1))+1),NODRAW,NOTEXT;BB:BACKSET(ISLASTBAR,VALUEWHEN(P1,REF(BARSLAST(P1),1))+BARSLAST(P1)+2),NODRAW,NOTEXT;N21:=VALUEWHEN(P1,REF(BARSLAST(P1),1))+1;NN:=REF(BARSLAST(P1),N21+2+BARSLAST(P1))+1;D1:BACKSET(ISLASTBAR,NN+N21+1+BARSLAST(P1)+1),NODRAW,NOTEXT;N3:=SUMBARS(P1=1,4);R1:=BACKSET(ISLASTBAR,N3);DRAWLINE1(CROSS(BB,0.5),前期高点,CROSS(AA,0.5),前期高点,0),COLORGREEN,LINETHICK2;DRAWLINE1(CROSS(D1,0.5),前期高点,CROSS(AA,0.5),前期高点,0),COLORGREEN;DRAWLINE1(CROSS(R1,0.5),前期高点,CROSS(AA,0.5),前期高点,0),COLORGREEN;顶前J:=REF(J,BARSLAST(CROSS(BB,0.5)));顶后J:=REF(J,BARSLAST(CROSS(AA,0.5)));顶前J1:=REF(J,BARSLAST(CROSS(D1,0.5)));顶后J1:=REF(J,BARSLAST(CROSS(AA,0.5)));
    顶前J2:REF(J,BARSLAST(CROSS(R1,0.5)));顶后J2:REF(J,BARSLAST(CROSS(AA,0.5)));DRAWTEXT(CROSS(顶前J2<顶后J2 ,0.5),前期高点,'注'),ALIGN2,FONTSIZE16,COLORGREEN;//条件DRAWTEXT(CROSS(R1,0.5)&&REFX1(顶前J2<顶后J2,10000),前期高点,'注'),ALIGN2,FONTSIZE16,COLORGREEN;

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 511411198  点击这里给我发消息进行 有偿 编写!不贵!点击查看价格!


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

相关文章

    没有相关内容