조언자를 작성하는 데 도움이됩니다. 미리 감사드립니다. - 페이지 13

 
물론 모든 사람이 생각하게 하십시오.
 
edikjefimov :
나는 지표가 주문의 개통을 지연시킬 뿐이라고 생각하고 잘못된 신호가 많이 있습니다. 예를 들어 12 주문이 도달했을 때 000.00에 마감하도록 두는 것이 더 합리적이라고 생각합니다. 또는이 숫자를 변경할 수 있습니다. 귀하의 재량 및 창고에 따라
그건 그렇고, 좋은 아이디어입니다!
 
//+------------------------------------------------------------------+
//|                                                        Канал.mq4 |
//|                                          Copyright © 2011, Лукас |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, Лукас"
#property link      "http://www.metaquotes.net"
extern int    magicnumber    = 1210;
extern double  Nach_Lot = 0.05;

extern int SL_BUY  = 500; 
extern int TP_BUY  = 700;
extern int Shirina_Kanala_STOP  = 200;

//int SL_SELL  = 400; 
//int TP_SELL  = 400; 
double Lot,Lot_BUY,Lot_SELL,Min_Lot;
string TF,Metka;
int Ticket_Open_BUYSTOP, Ticket_Open_SELLSTOP,Ticket_Open_BUY,Ticket_Open_SELL;
double Cena_Otkr_BUY,Cena_Otkr_SELL,TP_Otkr_BUY,SL_Otkr_BUY,TP_Otkr_SELL,SL_Otkr_SELL;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
   Lot=Nach_Lot;
   Lot_BUY=Nach_Lot;
   Lot_SELL=Nach_Lot;
   Min_Lot =MarketInfo(Symbol(), MODE_MINLOT);   
   //StopLevel = ND(MarketInfo(Symbol(), MODE_STOPLEVEL)*Point);  
   return(0);

  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
  Metka=Symbol()+"-''Канал(v.1.0)''";

 double ZigZag_0=iCustom(NULL, 0, "ZigZag",12,5,3,1,0);
 double ZigZag_1=iCustom(NULL, 0, "ZigZag",12,5,3,1,1);
 
if((CalculateCurrentOrders_STOP(Symbol())==1)&&(CalculateCurrentOrders_OPEN(Symbol())==0))
  {
    Close_Order_BUYSTOP();
    Close_Order_SELLSTOP();
  }
if  (ZigZag_0>ZigZag_1)
{  
if((CalculateCurrentOrders_STOP(Symbol())==0)&&(CalculateCurrentOrders_OPEN(Symbol())==0))
  {
    Lot_BUY=Nach_Lot;
    Ticket_Open_BUY=OrderSend(Symbol(),OP_BUY,Lot_BUY,Ask,3,ND(Bid-SL_BUY*Point),ND(Ask+TP_BUY*Point),Metka,magicnumber,0,Green);
    Cena_Otkr_BUY=ND(Ask);
    TP_Otkr_BUY=ND(Ask+TP_BUY*Point);
    SL_Otkr_BUY=ND(Bid-SL_BUY*Point);
    TP_Otkr_SELL=SL_Otkr_BUY;
    SL_Otkr_SELL=TP_Otkr_BUY;
    Cena_Otkr_SELL=ND(Ask-Shirina_Kanala_STOP*Point);
    Lot_SELL=Nach_Lot*2;
    Ticket_Open_SELLSTOP=OrderSend(Symbol(),OP_SELLSTOP,Lot_SELL,Cena_Otkr_SELL,3,SL_Otkr_SELL,TP_Otkr_SELL,Metka,magicnumber,0,Blue);
  }
}  
if((CalculateCurrentOrders_STOP(Symbol())==0)&&(CalculateCurrentOrders_OPEN(Symbol())==1))
  { 
    Lot_BUY=Nach_Lot*4;
    Ticket_Open_BUYSTOP=OrderSend(Symbol(),OP_BUYSTOP,Lot_BUY,Cena_Otkr_BUY,3,SL_Otkr_BUY,TP_Otkr_BUY,Metka,magicnumber,0,Blue);
  }
  
if((CalculateCurrentOrders_SELL(Symbol())==1)&&(CalculateCurrentOrders_BUY(Symbol())==2)&&(CalculateCurrentOrders_STOP(Symbol())==0))
  { 
    Lot_SELL=Nach_Lot*8;
    Ticket_Open_SELLSTOP=OrderSend(Symbol(),OP_SELLSTOP,Lot_SELL,Cena_Otkr_SELL,3,SL_Otkr_SELL,TP_Otkr_SELL,Metka,magicnumber,0,Blue);
  }  
  
if((CalculateCurrentOrders_SELL(Symbol())==2)&&(CalculateCurrentOrders_BUY(Symbol())==2)&&(CalculateCurrentOrders_STOP(Symbol())==0))
  { 
    Lot_BUY=Nach_Lot*16;
    Ticket_Open_BUYSTOP=OrderSend(Symbol(),OP_BUYSTOP,Lot_BUY,Cena_Otkr_BUY,3,SL_Otkr_BUY,TP_Otkr_BUY,Metka,magicnumber,0,Blue);
  }  
  
if((CalculateCurrentOrders_SELL(Symbol())==2)&&(CalculateCurrentOrders_BUY(Symbol())==3)&&(CalculateCurrentOrders_STOP(Symbol())==0))
  { 
    Lot_SELL=Nach_Lot*32;
    Ticket_Open_SELLSTOP=OrderSend(Symbol(),OP_SELLSTOP,Lot_SELL,Cena_Otkr_SELL,3,SL_Otkr_SELL,TP_Otkr_SELL,Metka,magicnumber,0,Blue);
  }  
  
if((CalculateCurrentOrders_SELL(Symbol())==3)&&(CalculateCurrentOrders_BUY(Symbol())==3)&&(CalculateCurrentOrders_STOP(Symbol())==0))
  { 
    Lot_BUY=Nach_Lot*64;
    Ticket_Open_BUYSTOP=OrderSend(Symbol(),OP_BUYSTOP,Lot_BUY,Cena_Otkr_BUY,3,SL_Otkr_BUY,TP_Otkr_BUY,Metka,magicnumber,0,Blue);
  }  

if((CalculateCurrentOrders_SELL(Symbol())==3)&&(CalculateCurrentOrders_BUY(Symbol())==4)&&(CalculateCurrentOrders_STOP(Symbol())==0))
  { 
    Lot_SELL=Nach_Lot*128;
    Ticket_Open_SELLSTOP=OrderSend(Symbol(),OP_SELLSTOP,Lot_SELL,Cena_Otkr_SELL,3,SL_Otkr_SELL,TP_Otkr_SELL,Metka,magicnumber,0,Blue);
  }   
  
if((CalculateCurrentOrders_SELL(Symbol())==4)&&(CalculateCurrentOrders_BUY(Symbol())==4)&&(CalculateCurrentOrders_STOP(Symbol())==0))
  { 
    Lot_BUY=Nach_Lot*256;
    Ticket_Open_BUYSTOP=OrderSend(Symbol(),OP_BUYSTOP,Lot_BUY,Cena_Otkr_BUY,3,SL_Otkr_BUY,TP_Otkr_BUY,Metka,magicnumber,0,Blue);
  } 
  
if((CalculateCurrentOrders_SELL(Symbol())==4)&&(CalculateCurrentOrders_BUY(Symbol())==5)&&(CalculateCurrentOrders_STOP(Symbol())==0))
  { 
    Lot_SELL=Nach_Lot*512;
    Ticket_Open_SELLSTOP=OrderSend(Symbol(),OP_SELLSTOP,Lot_SELL,Cena_Otkr_SELL,3,SL_Otkr_SELL,TP_Otkr_SELL,Metka,magicnumber,0,Blue);
  } 
  
if((CalculateCurrentOrders_SELL(Symbol())==5)&&(CalculateCurrentOrders_BUY(Symbol())==5)&&(CalculateCurrentOrders_STOP(Symbol())==0))
  { 
    Lot_BUY=Nach_Lot*1024;
    Ticket_Open_BUYSTOP=OrderSend(Symbol(),OP_BUYSTOP,Lot_BUY,Cena_Otkr_BUY,3,SL_Otkr_BUY,TP_Otkr_BUY,Metka,magicnumber,0,Blue);
  }
  
if((CalculateCurrentOrders_SELL(Symbol())==5)&&(CalculateCurrentOrders_BUY(Symbol())==6)&&(CalculateCurrentOrders_STOP(Symbol())==0))
  { 
    Lot_SELL=Nach_Lot*2048;
    Ticket_Open_SELLSTOP=OrderSend(Symbol(),OP_SELLSTOP,Lot_SELL,Cena_Otkr_SELL,3,SL_Otkr_SELL,TP_Otkr_SELL,Metka,magicnumber,0,Blue);
  }  
        
  /*
if((CalculateCurrentOrders_STOP(Symbol())==0)&&(CalculateCurrentOrders_OPEN(Symbol())==0))
  {
    if (Key_BUY==true) Ticket_Open_BUYSTOP=OrderSend(Symbol(),OP_BUYSTOP,Lot_BUY,Cena_Buy,3,SL_Buy,TP_Buy1,Metka,magicnumber,0,Blue);
    if (Key_SELL==true) Ticket_Open_SELLSTOP=OrderSend(Symbol(),OP_SELLSTOP,Lot_SELL,Cena_Sell,3,SL_Sell,TP_Sell1,Metka,magicnumber,0,Blue);
  }
  */
 
  
  
  
   return(0);
  }
//+------------------------------------------------------------------+

//***********************************************************************************************************************************//
// Функция определения количества отложенных стоп ордеров ---------------------------------------------------------------------------//
//***********************************************************************************************************************************//
int CalculateCurrentOrders_STOP(string symbol)
{
   int buys=0,sells=0;
//----
   for(int i=0;i<OrdersTotal();i++)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
      if(OrderSymbol()==Symbol() && OrderMagicNumber()==magicnumber)
        {
         if(OrderType()==OP_BUYSTOP)  buys++;
         if(OrderType()==OP_SELLSTOP) sells++;
        }
     }
//---- return orders volume
   return(buys+sells);   
}
// Окончание функции определения количества отложенных стоп ордеров------------------------------------------------------------------//










//***********************************************************************************************************************************//
// Функция определения количества открытых ордеров ----------------------------------------------------------------------------------//
//***********************************************************************************************************************************//
int CalculateCurrentOrders_OPEN(string symbol)
  {
   int buys=0,sells=0;
//----
   for(int i=0;i<OrdersTotal();i++)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
      if(OrderSymbol()==Symbol() && OrderMagicNumber()==magicnumber)
        {
         if(OrderType()==OP_BUY)  buys++;
         if(OrderType()==OP_SELL) sells++;
        }
     }
//---- return orders volume
   if(buys>0) return(buys);
   else       return(-sells);
  }
// Окончание функции определения количества открытых ордеров--------------------------------------------------------------------------//

//***********************************************************************************************************************************//
// Функция определения количества открытых ордеров BUY ------------------------------------------------------------------------------//
//***********************************************************************************************************************************//
int CalculateCurrentOrders_BUY(string symbol)
  {
   int buys_b=0,sells_b=0;
   for(int i=0;i<OrdersTotal();i++)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
      if(OrderSymbol()==Symbol() && OrderMagicNumber()==magicnumber)
        {
         if(OrderType()==OP_BUY)  buys_b++;
        }
     }
   if(buys_b>0) return(buys_b);
   else       return(-sells_b);
  }
// Окончание функции определения количества открытых ордеров BUY --------------------------------------------------------------------//

//***********************************************************************************************************************************//
// Функция определения количества открытых ордеров SELL -----------------------------------------------------------------------------//
//***********************************************************************************************************************************//
int CalculateCurrentOrders_SELL(string symbol)
  {
   int buys_s=0,sells_s=0;
   for(int i=0;i<OrdersTotal();i++)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
      if(OrderSymbol()==Symbol() && OrderMagicNumber()==magicnumber)
        {
         if(OrderType()==OP_SELL)  sells_s++;
        }
     }
   if(sells_s>0) return(sells_s);
   else       return(-buys_s);
  }
// Окончание функции определения количества открытых ордеров SELL -------------------------------------------------------------------//







//***********************************************************************************************************************************//
// Функция приведения значений к точности одного тика -------------------------------------------------------------------------------//
//***********************************************************************************************************************************//
double ND(double A)
{
 return(NormalizeDouble(A, Digits));
}
// Окончание функции приведения значений к точности одного тика ---------------------------------------------------------------------// 
파일:
gwssp.mq4  12 kb
 
))) 그건 그렇고 - 지그재그로 더 재미있다!!!!!
 
그래서 저는 이 전략이 어떻게 작동하는지 이해하기 시작한다는 것을 이해하기 시작했습니다. 만약 당신이 그것을 요점별로 그리고 구체적으로 예와 함께 다시 쓸 수 있다면 말입니다.
 
))) 모든 것은 절대적으로 Edik이 설명한 알고리즘에 따릅니다 !!!!
 
Lucas_SPb :
))) 모든 것은 절대적으로 Edik이 설명한 알고리즘에 따릅니다 !!!!


이해는 했는데 지금은 조금 다르게 상상하는 것 같기도 하고, 말로 설명하는 방법도 모르겠고...

이것과 요점에 대해 다시 묻습니다.

%)

 

여기 :

 

1. 지그재그 확인

2. 구매 주문 열기

3. 우리는 동시에 판매 지연을 설정합니다.

4.판매지연시 구매지연 등을 설정합니다.

5. 동시에, 우리는 많은

 
죄송합니다 - 모든 코드를 게시하지 않았습니다! 선택의 끝에 도달하지 않았습니다