10评论

0收藏

求助各位高人看看我的ea不下单

avatar u88y01 | 4049 人阅读 | 10 人评论 | 2011-11-07

思路是向上突破50点开多仓
  我的QQ170017111  各位大侠想交流请叫我 多一个朋友 多一条思路
  
  extern double TakeProfit = 50;
  extern double Lots = 0.1;
  extern double TrailingStop = 30;
  extern double MACDOpenLevel=3;
  extern double MACDCloseLevel=2;
  extern double MATrendPeriod=26;
  
  //+------------------------------------------------------------------+
  //|                                                                  |
  //+------------------------------------------------------------------+
  int start()
    {
   
     int cnt, ticket, total;
  
     double nclose,nopen;
  //----
   nclose=iClose(NULL,PERIOD_M5,0);
   nopen=iOpen(NULL,PERIOD_M5,0);
  
     total=OrdersTotal();
     if(total0)
             {
              if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print(\"BUY order opened : \",OrderOpenPrice());
             }
           else Print(\"Error opening BUY order : \",GetLastError());
           return(0);
          }
        // check for short position (SELL) possibility
        if(nopen-nclose>50*Point)
          {
           ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,\"macd sample\",16384,0,Red);
           if(ticket>0)
             {
              if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print(\"SELL order opened : \",OrderOpenPrice());
             }
           else Print(\"Error opening SELL order : \",GetLastError());
           return(0);
          }
        return(0);
       }
     // it is important to enter the market correctly,
     // but it is more important to exit it correctly...   
     for(cnt=0;cnt/                  }br /              // check for trailing stopbr /              if(TrailingStop>0)  
                {                 
                 if(Bid-OrderOpenPrice()>Point*TrailingStop)
                   {
                    if(OrderStopLoss()50*Point)
                {
                 OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet); // close position
                 return(0); // exit
                }
              // check for trailing stop
              if(TrailingStop>0)  
                {                 
                 if((OrderOpenPrice()-Ask)>(Point*TrailingStop))
                   {
                    if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0))
                      {
                       OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red);
                       return(0);
                      }
                   }
                }
             }
          }
       }
     return(0);
    }
  // the end.
""
还没有人打赏,支持一下

评论|共 10 个

guiliu

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

你好 , 写过很多ea了, 请看我用户名, 加后可提供博客看看我的ea介绍

lzjiang

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

谢谢分享了!   

御赐黄马甲

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

加油啊!!!!顶哦!!!!!  

妹子

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

帮顶  

elliott

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

既然来了,就留个脚印  

苍井空

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

挺 疯狂的这个EA  

西城威尔士

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

加油啊!!!!顶哦!!!!!  

macc

发表于 2014-11-9 00:22:31 | 显示全部楼层

下了  的确不错

earn1

发表于 2014-11-13 01:38:49 | 显示全部楼层

nice!!!!!!!!!!!!

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

EA之家评论守则