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

老师解决=- [文华财经]

  • 咨询内容:  

     N:=BACKSET(ISLASTBAR,IF(BARTYPE=1,30/BARINTERVAL,IF(BARTYPE=8,30*60/BARINTERVAL,NULL)));
    //老师以上边指标为依据,修改下面指标显示


    DIFF:=EMA(CLOSE,5) - EMA(CLOSE,53);
    DEA:=EMA(DIFF,5);
    MACD:=2*(DIFF-DEA),COLORSTICK;
    JC:=CROSS(DIFF,DEA)||ISLASTBAR&&MACD<0;
    SC:=CROSSDOWN(DIFF,DEA)||ISLASTBAR&&MACD>0;
    N1:=BARSLAST(JC)+1;
    N2:=BARSLAST(SC)+1;
    HH:=BARSLASTCOUNT(BACKSET(SC && N1>=3,HHVBARS(H,N1)+1))=1;
    LL:=BARSLASTCOUNT(BACKSET(JC && N2>=3,LLVBARS(L,N2)+1))=1;
    DRAWGBK1(1,RGB(158,158,207));
    DRAWGBK1(BARSLAST(HH)<BARSLAST(LL),RGB(158,158,207));//下
    DRAWGBK1(BARSLAST(HH)>BARSLAST(LL),RGB(255,202,255));//上
    J:=CROSS(DIFF,DEA),NODRAW;
    S:=CROSSDOWN(DIFF,DEA),NODRAW;
    //FILLRGN(NG&&(BARSLAST(LL)<BARSLAST(HH)||BARSLAST(HH)=0),0,MACD,RGB(255,166,210));//MACD铺平 红色
    //FILLRGN(NG&&(BARSLAST(LL)>BARSLAST(HH)||BARSLAST(LL)=0),0,MACD,RGB(128,128,192));//MACD铺平 青色 ////指标 1
    STICKLINE1(BARSLAST(HH)>BARSLAST(LL),0,MACD,4,0),RGB(255,140,85);//MACD柱线 红色
    STICKLINE1(BARSLAST(HH)<BARSLAST(LL),0,MACD,4,0),RGB(108,108,183);//MACD柱线 青色
    BACKGROUNDSTYLE(2),LINETHICK6;//将坐标以0为中轴的坐标系。


     

     

     来源:程序化99

  • 文华技术人员:  参考:
    N:=BACKSET(ISLASTBAR,IF(BARTYPE=1,30/BARINTERVAL,IF(BARTYPE=8,30*60/BARINTERVAL,NULL)));
    DIFF:=EMA(CLOSE,5) - EMA(CLOSE,53); DEA:=EMA(DIFF,5); MACD:=2*(DIFF-DEA),COLORSTICK; JC:=CROSS(DIFF,DEA)||ISLASTBAR&&MACD<0; SC:=CROSSDOWN(DIFF,DEA)||ISLASTBAR&&MACD>0; N1:=BARSLAST(JC)+1; N2:=BARSLAST(SC)+1; HH:=BARSLASTCOUNT(BACKSET(SC && N1>=3,HHVBARS(H,N1)+1))=1; LL:=BARSLASTCOUNT(BACKSET(JC && N2>=3,LLVBARS(L,N2)+1))=1; DRAWGBK1(N,RGB(158,158,207)); DRAWGBK1(N&&BARSLAST(HH)<BARSLAST(LL),RGB(158,158,207));//下 DRAWGBK1(N&&BARSLAST(HH)>BARSLAST(LL),RGB(255,202,255));//上 J:=CROSS(DIFF,DEA),NODRAW; S:=CROSSDOWN(DIFF,DEA),NODRAW; //FILLRGN(NG&&(BARSLAST(LL)<BARSLAST(HH)||BARSLAST(HH)=0),0,MACD,RGB(255,166,210));//MACD铺平 红色 //FILLRGN(NG&&(BARSLAST(LL)>BARSLAST(HH)||BARSLAST(LL)=0),0,MACD,RGB(128,128,192));//MACD铺平 青色 ////指标 1 STICKLINE1(N&&BARSLAST(HH)>BARSLAST(LL),0,MACD,4,0),RGB(255,140,85);//MACD柱线 红色 STICKLINE1(N&&BARSLAST(HH)<BARSLAST(LL),0,MACD,4,0),RGB(108,108,183);//MACD柱线 青色 BACKGROUNDSTYLE(2),LINETHICK6;//将坐标以0为中轴的坐标系。

     

     来源: WWW.CXH99.COM

  • 文华客服:  

     

     N:=BACKSET(ISLASTBAR,IF(BARTYPE=1,30/BARINTERVAL,IF(BARTYPE=8,30*60/BARINTERVAL,NULL)));
    //老师以上边指标为依据,修改下面指标显示

     TT:=(2*CLOSE+OPEN+HIGH+LOW);
    主导动能:=TT/EMA(TT,2)-1,COLORSTICK;
    FF:=主导动能;
    DRAWGBK1(1&&NG,RGB(255,208,232));//红色
    DRAWGBK1(FF<=0&&NG,RGB(179,179,217));//蓝色

    //STICKLINE1(NG&& FF>0,0,FF,4,0),RGB(0,155,39),COLOR33CFDD;//上,COLOR33CFDD
    //STICKLINE1(NG&& FF<=0,0,FF,4,0),COLORYELLOW;//下,COLOR00CC00

    BACKGROUNDSTYLE(2);//将坐标以0为中轴的坐标系。

     
    //NG:=BACKSET(ISLASTBAR,BARSLAST(CROSS(TIME>=IFELSE(PERIOD=0&&EXIST(TIME>2400,DAYBARPOS),090000,0900)&&TIME<IFELSE(PERIOD=0&&EXIST(TIME>2400,DAYBARPOS),150000, 1500),0.5)||CROSS(TIME>=IFELSE(PERIOD=0&&EXIST(TIME>2400,DAYBARPOS),210000,2100)&&TIME<IFELSE(PERIOD=0&&EXIST(TIME>2400,DAYBARPOS),220000,2200),0.5))+1);////指标 2
    分时线1:=H;
    分时线2:=L;
    分时跟踪1:=EMA(分时线1,20);
    HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;
    HHJSJDB:=(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJSJDA,5)+14*REF(HHJSJDA,6)
    +13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJDA,12)
    +7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJDA,18)+
    REF(HHJSJDA,20))/210;
    HHJSJDC:=MA(HHJSJDB,5);
    涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0);
     MAP:=MA(C,2),NODRAW;
    AAL:CROSS(TIME>=IF(PERIOD=0&&NOT(BARTYPE=1),120000, 1200)&&TIME<IF(PERIOD=0&&NOT(BARTYPE=1),140000, 1400),0.5),NODRAW;
    MYY:=BACKSET(ISLASTBAR,SUMBARS(REFX1(DAYBARPOS=1,1)||REFX1(TIME=0900,1)||REFX(AAL,1)=1,2));
    DD:=REFX(CROSSDOWN((ISUP||ISEQUAL)&&NG,0.5),1)||ISLASTBAR&&(ISUP||ISEQUAL)&&NG;
    KK:=REFX(CROSSDOWN(ISDOWN&&NG,0.5),1)||ISLASTBAR&&ISDOWN&&NG;
    HH:= BACKSET(DD,HHVBARS(H,BARSLASTCOUNT((ISUP||ISEQUAL)&&NG))+1);
    HHH:=CROSS(HH=1,0.5)||HH=1&&BARSLASTCOUNT((ISUP||ISEQUAL)&&NG)=1;
    LL:= BACKSET(KK,LLVBARS(L,BARSLASTCOUNT(ISDOWN&&NG))+1);
    LLL:=CROSS(LL=1,0.5)||LL=1&&BARSLASTCOUNT(ISDOWN&&NG)=1;
    AX:=BACKSET(ISLASTBAR,SUMBARS(HHH||LLL,4));

     

     


     A1:=REF(HIGH,3)=HHV(HIGH,2*3+1);////横线转向图标指标(2)
    B1A:=FILTER(A1,3);
    C1A:=BACKSET(B1A,3+1);
    D1:=FILTER(C1A,3);
    A2:=REF(LOW,3)=LLV(LOW,2*3+1);
    B2:=FILTER(A2,3);
    C2:=BACKSET(B2,3+1);
    D2:=FILTER(C2,3);
    E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;
    E2:=(HIGH+LOW)/2;
    H1A:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARPOS=1;
    L1A:=(D2 AND NOT(D1 AND E1<E2));
    H2:=D1 AND NOT(D2 AND E1>=E2);
    X1:=REF(BARSLAST(H1A),1)+1;
    F11:=BACKSET(H1A AND COUNT(L1A,X1)>0,LLVBARS(IFELSE(L1A,L,10000000),X1));
    F1:=IFELSE(F11=1,1,0);
    G1:=F1>REF(F1,1);
    I1:=BACKSET(G1,2);
    LD:=I1>REF(I1,1);
    L2:=LD OR ISLASTBAR OR BARPOS=1;
    X2:=REF(BARSLAST(L2),1)+1;
    F22:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IFELSE(H2,H,0),X2));
    F2:=IFELSE(F22=1,1,0);
    G2:=F2>REF(F2,1);
    I2:=BACKSET(G2,2);
    HD:=I2>REF(I2,1);
    BBT:=CROSS(BACKSET(ISLASTBAR,SUMBARS(LD,2)),0.5);
    CC:=CROSS(BACKSET(ISLASTBAR,SUMBARS(HD,1)),0.5);
    //DD:=CROSS(BACKSET(ISLASTBAR,SUMBARS(LD,1)),0.5);
    NF:=4;
    NN5:=80;
    A01:=REF(HIGH,NF)=HHV(HIGH,4*NF+1);
    B01:=FILTER(A01,NF);
    CB1:=BACKSET(B01,NF+1);
    E10:=(REF(LLV(LOW,ROUND(SQRT(2*NF),2)),1)+REF(HHV(HIGH,ROUND(SQRT(4*NF),2)),1))/2,COLORRED;
    G1Z:=F1>REF(F1,1);//DRAWTEXT(X1,L,'1';
    DD1公:=VALUEWHEN(LD ,L);
    GD1:=VALUEWHEN(HD ,H);
    XH1:=BARSLAST(HD)+1;
    XL2:=BARSLAST(LD)+1;
    AV:=IF(XH1<XL2 ,LLV(MAX(C,O),XH1),HHV(MIN(C,O),XL2));
    MPA:=1;//高度调节
    STICKLINE1(NG&&CROSS(XH1<XL2,0.5),H,H+MPA*MINPRICE,8,0),COLORYELLOW;////极端顶
    STICKLINE1(NG&&CROSS(XH1>XL2,0.5),L,L-MPA*MINPRICE,8,0),COLORGREEN;////极端底////转向指标(666)
    DRAWLINE1(NG&&CROSS(XH1<XL2,0.5),H,NG&&CROSS(XH1>XL2,0.5)||ISLASTBAR,L,0),COLORBLUE,LINETHICK3;
    DRAWLINE1(NG&&CROSS(XH1>XL2,0.5),L,NG&&CROSS(XH1<XL2,0.5)||ISLASTBAR,H,0),COLORRED,LINETHICK3;

     

     

  • 网友回复:   便于在线平台管理,新问题请发新帖提问,感谢您的配合
    参考:
    NG:=BACKSET(ISLASTBAR,IF(BARTYPE=1,30/BARINTERVAL,IF(BARTYPE=8,30*60/BARINTERVAL,NULL)));//老师以上边指标为依据,修改下面指标显示
     TT:=(2*CLOSE+OPEN+HIGH+LOW);主导动能:=TT/EMA(TT,2)-1,COLORSTICK;FF:=主导动能;DRAWGBK1(1&&NG,RGB(255,208,232));//红色DRAWGBK1(FF<=0&&NG,RGB(179,179,217));//蓝色
    //STICKLINE1(NG&& FF>0,0,FF,4,0),RGB(0,155,39),COLOR33CFDD;//上,COLOR33CFDD//STICKLINE1(NG&& FF<=0,0,FF,4,0),COLORYELLOW;//下,COLOR00CC00
    BACKGROUNDSTYLE(2);//将坐标以0为中轴的坐标系。
     //NG:=BACKSET(ISLASTBAR,BARSLAST(CROSS(TIME>=IFELSE(PERIOD=0&&EXIST(TIME>2400,DAYBARPOS),090000,0900)&&TIME<IFELSE(PERIOD=0&&EXIST(TIME>2400,DAYBARPOS),150000, 1500),0.5)||CROSS(TIME>=IFELSE(PERIOD=0&&EXIST(TIME>2400,DAYBARPOS),210000,2100)&&TIME<IFELSE(PERIOD=0&&EXIST(TIME>2400,DAYBARPOS),220000,2200),0.5))+1);////指标 2分时线1:=H;分时线2:=L;分时跟踪1:=EMA(分时线1,20);HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6;HHJSJDB:=(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJSJDA,5)+14*REF(HHJSJDA,6)+13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJDA,12)+7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJDA,18)+REF(HHJSJDA,20))/210;HHJSJDC:=MA(HHJSJDB,5);涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0); MAP:=MA(C,2),NODRAW;AAL:CROSS(TIME>=IF(PERIOD=0&&NOT(BARTYPE=1),120000, 1200)&&TIME<IF(PERIOD=0&&NOT(BARTYPE=1),140000, 1400),0.5),NODRAW;MYY:=BACKSET(ISLASTBAR,SUMBARS(REFX1(DAYBARPOS=1,1)||REFX1(TIME=0900,1)||REFX(AAL,1)=1,2));DD:=REFX(CROSSDOWN((ISUP||ISEQUAL)&&NG,0.5),1)||ISLASTBAR&&(ISUP||ISEQUAL)&&NG;KK:=REFX(CROSSDOWN(ISDOWN&&NG,0.5),1)||ISLASTBAR&&ISDOWN&&NG;HH:= BACKSET(DD,HHVBARS(H,BARSLASTCOUNT((ISUP||ISEQUAL)&&NG))+1);HHH:=CROSS(HH=1,0.5)||HH=1&&BARSLASTCOUNT((ISUP||ISEQUAL)&&NG)=1;LL:= BACKSET(KK,LLVBARS(L,BARSLASTCOUNT(ISDOWN&&NG))+1);LLL:=CROSS(LL=1,0.5)||LL=1&&BARSLASTCOUNT(ISDOWN&&NG)=1;AX:=BACKSET(ISLASTBAR,SUMBARS(HHH||LLL,4));
     
     

     A1:=REF(HIGH,3)=HHV(HIGH,2*3+1);////横线转向图标指标(2)B1A:=FILTER(A1,3);C1A:=BACKSET(B1A,3+1);D1:=FILTER(C1A,3);A2:=REF(LOW,3)=LLV(LOW,2*3+1);B2:=FILTER(A2,3);C2:=BACKSET(B2,3+1);D2:=FILTER(C2,3);E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;E2:=(HIGH+LOW)/2;H1A:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARPOS=1;L1A:=(D2 AND NOT(D1 AND E1<E2));H2:=D1 AND NOT(D2 AND E1>=E2);X1:=REF(BARSLAST(H1A),1)+1;F11:=BACKSET(H1A AND COUNT(L1A,X1)>0,LLVBARS(IFELSE(L1A,L,10000000),X1));F1:=IFELSE(F11=1,1,0);G1:=F1>REF(F1,1);I1:=BACKSET(G1,2);LD:=I1>REF(I1,1);L2:=LD OR ISLASTBAR OR BARPOS=1;X2:=REF(BARSLAST(L2),1)+1;F22:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IFELSE(H2,H,0),X2));F2:=IFELSE(F22=1,1,0);G2:=F2>REF(F2,1);I2:=BACKSET(G2,2);HD:=I2>REF(I2,1);BBT:=CROSS(BACKSET(ISLASTBAR,SUMBARS(LD,2)),0.5);CC:=CROSS(BACKSET(ISLASTBAR,SUMBARS(HD,1)),0.5);//DD:=CROSS(BACKSET(ISLASTBAR,SUMBARS(LD,1)),0.5);NF:=4;NN5:=80;A01:=REF(HIGH,NF)=HHV(HIGH,4*NF+1);B01:=FILTER(A01,NF);CB1:=BACKSET(B01,NF+1);E10:=(REF(LLV(LOW,ROUND(SQRT(2*NF),2)),1)+REF(HHV(HIGH,ROUND(SQRT(4*NF),2)),1))/2,COLORRED;G1Z:=F1>REF(F1,1);//DRAWTEXT(X1,L,'1';DD1公:=VALUEWHEN(LD ,L);GD1:=VALUEWHEN(HD ,H);XH1:=BARSLAST(HD)+1;XL2:=BARSLAST(LD)+1;AV:=IF(XH1<XL2 ,LLV(MAX(C,O),XH1),HHV(MIN(C,O),XL2));MPA:=1;//高度调节STICKLINE1(NG&&CROSS(XH1<XL2,0.5),H,H+MPA*MINPRICE,8,0),COLORYELLOW;////极端顶STICKLINE1(NG&&CROSS(XH1>XL2,0.5),L,L-MPA*MINPRICE,8,0),COLORGREEN;////极端底////转向指标(666)DRAWLINE1(NG&&CROSS(XH1<XL2,0.5),H,NG&&CROSS(XH1>XL2,0.5)||ISLASTBAR,L,0),COLORBLUE,LINETHICK3;DRAWLINE1(NG&&CROSS(XH1>XL2,0.5),L,NG&&CROSS(XH1<XL2,0.5)||ISLASTBAR,H,0),COLORRED,LINETHICK3;
     

 

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

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

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

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


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

相关文章

    没有相关内容