← Назад к списку файлов

exp_lego_4_beta.mq4

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

extern   string   Instructsia                =  "...????? ? ??????";
extern   string   ShiftTunes           =  "???? (???). ?? ??? ??????????, ????? 2?? ? ????????????????";
extern double GeneralShift = 0; // 0 - ?????????? ???, 1 - ????????.
extern string Implemented_Indicators         = "????????? ??????????. 12 ????. ?????????????";
extern string WARNING1                       = "???????? ?????????? ????????????? ? ???????";
extern string WARNING2                       = "?????????, ??? ?????????? ?????????? ?????????,";
extern string WARNING3                       = "????? ????????? ????? ?????????";
extern string Note_????                      = " ??????? ??????? ?????????? ?????????? ????? ??? ????-?? ??????";
extern string The_List_Of                    = " ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----";
extern string Indicators1                    = " ????????? ?????????? ????????? ????! ????? ?????? ? ?????????! ";
extern string Indicators2                    = " ??????????? - ???????? ????? ???????? ??? ????????! ";
extern string Indicators3                    = " ????????? ????? ???? - ??????????? ???????? ????. ";

extern string Indicators4                    = " ";

extern   string  Indicator_1     = "2MA (MACD 0-line-mode ??)";
extern  bool  otkr_MA      =false;
extern  bool  zakr_MA      =false;  // ??????????? _????_ ??????????. ????? ??? MACD-"??????? ?????".
extern double MA1          =4;
extern double MA2          =67;
extern double Shift_1      =1;  // ???? - ??? ???, ?? ??????? ????????? ????????. 1 - ????????????????, 0 - ???????, 3 - ??? ????? ?????... 
extern double Shift_2      =1; 
extern double MA_type      =1; //0 - Simple, 1 - Expotential, 2 - Smoothed, 3 - Linear Weighed. Most people are using EMA.
extern   string   Indicator_2       =  "???????? - ?????????????? ??????????.";
extern  bool   otkr_Stoh   =false;// 
extern  bool   zakr_Stoh   =false;
extern double per_K=5;
extern double per_D=3;
extern double slow=3;
extern double zoneBUY=20;
extern double zoneSELL=80; //?????? ???? - ????? ?? ????? ??????????? ?????? ?? ???????????.

extern   string   Indicator_3          =  "---- Awesome (std) ----"; // ???????? std, ??????????, standard. ??? ????????, ??? ?????????... ?? ???????????? ????. ???????. ???? ? ????? ???????????? ?????? ???? ?????? ?? ?????.
extern  bool   otkr_AO    =false;
extern  bool   zakr_AO    =false;
extern   string     StdDev         =  "--- StdDev (std) ----"; //?? ?? ?????, ??? ? ?????? ??????????? - ?????? ? ???. ????.
extern  bool   otkr_StdDev=false; 
extern  bool   zakr_StdDev=false; 
extern double StdDevMAPeriod =14;
extern double StdDevMAShift =0; 
extern double StdDevLimitToOpen   =0.0025;
extern double StdDevLimitToClose  =0.0025;// ????????? ???? - ?? ?????? ????????? ToClose ????, ??? ToOpen.
extern   string   Indicator_4         =  "---- Demarker (std) ---- ";
extern  bool   otkr_Dema   =false;
extern  bool   zakr_Dema   =false;
extern double DeMa_period=14;
extern double niz_ur=0.3;
extern double verx_ur=0.7;
extern   string   Indicator_5              =  "---- CCI (std) ---- ";
extern  bool   otkr_CCI    =false;
extern  bool   zakr_CCI    =false;
extern double CCI_period=14;
extern double CCI_Level=100;    // What, if we want 95?
extern   string   Indicator_6              =  "---- RSI (std) ----";
extern  bool   otkr_RSI   =false;
extern  bool   zakr_RSI   =false;
extern double RSI_Period =14;
extern double RSI_High=70;
extern double RSI_Low=30;
extern   string   Indicator_7             =  "---- MACD (std) ---- ";
extern  bool   otkr_MACD   =false;
extern  bool   zakr_MACD   =false;
extern double MACD_Fast=9;
extern double MACD_Slow=26;   // MACD uses SIGNAL line
extern double MACD_Signal=14; // because you have 2 MA Cross system
extern string     Indicator_8             =  "---- OsMA (std) ---- ";
extern  bool   otkr_OsMA   =false;
extern  bool   zakr_OsMA   =false;
extern double OsMA_Fast=9;
extern double OsMA_Slow=26;   // SIGNAL line (Well, you can also try Zignal.com as a platform - expenseful lux look is a sort of guaranty. Yes, I've made an ad here - Anon MMMMMMMMMI)
extern double OsMA_Signal=14; // because you have 2 MA Cross system
extern   string   Indicator_9             =  "---- WPR aka %R (std) ---- ";//Williams Percent Range
extern  bool   otkr_WPR   = false;
extern  bool   zakr_WPR   = false;
extern double WPR_Period = 14;
extern   string   Indicator_10            =  "---- MFI (std) ---- ";
extern  bool   otkr_MFI   = false;
extern  bool   zakr_MFI   = false;
extern double MFI_Period=14;
extern double MFI_High  =70;
extern double MFI_Low   =30;
extern   string   Indicator_11            =  "---- ADX (std) ----"; //Main Line 30/70
extern  bool   otkr_ADX   = false;
extern  bool   zakr_ADX   = false;
extern double ADX_Period=14;
extern string Indicator_12                =  "---- SAR (std) ---- ";
extern  bool otkr_SAR     = false;
extern  bool zakr_SAR     = false;
extern double SAR_Step =0.02;
extern double SAR_MaxStep =0.2;
extern string Custom_Indicator_?_0              =  " __________________ ";  
extern string Custom_Indicator_?_1              =  "???????????????? ??????????";  
extern string Custom_Indicator_?_2              =  "??????????????, ??? ??? ????????? ????? ?????????????? ????.";
extern string Custom_Indicator_?_3              =  "??? ?????? - ??????? Name_X ?? ???????? ?????? ??????????";  
extern string Custom_Indicator_?_4              =  "  ";
extern string IndName1                    = "Name1";
extern  bool  otkr_Custom_1 = false;
extern  bool  zakr_Custom_1 = false;
extern double Shift1    =0;
extern string IndName2                    = "Name2";
extern  bool  otkr_Custom_2 = false;
extern  bool  zakr_Custom_2 = false;
extern double Shift2    =0;
extern string IndName3                    = "ZigZag - ?????? ???????, ????"; // ??????? ???? :)
extern  bool  otkr_Custom_3 = false;
extern  bool  zakr_Custom_3 = false;
extern double Shift3    =0;
extern string IndName4                    = "Name4";
extern  bool  otkr_Custom_4 = false;
extern  bool  zakr_Custom_4 = false;
extern double Shift4    =0;
extern string IndName5                    = "Name5";
extern  bool  otkr_Custom_5 = false;
extern  bool  zakr_Custom_5 = false;
extern double Shift5    =0;
extern string IndName6                    = "Name6";
extern  bool  otkr_Custom_6 = false;
extern  bool  zakr_Custom_6 = false;
extern double Shift6    =0;
extern string IndName7                    = "Name7";
extern  bool  otkr_Custom_7 = false;
extern  bool  zakr_Custom_7 = false;
extern double Shift7    =0;
extern string IndName8                    = "Name8";
extern  bool  otkr_Custom_8 = false;
extern  bool  zakr_Custom_8 = false;
extern double Shift8    =0;
extern   string Void1                     = "  ";
extern   string Void2                     = "  ";

extern   string   __Non_Indicator__AKA__                =  "...????? ? ??????";
extern   string   __?????_?????????__          =  "----  __?????_?????????__ ---- ";  
extern double StopLoss    =100;    
extern double TakeProfit  =994;      // ?ake?rofit ?? ????? ???? ?? ??????????? :)
extern double Slippage = 2; // Slippage. ???????????????.
extern   string ID_of_EA              =  "??? ?? MagicNumber, ??? ?? ???????? ????";
extern double __ID_of_EA = 219249; // ZIGZAG ??. "????????? ?????????????"
extern   string    Block_of_Stakes           =  "----  Stake tuning ----"; 
extern   string    Bl_1                      =  "1 - FixLot, 2 - Martigail, 3 - Percental";
extern   string    Bl_2                      =  "??????-? ???? ????? ??????, ? ?? ?????????? ??????";
extern   string    Bl_3                      =  "IK is a miltiplies for Martingail-taktic. Normally=2";
extern double StakeMode   =1;      //   
extern double Lts1        =0.1;    // Fixlot
extern double IK          =2;      // Multiplying Lts1 * IK (if the previous deal was fail). Normally, Martingail is ThisDealLots = PrevDealLots * 2,  so...
extern double Percents    =5;      
extern double RiskPipsForPercents=100; // ?????????? ????-?????. ????? ? ?????? ????????????? ??????.
extern  bool  Pause1800 =true; // ?????, ????? ?? ?????? ???????? ????-????. ???-???? (???? ??? ?? ?30, ???-???? ?? ?1)
extern   string   ATR                      =  "---- ---- ---- ----"; 
extern   string   ??????????????_ATR       =  "ATR ????? ???????????? ??? ????????? TP ? SL."; // Actually, never tuned by me properly.
extern   string   ________________         =  "ATR_Multiply ??????????? ????????? ????????????????";
extern   string   __By_26_994_____         =  "????????, ???? Multiply=0.9, ?? ??????? - 0.9 ?????? ?? 0.0001 ATR";
extern double ATR_Period =14;
extern double ATR_Multiply = 0.9;         
extern double ATR_Reach  =0.0014;
extern  bool ATR_SL = false;
extern  bool ATR_TP = false; 

bool Work=true;                    
bool OrderSal;
string Symb;                       // ??? ???? (???????? -  EURUSD ??? GBPJPY) 

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

   int

   Total,                           // ?????????? ??????? ? ???? 
   Tip=-1,                          // ??? ??????. ?????? (B=0,S=1)
   Ticket;                          // ????? ??????

   double
   Lot,                             // ?????. ????? ? ??????.??????
   Lts,                             // ?????. ????? ? ??????.??????
   lot,
   Min_Lot,                         // ??????????? ?????????? ?????
   Step,                            // ??? ????????? ??????? ????
   Free,                            // ??????? ????????? ????????
   One_Lot,                         // ????????? ?????? ????
   Price,                           // ???? ?????????? ??????
   SL,                              // SL ?????????? ?????? 
   TP,                              // TP ?????????? ??????

   MA_By,MA_Sell,Stoh_By,Stoh_Sell,AO_By,AO_Sell,StdDev_By,StdDev_Sell,AC_By,AC_Sell,Cls_MA_Sell,Cls_MA_By,Cls_Stoh_Sell,Cls_Stoh_By,
   Cls_AO_Sell,Cls_AO_By,Cls_StdDev_By,Cls_StdDev_Sell,Cls_AC_Sell,Cls_AC_By,Dema_By,Cls_Dema_Sell,Dema_Sell,Cls_Dema_By,CCI_By,CCI_Sell,Cls_WPR_Sell,Cls_CCI_By,Cls_CCI_Sell,
   RSI_By,RSI_Sell,Cls_RSI_Sell,Cls_RSI_By,MFI_By,MFI_Sell,Cls_MFI_Sell,Cls_MFI_By,WPR_By,WPR_Sell,Cls_WRP_Sell,Cls_WPR_By,  //???????????.
   MACD_By,MACD_Sell,Cls_MACD_Sell,Cls_MACD_By,OsMA_By,OsMA_Sell,Cls_OsMA_Sell,Cls_OsMA_By,ADX_By,ADX_Sell,Cls_ADX_Sell,Cls_ADX_By,SAR_By,SAR_Sell,Cls_SAR_Sell,Cls_SAR_By,
   Custom_1__By, Custom_1__Sell, Cls_Custom_1__By, Cls_Custom_1__Sell,Custom_2__By, Custom_2__Sell, Cls_Custom_2__By, Cls_Custom_2__Sell,
   Custom_3__By, Custom_3__Sell, Cls_Custom_3__By, Cls_Custom_3__Sell,Custom_4__By, Custom_4__Sell, Cls_Custom_4__By, Cls_Custom_4__Sell,
   Custom_5__By, Custom_5__Sell, Cls_Custom_5__By, Cls_Custom_5__Sell,Custom_6__By, Custom_6__Sell, Cls_Custom_6__By, Cls_Custom_6__Sell,
   Custom_7__By, Custom_7__Sell, Cls_Custom_7__By, Cls_Custom_7__Sell,Custom_8__By, Custom_8__Sell, Cls_Custom_8__By, Cls_Custom_8__Sell;

  bool
   Modific=true,
   Ans  =false,                     // ????? ??????? ????? ????????
   Cls_B=false,                     // ???????? ??? ????????  Buy
   Cls_S=false,                     // ???????? ??? ????????  Sell
   Opn_B=false,                     // ???????? ??? ????????  Buy
   Opn_S=false,                     // ???????? ??? ????????  Sell
   S_Bar=false;                     // ???????? ??? Sleep Bar (??????????? ?????, ????? ?? ???????? ??????? ????????)

int time0 = 0;                                                  // ????????? ??????????? ??????????
for(int t0 = OrdersHistoryTotal();t0>=0;t0--)                   // ?????????? ??? ???????? ??????
if(OrderSelect(t0, SELECT_BY_POS,MODE_HISTORY )==true)          // ???? ????? ? ????? ??????? (i) ? ?????? ???????? ??????? ???? ( ?? ?????? ? ???????)
    {
      if( iTime(NULL,0,0)-OrderOpenTime() <1800 && Pause1800==true) //??????? ????? 
                 {                                         
                    S_Bar=true;                                // ????????   iTime(NULL,0,1)
                    Alert("???????. 994 ???????.");                                           
                 }

           }

   if(Work==false)                              // Critical error
     {
      Alert("?????????, ?????? ??? ??????????? ??????.");
      return;                                   // Exit from start()
     }

Symb=Symbol();                               // ???????? ???.?????.
   Total=0;                                     // ?????????? ???????
   for(int i=1; i<=OrdersTotal(); i++)          // ???? ???????? ?????
     {
      if (OrderSelect(i-1,SELECT_BY_POS)==true) // ???? ???? ?????????
        {                                       // ?????? ???????:
         if (OrderSymbol()!=Symb)continue;      // ?? ??? ???. ???????
         Total++;                               // ??????? ??????. ???
         if (Total>1)                           // ?? ????? ?????? ??? --          ????????? ??????????!
           {
            Alert("????????? ???????? ???????. ??????? ?? ????????.");
            return;                             // ????? ?? start()
           }
         Ticket=OrderTicket();                  // ????? ???????. ???.
         Tip   =OrderType();                    // ??? ?????????? ???.
         Price =OrderOpenPrice();               // ???? ???????. ???.
         SL    =OrderStopLoss();                // SL ?????????? ???.
         TP    =OrderTakeProfit();              // TP ?????????? ???.
         Lot   =OrderLots();                    // ?????????? ?????
        }
     }  

if(ATR_SL==true && iATR(NULL,0,ATR_Period,1)>=ATR_Reach)
StopLoss=iATR(NULL,0,ATR_Period,0)*ATR_Multiply/0.0001;    //????? ?? ????? ??????????? ????? ? ?????.      

if(ATR_TP==true && iATR(NULL,0,ATR_Period,1)>=ATR_Reach)
TakeProfit=iATR(NULL,0,ATR_Period,0)*ATR_Multiply/0.0001;

 if(otkr_MA==true)
              {
               if(iMA(NULL,0,MA1,Shift_1,MA_type,PRICE_CLOSE,GeneralShift)>iMA(NULL,0,MA2,Shift_2,MODE_SMA,PRICE_CLOSE,GeneralShift+1))
                 {
                  MA_By =true;// Normally SMA, but here is my edit.
                 } 
               if(iMA(NULL,0,MA1,Shift_1,MA_type,PRICE_CLOSE,GeneralShift)<iMA(NULL,0,MA2,Shift_2,MODE_SMA,PRICE_CLOSE,GeneralShift+1))               
                 {
                  MA_Sell =true;
                 } 
               }

 if(zakr_MA==true)
              {
               if(iMA(NULL,0,MA1,Shift_1,MA_type,PRICE_CLOSE,GeneralShift)>iMA(NULL,0,MA2,Shift_2,MODE_SMA,PRICE_CLOSE,GeneralShift+1))
                 {
                  Cls_MA_Sell=true;
                 }
               if(iMA(NULL,0,MA1,Shift_1,MA_type,PRICE_CLOSE,GeneralShift)<iMA(NULL,0,MA2,Shift_2,MODE_SMA,PRICE_CLOSE,GeneralShift+1))
                 {
                  Cls_MA_By=true;
                 } 
               }

 if(otkr_Stoh==true)
          {
               if(iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,GeneralShift)>iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,2,GeneralShift)
                  && iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,GeneralShift)<zoneBUY)
                   {
                   Stoh_By =true;
                   }
              if(iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,GeneralShift)<iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,2,GeneralShift)
                 && iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,GeneralShift)>zoneSELL)
                  {
                  Stoh_Sell =true;
                  } 
               }      

 if(zakr_Stoh==true)
          {
              if(iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,GeneralShift)>iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,2,GeneralShift)
                 && iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,GeneralShift)<zoneBUY)
                   {
                   Cls_Stoh_Sell=true;
                   }
             if(iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,GeneralShift)<iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,2,GeneralShift)
                 && iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,GeneralShift)>zoneSELL)
                  {
                  Cls_Stoh_By=true;
                  } 
               }                

  if(otkr_AO==true)
        {
              if(iAO(NULL,0,GeneralShift)<iAO(NULL,0,GeneralShift+1)&&iAO(NULL,0,GeneralShift)<0) 
                  {
                   AO_By =true;
                  }    
              if(iAO(NULL,0,GeneralShift)>iAO(NULL,0,GeneralShift+1)&&iAO(NULL,0,GeneralShift)>0)
                  {
                   AO_Sell =true;
                  } 
               } 

if(zakr_AO==true)
        {
           if(iAO(NULL,0,GeneralShift)>iAO(NULL,0,GeneralShift+1)&&iAO(NULL,0,GeneralShift)<0)     
                  {                          
                   Cls_AO_Sell=true;         
                  }                          
           if(iAO(NULL,0,GeneralShift)<iAO(NULL,0,GeneralShift+1)&&iAO(NULL,0,GeneralShift)>0)     
                  {
                   Cls_AO_By=true;
                  } 
               }

if(otkr_StdDev==true)
        {
              if(iStdDev(NULL,0,StdDevMAPeriod,StdDevMAShift,1,0,GeneralShift)>StdDevLimitToOpen)
                  {
                   StdDev_By=true;
                  }    
              if(iStdDev(NULL,0,StdDevMAPeriod,StdDevMAShift,1,0,GeneralShift)>StdDevLimitToOpen)
                  {
                   StdDev_Sell=true; // What? This "wait or not".
                  } 
               } 

if(zakr_StdDev==true)
        {
           if(iStdDev(NULL,0,StdDevMAPeriod,StdDevMAShift,1,0,GeneralShift)<StdDevLimitToClose) 
                  {                          
                   Cls_AO_Sell=true;         
                  }                          
            if(iStdDev(NULL,0,StdDevMAPeriod,StdDevMAShift,1,0,GeneralShift)<StdDevLimitToClose)  
                  {
                   Cls_AO_By=true;
                  } 
               }

 if(otkr_Dema==true) 
             {      
              if (iDeMarker(NULL, 0, DeMa_period, GeneralShift)<niz_ur) 
                  {
                   Dema_By =true;
                  }    
             if (iDeMarker(NULL, 0, DeMa_period, GeneralShift)>verx_ur) 
                  {
                   Dema_Sell =true;
                  }  
               }

 if(zakr_Dema==true) 
              {      
            if (iDeMarker(NULL, 0, DeMa_period, GeneralShift)<niz_ur) 
                  {
                   Cls_Dema_Sell=true;
                  }    
            if (iDeMarker(NULL, 0, DeMa_period, GeneralShift)>verx_ur) 
                  {
                   Cls_Dema_By=true;
                  }  
               }     

 if(otkr_CCI==true)
             {      
            if (iCCI(NULL, 0,CCI_period,PRICE_MEDIAN,GeneralShift)>CCI_Level)
                  {
                   CCI_By =true;
                  }    
            if (iCCI(NULL, 0,CCI_period,PRICE_MEDIAN,GeneralShift)<-CCI_Level)
                  {
                   CCI_Sell =true; 
                  } 
               }                   

   if(zakr_CCI==true)
               {      
           if (iCCI(NULL, 0,CCI_period,PRICE_MEDIAN,GeneralShift)<-CCI_Level) // Not hook.
                  {
                   Cls_CCI_Sell=true;
                  }    
           if (iCCI(NULL, 0,CCI_period,PRICE_MEDIAN,GeneralShift)>CCI_Level) 
                  {
                   Cls_CCI_By=true;
                  } 
               } 

    if(otkr_RSI==true)
              {
            if (iRSI(NULL,0,RSI_Period,0,GeneralShift)>RSI_High)
                  {
                   RSI_By=true;
                  }    
            if (iRSI(NULL,0,RSI_Period,0,GeneralShift)<RSI_Low)
                  {
                   RSI_Sell=true;
                  } 
               }                   

   if(zakr_RSI==true)
              {
           if (iRSI(NULL,0,RSI_Period,0,GeneralShift)>RSI_High)
                  {
                   Cls_RSI_Sell=true;
                  }    
           if (iRSI(NULL,0,RSI_Period,0,GeneralShift)<RSI_Low)
                  {
                   Cls_RSI_By=true;
                  } 
               }            

    if(otkr_MFI==true)
              {
            if (iMFI(NULL,0,MFI_Period,GeneralShift)>MFI_High)
                  {
                   MFI_By=true;
                  }    
            if (iMFI(NULL,0,MFI_Period,GeneralShift)<MFI_Low)
                  {
                   MFI_Sell=true;
                  } 
               }                   

   if(zakr_MFI==true)
                 {      
           if (iMFI(NULL,0,MFI_Period,GeneralShift)>MFI_High/2+MFI_Low/2) // ??? ???????? ?? ????????
                  {
                   Cls_MFI_Sell=true;
                  }    
           if (iMFI(NULL,0,MFI_Period,GeneralShift)<MFI_High/2+MFI_Low/2)
                  {
                   Cls_MFI_By=true;
                  } 
               }   

   if(otkr_WPR==true)
              {
            if (iWPR(NULL,0,WPR_Period,GeneralShift)>-20)
                  {
                   WPR_By=true;
                  }    
            if (iWPR(NULL,0,WPR_Period,GeneralShift)<-80)
                  {
            

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

Как получить полную версию?

Введите ваш email и нажмите кнопку, чтобы перейти к оплате.