Errors, bugs, questions - page 870

 
Telemah:
Thanks, it's just that the default is kind of weird without it.
Configure the chart as you need it, and save the template as default
 
Urain:
Set up the chart as you need it, and save the template under the default name
Yes, used to do that, thanks.
 

I can't understand why for writing:

int spread=SymbolInfoInteger(_Symbol,SYMBOL_SPREAD);

compiler is unhappy: possible loss of data due to type conversion , because it's an integer everywhere. Of course, I could leave it as it is, but the warning is a bit of a nuisance.

 
paladin800:

I can't understand why for recording:

compiler is unhappy: possible loss of data due to type conversion , because integer is everywhere. Of course, we could leave it as it is, but the warning is a bit of a nuisance.

Make it like this:

int spread=(int)SymbolInfoInteger(_Symbol,SYMBOL_SPREAD);
And read this: Type conversion
 
tol64:

Make it so:

And read this: Type conversion


Thank you, it helped. Have read the article.

I feel, however, that I need to remedy my lack of knowledge, because while my example above strained the compiler, my example below doesn't strain the compiler, and the situation seems to be similar.

double ask=SymbolInfoDouble(_Symbol,SYMBOL_ASK);
 
paladin800:
Thank you, it helped. Have read the article.

I feel, however, that I need to eliminate my lack of knowledge, because if for my above example the compiler strained, for the below example the compiler doesn't strain, and the situation seems to be similar.

SymbolInfoInteger returns a value of long type, which is 64-bit. And int is 32-bit, so the compiler rightly generates a warning.

In the second case, SymbolInfoDouble returns a value of the double type and this is the same type of your ask variable. So no losses (even theoretically) may occur here and the compiler won't say a word.

Документация по MQL5: Основы языка / Типы данных / Вещественные типы (double, float)
Документация по MQL5: Основы языка / Типы данных / Вещественные типы (double, float)
  • www.mql5.com
Основы языка / Типы данных / Вещественные типы (double, float) - Документация по MQL5
 
Comparing MT4 and MT5, I see two disadvantages or imperfections of MT5. The first one is not showing of pending orders on the tester's chart and therefore when debugging some strategies we cannot see on the chart the result of which order a certain deal is. The second one is the absence or extremely poor quality of fixed scale. If you press the "fixed scale" option in MT4 and you can move the chart up and down by virtually any distance, which is very convenient. For example, in MT5, I opened the same chart for 5 minutes, checked "fixed scale" ... but the chart will not move up or down at all. This is very uncomfortable. Of course, these drawbacks are not crucial and we can do without them.
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров - Документация по MQL5
 
I used to see a section somewhere on here dedicated to detected MT5 errors, but I forget where it is or how to find it...
 
SkyTreker:
I used to see a section here somewhere dedicated to detected MT5 bugs, but forgot where it is or how to find it...
I think you mean this section: List of changes in MetaTrader 5 Client Terminal builds. Add it to your favourites in your profile on this site.
 
Thank you tol64!
Reason: