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

老师,下面这个如何改成在赢顺云交易软件中用 [文华财经]

  • 咨询内容:  N:=9;M1:=3;M2:=3;VAR1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR2:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;VAR3:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;VAR5:=(VAR2+2*VAR3+3*VAR4)/6;VAR6:=MA(VAR5,3);MACD: VAR6*5,COLORSTICK ,LINETHICK2 ;提醒: STICKLINE(VAR6<=-6,0,-25,5,0), COLOR88B7EA ;关注: STICKLINE(VAR6<=-8,5,25,7,0), ;出击: STICKLINE(VAR6<=-10,80,100,5,0), coloryellow;警戒雷达: IF(VAR6<-6,20,0),LINETHICK3 , COLORFF0000;引导雷达: STICKLINE(VAR6<=-10,65,35,4,0),;制导雷达: STICKLINE(VAR6<=-10,40,0,4,0), colorred;发射: STICKLINE(VAR6<=-10,80,30,3,0), colorgreen;导弹: STICKLINE(VAR6<=-10,80,60,3,0), colorwhite;RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,LINETHICK2;K:SMA(RSV,M1,1),LINETHICK1;D:SMA(K,M2,1),LINETHICK1;J:3*K-2*D,COLORFF00FF,LINETHICK1;IF(J<0,J,DRAWNULL),colorgreen,LINETHICK2;IF(K>90,K,DRAWNULL),COLOR0000FF,LINETHICK2;IF(D>85,D,DRAWNULL),COLORFFFF11,LINETHICK2;DRAWICON(CROSS(K,d),d,'uy';DRAWICON(CROSS(d,k),k,'ell';DRAWICON(CROSS(J,1),J,1);DRAWICON(K>80 AND D>80 AND CROSS(D,K),D,2);底: 20,LINETHICK1 , COLOR77AA1A;中轴: 50,LINETHICK1 , colorcyan;入顶: 80,LINETHICK1 , COLOR9966FF;大顶: 100,LINETHICK1 ,COLOR22A6E6;多转空:=((((LLV(MACD,4)>0) AND (MACD<REF(MACD,1))) AND (REF(MACD,1)>REF(MACD,2))) AND (REF(MACD,2)>REF(MACD,3)));空转多:=((((HHV(MACD,4)<0) AND (MACD>REF(MACD,1))) AND (REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3)));DRAWICON(多转空,MACD,2);DRAWICON(空转多,MACD,1);DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);选股:CROSS(MACD>0,0.5);MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);蓝:IF(FILTER(YXF=1,5),20,0),colorliblue,LINETHICK3;红:  IF(FILTER(YXF=1,5),10,0),colorred,LINETHICK2;黄: IF(FILTER(YXF=1,5),5,0),coloryellow,LINETHICK1;DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD上拐:REF(DEA,2)>REF(DEA,1) AND REF(DEA,1)<DEA;过渡:IF(BBI,10,DRAWNULL),colorwhite,LINETHICK2;持股:IF(C>BBI AND BBI>REF(BBI,1),10,DRAWNULL), colorred,LINETHICK2;持币:IF(C<=BBI AND BBI<=REF(BBI,1),10,DRAWNULL),colorgreen,LINETHICK2;

     

     来源:程序化99

  • 文华技术人员:  您的问题已经在帮您分析了,请稍候参考原贴回复
     同一问题,您不用重复发帖的

     

     来源: WWW.CXH99.COM

  • 文华客服: 这个指标 在赢顺通中不能导入

     

  • 网友回复:

     

    您的指标源码中有多个变量重复定义或者是没有定义,我们直接按照系统自带的指标编写和参数调整了,

     

    修改如下,仅供参考

     

    另外,不同软件函数机制不同,效果可能有差异,请了解下

     

    N:=9;
    M1:=3;
    M2:=3;
    VAR1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
    VAR2:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
    VAR3:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
    VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
    VAR5:=(VAR2+2*VAR3+3*VAR4)/6;
    VAR6:=MA(VAR5,3);
    MACD1: VAR6*5,COLORSTICK ,LINETHICK2 ;
    STICKLINE(VAR6<=-6,0,-25,5,0), COLOR88B7EA ;
    STICKLINE(VAR6<=-8,5,25,7,0);
    STICKLINE(VAR6<=-10,80,100,5,0), COLORYELLOW;
    警戒雷达: IF(VAR6<-6,20,0),LINETHICK3 , COLORFF0000;
    STICKLINE(VAR6<=-10,65,35,4,0);
    STICKLINE(VAR6<=-10,40,0,4,0), COLORRED;
    STICKLINE(VAR6<=-10,80,30,3,0), COLORGREEN;
    STICKLINE(VAR6<=-10,80,60,3,0), COLORWHITE;
    RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,LINETHICK2;
    K:SMA(RSV,M1,1),LINETHICK1;
    D:SMA(K,M2,1),LINETHICK1;
    J:3*K-2*D,COLORFF00FF,LINETHICK1;
    IF(J<0,J,NULL),COLORGREEN,LINETHICK2;
    IF(K>90,K,NULL),COLOR0000FF,LINETHICK2;
    IF(D>85,D,NULL),COLORFFFF11,LINETHICK2;
    DRAWICON(CROSS(K,D),D,'UY';
    DRAWICON(CROSS(D,K),K,'ELL';
    DRAWICON(CROSS(J,1),J,1);
    DRAWICON(K>80 AND D>80 AND CROSS(D,K),D,2);
    底: 20,LINETHICK1 , COLOR77AA1A;
    中轴: 50,LINETHICK1 , COLORCYAN;
    入顶: 80,LINETHICK1 , COLOR9966FF;
    大顶: 100,LINETHICK1 ,COLOR22A6E6;
    多转空:=((((LLV(MACD1,4)>0) AND (MACD1<REF(MACD1,1))) AND (REF(MACD1,1)>REF(MACD1,2))) AND (REF(MACD1,2)>REF(MACD1,3)));
    空转多:=((((HHV(MACD1,4)<0) AND (MACD1>REF(MACD1,1))) AND (REF(MACD1,1)<REF(MACD1,2))) AND (REF(MACD1,2)<REF(MACD1,3)));
    DRAWICON(多转空,MACD1,2);
    DRAWICON(空转多,MACD1,1);
    DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
    DEA:=EMA(DIFF,9);
    MACD:=2*(DIFF-DEA);
    选股:CROSS(MACD>0,0.5);
    MTM:=C-REF(C,1);
    DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
    YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
    蓝:IF(FILTER(YXF=1,5),20,0),COLORLIGHTBLUE,LINETHICK3;
    红:  IF(FILTER(YXF=1,5),10,0),COLORRED,LINETHICK2;
    黄: IF(FILTER(YXF=1,5),5,0),COLORYELLOW,LINETHICK1;
    MACD上拐:REF(DEA,2)>REF(DEA,1) AND REF(DEA,1)<DEA;
    BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;//求N1周期,N2周期,N3周期,N4周期收盘价均线的简单平均

    过渡:IF(BBI,10,NULL),COLORWHITE,LINETHICK2;
    持股:IF(C>BBI AND BBI>REF(BBI,1),10,NULL), COLORRED,LINETHICK2;
    持币:IF(C<=BBI AND BBI<=REF(BBI,1),10,NULL),COLORGREEN,LINETHICK2;

 

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

可联系技术人员 QQ: 511411198  点击这里给我发消息进行 有偿 编写!不贵!点击查看价格!


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

相关文章

    没有相关内容