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

请在加入开平仓指令用于回测 [文华财经]

  • 咨询内容:  A:=5;B:=10;D:=20;E:=30;F:=40;G:=50;缠论_1:=1;缠论_2:=MA(CLOSE,170);缠论_3:=IF(HIGH<REF(HIGH,1) AND REF(HIGH,1)<REF(HIGH,2),REF(HIGH,2),0);缠论_4:=IF(LOW>REF(LOW,1) AND REF(LOW,1)>REF(LOW,2),REF(LOW,2),0);缠论_5:=VALUEWHEN(缠论_3>0,缠论_3);缠论_6:=VALUEWHEN(缠论_4>0,缠论_4);缠论_7:=HHV(HIGH,A)/10*缠论_1+HHV(HIGH,B)/10+HHV(HIGH,B)/10+HHV(HIGH,D)/10+HHV(HIGH,D)/10+HHV(HIGH,E)/10+HHV(HIGH,E)/10+HHV(HIGH,F)/10+HHV(HIGH,G)/10+HHV(HIGH,20)/10;缠论_8:=LLV(LOW,A)/10*缠论_1+LLV(LOW,B)/10+LLV(LOW,B)/10+LLV(LOW,D)/10+LLV(LOW,D)/10+LLV(LOW,E)/10+LLV(LOW,E)/10+LLV(LOW,F)/10+LLV(LOW,G)/10+LLV(LOW,20)/10;缠论_9:=IF(缠论_7<REF(缠论_7,1) AND 缠论_8<REF(缠论_8,1) AND REF(OPEN,1)>CLOSE AND OPEN>CLOSE AND HHV(OPEN,0)-CLOSE>0,REF(缠论_7,2),0);缠论_10:=IF(缠论_8>REF(缠论_8,1) AND 缠论_7>REF(缠论_7,1) AND REF(OPEN,1)<CLOSE AND OPEN<CLOSE AND CLOSE-LLV(OPEN,0)>0,REF(缠论_8,2),0);缠论_11:=DATE;缠论_12:=缠论_9;缠论_13:=缠论_10;缠论_14:=OPEN;缠论_15:=CLOSE;缠论_16:=HIGH;缠论_17:=LOW;缠论_18:=VALUEWHEN(缠论_12>0,缠论_12);缠论_19:=VALUEWHEN(缠论_13>0,缠论_13);缠论_20:=IF(CLOSE>缠论_18,(-3),IF(CLOSE<缠论_19,1,0));缠论_21:=VALUEWHEN(缠论_20<>0,缠论_20);缠论_22:=IF(缠论_21=1,缠论_18,缠论_19);缠论_23:=VALUEWHEN(ISLASTBAR,缠论_22);缠论_24:=缠论_21;缠论_25:=缠论_21;缠论_26:=缠论_24;缠论_27:=OPEN-CLOSE;缠论_28:=缠论_27;缠论_29:=IF(OPEN>CLOSE,OPEN,CLOSE);缠论_30:=IF(OPEN<CLOSE,OPEN,CLOSE);STICKLINE1(缠论_26=1,缠论_16,缠论_29,0,0),COLORCYAN;STICKLINE1(缠论_26=1,缠论_17,缠论_30,0,0),COLORCYAN;STICKLINE1(缠论_26=(-3),缠论_16,缠论_29,0,0),COLORRED;STICKLINE1(缠论_26=(-3),缠论_17,缠论_30,0,0),COLORRED;STICKLINE(缠论_26>0,缠论_14,缠论_15,3,1),COLORCYAN;STICKLINE(缠论_26<=0,缠论_14,缠论_15,3,1),COLORRED;STICKLINE(缠论_28>0 AND 缠论_26<=0,缠论_14,缠论_15,3,0),COLORRED;STICKLINE(缠论_28>0 AND 缠论_26>0,缠论_14,缠论_15,3,0),COLORCYAN;IF(缠论_21=1,缠论_22,NULL),COLORCYAN;IF(缠论_21=(-3),缠论_22,NULL),COLORRED;

    //CROSS(缠论_21,0),SPK;//CROSSDOWN(缠论_21,0),BPK;



    TT:TIME>=0927&&TIME<1500,NODRAW;D1:CROSSDOWN(缠论_21,0)&&TT=1,NODRAW;K1:CROSS(缠论_21,0)&&TT=1,NODRAW;D2:CROSS(TT,0.5)&&EXIST(CROSSDOWN(缠论_21,0),BARSLAST(TIME=0900)+1)&&NOT(CROSS(缠论_21,0)),NODRAW;K2:CROSS(TT,0.5)&&EXIST(CROSS(缠论_21,0),BARSLAST(TIME=0900)+1)&&NOT(CROSSDOWN(缠论_21,0)),NODRAW;DD:D1||D2,NODRAW;KK:K1||K2,NODRAW;DRAWTEXT(KK&&COUNT(KK,BARSLAST(DD))=1,H,'';DRAWTEXT(DD&&COUNT(DD,BARSLAST(KK))=1,L,'',VALIGN0;

     

     来源:程序化99

  • 文华技术人员:  参考:

     A:=5; B:=10; D:=20; E:=30; F:=40; G:=50; 缠论_1:=1; 缠论_2:=MA(CLOSE,170); 缠论_3:=IF(HIGH<REF(HIGH,1) AND REF(HIGH,1)<REF(HIGH,2),REF(HIGH,2),0); 缠论_4:=IF(LOW>REF(LOW,1) AND REF(LOW,1)>REF(LOW,2),REF(LOW,2),0); 缠论_5:=VALUEWHEN(缠论_3>0,缠论_3); 缠论_6:=VALUEWHEN(缠论_4>0,缠论_4); 缠论_7:=HHV(HIGH,A)/10*缠论_1+HHV(HIGH,B)/10+HHV(HIGH,B)/10+HHV(HIGH,D)/10+HHV(HIGH,D)/10+HHV(HIGH,E)/10+HHV(HIGH,E)/10+HHV(HIGH,F)/10+HHV(HIGH,G)/10+HHV(HIGH,20)/10; 缠论_8:=LLV(LOW,A)/10*缠论_1+LLV(LOW,B)/10+LLV(LOW,B)/10+LLV(LOW,D)/10+LLV(LOW,D)/10+LLV(LOW,E)/10+LLV(LOW,E)/10+LLV(LOW,F)/10+LLV(LOW,G)/10+LLV(LOW,20)/10; 缠论_9:=IF(缠论_7<REF(缠论_7,1) AND 缠论_8<REF(缠论_8,1) AND REF(OPEN,1)>CLOSE AND OPEN>CLOSE AND HHV(OPEN,0)-CLOSE>0,REF(缠论_7,2),0); 缠论_10:=IF(缠论_8>REF(缠论_8,1) AND 缠论_7>REF(缠论_7,1) AND REF(OPEN,1)<CLOSE AND OPEN<CLOSE AND CLOSE-LLV(OPEN,0)>0,REF(缠论_8,2),0); 缠论_11:=DATE; 缠论_12:=缠论_9; 缠论_13:=缠论_10; 缠论_14:=OPEN; 缠论_15:=CLOSE; 缠论_16:=HIGH; 缠论_17:=LOW; 缠论_18:=VALUEWHEN(缠论_12>0,缠论_12); 缠论_19:=VALUEWHEN(缠论_13>0,缠论_13); 缠论_20:=IF(CLOSE>缠论_18,(-3),IF(CLOSE<缠论_19,1,0)); 缠论_21:=VALUEWHEN(缠论_20<>0,缠论_20); 缠论_22:=IF(缠论_21=1,缠论_18,缠论_19); 缠论_23:=VALUEWHEN(ISLASTBAR,缠论_22); 缠论_24:=缠论_21; 缠论_25:=缠论_21; 缠论_26:=缠论_24; 缠论_27:=OPEN-CLOSE; 缠论_28:=缠论_27; 缠论_29:=IF(OPEN>CLOSE,OPEN,CLOSE); 缠论_30:=IF(OPEN<CLOSE,OPEN,CLOSE); STICKLINE1(缠论_26=1,缠论_16,缠论_29,0,0),COLORCYAN; STICKLINE1(缠论_26=1,缠论_17,缠论_30,0,0),COLORCYAN; STICKLINE1(缠论_26=(-3),缠论_16,缠论_29,0,0),COLORRED; STICKLINE1(缠论_26=(-3),缠论_17,缠论_30,0,0),COLORRED; STICKLINE(缠论_26>0,缠论_14,缠论_15,3,1),COLORCYAN; STICKLINE(缠论_26<=0,缠论_14,缠论_15,3,1),COLORRED; STICKLINE(缠论_28>0 AND 缠论_26<=0,缠论_14,缠论_15,3,0),COLORRED; STICKLINE(缠论_28>0 AND 缠论_26>0,缠论_14,缠论_15,3,0),COLORCYAN; IF(缠论_21=1,缠论_22,NULL),COLORCYAN; IF(缠论_21=(-3),缠论_22,NULL),COLORRED;

    //CROSS(缠论_21,0),SPK; //CROSSDOWN(缠论_21,0),BPK;



    TT:TIME>=0927&&TIME<1500,NODRAW; D1:CROSSDOWN(缠论_21,0)&&TT=1,NODRAW; K1:CROSS(缠论_21,0)&&TT=1,NODRAW; D2:CROSS(TT,0.5)&&EXIST(CROSSDOWN(缠论_21,0),BARSLAST(TIME=0900)+1)&&NOT(CROSS(缠论_21,0)),NODRAW; K2:CROSS(TT,0.5)&&EXIST(CROSS(缠论_21,0),BARSLAST(TIME=0900)+1)&&NOT(CROSSDOWN(缠论_21,0)),NODRAW; DD:D1||D2,NODRAW; KK:K1||K2,NODRAW; DRAWTEXT(KK&&COUNT(KK,BARSLAST(DD))=1,H,''; DRAWTEXT(DD&&COUNT(DD,BARSLAST(KK))=1,L,'',VALIGN0; KK&&COUNT(KK,BARSLAST(DD))=1,SPK; DD&&COUNT(DD,BARSLAST(KK))=1,BPK; AUTOFILTER;

 

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

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

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

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


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

相关文章

    没有相关内容