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.
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);
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.
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.
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.
Thanks, it's just that the default is kind of weird without it.
Set up the chart as you need it, and save the template under the default name
I can't understand why for writing:
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.
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:
And read this: Type conversionMake it so:
And read this: Type conversionI 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.
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.
I used to see a section here somewhere dedicated to detected MT5 bugs, but forgot where it is or how to find it...