29评论

2收藏

万能指标代码

avatar 零海拔 | 8215 人阅读 | 29 人评论 | 2011-12-14

很容易的修改万能指标代码 !
  改变红色代码 您的买入卖出条件
  
  
  #property copyright \"SH Lim\"
  #property link      \"singhooilim@yahoo.com\"
  
  #property indicator_chart_window
  #property indicator_color1 White
  #property indicator_color2 Yellow
  extern bool Alertbuy = false;
  extern bool Alertsell = false;
  extern int distance = 5;
  extern int Symbol_1_Kod=181; // 可以改 100 至 255
  extern string NameFileSound = \"alert.wav\";
  
  #property indicator_buffers 2
  //---- input parameters
  //---- buffers
  double UpBuffer[];
  double DnBuffer[];
  
  //+------------------------------------------------------------------+
  //| Custom indicator initialization function                         |
  //+------------------------------------------------------------------+
  int init()
    {
  //---- indicators
  
    // IndicatorBuffers(2);
     SetIndexStyle(0,DRAW_ARROW,0,0);
     SetIndexArrow(0,Symbol_1_Kod);
     SetIndexBuffer(0,UpBuffer);
     SetIndexEmptyValue(0,0.0);
     
     SetIndexStyle(1,DRAW_ARROW,0,0);
     SetIndexArrow(1,Symbol_1_Kod);
     SetIndexBuffer(1,DnBuffer);
     SetIndexEmptyValue(1,0.0);
     
     SetIndexLabel(0,\"Up Signal\");
     SetIndexLabel(1,\"Down Signal\");
  
  //----
     return(0);
    }
  //+------------------------------------------------------------------+
  //| Custor indicator deinitialization function                       |
  //+------------------------------------------------------------------+
  int deinit()
    {
  //----
     
  //----
     return(0);
    }
  //+------------------------------------------------------------------+
  //| Custom indicator iteration function                              |
  //+------------------------------------------------------------------+
  int start()
    {
   
     int limit;
     int counted_bars=IndicatorCounted();
     if(counted_bars0) counted_bars--;
     limit=Bars-counted_bars;
     
   
     for(int i = 0 ;i < limit ;i++)
     {
     
  //indicators
  
  double m1 = iCustom(NULL,0, \"MTF_MACD_inColor\", 15, 12, 26, 9, 0, 0, i);
  double m1a = iCustom(NULL,0, \"MTF_MACD_inColor\", 15, 12, 26, 9, 0, 1, i);
  
  double m2 = iCustom(NULL,0, \"MTF_MACD_inColor\", 30, 12, 26, 9, 0, 0, i);
  double m2a = iCustom(NULL,0, \"MTF_MACD_inColor\", 30, 12, 26, 9, 0, 1, i);
  
  double m3 = iCustom(NULL,0, \"MTF_MACD_inColor\", 240, 12, 26, 9, 0, 0, i);
  double m3a = iCustom(NULL,0, \"MTF_MACD_inColor\", 240, 12, 26, 9, 0, 1, i);
  

  //end of indicators
  
        if((m1>m1a)&&(m2>m2a)&&(m3>m3a)) // Up Trend Condition 上升趋势条件
        {  
          UpBuffer<i> = iLow(Symbol(),0,i)-(distance*Point); // Signal Location 信号位置
          DnBuffer<i> = EMPTY_VALUE;
        if (Alertbuy==1) Alert(\"H4 Buy at Ask=\",Ask,\", Bid=\",Bid,\" Symbol=\",Symbol());
  
        }
         else if(<font color=\"Red\">(m1
""
还没有人打赏,支持一下

评论|共 29 个

lzjiang

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

不错,支持下  

qinkui007

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

我的啦嘿嘿  

印度阿三

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

唉,悲催的外汇。。  

一壶乡愁

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

真的有么  

珊瑚

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

好人一个  

2364383259

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

#无语  

知足常乐

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

做一个,做好了,请看  

mt5mt5

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

我帮你 喝喝  

释放人质

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

唉,悲催的外汇。。  

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

EA之家评论守则