# Компиляция индикаторов и экспертов под новые билды MetaTrader 4

Раздел: Язык программирования MQL4
Автор темы: Veles-tm
Создана: 2013-07-29 19:38
Ответов: 4184 | Просмотров: 824322
Страница 196 из 210
Источник: https://forexsystemru.com/threads/72646/page-196

---

## malojorsk — 2017-06-16 19:54

> Цитата (поручик):
> ------------

Спасибо поручик,
не знаю как "спасибо" нажать, видимо репутации мало на форуме

## Сергей 123 — 2017-06-19 10:39

а нет возможности с одного формата в другой переделать ,а потом "вылечить"?

## gek — 2017-06-28 16:07

Ребята,скомпилируйте пожалуйста.

## unreal-1980 — 2017-06-28 16:15

> Цитата (gek):
> Ребята,скомпилируйте пожалуйста.

!

## gek — 2017-06-29 17:05

> Цитата (unreal-1980):
> !

Скомпилируйте и обновите ещё этот индикатор.
Хочется во внутрь глянуть.;)

## unreal-1980 — 2017-06-29 23:01

> Цитата (gek):
> Скомпилируйте и обновите ещё этот индикатор.
> Хочется во внутрь глянуть.;)

К сожалению не получается. Он скомпилирован в последниях версиях терминала.;)

## rkkgs — 2017-06-30 08:35

> Цитата (gek):
> Скомпилируйте и обновите ещё этот индикатор.
> Хочется во внутрь глянуть.;)

how can using this indicator?

time-farm and best pairs

## gek — 2017-06-30 13:01

> Цитата (gek):
> Скомпилируйте и обновите ещё этот индикатор.
> Хочется во внутрь глянуть.;)

Мужики,может ещё кто попробует?
Очень надо.

## JcfwB3 — 2017-07-01 11:23

Hi, can you change this indicator file to mq5, so it can work with mt5 program?

## gek — 2017-07-03 19:25

> Цитата (unreal-1980):
> К сожалению не получается. Он скомпилирован в последниях версиях терминала.;)

Привет!
Попробуй этот пожалуйста.:)

## gek — 2017-07-03 21:49

> Цитата (unreal-1980):
> Привет.
> Забирай ;)

Спасибо!:)

## unreal-1980 — 2017-07-03 21:52

> Цитата (gek):
> Спасибо!:)

Не за что. ;)
Если что, обращайся в личку.

## gek — 2017-07-03 22:07

> Цитата (unreal-1980):
> Не за что. ;)
> Если что, обращайся в личку.

А куда пропал?
Я не успел скачать.o_oo_o
Выложи пожалуйста.

## gek — 2017-07-03 22:15

Всё разобрался.

## rods — 2017-07-05 13:12

Добрый день.Помогите пожалуйста скомпилировать индикаторы в 1090 билдах. Спасибо.

## JcfwB3 — 2017-07-05 14:48

Can someone compile this code to metaeditor 5 and then share the file here?

//+------------------------------------------------------------------+
//|                    Converted by: MqlConvert.com                  |
//|                       Site of CyberFX.org                        |
//+------------------------------------------------------------------+

#property copyright ""
#property link      ""

#property indicator_separate_window
#property indicator_levelcolor DimGray
#property indicator_buffers 2
#property indicator_color1 Green
#property indicator_color2 Red
#property indicator_level1 25.0
#property indicator_level2 6.0
#property indicator_width1 2
#property indicator_width2 2

input int        Len         = 15;
input int        HistoryBars = 500;
input double     UrovenSignal = 6.0;

input int        TF1         = 0;
input int        TF2         = 0;
input bool       ModeHL      = TRUE;
input bool       ModeOnline  = TRUE;
input bool       ModeinFile  = FALSE;
input bool       ModeHistory = FALSE;
input bool       alert       = FALSE;
input bool       sound       = FALSE;
input bool       email       = FALSE;
input bool       GV          = FALSE;

double UP[];
double DN[];
double Clos;
double Hig;
double Loww;
int i;
int j;
int Gi_172;
int G_shift_176;
int G_count_180;
double Highest;
double Lowest;
double Gd_200;
double Gd_208;
double Gd_216;
double Gd_224;
double ArrayClose[];
double ArrayHi[];
double ArrayLo[];
int G_timeframe_244;
int LatBarTime;
int Gi_252;
bool Gi_256;
int G_file_260;
bool Gi_264;

double SignUp[];
double SignDn[];

//==================================================================
//
//==================================================================
int init() 
{
   if (ModeinFile) FileDelete(_Symbol + "-SP-" + Period() + ".ini");
   if (TF2 == 0) TF2 = Period();
   HistoryBars = NormalizeDouble(HistoryBars / (TF2 / Period()), 0);
   SetIndexBuffer(0, UP);
   SetIndexBuffer(1, DN);

   
   SetIndexStyle(0, DRAW_HISTOGRAM);
   SetIndexStyle(1, DRAW_HISTOGRAM);
   
   SetIndexLabel(0, "UP");
   SetIndexLabel(1, "DN");
   
   ArrayResize(ArrayClose, HistoryBars + Len);
   ArrayResize(ArrayHi, HistoryBars + Len);
   ArrayResize(ArrayLo, HistoryBars + Len);
   G_timeframe_244 = Period();
   if (ModeinFile) G_file_260 = FileOpen(_Symbol + "-SP-" + Period() + ".ini", FILE_WRITE, " ");
   return (0);
}
//==================================================================
//
//==================================================================
void Signals() 
{
}
//==================================================================
//
//==================================================================
int start() 
{
   int cnt;
   int Li_4;
   int Li_8;
//   int Li_12;
//   int str2time_16;
//   int str2int_20;
//   int str2int_24;
//   int file_28;
   if (ModeOnline || ModeinFile) 
   {
      if (iTime(NULL, TF2, 0) == LatBarTime) return (0);
      LatBarTime = iTime(NULL, TF2, 0);
      
      for (i = HistoryBars + Len; i > 0; i--) 
      {
         G_shift_176 = iBarShift(NULL, TF1, iTime(NULL, TF2, i));
         cnt = 0;
         for (j = G_shift_176; j > G_shift_176 - TF2; j--) 
         {
            ArrayClose = iClose(NULL, TF1, j);
            if (ModeHL) 
               ArrayHi = iHigh(NULL, TF1, j);
            else 
               ArrayHi = MathMax(iOpen(NULL, TF1, j), iClose(NULL, TF1, j));
            
            if (ModeHL) 
               ArrayLo = iLow(NULL, TF1, j);
            else 
               ArrayLo = MathMin(iOpen(NULL, TF1, j), iClose(NULL, TF1, j));
            cnt++;
         }
      }
//-----------------------------------------------------------------------------------------------------------------------------+

//-----------------------------------------------------------------------------------------------------------------------------+
      Li_4 = NormalizeDouble((Bars - IndicatorCounted()) / (TF2 / Period()), 0);
      if (ModeOnline && (!IsTesting())) Li_4 = HistoryBars;
      for (i = Li_4; i > 0; i--) 
      {
         G_count_180 = 0;
         Gd_200 = 0;
         Gd_208 = 0;
         Highest = 0;
         Lowest = 1000000;
         while (G_count_180 < Len) 
         {
            Gi_172 = i + G_count_180;
            Gd_216 = 0;
            Gd_224 = 0;
            for (int k = 0; k < TF2; k++) 
            {
               if (ArrayClose > 0.0)    Clos = ArrayClose;
               if (ArrayHi > 0.0)       Hig = ArrayHi;
               if (ArrayLo > 0.0)       Loww = ArrayLo;
               if (Hig > Highest) 
               {
                  Highest = Hig;
                  Gd_216 += Clos;
               }
               if (Loww < Lowest) 
               {
                  Lowest = Loww;
                  Gd_224 += Clos;
               }
            }
            if (Gd_216 > 0.0) Gd_200 += Gd_216;
            if (Gd_224 > 0.0) Gd_208 += Gd_224;
            G_count_180++;
         }
         if (Gd_200 > 0.0 && Gd_208 > 0.0) 
         {
            if (ModeinFile && Gi_252 != Time) 
            {
               Gi_252 = Time;
               FileWrite(G_file_260, StringConcatenate(TimeToString(Time), ";", DoubleToString(Gd_200 / Gd_208, 0), ";", DoubleToString(Gd_208 / Gd_200, 0)));
            }
            Li_8 = iBarShift(NULL, 0, iTime(NULL, TF2, i));
            for (int Li_36 = Li_8; Li_36 > Li_8 - TF2 / Period(); Li_36--) 
            {
               UP = Gd_200 / Gd_208;
               DN = Gd_208 / Gd_200;
            }
         }
      }
   }
/*
   if (ModeHistory && (!ModeOnline) && (!ModeinFile) && Gi_256 == FALSE) {
      Gi_256 = TRUE;
      file_28 = FileOpen(_Symbol + "-SP-" + TF2 + ".ini", FILE_READ);
      while (!FileIsEnding(file_28)) {
         str2time_16 = StringToTime(FileReadString(file_28));
         str2int_20 = StringToInteger(FileReadString(file_28));
         str2int_24 = StringToInteger(FileReadString(file_28));
         Li_12 = iBarShift(NULL, 0, str2time_16, FALSE);
         for (int Li_40 = Li_12; Li_40 > Li_12 - TF2 / Period(); Li_40--) {
            UP = str2int_20;
            DN = str2int_24;
         }
      }
      FileClose(file_28);
   }
*/
   string Ls_44 = "";
   if (sound || alert || email || GV) 
   {
      if (UP[Li_36 + 1] > UrovenSignal && UP[Li_36 + 1] < 1000000.0) Ls_44 = _Symbol + " Signal " + WindowExpertName() + " BUY ( " + DoubleToString(UP[Li_36 + 1], 1) + " )";
      if (DN[Li_36 + 1] > UrovenSignal && DN[Li_36 + 1] < 1000000.0) Ls_44 = _Symbol + " Signal " + WindowExpertName() + " SELL ( " + DoubleToString(DN[Li_36 + 1], 1) + " )";
      if (GV && (!IsTesting())) GlobalVariableSet(_Symbol + WindowExpertName(), UP[Li_36 + 1] - (DN[Li_36 + 1]));
      if (Ls_44 != "" && (!IsTesting())) {
         if (sound && Gi_264 == FALSE) PlaySound("Wait.wav");
         if (alert && Gi_264 == FALSE) Alert(Ls_44);
         if (email && Gi_264 == FALSE) f0_0(Ls_44);
         Gi_264 = TRUE;
      } else Gi_264 = FALSE;
   }
   Signals();
   return (0);
}

//==================================================================
//
//==================================================================
void f0_0(string As_0) {
   if (IsTesting() == FALSE && IsOptimization() == FALSE && IsVisualMode() == FALSE) SendMail(WindowExpertName(), As_0);
}

//==================================================================
//
//==================================================================
void deinit() {
   if (ModeinFile) FileClose(G_file_260);
}

//********************************************  Emulation *******************************************
double Ask;
double Bid;
double Bars;
double Open[];
double Close[];
double High[];
double Low[];
datetime Time[];
long Volume[];

void Set_Values_to_variables()
{
   MqlTick last_tick;
   SymbolInfoTick(_Symbol,last_tick);
   Ask=last_tick.ask;
   Bid=last_tick.bid;
  
   ArraySetAsSeries(Close,true);
   CopyClose(_Symbol,_Period,0,Bars(_Symbol,_Period),Close);
   ArraySetAsSeries(Open,true);
   CopyOpen(_Symbol,_Period,0,Bars(_Symbol,_Period),Open);
   ArraySetAsSeries(Low,true);
   CopyLow(_Symbol,_Period,0,Bars(_Symbol,_Period),Low);
   ArraySetAsSeries(High,true);
   CopyHigh(_Symbol,_Period,0,Bars(_Symbol,_Period),High);
   ArraySetAsSeries(Time,true);
   CopyTime(_Symbol,_Period,0,Bars(_Symbol,_Period),Time);
   ArraySetAsSeries(Volume,true);
   CopyTickVolume(_Symbol,_Period,0,Bars(_Symbol,_Period),Volume);
} 
void OnTick()
{
	Set_Values_to_variables();
}
int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], 
                const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[])     
{
	Set_Values_to_variables();
}
void OnInit()
{
	Set_Values_to_variables();
	init();
}
void OnDeinit()
{
	deinit();
}
ENUM_TIMEFRAMES TFMigrate(int tf)
{
   switch(tf)
   {
      case 0: return(PERIOD_CURRENT);
      case 1: return(PERIOD_M1);
      case 5: return(PERIOD_M5);
      case 15: return(PERIOD_M15);
      case 30: return(PERIOD_M30);
      case 60: return(PERIOD_H1);
      case 240: return(PERIOD_H4);
      case 1440: return(PERIOD_D1);
      case 10080: return(PERIOD_W1);
      case 43200: return(PERIOD_MN1);
      
      case 2: return(PERIOD_M2);
      case 3: return(PERIOD_M3);
      case 4: return(PERIOD_M4);      
      case 6: return(PERIOD_M6);
      case 10: return(PERIOD_M10);
      case 12: return(PERIOD_M12);
      case 16385: return(PERIOD_H1);
      case 16386: return(PERIOD_H2);
      case 16387: return(PERIOD_H3);
      case 16388: return(PERIOD_H4);
      case 16390: return(PERIOD_H6);
      case 16392: return(PERIOD_H8);
      case 16396: return(PERIOD_H12);
      case 16408: return(PERIOD_D1);
      case 32769: return(PERIOD_W1);
      case 49153: return(PERIOD_MN1);      

      default: return(PERIOD_CURRENT);
   }
}

## Bear-SPb — 2017-07-05 21:31

Доброго вечера.

У кого есть исходник или открытый код.

https://yadi.sk/d/VVBUqJny3KnWvL

скрина нет т.к. перестал работать.

## Джозеф — 2017-07-07 20:02

Здравствуйте можно этого советника подправить под новый билд, а то много предупреждений у него.

## kit888 — 2017-07-12 19:00

> Цитата (Джозеф):
> Здравствуйте можно этого советника подправить под новый билд, а то много предупреждений у него.

исправил :)

## nikson84 — 2017-07-15 15:27

доброго дня

Подлечите пациента, не хочет в последнем билде робить. Спасибо

---

Следующая страница: https://forexsystemru.com/threads/72646/page-197
