提供EA代写,指标,脚本等。有编程相关问题也可在此回复 - 页 3

 

5431827 


543182718:
提供EA代写,指标,脚本等。有编程相关问题也可在此回复,我的帐号就是我的QQ号。

你好,请问新版程序 的金叉买入死叉卖出该怎样编,找了很多资料都没找到。万分感谢!!!

 

 


 

mming:

   for(int buy=0;buy<OrdersTotal();buy++)  

       {

         if(OrderSelect(buy,SELECT_BY_POS,MODE_TRADES))

           {

            if(OrderType()==OP_BUY)

              {

               myTrallingStopPrice=Bid-TrallingStop*Point;

               if(myTrallingStopPrice>OrderStopLoss())

                 {

                  //iWait;

                  OrderModify(OrderTicket(),OrderOpenPrice(),myTrallingStopPrice,OrderTakeProfit(),0);

                 }

              }

            }

          }

   

       

    for(int sell=0;sell<OrdersTotal();sell++)  

       {

         if(OrderSelect(sell,SELECT_BY_POS,MODE_TRADES))

           {

         

           

                  if(OrderType()==OP_SELL)

              {

               myTrallingStopPrice=Ask+TrallingStop*Point;

               if(myTrallingStopPrice<OrderStopLoss())

                 {

                  //iWait;

                  OrderModify(OrderTicket(),OrderOpenPrice(),myTrallingStopPrice,OrderTakeProfit(),0);

                 }

              }

           }

       }

这个移动止损代码为什么只有BUY单可以 SELL单不可以?


 
543182718:
提供EA代写,指标,脚本等。有编程相关问题也可在此回复,我的帐号就是我的QQ号。

Mql4语言的下单命令 

运行后账户根本不开仓(我没有设置限制条件,直接市价下单,两个语言都试过了,根本不好使,也没有显示挂单) 

OrderSend(Symbol(),OP_SELL,0.05,Ask,50,0,0,"Sell",1,0,clrRed);

 OrderSend(Symbol(),OP_SELL,0.05,Bid,50,0,0,"Sell",1,0,clrRed);

平仓命令

明明有开仓单,ea就是不平仓 

  {

  double i;

  if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES )==true){

i = OrderTicket();

OrderClose(i,0.05,(Ask+Bid)/2,50,clrRed);


 
yoki22:
可以根据已有模板 制作一个EA吗
 
+1
 
我的EA只开多单,没有空单,是怎么回事?
 
sheri_lanyue:

我这个总是提示wrong parameters count,错误位置我在下面加粗标注,是森么原因呢 

 

//+------------------------

//计算最大开仓量

//+------------------------

double myLots(double lot)

 {

  lot=NormalizeDouble(AccountBalance()/1000.0*(getmax()-getmin()),2);

  return(lot);

  } 

 

void iOpenOrders(string myType,double myLots,double LossStop,double TakeProfit)
{
 int ticket;
 int mySPREAD=MarketInfo(Symbol(),MODE_SPREAD);//获取市场滑点
 if(myType=="Buy")
  ticket=OrderSend(NULL,OP_BUY,myLots(),Ask,mySPREAD,LossStop,TakeProfit,NULL,0,0,Red);
 if(myType=="Sell")
  ticket=OrderSend(NULL,OP_SELL,myLots(),Bid,mySPREAD,LossStop,TakeProfit,NULL,0,0,Blue);
}
//+--------------------------------------
//开仓条件若符合则开仓
//+-------------------------------------- 
void CheckForOpen()
 {
  double modebid;
  double modeask;
  modebid=MarketInfo(NULL,MODE_BID);//---最低卖价
  modeask=MarketInfo(NULL,MODE_ASK);//---最高买价
  if(CheckForMA()==0&&modebid<=getmin())
  iOpenOrders("Sell",myLots(),50,80);
  else 
      if(CheckForMA()==1&&modeask>=getmax())
      iOpenOrders("Buy",myLots(),50,80);
 } 
myLots()这个自定义函数的括号内应该有个参数lot,你没有输入
 
543182718:
提供EA代写,指标,脚本等。有编程相关问题也可在此回复,我的帐号就是我的QQ号。
谢谢
 
543182718:
提供EA代写,指标,脚本等。有编程相关问题也可在此回复,我的帐号就是我的QQ号。
很好