Errors, bugs, questions - page 1040

 
paladin800:

Here I learned that "... Comment() is the heaviest function, it makes the window completely redraw...". Can you tell me if it is possible to make the information displayed in the window via Comment() be visible, e.g., on 5 ticks, then on the next five ticks it will not be displayed, then again on 5 ticks it will be visible, etc. I am looking for ways to offload the CPU when EA works.

The counter of ticks, if =5 - comment and counter in 0.

Or by OnTimer to output. Or not by comment. (I took f_comment from here).

 

I want to use a two-dimensional array.

The data I plan to store there is of type double and datetime.

What type should I assign to the array when declaring it? Or mixed data cannot be used in arrays?

Документация по MQL5: Основы языка / Типы данных / Вещественные типы (double, float)
Документация по MQL5: Основы языка / Типы данных / Вещественные типы (double, float)
  • www.mql5.com
Основы языка / Типы данных / Вещественные типы (double, float) - Документация по MQL5
 
cat7:

I want to use a two-dimensional array.

The data I plan to store there is of type double and datetime.

What type should I assign to an array when declaring it? Or mixed data cannot be used in arrays?

You can't. Through a structure, here is an example.

Here is an article on arrays.

 
Silent:

You can't. Through the structure, here' s an example.

On arrays, here's an article.

Thank you!

It's super convenient to create multidimensional arrays by declaring the name of the element to be called! )))

 

I don't understand anything.

I use ObjectDelete(chart_ID, name).

Returns true even if there was no such chart. There was no chart, therefore nothing to delete, but returns true.

Документация по MQL5: Графические объекты / ObjectDelete
Документация по MQL5: Графические объекты / ObjectDelete
  • www.mql5.com
Графические объекты / ObjectDelete - Документация по MQL5
 
cat7:

I don't understand anything.

I use ObjectDelete(chart_ID, name).

Returns true even if there was no such chart. There was no chart, therefore nothing to delete, but returns true.

The ObjectDelete() function is intended to delete graphical objects.
 
cat7:

I don't understand anything.

I use ObjectDelete(chart_ID, name).

Returns true even if there was no such chart. There was no chart, therefore nothing to delete, but returns true.

So, everything is fine, there is nothing to delete).
 

And it returns false if the object exists (found), but could not be deleted.

ChartClose

 
zfs:
So it's OK, there's nothing to delete).
Suppose the graphical object is a button. If I make an analogy with WinAPI and delete a non-existing button, WinAPI::DestroyWindow() will return FALSE (failure), while MQL5::ObjectDelete() = true.
 
A100:
Let's assume the graphical object is a button. If I make an analogy with WinAPI and delete a non-existing button, WinAPI::DestroyWindow() will return FALSE, while MQL5::ObjectDelete() = true.
There is also ObjectFind, languages are different. In Russian there are words that are not in English.
Reason: