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

    我写的指标MACD箭头不显示,请老师帮忙?

    2011-10-26 · 8731 阅读
    #property  indicator_chart_window
      #property indicator_buffers 6
      #property  indicator_color1  Linen
      #property  indicator_color2 Red
      #property  indicator_color3  Red
      #property  indicator_color4  Lime
      #property  indicator_width1  2
      #property  indicator_width3 3
      #property  indicator_width4  3
      
      #property indicator_color5 Red
      #property indicator_color6 Green
      #property indicator_width5  3
      #property indicator_width6  3
      
      
      extern int  变色均线=26;
      extern int FastEMA=12;
      extern int SlowEMA=26;
      extern int SignalSMA=9;
      extern int EMA1=60;
      
      
      
      //---- indicator buffers
      double     M1[];
      double     M2[];
      double     M3[];
      double     M4[];
      double duo[];
      double kong[];
      double     MacdBuffer[];
      double     SignalBuffer[];
      //+------------------------------------------------------------------+
      //| Custom indicator initialization function                         |
      //+------------------------------------------------------------------+
      int init()
        {
      //---- drawing settings
         SetIndexStyle(0,DRAW_LINE);
         SetIndexStyle(1,DRAW_LINE);
           SetIndexStyle(2,DRAW_ARROW);
         SetIndexArrow( 2, 67);
         SetIndexStyle(3,DRAW_ARROW);
         SetIndexArrow( 3, 68);
      
      //---- indicator buffers mapping
       SetIndexBuffer(0,M1);
        SetIndexBuffer(1,M2);
          SetIndexBuffer(2,M3);
          SetIndexBuffer(3,M4);
         
      //---- name for DataWindow and indicator subwindow label
         IndicatorShortName(\"MA(\"+EMA1+\",\"+变色均线+\",)\");
         //IndicatorShortName(\"MACD(\"+FastEMA+\",\"+SlowEMA+\",\"+SignalSMA+\")\");
         SetIndexLabel(0,\"M1\");
         SetIndexLabel(1,\"M2\");
         SetIndexLabel(2,\"M3\");
         SetIndexLabel(3,\"M4\");
           SetIndexBuffer(4,duo);
         SetIndexBuffer(5,kong);
         SetIndexStyle(4,DRAW_LINE);
         SetIndexStyle(5,DRAW_LINE);
         SetIndexDrawBegin(4,变色均线);
        SetIndexDrawBegin(5,变色均线);
         IndicatorDigits(Digits);
       
      //---- initialization done
         return(0);
        }
      //+------------------------------------------------------------------+
      //| Moving Averages Convergence/Divergence                           |
      //+------------------------------------------------------------------+
      int start()
        {
         double temp0,temp1;
         int limit;
         int counted_bars=IndicatorCounted();
         if(counted_bars>0) counted_bars--;
         limit=Bars-counted_bars;
               
       
       
      //---- macd counted in the 1-st buffer
         for(int i=0; i
    ""
    还没有人打赏,支持一下
    回复

    举报

     

    回答|共 25 个

    闲暇时光在这里 LV5

    发表于 2012-11-21 23:54:18 | 显示全部楼层

    好人一生平安  

    醉醒翁 LV5

    发表于 2012-11-21 23:54:18 | 显示全部楼层

    请发一个试试,谢谢!RongYuanQiong@163.com 。。。  

    lljia LV4

    发表于 2012-11-22 01:12:18 | 显示全部楼层

    请发一个试试,谢谢!RongYuanQiong@163.com 。。。  

    hdadad1 LV5

    发表于 2012-11-22 01:36:01 | 显示全部楼层

    一楼的位置好啊..  

    苍老师学外汇 LV6

    发表于 2012-11-22 01:36:01 | 显示全部楼层

    真好。。。。。。。。。  

    有多少爱 LV5

    发表于 2012-11-22 01:36:01 | 显示全部楼层

    挺好啊  

    taojinzhe1 LV5

    发表于 2012-11-22 01:36:01 | 显示全部楼层

    似曾相识的感觉  

    天鹰 LV6

    发表于 2012-11-22 01:36:01 | 显示全部楼层

    都是那么过来的  

    海贼王 LV4

    发表于 2012-11-22 01:36:01 | 显示全部楼层

    呵呵 大家好奇嘛 来观看下~~~~  
    123下一页
    您需要登录后才可以回帖 登录 | 注册

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

    微信二维码

    有问题联系客服