Errors, bugs, questions - page 340

 
alexluek:

What kind of miracles are these? There wasn't a single moment where you could see that one was bigger than the other.


  Print ("vol1=",vol1,"vol2=",vol1,"vol1<vol2=",vol1<vol2);
 
mql5:

Here I am di.... There really is an error in the code, and I was racking my brains!

Thank you!

 
alexluek:

Here I am di.... There really is an error in the code, and I was racking my brains!

The correct spelling is with an "e".
 
Rosh:
The correct spelling is with an 'e'.
))))))))))))))))) super!
 

Small thing, but still

int digits = SymbolInfoInteger("EURUSD", SYMBOL_DIGITS);

Warning: possible loss of data due to type conversion

What's wrong? (5.00.412)


Документация по MQL5: Основы языка / Типы данных / Приведение типов
Документация по MQL5: Основы языка / Типы данных / Приведение типов
  • www.mql5.com
Основы языка / Типы данных / Приведение типов - Документация по MQL5
 
pilipenok:

A small thing, but still

int digits = SymbolInfoInteger("EURUSD", SYMBOL_DIGITS);


Integer properties are always returned as long, do a type conversion yourself and you won't get any warnings.

int digits = (int)SymbolInfoInteger("EURUSD", SYMBOL_DIGITS);
 
pilipenok:

Small thing, but still

int digits = SymbolInfoInteger("EURUSD", SYMBOL_DIGITS);

Warning: possible loss of data due to type conversion

What's wrong? (5.00.412)


The SymbolInfoInteger function returns long.

int digits = (int)SymbolInfoInteger("EURUSD", SYMBOL_DIGITS);
 
pilipenok:

Small thing, but still

int digits = SymbolInfoInteger("EURUSD", SYMBOL_DIGITS);

Warning: possible loss of data due to type conversion

What's wrong? (5.00.412)


Either write
long digits = SymbolInfoInteger("EURUSD", SYMBOL_DIGITS);

или

int digits = (int)SymbolInfoInteger("EURUSD", SYMBOL_DIGITS);
 
alexluek:

The check results are correct, but not in the log!

What kind of miracles are these? There was not a single moment where it was obvious that one was bigger than the other.

On all TFs and no matter what character.

Watch the code carefully and correct the errors:

("vol1=",vol1,"vol2=",vol1,
 

There is a need to send preprocessed data to an already running indicator. I have decided to use graph object text as a global data storage. I understand that the purpose of graphical objects is different and if there is any alternative, I will be glad to hear it.

But here I have faced another limitation of the language. String itself supports almost infinite length of characters. Well, probably the limitation lies somewhere in the area of limiting arrays in general. And the string passed as a parameter of a graphical object is limited by 63 characters. As a result, passing an array as a string would require a heap of graphical objects (yes, I forgot to tell you that I use encryption, that's why information in strings takes approximately the same amount of space as in the original type). Now with current 63 characters it's possible to pass only 15 time/price pairs through one object.

Hence the question: can we expect that in the future the language will remove the limitation on the text length of the graphical object or will there be a mechanism for passing data into the indicator thread?

Reason: