Navigation:Home > Content >

Покупка__5_ордерами.mq4

Time: 2017-08-13 | Download file:Покупка__5_ордерами.mq4

//+------------------------------------------------------------------+
//|                                                      ZeroBuy.mq4 |
//|                                                           Сергей |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Сергей"
#property link      ""
#include 
//ErrorDescription(GetLastError())
#property show_inputs
extern double Lots=1;
extern int    Magic=1000;
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
int ticket.1=-1;
  while(ticket.1<0)
    {
    ticket.1=OrderSend(Symbol(),OP_BUY,Lots,Ask,10,0,0,NULL,Magic,0,CLR_NONE);
    ticket.1=OrderSend(Symbol(),OP_BUY,Lots,Ask,10,0,0,NULL,Magic,0,CLR_NONE);
    ticket.1=OrderSend(Symbol(),OP_BUY,Lots,Ask,10,0,0,NULL,Magic,0,CLR_NONE);
    ticket.1=OrderSend(Symbol(),OP_BUY,Lots,Ask,10,0,0,NULL,Magic,0,CLR_NONE);
    ticket.1=OrderSend(Symbol(),OP_BUY,Lots,Ask,10,0,0,NULL,Magic,0,CLR_NONE);
    if(ticket.1<0)Print("Ошибка при открытии позиции (",ErrorDescription(GetLastError()),")");
    }
//----
   return(0);
  }
//+------------------------------------------------------------------+

Recommend