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

通达信 ]敬爱的老师能帮我改下这个吗 [文华财经]

  • 咨询内容:

    老师晚上好,这是通达信的买卖量差,能帮我改成WH3的吗?谢谢

    AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
    买量:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0,COLORRED;
    卖量:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORCYAN;
    进出量:=买量+卖量,COLOR00FFFF;
    STICKLINE(进出量<0,0,进出量,1,0),COLORFF6600;
    STICKLINE(进出量<0,0,进出量,1,0),COLORFF9900;
    STICKLINE(进出量<0,0,进出量,1.0,0),COLORFFCC00;
    STICKLINE(进出量<0,0,进出量,0.5,0),COLORGREEN;
    STICKLINE(进出量>0,0,进出量,1,0),COLOR000099;
    STICKLINE(进出量>0,0,进出量,1,0),COLOR0000CC;
    STICKLINE(进出量>0,0,进出量,1.0,0),COLOR0000FF;
    STICKLINE(进出量>0,0,进出量,0.5,0),COLORCC66FF;
    万手:VOL/10000,LINETHICK0,NODRAW;
    BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
    主动买:=IF(CLOSE>OPEN,BB*(HIGH-LOW),IF(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
    主买:主动买/10000,COLORRED,NODRAW;
    主动卖:=IF(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-BB*(HIGH-LOW),0-VOL/2));
    主卖:-主动卖/10000,COLORGREEN,NODRAW;
    主净额:(主动买+主动卖)/10000,NODRAW;
    VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
    买:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED;
    卖:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2)),COLOR00FF00 ;
    买卖差:=(买+卖);
    买卖比:ABS(买/卖);
    N日内净流入:SUM (买卖差,N), LINETHICK2,COLORGREEN;
    流入:IF (N日内净流入>REF(N日内净流入,1),N日内净流入,DRAWNULL),COLORMAGENTA,LINETHICK2;
    M日内翻红天数:COUNT(买卖差>0,M);
    连红天数:BARSLASTCOUNT(买卖差>0);

     

  • 文华技术人员:

    AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
    BUYL:=IFELSE(CLOSE>OPEN,AA*(HIGH-LOW),IFELSE(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED;//买量
    SELLL:=IFELSE(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IFELSE(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),COLORCYAN;//卖量
    JCL:=BUYL+SELLL,COLORWHITE;//进出量
    STICKLINE(JCL<0,0,JCL,COLORGREEN,0);
    STICKLINE(JCL>0,0,JCL,COLORRED,0);

    WS:VOL/10000,NODRAW;//万手
    BB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
    ZDBUY:=IFELSE(CLOSE>OPEN,BB*(HIGH-LOW),IFELSE(CLOSE<OPEN,BB*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));//主动买
    ZB:ZDBUY/10000,COLORRED,NODRAW;
    ZDSELL:=IFELSE(CLOSE>OPEN,0-BB*((HIGH-CLOSE)+(OPEN-LOW)),IFELSE(CLOSE<OPEN,0-BB*(HIGH-LOW),0-VOL/2));
    ZS:-ZDSELL/10000,COLORGREEN,NODRAW;
    ZJE:(ZDBUY+ZDSELL)/10000,NODRAW;//主净额
    VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
    MB:=IFELSE(CLOSE>OPEN,VAR1*(HIGH-LOW),IFELSE(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED;//买
    MS:=IFELSE(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IFELSE(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2)),COLORGREEN ;//卖
    MMC:=(MB+MS);
    MMB:ABS(MB/MS);
    NJLR:SUM (MMC,N),COLORGREEN;//N日内净流入
    //LR:IFELSE(NJLR>REF(NJLR,1),NJLR,DRAWNULL),COLORMAGENTA;
    MHT:COUNT(MMC>0,M);//M日内翻红天数
    LHTS:BARSLAST(MMC>0);//连红天数

     

    目前软件中没有DRAWNULL函数,以后我们会考虑增加相应的函数

     

    仅供参考!

     

  • 文华客服:

    老师还在吗

     

    老师能不能编一个这种指标:

    单根成交量为前60根成交量平均的三倍,

    而当根成量多空比也为前60根成效量多空比的三倍

    才在多空量比上画柱

    小于上面的就不要画柱

    谢谢

     

  • 网友回复:

    老师就是这个双向成交量,就是把多空比小的不要显示出来

    要他前面60根多空平均量的三倍才显示出来,还有就是成交量也要是前60根平均量的三倍



    此主题相关图片如下:未命名.jpg

     

  • 网友回复:

    VV:=MA(VOL,60)*3;
    MM:=SCALE>REF(MA(SCALE,60)*3,1);
    A:=VOL>REF(VV,1)&&MM;
    AA:SCALE ;
    ZB:=VOL*SCALE;
    ZS:=VOL*(1-SCALE);
    STICKLINE(A&&ZB>=ZS,0,ZB-ZS,COLORRED,0);
    STICKLINE(A&&ZB<ZS,0,ZB-ZS,COLORGREEN,0);

     

    您试试

     

    仅供参考!

 

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

可联系技术人员 QQ: 1145508240  有需要帮忙请点击这里留言!!!进行 有偿 编写!不贵!点击查看价格!


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

相关文章

    没有相关内容