Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1484
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
you and I have different "lefts" :-)
1110<<1 := 11100
I read it on the internet. This is for 32 bits I understand, for 16 it's the same, nothing jumped by a bit. But I'm just learning, probably you are right.
It's not the point, it's just a side note. I was surprised by such a construction in the terminal. This indicator is not even from the codebase, it is from the terminal from the Examples folder.
How do you change an old design?
Here it's all clear. Such and such object, so and so describe, such and such font size, font type, colour.
But that's from the old one.
I read what's being replaced
To
ObjectGetInteger,ObjectSetString,ObjectSetIntegerStringLen.
But in all these functions there are no such parameters as in ObjectSetText.
I had this code on µl4
I changed it to µl5, only ObjectSetText I didn't understand how to change it.
How do you change an old design?
It's all clear here. We describe such and such an object in such and such a font size, font type, colour.
But that's from the old one.
I read what's being replaced
To
ObjectGetInteger,ObjectSetString,ObjectSetIntegerStringLen
But in all these functions there are no such parameters as in ObjectSetText.
Font, size, colour, background colour, etc. are set by separate calls of https://www.mql5.com/ru/docs/constants/objectconstants/enum_object_property.
Font, size, colour, background colour, etc. are set by separate calls to https://www.mql5.com/ru/docs/constants/objectconstants/enum_object_property.
Instead of
Should I do it like this?
So instead of
You have to do this?
OBJPROP_FONTSIZE and OBJPROP_COLOR - via ObjectSetInteger()
Instead of DoubleToString() it is sometimes more convenient to use StringFormat(), you can control the format more flexibly.
Why does this script output 196
and this one 104.
The result should be the same.
Why does such a script output 196
And this one 104.
The result should be the same.
Why should it be the same?
The first case is to get the value of the property number CHART_FIRST_VISIBLE_BAR of the current chart.
The second case is to get the number of this property itself.
Roughly, the difference is the same as between the value of an array cell and the index of this cell.
There was such an indicator on the old MQL4.
I rewrote it to MQL5. I removed the work with objects from it.
When setting Ratio=1, it appears on the chart as it should be, i.e. it is just superimposed on the chart as a Hi-Low bar. But in debugging mode it is not so for some reason,
it is displayed as if Ratio is set to 2, while it is set to 1.
Is everything correct in the code?