25评论

0收藏

第一个公式终于通过了难呀!

avatar kxzhong | 5973 人阅读 | 25 人评论 | 2011-09-13

#property indicator_chart_window
  #property indicator_buffers 2
  #property indicator_color1 Red
  #property indicator_color2 Green
  extern int  变色均线=18;
  double duo[];
  double kong[];
  int init()
    {
     SetIndexBuffer(0,duo);
     SetIndexBuffer(1,kong);
     SetIndexStyle(0,DRAW_LINE);
     SetIndexStyle(1,DRAW_LINE);
     SetIndexDrawBegin(0,变色均线);
     SetIndexDrawBegin(1,变色均线);
     IndicatorDigits(Digits);
     return(0);
    }
  int start()
    {
     double temp0,temp1;
     int limit;
     int counted_bars=IndicatorCounted();
     if(counted_bars0) counted_bars--;
     limit=Bars-counted_bars;
     for(int i=limit; i>=0; i--)
        {     
        duo<i>=EMPTY_VALUE;
        kong<i>=EMPTY_VALUE;
        temp0=iMA(NULL,0,变色均线,0,MODE_SMA,PRICE_CLOSE,i);
        temp1=iMA(NULL,0,变色均线,0,MODE_SMA,PRICE_CLOSE,i+1);
        if(iClose(NULL,0,i)>=iMA(NULL,0,变色均线,0,MODE_SMA,PRICE_CLOSE,i))
              {duo<i>=temp0; duo[i+1]=temp1;}
        else  {kong<i>=temp0; kong[i+1]=temp1;}
        }      
     return(0);
    }[/td][/tr]
""
还没有人打赏,支持一下

评论|共 25 个

ccn无耻

发表于 2012-11-22 00:05:51 | 显示全部楼层

HOHO~~~~~~  

music

发表于 2012-11-22 00:05:51 | 显示全部楼层

#无语  

桃太郎

发表于 2012-11-22 00:05:51 | 显示全部楼层

小心大家盯上你哦  

引章小姐

发表于 2012-11-22 00:05:51 | 显示全部楼层

好帖,有才  

newer

发表于 2012-11-22 00:05:51 | 显示全部楼层

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

dcyhm

发表于 2012-11-22 00:05:51 | 显示全部楼层

老大,我好崇拜你哟  

苍老师学外汇

发表于 2012-11-22 00:05:51 | 显示全部楼层

支持一下吧  

5511880

发表于 2014-12-18 06:20:56 | 显示全部楼层

研究研究

goodsss241

发表于 2014-12-18 07:43:24 | 显示全部楼层


继续,学习了

123下一页
您需要登录后才可以回帖 登录 | 注册 微信登录

EA之家评论守则