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

麻烦老师帮改个指标谢谢, [文华财经]

  • 咨询内容: 请舟亢老师帮我加个 TIME  时间,加下以上原码下多谢, 我试了几次提示错误,  只考虑当天的时间就行, 如上午的10:34分,多谢老师
    CAPITAL:=GETPRICE1('通股本';AMOUNT:=AVPRICE*V;A1:=SUM( IF(CLOSE>REF(CLOSE,1)&&DAYBARPOS>1,VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1)&&DAYBARPOS>1,-VOL/CAPITAL*100,0)),DAYBARPOS);成交额:=V*C/100,NODRAW;A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1))))&&DAYBARPOS>1,成交额,0)),DAYBARPOS);A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1))))&&DAYBARPOS>1,成交额,0)),DAYBARPOS);A4:=SUM((IF(((成交额/8<20) AND (CLOSE>(REF(CLOSE,1))))&&DAYBARPOS>1,成交额,0)),DAYBARPOS);A5:=SUM((IF(((成交额/8<20) AND (CLOSE<(REF(CLOSE,1))))&&DAYBARPOS>1,成交额,0)),DAYBARPOS);A6:=((A2+A3)+A4)+A5;A7:=IF((ISLASTBAR),((100*A2)/A6),0);A8:=IF((ISLASTBAR),((100*A3)/A6),0);A9:=IF((ISLASTBAR),((100*A4)/A6),0);A10:=IF((ISLASTBAR),((100*A5)/A6),0);
    机构买:(A2),COLORRED,NODRAW;机构卖:(A3),COLORGREEN,NODRAW;
    IF(MOD( COUNT(DAYBARPOS=1,BARPOS),2)=0,机构买,NULL),LINETHICK2,COLORRED;IF(MOD( COUNT(DAYBARPOS=1,BARPOS),2)=1,机构买,NULL),LINETHICK2,COLORRED;

    IF(MOD( COUNT(DAYBARPOS=1,BARPOS),2)=0,机构卖,NULL),LINETHICK2,COLORGREEN;IF(MOD( COUNT(DAYBARPOS=1,BARPOS),2)=1,机构卖,NULL),LINETHICK2,COLORGREEN;
    机构进出:机构买-机构卖,NODRAW;散户买:=(A4),COLOR5555FF;散户卖:=(A5),COLOR55FF55;强势:((100*A2)/A6>50);STICKLINE(强势,机构买*1.02,机构买*1.1,1,0),COLORYELLOW;拉升:((100*A2)/A6-(100*A3)/A6)>18 AND (100*A2)/A6-(100*A5)/A6>18;STICKLINE(拉升,机构买*1.1,机构买*1.2,1,0),COLORRED;
    Q:=BETWEEN(C/(SUM(AMOUNT,DAYBARPOS)/SUM(VOL*100,DAYBARPOS)),1.05,0.95);Q2:=IF(Q=0,MA(C,DAYBARPOS),(SUM(AMOUNT,DAYBARPOS)/SUM(VOL*100,DAYBARPOS)));DRAWICON(CROSS((C/Q2),1.03),机构买,5);DD1:=1;
    机构买入:(100*A2)/A6,NODRAW;机构卖出:(100*A3)/A6,NODRAW;散户买入:(100*A4)/A6,NODRAW;散户卖出:(100*A5)/A6,NODRAW;

    DRAWNUMBER(CLOSEMINUTE<=BARINTERVAL||ISLASTBAR,机构买,机构买/A6*100,2,COLORRED),ALIGN0,FONTSIZE25,VALIGN2;DRAWNUMBER(CLOSEMINUTE<=BARINTERVAL||ISLASTBAR,机构买,机构卖/A6*100,2,COLORGREEN),ALIGN0,FONTSIZE25,VALIGN0;
    DRAWTEXT(REFX(ISLASTBAR,1)&&机构买>机构卖,机构卖,'',COLORRED,ALIGN0,FONTSIZE25;DRAWTEXT(REFX(ISLASTBAR,1)&&机构买<机构卖,机构卖,'',COLORGREEN,ALIGN0,FONTSIZE25;

    请舟亢老师帮我加个 TIME  时间,加下以上原码下多谢, 我试了几次提示错误,  只考虑当天的时间就行, 如上午的10:34分,多谢老师

     

     来源:程序化99

  • 文华技术人员:   CAPITAL:=GETPRICE1('通股本'; AMOUNT:=AVPRICE*V; A1:=SUM( IF(CLOSE>REF(CLOSE,1)&&DAYBARPOS>1,VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1)&&DAYBARPOS>1,-VOL/CAPITAL*100,0)),DAYBARPOS); 成交额:=V*C/100,NODRAW; A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1))))&&DAYBARPOS>1,成交额,0)),DAYBARPOS); A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1))))&&DAYBARPOS>1,成交额,0)),DAYBARPOS); A4:=SUM((IF(((成交额/8<20) AND (CLOSE>(REF(CLOSE,1))))&&DAYBARPOS>1,成交额,0)),DAYBARPOS); A5:=SUM((IF(((成交额/8<20) AND (CLOSE<(REF(CLOSE,1))))&&DAYBARPOS>1,成交额,0)),DAYBARPOS); A6:=((A2+A3)+A4)+A5; A7:=IF((ISLASTBAR),((100*A2)/A6),0); A8:=IF((ISLASTBAR),((100*A3)/A6),0); A9:=IF((ISLASTBAR),((100*A4)/A6),0); A10:=IF((ISLASTBAR),((100*A5)/A6),0);
    机构买:(A2),COLORRED,NODRAW; 机构卖:(A3),COLORGREEN,NODRAW;
    IF(MOD( COUNT(DAYBARPOS=1,BARPOS),2)=0,机构买,NULL),LINETHICK2,COLORRED; IF(MOD( COUNT(DAYBARPOS=1,BARPOS),2)=1,机构买,NULL),LINETHICK2,COLORRED;

    IF(MOD( COUNT(DAYBARPOS=1,BARPOS),2)=0,机构卖,NULL),LINETHICK2,COLORGREEN; IF(MOD( COUNT(DAYBARPOS=1,BARPOS),2)=1,机构卖,NULL),LINETHICK2,COLORGREEN; K:=TIME>=1034; 机构进出:机构买-机构卖,NODRAW; 散户买:=(A4),COLOR5555FF; 散户卖:=(A5),COLOR55FF55; 强势:((100*A2)/A6>50); STICKLINE(强势&&K,机构买*1.02,机构买*1.1,1,0),COLORYELLOW; 拉升:((100*A2)/A6-(100*A3)/A6)>18 AND (100*A2)/A6-(100*A5)/A6>18; STICKLINE(拉升&&K,机构买*1.1,机构买*1.2,1,0),COLORRED;
    Q:=BETWEEN(C/(SUM(AMOUNT,DAYBARPOS)/SUM(VOL*100,DAYBARPOS)),1.05,0.95); Q2:=IF(Q=0,MA(C,DAYBARPOS),(SUM(AMOUNT,DAYBARPOS)/SUM(VOL*100,DAYBARPOS))); DRAWICON(CROSS((C/Q2)&&K,1.03),机构买,5); DD1:=1;
    机构买入:(100*A2)/A6,NODRAW; 机构卖出:(100*A3)/A6,NODRAW; 散户买入:(100*A4)/A6,NODRAW; 散户卖出:(100*A5)/A6,NODRAW;

    DRAWNUMBER(CLOSEMINUTE<=BARINTERVAL&&K||ISLASTBAR&&K,机构买,机构买/A6*100,2,COLORRED),ALIGN0,FONTSIZE25,VALIGN2; DRAWNUMBER(CLOSEMINUTE<=BARINTERVAL&&K||ISLASTBAR&&K,机构买,机构卖/A6*100,2,COLORGREEN),ALIGN0,FONTSIZE25,VALIGN0;
    DRAWTEXT(REFX(ISLASTBAR,1)&&机构买>机构卖&&K,机构卖,'',COLORRED,ALIGN0,FONTSIZE25; DRAWTEXT(REFX(ISLASTBAR,1)&&机构买<机构卖&&K,机构卖,'',COLORGREEN,ALIGN0,FONTSIZE25;

     

     来源: WWW.CXH99.COM

  • 文华客服:  麻烦老师,我是想从这个指定的时候开始,从0开始计算       这个时间前的可以取消掉, 多谢

     

  • 网友回复:   CAPITAL:=GETPRICE1('通股本'; AMOUNT:=AVPRICE*V; QW:=BARSLAST(TIME=1034)+1; A1:=SUM( IF(CLOSE>REF(CLOSE,1)&&QW>1,VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1)&&QW>1,-VOL/CAPITAL*100,0)),QW); 成交额:=V*C/100,NODRAW; A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1))))&&QW>1,成交额,0)),QW); A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1))))&&QW>1,成交额,0)),QW); A4:=SUM((IF(((成交额/8<20) AND (CLOSE>(REF(CLOSE,1))))&&QW>1,成交额,0)),QW); A5:=SUM((IF(((成交额/8<20) AND (CLOSE<(REF(CLOSE,1))))&&QW>1,成交额,0)),QW); A6:=((A2+A3)+A4)+A5; A7:=IF((ISLASTBAR),((100*A2)/A6),0); A8:=IF((ISLASTBAR),((100*A3)/A6),0); A9:=IF((ISLASTBAR),((100*A4)/A6),0); A10:=IF((ISLASTBAR),((100*A5)/A6),0);
    机构买:(A2),COLORRED,NODRAW; 机构卖:(A3),COLORGREEN,NODRAW;
    IF(MOD( COUNT(QW=1,BARPOS),2)=0,机构买,NULL),LINETHICK2,COLORRED; IF(MOD( COUNT(QW=1,BARPOS),2)=1,机构买,NULL),LINETHICK2,COLORRED;

    IF(MOD( COUNT(QW=1,BARPOS),2)=0,机构卖,NULL),LINETHICK2,COLORGREEN; IF(MOD( COUNT(QW=1,BARPOS),2)=1,机构卖,NULL),LINETHICK2,COLORGREEN;
    机构进出:机构买-机构卖,NODRAW; 散户买:=(A4),COLOR5555FF; 散户卖:=(A5),COLOR55FF55; 强势:((100*A2)/A6>50); STICKLINE(强势,机构买*1.02,机构买*1.1,1,0),COLORYELLOW; 拉升:((100*A2)/A6-(100*A3)/A6)>18 AND (100*A2)/A6-(100*A5)/A6>18; STICKLINE(拉升,机构买*1.1,机构买*1.2,1,0),COLORRED;
    Q:=BETWEEN(C/(SUM(AMOUNT,QW)/SUM(VOL*100,QW)),1.05,0.95); Q2:=IF(Q=0,MA(C,QW),(SUM(AMOUNT,QW)/SUM(VOL*100,QW))); DRAWICON(CROSS((C/Q2),1.03),机构买,5); DD1:=1;
    机构买入:(100*A2)/A6,NODRAW; 机构卖出:(100*A3)/A6,NODRAW; 散户买入:(100*A4)/A6,NODRAW; 散户卖出:(100*A5)/A6,NODRAW;

    DRAWNUMBER(CLOSEMINUTE<=BARINTERVAL||ISLASTBAR,机构买,机构买/A6*100,2,COLORRED),ALIGN0,FONTSIZE25,VALIGN2; DRAWNUMBER(CLOSEMINUTE<=BARINTERVAL||ISLASTBAR,机构买,机构卖/A6*100,2,COLORGREEN),ALIGN0,FONTSIZE25,VALIGN0;
    DRAWTEXT(REFX(ISLASTBAR,1)&&机构买>机构卖,机构卖,'',COLORRED,ALIGN0,FONTSIZE25; DRAWTEXT(REFX(ISLASTBAR,1)&&机构买<机构卖,机构卖,'',COLORGREEN,ALIGN0,FONTSIZE25;

     

  • 网友回复:  没有清零尼, 能不能让他清零, 从我指定的时间开始,往后走 

 

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

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

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

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


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

相关文章

    没有相关内容