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

求助老师把两个参数合并后写下 [文华财经]

  • 咨询内容: 这个是单个条件下的开仓,反手开仓  VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6; DTX:(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2,10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210,COLORWHITE; KTX: MA(DTX,10), COLORYELLOW; STICKLINE(DTX>KTX,DTX,KTX, COLORRED,10); STICKLINE(DTX<KTX,DTX,KTX, COLORGREEN,10) ;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE, COLORRED,1);DRAWLINE(CLOSE>=OPEN,HIGH, CLOSE>=OPEN,CLOSE,  COLORRED);DRAWLINE(CLOSE>=OPEN,LOW, CLOSE>=OPEN,OPEN,  COLORRED);STICKLINE(CLOSE<OPEN,OPEN,CLOSE, COLORCYAN,0);DRAWLINE(CLOSE<OPEN,HIGH, CLOSE<OPEN,LOW, COLORCYAN); CROSS(DTX,KTX),BPK;CROSSDOWN(DTX,KTX),SPK;AUTOFILTER;
    现在想加入条件二 DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);DEA  : EMA(DIFF,9);MACD:2*(DIFF-DEA),COLORSTICK;JC:=CROSS(DIFF,DEA);SC:=CROSSDOWN(DIFF,DEA);DRAWTEXT(JC&&DIFF>-3&&DIFF<3,DIFF,'';DRAWTEXT(SC&&DIFF>-3&&DIFF<3,DIFF,'';

    如果两个条件在3根k线内同时出现就开仓。然后同样的条件下出现反方向就反手,收盘自动平仓,开盘10分钟出现信号也不开仓。

     

     来源:程序化99

  • 文华技术人员:   VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;  DTX:(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2,10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210,COLORWHITE;  KTX: MA(DTX,10), COLORYELLOW;  STICKLINE(DTX>KTX,DTX,KTX, COLORRED,10);  STICKLINE(DTX<KTX,DTX,KTX, COLORGREEN,10) ; STICKLINE(CLOSE>=OPEN,OPEN,CLOSE, COLORRED,1); DRAWLINE(CLOSE>=OPEN,HIGH, CLOSE>=OPEN,CLOSE,  COLORRED); DRAWLINE(CLOSE>=OPEN,LOW, CLOSE>=OPEN,OPEN,  COLORRED); STICKLINE(CLOSE<OPEN,OPEN,CLOSE, COLORCYAN,0); DRAWLINE(CLOSE<OPEN,HIGH, CLOSE<OPEN,LOW, COLORCYAN);  AUTOFILTER;
    DIFF : EMA(CLOSE,12) - EMA(CLOSE,26); DEA  : EMA(DIFF,9); MACD:2*(DIFF-DEA),COLORSTICK; JC:=CROSS(DIFF,DEA); SC:=CROSSDOWN(DIFF,DEA); DRAWTEXT(JC&&DIFF>-3&&DIFF<3,DIFF,''; DRAWTEXT(SC&&DIFF>-3&&DIFF<3,DIFF,'';
    EXIST(CROSS(DTX,KTX),3)&&JC&&DIFF>-3&&DIFF<3&&DTX>KTX&&OPENMINUTE>=10,BPK; EXIST(CROSSDOWN(DTX,KTX),3)&&SC&&DIFF>-3&&DIFF<3&&DTX<KTX&&OPENMINUTE>=10,SPK;
    CROSS(DTX,KTX)&&DIFF>DEA&&EXIST(JC&&DIFF>-3&&DIFF<3,3)&&OPENMINUTE>=10,BPK; CROSSDOWN(DTX,KTX)&&DIFF<DEA&&EXIST(SC&&DIFF>-3&&DIFF<3,3)&&OPENMINUTE>=10,SPK; ISLASTKLINE,CLOSEOUT;

 

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

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

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

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


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

相关文章

    没有相关内容