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

两个指标请教师帮改成文化能用的。谢谢 [文华财经]

  • 咨询内容:  MA1:MA(CLOSE,M1);{设定均线}
    MA2:=MA(CLOSE,M2);{设定均线}
    DRAWKLINE(H,O,L,C);{写K线}
    STICKLINE(MA1>=REF(MA1,1),H,L,0,0),COLOR0000FF;{均线上行,标记影线}
    STICKLINE(MA1>=REF(MA1,1) AND (C>=O),O,C,3,1),COLOR0000FF;{均线上行,标记阳线}
    STICKLINE(MA1>=REF(MA1,1)AND (C<=O),O,C,3,0),COLOR0000FF;{均线上行,标记阴线}
    STICKLINE(MA1>=REF(MA1,1) AND MA2<=REF(MA2,1) AND COUNT(MA1>=REF(MA1,1),20)>13,H,L,0,0),COLOR00FFFF;{做顶,标记影线}
    STICKLINE(MA1>=REF(MA1,1) AND MA2<=REF(MA2,1) AND COUNT(MA1>=REF(MA1,1),20)>13 AND (C>=O),O,C,3,1),COLOR00FFFF;{做顶,标记阳线}
    STICKLINE(MA1>=REF(MA1,1) AND MA2<=REF(MA2,1) AND COUNT(MA1>=REF(MA1,1),20)>13 AND (C<=O),O,C,3,0),COLOR00FFFF;{做顶,标记阴线}
    STICKLINE(MA1<REF(MA1,1),H,L,0,0),COLOR00FF00;{均线下行,标记影线}
    STICKLINE(MA1<REF(MA1,1) AND (C>=O),O,C,3,1),COLOR00FF00;{均线下行,标记阳线}
    STICKLINE(MA1<REF(MA1,1) AND (C<=O),O,C,3,0),COLOR00FF00;{均线下行,标记阴线};
    STICKLINE(MA1<=REF(MA1,1) AND MA2>=REF(MA2,1) AND COUNT(MA1<=REF(MA1,1),30)>15,H,L,0,0),COLORFF00FF;{做底,标记影线}
    STICKLINE(MA1<=REF(MA1,1) AND MA2>=REF(MA2,1) AND COUNT(MA1<=REF(MA1,1),30)>15 AND (C>=O),O,C,3,1),COLORFF00FF;{做底,标记阳线}
    STICKLINE(MA1<=REF(MA1,1) AND MA2>=REF(MA2,1) AND COUNT(MA1<=REF(MA1,1),30)>15 AND (C<=O),O,C,3,0),COLORFF00FF;{做底,标记阴线}; 
    ==============================
    MA1:MA(CLOSE,M1);
    VAR1:HHV(MA1,3),COLOR00AA00;
    VAR2:HHV(VAR1,2),COLOR00BB00;
    VAR3:HHV(VAR2,2),COLOR00CC00,LINETHICK2;
    VAR4:LLV(MA1,3),COLOR0000AA;
    VAR5:LLV(VAR4,2),COLOR0000BB;
    VAR6:LLV(VAR5,2),COLOR0000CC,LINETHICK2;
    IF(MA1>=REF(MA1,1),MA1,DRAWNULL),COLORMAGENTA,LINETHICK2;
    IF(MA1<=REF(MA1,1),MA1,DRAWNULL),COLORWHITE,LINETHICK2;

     

  • 文华技术人员:

     这样编写。

    MA1:MA(CLOSE,M1);
    MA2:=MA(CLOSE,M2);
    DRAWKLINE(H,O,L,C);
    STICKLINE1(MA1>=REF(MA1,1),H,L,0,0),COLOR0000FF;
    STICKLINE1(MA1>=REF(MA1,1) AND (C>=O),O,C,3,1),COLOR0000FF;
    STICKLINE1(MA1>=REF(MA1,1) AND (C<=O),O,C,3,0),COLOR0000FF;
    STICKLINE1(MA1>=REF(MA1,1) AND MA2<=REF(MA2,1) AND COUNT(MA1>=REF(MA1,1),20)>13,H,L,0,0),COLOR00FFFF;
    STICKLINE1(MA1>=REF(MA1,1) AND MA2<=REF(MA2,1) AND COUNT(MA1>=REF(MA1,1),20)>13 AND (C>=O),O,C,3,1),COLOR00FFFF;
    STICKLINE1(MA1>=REF(MA1,1) AND MA2<=REF(MA2,1) AND COUNT(MA1>=REF(MA1,1),20)>13 AND (C<=O),O,C,3,0),COLOR00FFFF;
    STICKLINE1(MA1<REF(MA1,1),H,L,0,0),COLOR00FF00;
    STICKLINE1(MA1<REF(MA1,1) AND (C>=O),O,C,3,1),COLOR00FF00;
    STICKLINE1(MA1<REF(MA1,1) AND (C<=O),O,C,3,0),COLOR00FF00;
    STICKLINE1(MA1<=REF(MA1,1) AND MA2>=REF(MA2,1) AND COUNT(MA1<=REF(MA1,1),30)>15,H,L,0,0),COLORFF00FF;
    STICKLINE1(MA1<=REF(MA1,1) AND MA2>=REF(MA2,1) AND COUNT(MA1<=REF(MA1,1),30)>15 AND (C>=O),O,C,3,1),COLORFF00FF;
    STICKLINE1(MA1<=REF(MA1,1) AND MA2>=REF(MA2,1) AND COUNT(MA1<=REF(MA1,1),30)>15 AND (C<=O),O,C,3,0),COLORFF00FF;

     

    注:需要在参数栏中对M1,M2定义一下。

     

  • 文华客服:

    第二个

    MA1:MA(CLOSE,M1);
    VAR1:HHV(MA1,3),COLOR00AA00;
    VAR2:HHV(VAR1,2),COLOR00BB00;
    VAR3:HHV(VAR2,2),COLOR00CC00,LINETHICK2;
    VAR4:LLV(MA1,3),COLOR0000AA;
    VAR5:LLV(VAR4,2),COLOR0000BB;
    VAR6:LLV(VAR5,2),COLOR0000CC,LINETHICK2;
    IF(MA1>=REF(MA1,1),MA1,NULL),COLORMAGENTA,LINETHICK2;
    IF(MA1<=REF(MA1,1),MA1,NULL),COLORWHITE,LINETHICK2;

 

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

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


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

相关文章

    没有相关内容