Errors, bugs, questions - page 2030

 
Andrey Khatimlianskii:

I said straight out:"or real copies of OHLC arrays".

Make your own arrays, copy data there, store the number of elements.

"Who said it would be easy?" (с)


I'm sorry if I'm boring you) I have another question, maybe you know, I'd be very grateful)
My OnCalC works with my data, the chart is drawn correctly, but the data from the indicator buffers are only displayed on the monitor after a tick or right-click refresh
i think there is some other slyness i don't know yet where to dig))

i have a question: when the indicator sends the data for drawing?

 
Money_Man:

I'm sorry if I'm boring you) I have another question, maybe you know, I'd be very grateful)
My OnCalC works with my data, the chart is drawn correctly, but the data from the indicator buffers is still displayed on the monitor only after a tick or right-click refresh
i think there is some other slyness i don't know yet where to dig))

i have a question: when the indicator sends the data for drawing?

Posted the code here - https://www.mql5.com/ru/forum/59136/page3#comment_1648963

Perhaps ChartReadrow is missing.

Отображение буфера в индикаторе
Отображение буфера в индикаторе
  • 2015.05.26
  • www.mql5.com
15,M1) сдвиг значений буферов.
 
To be honest I've always been attracted by MT5 features, but it's too sophisticated compared to MT4
I don't know why it's so complicated with the organization of indicators and data... Each time I wonder how it really works(
 
Andrey Khatimlianskii:

Posted the code here - https://www.mql5.com/ru/forum/59136/page3#comment_1648963

Perhaps ChartReadrow is missing.


From experience I've already inserted ChartRedr at every completion... But apparently it's only useful when drawing your own graphics.
Thank you very much, OnCalc call helps a lot made my chart already it is displayed in the first pass and no different than buffer chart

 
Vitaly Muzichenko:

Today I encountered a problem that if the name of the object is in Russian, it is not recognized on terminals of users in South-East Asia

This code is scrapped because it's in Cyrillic.


This one works without a problem.


I knew that only idiots use Cyrillic in the program, and that sooner or later it will turn out to be a bummer. There were only 3 objects in Russian, decided to save on a tooltip, and enough to stop the program running.

Well, yes, the situation is certainly unpleasant. But on the other hand, but even if the Cyrillic was displayed, what good would it do users of South-East Asia? This is why you should either make everything in English only, or provide different translations and give the right one according to the terminal language.

And suckers use Cyrillic in variable and function names, which is not the case here)

 

Hello! I can't create a global variable

GlobalVariableSet(ChartSymbol(),ChartID());

The value is different from the real one (entered ChartID() in the comment for verification)

Then converted long ChartID() in string and double. The result is the same.


Help.

 
inter78:

Hello! I can't create a global variable

GlobalVariableSet(ChartSymbol(),ChartID());

The value is different from the real one (entered ChartID() in the comment for verification)

Then converted long ChartID() in string and double. The result is the same.


Please help.


Read about type conversions and losses. https://www.mql5.com/ru/docs/basis/types/casting

Документация по MQL5: Основы языка / Типы данных / Приведение типов
Документация по MQL5: Основы языка / Типы данных / Приведение типов
  • www.mql5.com
Часто возникает необходимость преобразовать один числовой тип в другой. Не каждый числовой тип допустимо преобразовать в другой, допустимые преобразования в MQL5 показаны на схеме: Сплошные линии со стрелками обозначают преобразования, которые выполняются без потери информации. Вместо типа char может выступать тип bool (оба занимают в памяти 1...
 
inter78:

Hello! I can't create a global variable

GlobalVariableSet(ChartSymbol(),ChartID());

Look here, any can be stored in a global variable.


Or this particular variant (ripped from here)

union UNION
{
  double Double;
  long Long;
} Chart;

Chart.Long = ChartID();
GlobalVariableSet(NAME, Chart.Double);

Chart.Double = GlobalVariableGet(NAME);

Print(Chart.Long);
Нужны ли глобальные переменные терминала типа string?
Нужны ли глобальные переменные терминала типа string?
  • 2017.04.08
  • www.mql5.com
Было бы супер! Вынужден выкручиваться без них. К чему они? И так возможностей для грамотного профи достаточно...
 
inter78:

Hello! I can't create a global variable

GlobalVariableSet(ChartSymbol(),ChartID());

The value is different from the real one (entered ChartID() in the comment for verification)

Then converted long ChartID() in string and double. The result is the same.


Help.

Doubtful decision to name a global variable with a symbol.

The symbol may contain special characters, unacceptable in a variable name

 
Vitaly Muzichenko:

Today I encountered a problem that if the name of the object is in Russian, it is not recognized on terminals of users in South-East Asia

This code is scrapped because it's in Cyrillic.


This one works without a problem.


I knew that only idiots use Cyrillic in the program, and that sooner or later it will turn out to be a bummer. There were only 3 objects in Russian, decided to save on a tooltip, and enough to make the program stop working.

Four?
Reason: