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

请高手帮忙将文华指标改写到金字塔软件 [金字塔]

  • 咨询内容:

    自用一个文华指标如下,请高手帮忙改写到金字塔可用状态,我不太懂语法,请教了!其中N取2,N1取2,Q取0,Q1取0值。

     

    HH:=HHV(HIGH,N);
    LL:=LLV(LOW,N);
    H1:=IFELSE(HH<REF(HH,1)&&LL<REF(LL,1)&&REF(OPEN,1)>CLOSE&&OPEN>CLOSE&&(HHV(OPEN,Q)-CLOSE)>Q1,REF(HH,N1),0);
    L1:=IFELSE(LL>REF(LL,1)&&HH>REF(HH,1)&&REF(OPEN,1)<CLOSE&&OPEN<CLOSE&&(CLOSE-LLV(OPEN,Q))>Q1,REF(LL,N1),0);
    H2:=VALUEWHEN(H1>0,H1);
    L2:=VALUEWHEN(L1>0,L1);
    K1:=IFELSE(CLOSE>H2,-3,IFELSE(CLOSE<L2,1,0));
    K2:=VALUEWHEN(K1<>0,K1);
    G:=IFELSE(K2=1,H2,L2);
    G1:=VALUEWHEN(ISLASTBAR,G);
    DRAWNUMBER(LL>0,G1,G1,0,COLORCYAN);
    TMP:=K2;W1:=K2;
    W2:=OPEN-CLOSE;
    HT:=IFELSE(OPEN>CLOSE,OPEN,CLOSE);
    LT:=IFELSE(OPEN<CLOSE,OPEN,CLOSE);
    DRAWLINE(W1=1,HIGH,W1=1,HT,COLORCYAN);
    DRAWLINE(W1=1,LOW,W1=1,LT,COLORCYAN);
    DRAWLINE(W1=-3,HIGH,W1=-3,HT,COLORRED);
    DRAWLINE(W1=-3,LOW,W1=-3,LT,COLORRED);
    STICKLINE(W1>0,OPEN,CLOSE,COLORCYAN,1);
    STICKLINE(W1<=0,OPEN,CLOSE,COLORRED,1);
    STICKLINE(W2>0&&W1<=0,OPEN,CLOSE,COLORRED,0);
    STICKLINE(W2>0&&W1>0,OPEN,CLOSE,COLORCYAN,0);
    DRAWLINE(TMP=1&&REF(TMP,1)=1,G,TMP=1&&REF(TMP,1)=1,REF(G,1),COLORCYAN);
    DRAWLINE(TMP=-3&&REF(TMP,1)=-3,G,TMP=-3&&REF(TMP,1)=-3,REF(G,1),COLORRED);
    DRAWSL(K2=1,G,0,1,0,COLORCYAN);
    DRAWSL(K2=-3,G,0,1,0,COLORRED);
    DRAWTEXT(CROSS(TMP,0),HH,'卖');
    DRAWTEXT(CROSS(0,TMP),LL,'买');
    MA55:=MA(CLOSE,55);
    DRAWTEXT(CROSS(TMP,0)&&CLOSE<=MA55,HH,'卖↓');
    DRAWTEXT(CROSS(0,TMP)&&CLOSE>=MA55,LL,'买↑');
    AAA:=BACKSET(ISLASTBAR,20);
    BBB:=AAA && NOT(REF(AAA,1));

     

  • 金字塔客服:

    加上下面的语句 编译就通过了

    N:=2;
    N1:=2;
    Q:=0;
    Q1:=0;

     

  • 用户回复:

    加上去后还是不能显示啊,到底怎回事呢?能否给全部贴一个完整的?

     

  • 网友回复:

    公式面板里面选择主图叠加

     

  • 网友回复:

    N:=2;
    N1:=2;
    Q:=0;
    Q1:=0;

    HH:=HHV(HIGH,N);
    LL:=LLV(LOW,N);
    H1:=IFELSE(HH<REF(HH,1)&&LL<REF(LL,1)&&REF(OPEN,1)>CLOSE&&OPEN>CLOSE&&(HHV(OPEN,Q)-CLOSE)>Q1,REF(HH,N1),0);
    L1:=IFELSE(LL>REF(LL,1)&&HH>REF(HH,1)&&REF(OPEN,1)<CLOSE&&OPEN<CLOSE&&(CLOSE-LLV(OPEN,Q))>Q1,REF(LL,N1),0);
    H2:=VALUEWHEN(H1>0,H1);
    L2:=VALUEWHEN(L1>0,L1);
    K1:=IFELSE(CLOSE>H2,-3,IFELSE(CLOSE<L2,1,0));
    K2:=VALUEWHEN(K1<>0,K1);
    G:=IFELSE(K2=1,H2,L2);
    G1:=VALUEWHEN(ISLASTBAR,G);
    DRAWNUMBER(LL>0,G1,G1,0,COLORCYAN),noaxis;
    TMP:=K2;W1:=K2;
    W2:=OPEN-CLOSE;
    HT:=IFELSE(OPEN>CLOSE,OPEN,CLOSE);
    LT:=IFELSE(OPEN<CLOSE,OPEN,CLOSE);
    DRAWLINE(W1=1,HIGH,W1=1,HT,COLORCYAN),noaxis;
    DRAWLINE(W1=1,LOW,W1=1,LT,COLORCYAN),noaxis;
    DRAWLINE(W1=-3,HIGH,W1=-3,HT,COLORRED),noaxis;
    DRAWLINE(W1=-3,LOW,W1=-3,LT,COLORRED),noaxis;
    STICKLINE(W1>0,OPEN,CLOSE,COLORCYAN,1),noaxis;
    STICKLINE(W1<=0,OPEN,CLOSE,COLORRED,1),noaxis;
    STICKLINE(W2>0&&W1<=0,OPEN,CLOSE,COLORRED,0),noaxis;
    STICKLINE(W2>0&&W1>0,OPEN,CLOSE,COLORCYAN,0),noaxis;
    DRAWLINE(TMP=1&&REF(TMP,1)=1,G,TMP=1&&REF(TMP,1)=1,REF(G,1),COLORCYAN),noaxis;
    DRAWLINE(TMP=-3&&REF(TMP,1)=-3,G,TMP=-3&&REF(TMP,1)=-3,REF(G,1),COLORRED),noaxis;
    DRAWSL(K2=1,G,0,1,0,COLORCYAN),noaxis;
    DRAWSL(K2=-3,G,0,1,0,COLORRED),noaxis;
    DRAWTEXT(CROSS(TMP,0),HH,'卖'),noaxis;
    DRAWTEXT(CROSS(0,TMP),LL,'买'),noaxis;
    MA55:=MA(CLOSE,55);
    DRAWTEXT(CROSS(TMP,0)&&CLOSE<=MA55,HH,'卖↓'),noaxis;
    DRAWTEXT(CROSS(0,TMP)&&CLOSE>=MA55,LL,'买↑'),noaxis;
    AAA:=BACKSET(ISLASTBAR,20);
    BBB:=AAA && NOT(REF(AAA,1));

 

如果以上指标公式不适用于您常用的行情软件

或者您想改编成选股公式,以便快速选出某种形态个股的话,

可以联系我们相关技术人员 QQ: 262069696  点击在线交流进行 有偿 改编!

 


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

相关文章

    指定的模型还没有相关内容!