Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1001
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
Can you please tell me why I'm getting errors
in this code
If the first error is still understandable - an object is not found, but the implementation of the search for a missing object without an error is not clear, the second error is not clear, while the object is clearly created - the chart is formed and the reason for the error is not clear.
How to get rid of errors?
Can you please tell me why I'm getting errors
in this code
If the first error is still understandable - an object is not found, but the implementation of the search for a missing object without an error is not clear, the second error is not clear, while the object is clearly created - the chart is formed and the reason for the error is not clear.
How to get rid of the error?
ResetLastError() must be done before calling the function. What is it here:
is unclear. If this is CCanvas, then the Create() method creates a graphical resource without reference to the chart object. And it returns either true or false:
Create
Creates a graphical resource without binding to a chart object.
Parameters
name
[in] Base for the name of the graphical resource. The resource name is formed during creation by adding a pseudo-random string.
width
Width [in] Width (X size) in pixels.
height
[in] Height (Y-axis size) in pixels.
clrfmt=COLOR_FORMAT_XRGB_NOALPHA
[in] Color processing method. See the ResourceCreate() function description for more details on the colour handling methods.
The return value is
true - if successful, otherwise false
Generally, it's hard to understand from what you have shown.
But you can try it this way:
If you have CGraphic there, you need to get into the Create() code to understand what it returns, as there's not a word about it in the help:
ResetLastError() must be performed before the function is called. What's here:
is unclear. If it's CCanvas, the Create() method creates a graphical resource without reference to a chart object. And it returns either true or false:
Create
Creates a graphical resource without binding to a chart object.
Parameters
name
[in] Base for the name of the graphical resource. The resource name is formed during creation by adding a pseudo-random string.
width
Width [in] Width (X size) in pixels.
height
[in] Height (Y-axis size) in pixels.
clrfmt=COLOR_FORMAT_XRGB_NOALPHA
[in] Color processing method. See the ResourceCreate() function description for more details on the colour handling methods.
The return value is
true - if successful, otherwise false
Generally, it's hard to understand from what you have shown.
But you can try it this way:
If you have CGraphic there, you need to get into Create() code to understand what it returns, as there's not a word about it in the help:
I have already checked above with error reset and localized the place where the error occurs.
Besides, it occurs twice from different functions there - after the first function the error is cleared, but then it occurs again.
And my variant of creation
Create
Creates a graphical resource linked to the chart object.
bool Create (
const longchart,// chart ID
const stringname,//name
const intsubwin,// number of subwindow
const intx1,//coordinate x1
const inty1,//coordinate y1
const intx2,//coordinate x2
const inty2//coordinate y1
)
Parameters
chart
The [in] identifier of the chart.
name
[in] Name.
subwin
[Subwindow number.
x1
[Coordinate X1.
y1
[in] Coordinate Y1.
x2
[in] Coordinate X2.
y2
[in] Coordinate Y2.
I have already checked above with an error reset and localised where the error occurs
You do not reset the error before accessing the object search function.
You don't reset the error before accessing the object search function.
Yes, in the code quote I don't reset, as I've already checked the code above - there's no error there, so I've erased similar check lines as shown below.
You don't reset the error before calling the object search function.
Once again I decided to repeat the experiment, here is the code
Here is the result.
Any idea what caused the error?Hello, my alert function reads a string from a file and outputs it in either Chinese or Japanese characters, how can I fix it?
Configure the fonts in Windows. Set Russian for "Language for programmes that do not support Unicode".
"Regional standards" - "Advanced".
Configure the fonts in Windows. Set Russian for "Language for programmes that do not support Unicode".
"Regional Standards - Advanced.
This did not work.
I get an automatic translation to Japanese or Chinese of a line read from a file, why is this happening?
Once again I decided to repeat the experiment, here is the code
Here's the result
Any idea what caused the error?Well, since you reset the last error, look in the wilds of CGraphic where this error code occurs.