Questions from a "dummy" - page 95

 
Is there any way to get the current value of the price scale step into a variable?
 
sultanm:
Is there any way to get the current value of the price scale step into a variable?
It is possible to get the minimum and maximum of the current chart window, but what you mean is not very clear, please clarify.
 
Urain:
You can get data about the minimum and maximum of the current chart window, but what you mean is not very clear, please clarify.
The step of the current chart's grid is constantly changing depending on the zoom and selected time series and simply in the process of new bars appearing. So I need to know this step in real time. In principle, maybe "minimum and maximum data" will help. Please tell me how to get it.
Обработчик события "новый бар"
Обработчик события "новый бар"
  • 2010.10.04
  • Konstantin Gruzdev
  • www.mql5.com
Язык программирования MQL5 позволяет решать задачи на совершенно новом уровне. Даже те задачи, которые уже вроде имеют решения, благодаря объектно-ориентированному программированию могут подняться на качественно новый уровень. В данной статье специально взят простой пример проверки появления нового бара на графике, который был преобразован в достаточно мощный и универсальный инструмент. Какой? Читайте в статье.
 
sultanm:
The step of the current chart grid is constantly changing depending on zooming in and time series and simply in the process of new bars appearing. So I need to know in real time this step. In principle, maybe "minimum and maximum data" will help. Please advise how to obtain it.

So, we have got the gist of it, it turns out that you need the vertical size of the grid in price lists.

MQL5 Reference / Operations with Charts / ChartGetInteger ENUM_CHART_PROPERTY_INTEGER

MQL5 Reference / Operations with Charts / ChartGetDouble ENUM_CHART_PROPERTY_DOUBLE

help.

Although it is better to ask the developers for the formula, because they know it (the terminal automatically recalculates values), while you should use your own experience to find it.

 
The software builds an N number of random graphical objects with random names, properties and other attributes. Is it possible to access the queue of these objects in the order in which they were built (e.g. to remove the earliest objects)? That is, they were built sequentially over time and in terms of a list/queue/array as they were created should have ordinal indexes in ascending order. Is there such a list or array if searching by name and other attributes is useless?
 
x100intraday:
The software builds an N number of random graphical objects with random names, properties and other attributes. Is it possible to access the queue of these objects in the order in which they were built (e.g. to remove the earliest objects)? That is, they were built sequentially over time and in terms of a list/queue/array as they were created should have ordinal indexes in ascending order. Is there such a list or array if searching by name and other attributes is useless?
There is theOBJPROP_CREATETIME property.I haven't checked it, because objects are created very quickly and may be created at the same time, I suppose. If we can't find any other way, when creating objects, we'll have to write them to a dynamic array, for example.
Документация по MQL5: Основы языка / Типы данных / Объект динамического массива
Документация по MQL5: Основы языка / Типы данных / Объект динамического массива
  • www.mql5.com
Основы языка / Типы данных / Объект динамического массива - Документация по MQL5
 
tol64:
Is it possible to programmatically save these resources to disk only by means of MQL5, by the very program that contains the resources?
Have a look at the ResourceSave function
 
Rosh:
Have a look at ResourceSave function.

Thank you, I am familiar with it. The wish I sent to servicedesk has been fulfilled. :) Except that in the help it says:

ResourceSave

Sets value of predefined variable _LastError to zero.

So, the description in the help is wrong. It must have come from ResetLastError. :)
 
tol64:

Thank you, I am familiar with it. The wish I sent to servicedesk has been fulfilled. :) Except that the certificate says:

That is, erroneous description in the help. ResetLastError must have gotten it. :)
Yes, you're right. Thanks for the message, it was corrected.
 

tol64, the point is that OBJPROP_CREATETIME is, again, nothing more than one of the object's properties... and I'm worried that it, by hanging on to it, will give it "unnecessary uniqueness". After all, it's not just the name of the object that identifies it as a unique object, but also some of its other parameters, isn't it? I can't afford it, because there are cases when instead of a previous object, another one with the same parameters (time1,price1,time2,price2) is drawn, but the terminal sees that the exact same object already exists and does not draw over it, but skips it, and if the previous object, say, was blue and the new object came in yellow, it just changes colour to yellow. This is what I call absorption, which saves a lot of resources by not producing unnecessary twins blocking each other. No ObjectFind, name string parsing, comparisons via if and other unnecessary gestures. But this is achieved by not naming objects with unique names. With properties - haven't tested yet...