📅 财经日历 📊 实时波动 📈 大盘云图 📶 行情走势 🆚 投机情绪 🚀 今日热点

    求牛版主帮忙

    arp LV3
    2011-09-08 · 5031 阅读
    下面的图形中,后面的八个向上箭头只有最后一个才是正确的,它前面的七个全是由K 线上去后又下来的假信号留下的垃圾,变换一下周期再变回来,那七个就没了;求你解决的问题是:能否让图表自动刷新,使它只有一个箭头,条件变化之后,让不符合条件的箭头自动消失?
      谢谢了!!!


    • #property indicator_chart_window
    • #property indicator_buffers 8
    • #property indicator_color1 Gold
    • #property indicator_color2 Lime
    • #property indicator_color3 Lime
    • #property indicator_color4 Gold

    • extern int 均线周期2 = 2;
    • extern int 均线周期5 = 5;
    • extern int 类型1 = 0;//0-SMA; 1-EMA; 2-SMMA; 3-LWMA
    • extern int 类型2 = 0;//0-SMA; 1-EMA; 2-SMMA; 3-LWMA
    • double ibuf_1[];
    • double ibuf_2[];
    • double ibuf_3[];
    • double ibuf_4[];
    • int gi_1;
    • int gi_2 = 0;
    • datetime time_1;
    • //+------------------------------------------------------------------+
    • int init() {
    •    IndicatorBuffers(8);
    •    SetIndexStyle(0, DRAW_LINE,0,2);
    •    SetIndexStyle(1, DRAW_LINE,0,2);
    •    SetIndexStyle(2, DRAW_ARROW,0,1);
    •    SetIndexStyle(3, DRAW_ARROW,0,1);
    •    SetIndexArrow(2, 233);
    •    SetIndexArrow(3, 234);
    •    SetIndexBuffer(0, ibuf_1);
    •    SetIndexBuffer(1, ibuf_2);
    •    SetIndexBuffer(2, ibuf_3);
    •    SetIndexBuffer(3, ibuf_4);
    •    gi_1 = 0;
    •    return (0);
    • }
    • //+------------------------------------------------------------------+
    • //| Custom indicator deinitialization function                       |
    • //+------------------------------------------------------------------+
    • int deinit() {
    •    return(0); }
    • //+------------------------------------------------------------------+
    • int start() {
    •    int counted_bars = IndicatorCounted();
    •    if (counted_bars < 0) return (-1);
    •    if (counted_bars > 0) counted_bars--;
    •    int limit = Bars - counted_bars;
    •    for (int i = limit; i >= 0; i--) {
    •       ibuf_1 = iMA(NULL, 0, 均线周期2, 0, 类型1, PRICE_CLOSE, i);
    •       ibuf_2 = iMA(NULL, 0, 均线周期5, 0, 类型2, PRICE_CLOSE, i);
    • //+----
    •       if (ibuf_1[i + 1] < ibuf_2[i + 1] && ibuf_1 > ibuf_2) {
    •          ibuf_3 = Low - 5 * Point;
    •       }
    • //+----
    •       if (ibuf_1[i + 1] > ibuf_2[i + 1] && ibuf_1 < ibuf_2) {
    •          ibuf_4 = High + 5 * Point;
    •       } else gi_2 = FALSE;
    •    }
    •    return (0);}

    复制代码
    ""
    还没有人打赏,支持一下
    回复

    举报

     

    回答|共 15 个

    落羽 LV5

    发表于 2012-11-25 16:59:05 | 显示全部楼层

    牛牛牛牛  

    走就走吧 LV5

    发表于 2012-11-25 16:59:05 | 显示全部楼层

    这个站不错!!  

    pkvszl LV4

    发表于 2012-11-25 18:07:25 | 显示全部楼层

    帮顶  

    妖怪 LV6

    发表于 2012-11-25 18:07:25 | 显示全部楼层

    人气还要再提高  

    CCN客户经理 LV4

    发表于 2012-11-25 18:07:25 | 显示全部楼层

    我十目一行也还是看不懂啊  

    newer LV6

    发表于 2012-11-25 18:07:25 | 显示全部楼层

    呵呵 哪天得看看 `~~~~  

    痔疮犯了 LV4

    发表于 2012-11-25 18:07:25 | 显示全部楼层

    长时间没来看了 ~~  

    心魔 LV17

    发表于 2012-11-25 18:07:25 | 显示全部楼层

    回复一下  

    jzjjtthte LV5

    发表于 2012-11-25 18:07:25 | 显示全部楼层

    你好!我想编写一平仓条件,可一直不成功。当下单成功后赢利超过7点之后赢利又小于6点平仓。就这个平仓条件能辛苦帮我写一下吗?这样能保住赢利不会变亏损。先行谢谢了!!!~~~  
    12下一页
    您需要登录后才可以回帖 登录 | 注册

    提醒: 禁止引战、谩骂、灌水内容

    微信二维码

    有问题联系客服