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

[求助]求注释? [文华财经]

  • 咨询内容: 老师您好: 从朋友处得到一模型,读了几遍,没读懂,问朋友他也不知道,麻烦老师给详细注释一下,多谢了!在线等

     

  • 文华技术人员: 方便的话可以发到论坛上,如果涉及到保密的话,可以发到签名处邮箱,一个工作日内会给您回复的。E-mail: research@wenhua.com.cn

     

  • 文华客服: 我晕!忘了发源码了BA:=BARPOS;VOL1:=IFELSE(ISLASTBAR,VOL,REFX(VOL,1));HC:=LLV(IFELSE(H-C=0,1000,H-C),0);CL:=LLV(IFELSE(C-L=0,1000,ABS(C-L)),0);CO:=LLV(IFELSE(C-O=0,1000,ABS(C-O)),0);ZXBD:=MIN(HC,MIN(CL,CO));DFX:=REF(L,2)=LLV(L,5)&&REF(L,1)>REF(L,2)&&L>REF(L,2)&&REF(L,2)<=REF(L,3);GFX:=REF(H,2)=HHV(H,4)&&REF(H,1)<REF(H,2)&&H<REF(H,2)&&REF(H,2)>=REF(H,3);DFXI:=VALUEWHEN(DFX,BA);GFXI:=VALUEWHEN(GFX,BA);DDP1:=VALUEWHEN(DFX,REF(L,2));GDP1:=VALUEWHEN(GFX,REF(H,2));DDP:=VALUEWHEN(DFX&&DDP1<>REF(DDP1,1),DDP1);GDP:=VALUEWHEN(GFX&&GDP1<>REF(GDP1,1),GDP1);DFX1I:=VALUEWHEN(DFX,REF(DFXI,1));DFX1P:=VALUEWHEN(DFX,REF(DDP,BA-DFX1I+1));GFX1I:=VALUEWHEN(GFX,REF(GFXI,1));GFX1P:=VALUEWHEN(GFX,REF(GDP,BA-GFX1I+1));DFXP:=VALUEWHEN(DFX&&DDP<>REF(DDP,1),MIN(DDP,MIN(DFX1P,REF(DDP,1))));GFXP:=VALUEWHEN(GFX&&GDP<>REF(GDP,1),MAX(GDP,MAX(GFX1P,REF(GDP,1))));SA:=SAR(4,0.02,0.2);DZZ:=SA>0&&NOT(REF(SA,1)>0)||BA=0;GZZ:=SA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D&&C<DKD&&DK<>DKD&&NOT(L<DKP&&C>DKP),2)=2;DTO:=CROSS(C,REF(DKP,2))&&REF(CROSS(DK,C)&&CROSS(DKD,C)&&CROSS(DKP,C)&&DK>DKD,1)=1;KTQ:=C>DK&&CROSS(DKD,C)&&SUM(CROSS(C,DKD)&&H>GFXP&&C<GFXP,BA-DWD+1)&&SUM(CROSS(C,GFXP),BA-DWD+1)=0;KTR:=CROSS(DKP,C)&&SUM(C<DKD&&L<DKP&&C>DKP&&ISUP,BA-GWD+1)>=1;DT1:=DTA||DTB||DTC||DTD||DTE||DTF||DTG||DTH||DTJ||DTK||DTL||DTM||DTN||DTO;KT1:=KTA||KTB||KTC||KTD||KTE||KTF||KTG||KTH||KTJ||KTK||KTL||KTM||KTN||KTO||KTQ||KTR;DTI:=VALUEWHEN(DT1||BA=0,BA);KTI:=VALUEWHEN(KT1||BA=0,BA);REF(DTI<=KTI,1)=1&&DTI>KTI,BPK;REF(DTI>=KTI,1)=1&&DTI<KTI,SPK;AUTOFILTER;

     

  • 网友回复: 这么长的模型,思路很复杂的,我们不便给您主观理解,很抱歉。建议您在说明书中了解相关函数和语法,学习文华麦语言,来总结自己的思路,尝试编写。软件帮助》软件说明书

 

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

可联系技术人员 QQ: 262069696  点击在线交流进行 有偿 编写!不贵!点击查看价格!


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

相关文章

    没有相关内容