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

麻烦将此自用公式转换为文华天津贵金属公式 [文华财经]

  • 咨询内容:  经过半月尝试未能解决,盼协助自用公式cmcm源代码:N(14,0,100,1),N1(9,0,100,1),N2(3,0,100,1),N3(5,0,100,1),N4(5,0,100,1),N5(5,0,100,1);REFLINE:-200,-100,0,100,200;
    TYP:= (HIGH + LOW + CLOSE)/3;CCI:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));RSV:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=((3*K-2*D)-50)*3;WR:=(50-(100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))))*3;PJ:=(CCI+J+WR)/3;PJK:=EMA(EMA(EMA(PJ,N2),2),2);PJM:=EMA(EMA(EMA(PJ,N3),3),3);
    CCIL:=(TYP-MA(TYP,N*N4))/(0.015*AVEDEV(TYP,N*N4));RSVL:=(CLOSE-LLV(LOW,N1*N4))/(HHV(HIGH,N1*N4)-LLV(LOW,N1*N4))*100;KL:=SMA(RSVL,3,1);DL:=SMA(KL,3,1);JL:=((3*KL-2*DL)-50)*3;WRL:=(50-(100*(HHV(HIGH,N*N4)-CLOSE)/(HHV(HIGH,N*N4)-LLV(LOW,N*N4))))*3;PJL:=(CCIL+JL+WRL)/3;PJKL:=EMA(EMA(EMA(PJL,N2*N4),N5),N5);PJML:=EMA(EMA(EMA(PJL,N3*N4),N5),N5);
    CMACD:=(PJK-PJKL)/2;MACDHS:=IF(CMACD>0 AND CMACD>=REF(CMACD,1),CMACD,0);MACDHX:=IF(CMACD>0 AND CMACD<=REF(CMACD,1),CMACD,0);MACDLX:=IF(CMACD<0 AND CMACD<=REF(CMACD,1),CMACD,0);MACDLS:=IF(CMACD<0 AND CMACD>=REF(CMACD,1),CMACD,0);STICKLINE(MACDHS>0,0,CMACD,2.7,0),COLOR0000BB;STICKLINE(MACDHS>0,0,CMACD,2.4,0),COLOR0000CC;STICKLINE(MACDHS>0,0,CMACD,2.1,0),COLOR0011CC;STICKLINE(MACDHS>0,0,CMACD,1.8,0),COLOR1122DD;STICKLINE(MACDHS>0,0,CMACD,1.5,0),COLOR2233DD;STICKLINE(MACDHS>0,0,CMACD,1.2,0),COLOR3344EE;STICKLINE(MACDHS>0,0,CMACD,0.9,0),COLOR4455EE;STICKLINE(MACDHS>0,0,CMACD,0.6,0),COLOR5566FF;STICKLINE(MACDHS>0,0,CMACD,0.3,0),COLOR6677FF;STICKLINE(MACDHX>0,0,CMACD,2.7,0),COLOR0077BB;STICKLINE(MACDHX>0,0,CMACD,2.4,0),COLOR0088CC;STICKLINE(MACDHX>0,0,CMACD,2.1,0),COLOR0099CC;STICKLINE(MACDHX>0,0,CMACD,1.8,0),COLOR00AADD;STICKLINE(MACDHX>0,0,CMACD,1.5,0),COLOR00BBDD;STICKLINE(MACDHX>0,0,CMACD,1.2,0),COLOR00CCEE;STICKLINE(MACDHX>0,0,CMACD,0.9,0),COLOR00DDEE;STICKLINE(MACDHX>0,0,CMACD,0.6,0),COLOR00EEFF;STICKLINE(MACDHX>0,0,CMACD,0.3,0),COLOR00FFFF;STICKLINE(MACDLX<0,CMACD,0,2.7,0),COLOR770000;STICKLINE(MACDLX<0,CMACD,0,2.4,0),COLOR881100;STICKLINE(MACDLX<0,CMACD,0,2.1,0),COLOR992200;STICKLINE(MACDLX<0,CMACD,0,1.8,0),COLORAA3300;STICKLINE(MACDLX<0,CMACD,0,1.5,0),COLORBB4400;STICKLINE(MACDLX<0,CMACD,0,1.2,0),COLORCC5500;STICKLINE(MACDLX<0,CMACD,0,0.9,0),COLORDD6600;STICKLINE(MACDLX<0,CMACD,0,0.6,0),COLOREE7700;STICKLINE(MACDLX<0,CMACD,0,0.3,0),COLORFF8800;STICKLINE(MACDLS<0,CMACD,0,2.7,0),COLOR005500;STICKLINE(MACDLS<0,CMACD,0,2.4,0),COLOR007700;STICKLINE(MACDLS<0,CMACD,0,2.1,0),COLOR009900;STICKLINE(MACDLS<0,CMACD,0,1.8,0),COLOR00AA00;STICKLINE(MACDLS<0,CMACD,0,1.5,0),COLOR00BB00;STICKLINE(MACDLS<0,CMACD,0,1.2,0),COLOR00CC00;STICKLINE(MACDLS<0,CMACD,0,0.9,0),COLOR00DD00;STICKLINE(MACDLS<0,CMACD,0,0.6,0),COLOR00EE00;STICKLINE(MACDLS<0,CMACD,0,0.3,0),COLOR00FF00;
    DK:PJK,COLORRED,LINETHICK2;DM:PJM,COLORGREEN,LINETHICK2;ZK:PJKL,COLORCYAN,LINETHICK1;ZM:PJML,COLORYELLOW,LINETHICK1;

     

  • 文华技术人员:  N:=14;N1:=9;N2:=3;N3:=5;N4:=5;N5:=5;//REFLINE:-200,-100,0,100,200;
    TYP:= (HIGH + LOW + CLOSE)/3;CCI:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));RSV:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=((3*K-2*D)-50)*3;WR:=(50-(100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))))*3;PJ:=(CCI+J+WR)/3;PJK:=EMA(EMA(EMA(PJ,N2),2),2);PJM:=EMA(EMA(EMA(PJ,N3),3),3);
    CCIL:=(TYP-MA(TYP,N*N4))/(0.015*AVEDEV(TYP,N*N4));RSVL:=(CLOSE-LLV(LOW,N1*N4))/(HHV(HIGH,N1*N4)-LLV(LOW,N1*N4))*100;KL:=SMA(RSVL,3,1);DL:=SMA(KL,3,1);JL:=((3*KL-2*DL)-50)*3;WRL:=(50-(100*(HHV(HIGH,N*N4)-CLOSE)/(HHV(HIGH,N*N4)-LLV(LOW,N*N4))))*3;PJL:=(CCIL+JL+WRL)/3;PJKL:=EMA(EMA(EMA(PJL,N2*N4),N5),N5);PJML:=EMA(EMA(EMA(PJL,N3*N4),N5),N5);
    CMACD:=(PJK-PJKL)/2;MACDHS:=IFELSE(CMACD>0 AND CMACD>=REF(CMACD,1),CMACD,0);MACDHX:=IFELSE(CMACD>0 AND CMACD<=REF(CMACD,1),CMACD,0);MACDLX:=IFELSE(CMACD<0 AND CMACD<=REF(CMACD,1),CMACD,0);MACDLS:=IFELSE(CMACD<0 AND CMACD>=REF(CMACD,1),CMACD,0);STICKLINE(MACDHS>0,0,CMACD,COLORRED,0);

    STICKLINE(MACDLX<0,CMACD,0,COLORGREEN,0);

    DK:PJK,SETSTYLECOLOR(LINETHICK2,COLORRED);DM:PJM,SETSTYLECOLOR(LINETHICK2,COLORGREEN);ZK:PJKL,SETSTYLECOLOR(LINETHICK1,COLORCYAN);ZM:PJML,SETSTYLECOLOR(LINETHICK1,COLORYELLOW);

    以上红色颜色可以根据自己的需要进行修改 

     

  • 文华客服:  辛苦了,没想到这么快

 

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

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


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

相关文章

    没有相关内容