• 注册
    • 中文
    • English
  • 注册
  • 网格 网格 关注:3 内容:5271

    大家来找碴…….【速成班编程方案】

  • 查看作者
  • 打赏作者
  • 网格
  • Lv.9
    神隐会员
    靓号:1322336
    EA+

    请大家看看.有些什么地方写错了….
      //+——————————————————————+
      //|                                                         模板.mq4 |
      //|                                                              sun |
      //|                                                         sunyijie |
      //+——————————————————————+
      #property copyright \”sun\”
      #property link      \”sunyijie\”
      //+——————————————————————+
         double shortEma, longEma;
         double kdj_sig,kdj_main,macd_main,macd_sig;
         extern double    Short_MA_value = 20;
         extern double    Long_MA_value  = 50;
         extern double    stoch_k        = 8;
         extern double    stoch_d        = 3;
         extern double    stoch_j        = 3;
         extern double    StopLoss       = 0;
         extern double    lots           = 1;
      //+——————————————————————+
         int cnt, ticket, total;
         int s=0,b=0;
         int   panduan=0;
      //+——————————————————————+  
         double mode=0;
         double LastOrderType;
         double LastPricesell;
         double LastPricebuy;
         double LastPrice;
         double OpenSells;
         double OpenSellStops;
         double OpenBuys;
         double OpenBuyStops;
      
      //| expert initialization function                                   |
      //+——————————————————————+
      int init()
        {
      //—-
         
      //—-
         return(0);
        }
      //+——————————————————————+
      //| expert deinitialization function                                 |
      //+——————————————————————+
      int deinit()
        {
      //—-
         
      //—-
         return(0);
        }
      //+——————————————————————+
      //| expert start function                                            |
      //+——————————————————————+
      int start()
        {
      //—-
      jiancha();
      kd();
      ma();
      jinchang();
      buyme();
      sellme();
      closebuy();
      closesell();
         
      //—-
         return(0);
        }
      //+——————————————————————+
      void jiancha()
      {
      
      b=0;s=0;
      for (int cnt=0; cnt/     shortEma = iMA(NULL,0,Short_MA_value,0,MODE_EMA,PRICE_CLOSE,0);br /     longEma  = iMA(NULL,0,Long_MA_value ,0,MODE_EMA,PRICE_CLOSE,0);br /  }br /  //+——————————————————————+br /  void jinchang(){br /  //+——————————————————————+br /     br /  if((s+b==0) && (panduan==0)){panduan=1;}br /  if((TimeHour(CurTime()) > 5 )){panduan=2;}
      if((TimeHour(CurTime()) < 17 )){panduan=3;}
      if((Close[0]>High[1]) && (s+b==0) && (panduan==1) && (panduan==2) && (panduan==3)){buyme();panduan=0;}
      if((Close[0]

    请登录之后再进行评论

    登录

    WordPress后台-外观-小工具 进行配置小工具

  • 发布
  • 做任务
  • 实时动态
  • 偏好设置
  • 帖子间隔 侧栏位置: