MT4 EA 自动打开七对对冲货币

用模拟账户运行,仅仅作为观察指标

详细说明请看:http://my.fx678.com/forum.php?mod=viewthread&tid=140383


//+------------------------------------------------------------------+
//| MT4-EA制作.mq4 |
//| Copyright 2017, MT4-EA制作. |
//+------------------------------------------------------------------+
#property copyright "Copyright 2017, BY不悔"
#property link "彬哥出品-必属精品"
extern double Lot = 0.1;
int r=1;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
      if(r<2){//如果执行过一次,就暂停
               OrderSend("AUDUSD",OP_SELL, Lot, MarketInfo("AUDUSD",MODE_BID), 2, NULL, NULL, NULL, 0, 0, CLR_NONE);// 澳元/美元
               OrderSend("NZDJPY",OP_SELL, Lot, MarketInfo("NZDJPY",MODE_BID), 2, NULL, NULL, NULL, 0, 0, CLR_NONE);// 新西兰元/日元
               OrderSend("GBPCHF",OP_SELL, Lot, MarketInfo("GBPCHF",MODE_BID), 2, NULL, NULL, NULL, 0, 0, CLR_NONE);// 英镑/瑞士法郎
               OrderSend("EURUSD",OP_SELL, Lot, MarketInfo("EURUSD",MODE_BID), 2, NULL, NULL, NULL, 0, 0, CLR_NONE);// 欧元/美元
               OrderSend("EURCHF",OP_SELL, Lot, MarketInfo("EURCHF",MODE_BID), 2, NULL, NULL, NULL, 0, 0, CLR_NONE);// 欧元/瑞士法郎
               OrderSend("CHFJPY",OP_SELL, Lot, MarketInfo("CHFJPY",MODE_BID), 2, NULL, NULL, NULL, 0, 0, CLR_NONE);// 瑞士法郎/日元
               OrderSend("USDJPY",OP_SELL, Lot, MarketInfo("USDJPY",MODE_BID), 2, NULL, NULL, NULL, 0, 0, CLR_NONE);// 美元/日元
                  
            
               OrderSend("USDCHF",OP_BUY, Lot, MarketInfo("USDCHF",MODE_ASK), 2, NULL, NULL, NULL, 0, 0, CLR_NONE); // 美元/瑞士法郎
               OrderSend("EURGBP",OP_BUY, Lot, MarketInfo("EURGBP",MODE_ASK), 2, NULL, NULL, NULL, 0, 0, CLR_NONE); // 欧元/英镑
               OrderSend("NZDUSD",OP_BUY, Lot, MarketInfo("NZDUSD",MODE_ASK), 2, NULL, NULL, NULL, 0, 0, CLR_NONE); // 新西兰元/美元
               OrderSend("GBPUSD",OP_BUY, Lot, MarketInfo("GBPUSD",MODE_ASK), 2, NULL, NULL, NULL, 0, 0, CLR_NONE); // 英镑/美元
               OrderSend("EURJPY",OP_BUY, Lot, MarketInfo("EURJPY",MODE_ASK), 2, NULL, NULL, NULL, 0, 0, CLR_NONE); // 欧元/日元
               OrderSend("AUDJPY",OP_BUY, Lot, MarketInfo("AUDJPY",MODE_ASK), 2, NULL, NULL, NULL, 0, 0, CLR_NONE); // 澳元/日元
               OrderSend("GBPJPY",OP_BUY, Lot, MarketInfo("GBPJPY",MODE_ASK), 2, NULL, NULL, NULL, 0, 0, CLR_NONE); // 英镑/日元
               r++;
      }


return(0);

   



}
//+------------------------------------------------------------------+ 


你可能感兴趣的:(mt4,EA编程)