Indicators: Setka (grid) - page 4

 

I don't understand why, but if in the code of drawing vertical lines:

line_counter++;

TimeToStruct(time[i],str);

StringConcatenate(line_name,IntegerToString(str.hour,2,'0'),":",IntegerToString(str.min,2,'0'),"_N",line_counter);

SetVLine(line_name,time[i],line_colour);

replace the last line with the next line:

SetVLine(IntegerToString(str.hour,2,'0')+": "+IntegerToString(str.min,2,'0')+"_N "+IntegerToString(line_counter),time[i],line_color);

then everything works as it should.

When printing through Print the line_name variable after the line with StringConcatenate - the name of lines is written to the terminal correctly.

For some reason, when substituting this variable obtained in StringConcatenate into SetVLine function, lines are not drawn, only direct calculation of line name in the code of drawing function call works.

And it appears exactly after build 3021.

P.S. I have started the turkey, but "cockroaches" live in the terminal.

 

Thanks to the developers for fixing a bug in the StringConcatenate function in build 3090.

https://www.mql5.com/ru/forum/380121

Now the indicator works fine in the original code.

Новая версия платформы MetaTrader 5 build 3090: Улучшения в работе
Новая версия платформы MetaTrader 5 build 3090: Улучшения в работе
  • 2021.10.20
  • www.mql5.com
В четверг 21 октября 2021 года будет выпущена обновленная версия платформы MetaTrader 5...