Errors, bugs, questions - page 344

 
AlexSTAL:

Either make sure they are not in the file initially, or apply an additional function when reading, for example:

Thanks, I'll try it now, originally in the file it's a pain to manually delete them. This file is downloaded from the DC website.

PS. Thank you again for your help all worked.

 

Taking help from the audience :o)

I made an indicator that calls another indicator in its own init and everything works fine, but when I remove it says

2011.03.23 14:27:12     Ind Calculate Balance (EURUSD,M1)          1 leaked strings left

code has handle removal in Deinite

void OnDeinit(const int reason)
  {
   for(int i=0;i<total;i++)IndicatorRelease(handle[i]);
  }

I think the reason for this is some small thing, but I can't figure out what I forgot.

SZY if I increase the number of calls iCustom then increases the number of lines of memory loss.

ZZZY Ind Calculate Balance (EURUSD,M1) is just the indicator called via iCustom.

 
Urain:

Taking help from the audience :o)

I made an indicator that calls another indicator in its own init and everything works fine, but when I remove it says

code has handle removal in Deinite

I think the reason for this is some small thing, but I can't figure out what I forgot.

SZY if I increase the number of calls iCustom then increases the number of lines of memory loss.

ZZZY Ind Calculate Balance (EURUSD,M1) is exactly the indicator called via iCustom.


If only the lines are leaked, this is 100% compiler error, please create a request to servicedesk with the code to reproduce. Thank you.
 
mql5:
If only lines are leaked, it's 100% compiler error, please create a request to servicedesk with the code attached to reproduce. Thank you.
I used to create requests with already localized bugs. Here I don't understand what MT is telling me at all.
 

found a discrepancy between the help and the behaviour of the function

CopyTime

MAXBARS = 100000 is set in the terminal.

If right date (stop_time) of copying exceeds 100000 bars, function just copies 100000 bars and returns this amount.

Although as stated in the help:

В случае если запрашиваются данные за пределами TERMINAL_MAXBARS (максимальное количество баров на графике), функция также вернет -1.

please correct this inconsistency.


In addition, the CopyTime function starts to slow down wildly... without any obvious reason for the behaviour.

 
sergeev:
Also the CopyTime function starts to slow down wildly... without any obvious reason for the behaviour.

It seems to me that it's slowing down because it's going to the server for history...

Somewhere I used some code like this and all brakes disappeared:

   if ( SeriesInfoInteger(Instrument, TimeFrame, SERIES_FIRSTDATE) <= SeriesInfoInteger(Instrument, 0, SERIES_SERVER_FIRSTDATE) )
      tmpBars = (int)MathMin(SeriesInfoInteger(Instrument, TimeFrame, SERIES_BARS_COUNT), BarsLimit);
   else
      tmpBars = BarsLimit;
   if (tmpBars <= 0)
      tmpBars = BarsLimit;
   int BarsCopy = CopyRates(Instrument, TimeFrame, 0, tmpBars, tmpRates);
 
Urain:
I used to create applications with bugs already localised. This time I don't understand what MT is telling me.
When closing (unloading) the MQL5 program, the executing system detected that there was one (in your message) line that was not freed.
 
AlexSTAL:

It seems to me that it's slowing down because it's going to the server for history...

Somewhere I used some code like this and all the lags disappeared:

No. The lag is exactly because of going beyond MAXBARS. No paging is fixed. As soon as I go back to 99999 bars, the lag disappears abruptly. that's how I sat and moved the mouse to CopyTime to copy MAXBARS, then 1-2 bars less. the glitch appeared/ disappeared consistently with the subsequent call to CopyTime.

so i am sure that the bug is in CopyTime itself. well, help for the function should also be solved.

 
mql5:
When closing (unloading) an MQL5 program, the executing system detected that one (in your message) line was left in memory, which was not freed.

Made a request

Exactly one line because 2 iCustom entries appear when running 2

1 leaked strings left
 

Cannot set timeframe greater than 30 minutes.

   Print("PERIOD_M5=",PERIOD_M5,"   PERIOD_H1=",PERIOD_H1);

2011.03.25 10:20:00 period_test (GBPUSD,D1) PERIOD_M5=5 PERIOD_H1=16385

Also functions Period() and _Period and PERIOD_CURRENT give unknown results.

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Периоды графиков
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы графиков / Периоды графиков
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы графиков / Периоды графиков - Документация по MQL5