您现在的位置:程序化交易>> 期货公式>> 金字塔等>> 金字塔知识>>正文内容

为什么编译会说底背离DAY未定义? [金字塔]

  • 咨询内容:

    DIFFDAY:STKINDI('SH000001','MACDViolate.DIFF(12,26,9)',0,6,-1);
    DIFF60MIN:STKINDI('SH000001','MACDVIOLATE.DIFF(12,26,9)',0,5,-1);
    DIFF15MIN:STKINDI('SH000001','MACDVIOLATE.DIFF(12,26,9)',0,3,-1);
    DIFF5MIN:STKINDI('SH000001','MACDVIOLATE.DIFF(12,26,9)',0,2,-1);
    DIFF1MIN:STKINDI('SH000001','MACDVIOLATE.DIFF(12,26,9)',0,1,-1);
    DEA1MIN:STKINDI('SH000001','MACDVIOLATE.DEA(12,26,9)',0,1,-1);
    //POSITIVEV 代表底背离POSITIVE VIOLATION
    底背离5MIN1:STKINDI('SH00001','MACDVIOLATE.底背离1(12,26,9)',0,2,-1);
    底背离5MIN2:STKINDI('SH00001','MACDVIOLATE.底背离2(12,26,9)',0,2,-1);
    底背离5MIN3:STKINDI('SH00001','MACDVIOLATE.底背离3(12,26,9)',0,2,-1);
    底背离5MIN4:STKINDI('SH00001','MACDVIOLATE.底背离4(12,26,9)',0,2,-1);
    底背离5MIN5:STKINDI('SH00001','MACDVIOLATE.底背离5(12,26,9)',0,2,-1);

    底背离15MIN1:STKINDI('SH00001','MACDVIOLATE.底背离1(12,26,9)',0,3,-1);
    底背离15MIN2:STKINDI('SH00001','MACDVIOLATE.底背离2(12,26,9)',0,3,-1);
    底背离15MIN3:STKINDI('SH00001','MACDVIOLATE.底背离3(12,26,9)',0,3,-1);
    底背离15MIN4:STKINDI('SH00001','MACDVIOLATE.底背离4(12,26,9)',0,3,-1);
    底背离15MIN5:STKINDI('SH00001','MACDVIOLATE.底背离5(12,26,9)',0,3,-1);

    底背离60MIN1:STKINDI('SH00001','MACDVIOLATE.底背离1(12,26,9)',0,5,-1);
    底背离60MIN2:STKINDI('SH00001','MACDVIOLATE.底背离2(12,26,9)',0,5,-1);
    底背离60MIN3:STKINDI('SH00001','MACDVIOLATE.底背离3(12,26,9)',0,5,-1);
    底背离60MIN4:STKINDI('SH00001','MACDVIOLATE.底背离4(12,26,9)',0,5,-1);
    底背离60MIN5:STKINDI('SH00001','MACDVIOLATE.底背离5(12,26,9)',0,5,-1);

    底背离DAY1:STKINDI('SH00001','MACDVIOLATE.底背离1(12,26,9)',0,6,-1);
    底背离DAY2:STKINDI('SH00001','MACDVIOLATE.底背离2(12,26,9)',0,6,-1);
    底背离DAY3:STKINDI('SH00001','MACDVIOLATE.底背离3(12,26,9)',0,6,-1);
    底背离DAY4:STKINDI('SH00001','MACDVIOLATE.底背离4(12,26,9)',0,6,-1);
    底背离DAY5:=STKINDI('SH00001','MACDVIOLATE.底背离5(12,26,9)',0,6,-1);

    底背离5MIN:STKINDI('SH00001','MACDVIOLATE.底背离(12,26,9)',0,2,-1);
    底背离15MIN:STKINDI('SH00001','MACDVIOLATE.底背离(12,26,9)',0,3,-1);
    底背离60MIN:STKINDI('SH00001','MACDVIOLATE.底背离(12,26,9)',0,5,-1);
    底背离DAY:STKINDI('SH00001','MACDVIOLATE.底背离(12,26,9)',0,6,-1);

    POSITIVE5MIN:底背离5MIN||底背离15MIN||底背离60MIN||底背离DAY;
    POSITIVE15MIN:底背离5MIN2||底背离5MIN3||底背离5MIN4||底背离5MIN5||底背离15MIN||底背离60MIN||底背离DAY;
    POSITIVE60MIN:底背离5MIN5||底背离15MIN2||底背离15MIN3||底背离15MIN4||底背离15MIN5||底背离60MIN||底背离DAY;
    POSITIVEDAY:底背离15MIN4||底背离15MIN5||底背离60MIN2||底背离60MIN3||底背离60MIN4||底背离60MIN5||底背离DAY;
    POSITIVEDAY2:底背离DAY5||底背离DAY4||底背离DAY3||底背离DAY2;

     

  • 金字塔客服: 名称改下就行了。
    “底背离DAY” 后面带这个day 导致的。编译器识别成某种函数了。

     

     来源:程序化久久网( WWW.CXH99.COM )

  • 用户回复:

    还有一个为什么POSITIVE5MIN, DIFF60MIN 等这些都能显示出来, 但是底背离1MIN 到 底背离PV60MIN 都显示不出来, 把底背离三个字换成PV后也照样显示不出来数值, 就是了个是什么原因?  连AA也显示不出数值

     


    DIFFDAY:=STKINDI('SH000001','MACDViolate.DIFF(12,26,9)',0,6,-1);
    DIFF60MIN:=STKINDI('SH000001','MACDVIOLATE.DIFF(12,26,9)',0,5,-1);
    DIFF15MIN:=STKINDI('SH000001','MACDVIOLATE.DIFF(12,26,9)',0,3,-1);
    DIFF5MIN:=STKINDI('SH000001','MACDVIOLATE.DIFF(12,26,9)',0,2,-1);
    DIFF1MIN:=STKINDI('SH000001','MACDVIOLATE.DIFF(12,26,9)',0,1,-1);
    DEA1MIN:=STKINDI('SH000001','MACDVIOLATE.DEA(12,26,9)',0,1,-1);
    //POSITIVEV 代表底背离POSITIVE VIOLATION,PV
    PV5MIN1:STKINDI('SH00001','MACDVIOLATE.底背离1(12,26,9)',0,2,-1);
    PV5MIN2:STKINDI('SH00001','MACDVIOLATE.底背离2(12,26,9)',0,2,-1);
    PV5MIN3:STKINDI('SH00001','MACDVIOLATE.底背离3(12,26,9)',0,2,-1);
    PV5MIN4:STKINDI('SH00001','MACDVIOLATE.底背离4(12,26,9)',0,2,-1);
    PV5MIN5:STKINDI('SH00001','MACDVIOLATE.底背离5(12,26,9)',0,2,-1);

    PV15MIN1:STKINDI('SH00001','MACDVIOLATE.底背离1(12,26,9)',0,3,-1);
    PV15MIN2:STKINDI('SH00001','MACDVIOLATE.底背离2(12,26,9)',0,3,-1);
    PV15MIN3:STKINDI('SH00001','MACDVIOLATE.底背离3(12,26,9)',0,3,-1);
    PV15MIN4:STKINDI('SH00001','MACDVIOLATE.底背离4(12,26,9)',0,3,-1);
    PV15MIN5:STKINDI('SH00001','MACDVIOLATE.底背离5(12,26,9)',0,3,-1);

    PV60MIN1:STKINDI('SH00001','MACDVIOLATE.底背离1(12,26,9)',0,5,-1);
    PV60MIN2:STKINDI('SH00001','MACDVIOLATE.底背离2(12,26,9)',0,5,-1);
    PV60MIN3:STKINDI('SH00001','MACDVIOLATE.底背离3(12,26,9)',0,5,-1);
    PV60MIN4:STKINDI('SH00001','MACDVIOLATE.底背离4(12,26,9)',0,5,-1);
    PV60MIN5:STKINDI('SH00001','MACDVIOLATE.底背离5(12,26,9)',0,5,-1);

    PVDAY1:STKINDI('SH00001','MACDVIOLATE.底背离1(12,26,9)',0,6,-1);
    PVDAY2:STKINDI('SH00001','MACDVIOLATE.底背离2(12,26,9)',0,6,-1);
    PVDAY3:STKINDI('SH00001','MACDVIOLATE.底背离3(12,26,9)',0,6,-1);
    PVDAY4:STKINDI('SH00001','MACDVIOLATE.底背离4(12,26,9)',0,6,-1);
    PVDAY5:STKINDI('SH00001','MACDVIOLATE.底背离5(12,26,9)',0,6,-1);

    PV5MIN:STKINDI('SH00001','MACDVIOLATE.底背离(12,26,9)',0,2,-1);
    PV15MIN:STKINDI('SH00001','MACDVIOLATE.底背离(12,26,9)',0,3,-1);
    PV60MIN:STKINDI('SH00001','MACDVIOLATE.底背离(12,26,9)',0,5,-1);
    PVDAY6:STKINDI('SH00001','MACDVIOLATE.底背离(12,26,9)',0,6,-1);

    POSITIVEV5MIN:=PV5MIN||PV15MIN||PV60MIN||PVDAY6;
    POSITIVEV15MIN:=PV5MIN2||PV5MIN3||PV5MIN4||PV5MIN5||PV15MIN||PV60MIN||PVDAY6;
    POSITIVEV60MIN:=PV5MIN5||PV15MIN2||PV15MIN3||PV15MIN4||PV15MIN5||PV60MIN||PVDAY6;
    POSITIVEVDAY:=PV15MIN4||PV15MIN5||PV60MIN2||PV60MIN3||PV60MIN4||PV60MIN5||PVDAY6;
    POSITIVEVDAY2:=PVDAY5||PVDAY4||PVDAY3||PVDAY2;
    AA:PV5MIN1;

     

  • 网友回复:  MACDVIOLATE.底背离1(12,26,9)

    MACDVIOLATE这个指标里面有变量底背离1吗?另外你调用的品种有对应周期的数据吗?因为你调用的多个周期的数据,被调用的品种必须有这个周期的数据才行。
    [此贴子已经被作者于2019/7/12 13:25:31编辑过]

     

  • 网友回复: 当然有这个函数和值, 不然肯定会说调用错误的!

 

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

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

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

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


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

相关文章

    没有相关内容