Errors, bugs, questions - page 1758

 
-Aleks-:

If I change profile in MT4 and then back, when market is closed CPU starts to load heavily - up to 5%, after 18-25%.

I had a feeling there is something wrong with the compiler, because when I run the compilation of .mq5ME I just crash and if I run the compilation of .mqh I get swearing at the compiler))) And in crash appears a huge file !!! which is constantly updated. No viruses except for Win 8.1x64 OS itself, no antivirus on one machine at all as only MT5 goes to Net, and OS itself to its repository.

By the way to theme to Renat's answer about thousandths of tests - before writing a question I do the same check similar things on different OS and machines )) if the result is confirmed, I ask a question, if not, I start to dig in the problem myself.

 

I can't figure out what the problem is - whether it's with the indicator, or the Expert Advisor, or the visualizer.)

For this, the indicator only has the same settings, the timeframe is the same.


Expert Advisor code

#property strict
input string   Symbol1="EURUSD";
input int Per=14;  
double buf[];
int handle_1,copied1;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---

handle_1=iCustom(Symbol(),PERIOD_CURRENT,"test ma",Symbol1,Per);
ArrayInitialize(buf,0);
   return(INIT_SUCCEEDED);
  }
//+---------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
  Comment("");
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---

  copied1=CopyBuffer(handle_1,0,0,4,buf);
  Comment("Индикатор 3 = ",buf[3]);
}  

//+------------------------------------------------------------------+
//| Trade function                                                   |
//+------------------------------------------------------------------+
void OnTrade()
  {
//---

  }
//+------------------------------------------------------------------+

indicator code

#property indicator_separate_window
//---- количество индикаторных буферов 2
#property indicator_buffers 3
//---- использовано всего одно графическое построение
#property indicator_plots   1
//+----------------------------------------------+
//|  объявление констант                         |
//+----------------------------------------------+
#define RESET 0 // Константа для возврата терминалу команды на пересчёт индикатора
//+----------------------------------------------+
//|  Параметры отрисовки индикатора              |
//+----------------------------------------------+
#property indicator_type1   DRAW_HISTOGRAM
#property indicator_color1  clrPlum
//+----------------------------------------------+
//| Входные параметры индикатора                 |
//+----------------------------------------------+
input string Symb1="EURUSD";
input int Per=14;                        
int Shift=0;                              
//+----------------------------------------------+
//---- объявление динамических массивов, которые будут в
// дальнейшем использованы в качестве индикаторных буферов
double Buffer1[];
double Buffer2[];
double Buffer3[],Buffer4[],Buffer5[];
//---- Объявление целых переменных начала отсчёта данных
int min_rates_total;
//---- Объявление целых переменных для хранения хендлов индикаторов
int Handle1,Handle2;
double buf1[],buf2[],close1[],close2[],buf4[];
int closed1,closed2;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+  
int OnInit()
  {
//---- Инициализация переменных начала отсчёта данных
   min_rates_total=Per+1;

//--- получение хендла индикатора Fast iCCI
   Handle1=iMA(Symb1,PERIOD_CURRENT,Per,0,0,0);
   if(Handle1==INVALID_HANDLE)
     {
      Print(" Не удалось получить хендл индикатора");
      return(INIT_FAILED);
     }

//---- превращение динамического массива в индикаторный буфер
   SetIndexBuffer(1,Buffer1,INDICATOR_DATA);
   SetIndexBuffer(0,Buffer3,INDICATOR_DATA);
   SetIndexBuffer(2,buf1,INDICATOR_DATA);
//---- осуществление сдвига индикатора 1 по горизонтали на Shift
   PlotIndexSetInteger(0,PLOT_SHIFT,Shift);
//---- осуществление сдвига начала отсчёта отрисовки индикатора 1 на min_rates_total
   PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,min_rates_total);
      IndicatorSetInteger(INDICATOR_DIGITS,_Digits);
//--- завершение инициализации
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
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[]
                )
  {
//---- объявления локальных переменных
   int to_copy;
  
//---- расчёты необходимого количества копируемых данных
   if(prev_calculated>rates_total || prev_calculated<=0)// проверка на первый старт расчёта индикатора
     {
      to_copy=rates_total; // стартовый номер для расчёта всех баров
     }
   else to_copy=rates_total-prev_calculated+1; // стартовый номер для расчёта новых баров

      int first,bar;
      if(CopyBuffer(Handle1,0,0,to_copy,Buffer1)<=0) return(RESET);
      if(CopyClose(Symb1,0,0,to_copy,buf1)<=0) return(RESET);
    
//---- расчёт стартового номера first для цикла пересчёта баров
   if(prev_calculated>rates_total || prev_calculated<=0) // проверка на первый старт расчёта индикатора
      first=min_rates_total; // стартовый номер для расчёта всех баров
   else first=prev_calculated-1; // стартовый номер для расчёта новых баров

//---- Основной цикл расчёта индикатора
   for(bar=first; bar<rates_total ; bar++)
   {
   Buffer3[bar]=Buffer1[bar] - buf1[bar];
   }
  
//----    
   return(rates_total);
  }
//+------------------------------------------------------------------+
Files:
test.mq5  11 kb
 

The quote window collapses when the terminal is minimised. This should not be the case.

 
Vladimir Pastushak:

The quote window collapses when the terminal is minimised. This should not be the case.

Spread has always been marked so (!) in MT... Who knows why, maybe to save space... what (?) if the spread is longer than "!" ...
 

Can anyone tell me if the RAM size (underlined in red) is correct?

Notebook data before repair:

2013.04.28 01:26:54     OpenCL  Device #2: GPU NVIDIA Corporation GeForce 610 M with OpenCL 1.1 (1 units, 950 MHz, 2047 Mb, version 305.46)
2013.04.28 01:26:54     OpenCL  Device #1: GPU Intel(R) Corporation Intel(R) HD Graphics 4000 with OpenCL 1.1 (16 units, 350 MHz, 1624 Mb, version 9.17.10.2828)
2013.04.28 01:26:54     OpenCL  Device #0: CPU Intel(R) Corporation  Intel(R) Core(TM) i5-3210 M CPU @ 2.50 GHz with OpenCL 1.1 (4 units, 2500 MHz, 6029 Mb, version 1.1)

handed over the laptop for repair, after repair said that from the factory was installed memory (all its 6 gb) is not compatible (the one at 4 gb) with the type of processor.

can it be that the size of the memory is specified normally, but in fact due to incompatibility with the type of processor it was not involved?

 
Alexandr Bryzgalov:

I handed in my laptop for repair, after the repair they said that the memory was installed from the factory (6gb total) not compatible (the one for 4gb) with the type of processor.

Usually ALL systems and for sure all laptops are factory tested and the possibility that the factory installed incompatible hardware... it is very very very very unlikely...
 
ivanivan_11:
Usually ALL systems and for sure laptops are factory tested and the chances of factory installed incompatible hardware... it's very very very very unlikely...
for some reason, I feel the same way, I feel like I'm being... me
 
Alexandr Bryzgalov:
For some reason I feel the same way, I feel like I'm being... me
Well, it happens in different ways, as it turns out - there are branded smartphones exploding from the factory. And about the computer - a lot of factors do not know - whether someone had rummaged in the laptop before the sale (there are refurbishments, returns), what kind of laptop, what operating system, etc. - all of which can affect the availability of memory.
 
Alexandr Bryzgalov:

Can anyone tell me if the RAM size (underlined in red) is correct?

Notebook data before repair:

2013.04.28 01:26:54     OpenCL  Device #2: GPU NVIDIA Corporation GeForce 610 M with OpenCL 1.1 (1 units, 950 MHz, 2047 Mb, version 305.46)
2013.04.28 01:26:54     OpenCL  Device #1: GPU Intel(R) Corporation Intel(R) HD Graphics 4000 with OpenCL 1.1 (16 units, 350 MHz, 1624 Mb, version 9.17.10.2828)
2013.04.28 01:26:54     OpenCL  Device #0: CPU Intel(R) Corporation  Intel(R) Core(TM) i5-3210 M CPU @ 2.50 GHz with OpenCL 1.1 (4 units, 2500 MHz, 6029 Mb, version 1.1)

gave the laptop for repair, after repair said that from the factory was installed memory (only its 6gb) is not compatible (the one on 4gb) with the type of processor.

Is it possible that the memory size is stated as normal but not used due to incompatibility with the type of processor?

The memory can conflict with the motherboard. And, if the bios detected the memory as present, it is there, but may not work stably.

The smaller memory size, I would assume, is due to the memory being squeezed for the video card - some integrated cards do this as they have no memory of their own.

 

How do you find Signals that have?

Слишком большой прирост за последний месяц говорит о высоком риске

Reason: