← К каталогу
Исходный код · ID 156

gold.mq4

Вы автор или правообладатель?

Сообщите нам, если считаете, что материал размещён без разрешения.

Получить полный код

Поиск по коду файла

#property version   "1.00"
#property strict

extern double Lots         = 0.1;   // ???
extern double KLot         = 2;     // ????????? ????
extern double MaxLot       = 5;     // ???????????? ???
extern double Depo         = 20000; // ??????????? ????
extern double Sup          = 1000;  // ????????? ????
extern double Res          = 1500;  // ????????????? ?????
extern int    StopLoss     = 5000;  // ????
extern int    TakeProfit   = 5000;  // ???
extern int    Slip         = 30;    // ??????
extern int    Count        = 100;   // ???????????? ?????????? ???
extern int    Magic        = 12;    // ?????

datetime t=0;
double Price=0;

int OnInit()
  {
      // код доступен только после оплаты
   }

void OnDeinit(const int reason)
  {

  }

void PutOrder(int type,double price)
  {
   int r=0;
   color clr=Green;
   double sl=0,tp=0;

   if(type==1 || type==3 || type==5)
     {
      clr=Red;
      if(StopLoss>0)   sl=NormalizeDouble(price+StopLoss*Point,Digits);
      if(TakeProfit>0) tp=NormalizeDouble(price-TakeProfit*Point,Digits);
     }

   if(type==0 || type==2 || type==4)
     {
      clr=Blue;
      if(StopLoss>0)   sl=NormalizeDouble(price-StopLoss*Point,Digits);
      if(TakeProfit>0) tp=NormalizeDouble(price+TakeProfit*Point,Digits);
     }

   r=OrderSend(NULL,type,Lots,NormalizeDouble(price,Digits),Slip,sl,tp,"",Magic,0,clr);
   return;
  }

int CountTrades()
  {
   int count=0;
   for(int i=OrdersTotal()-1;i>=0;i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
       

Показано первые 50% кода (символов: 2064)

Что вы получите после оплаты

На этой странице откроется полный исходный код файла вместо ознакомительного фрагмента.

Чтобы оформить заказ, введите email и перейдите к оплате.

Стоимость полного кода
206₽