Errors, bugs, questions - page 2243
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
The code in mql4 indicator stopped working. how can i fix it?
Editor says 'ObjectSetInteger' - no one of the overloads can be applied to the function call
It's been working for years and then suddenly stopped. It's a shame, though.
But why did you mix up two styles? If you use the first line to specify the arrow code, then use the second line in the same style:
Tried to upload a new version of the indicator to the market. The test ended with errors. Error report as on the picture in the appendix with the following content:
Maybe the problem is in the tester?Just why did you mix the two styles? If you use the first line to set the arrow code, then use the second line in the same style:
Thank you, that helped.
2 styles? I didn't know about the styles. It's just that previously you could only do this section that way. There has been a change. I've been programming in MQL4 for more than 10 years. And now the developers have changed the language and many of my codes do not work anymore. I'm very disappointed. The changes were not for the better. It means that I have to redo a huge amount of codes. Even though they are old, they were a lot of use.
Tried to upload a new version of the indicator to the market. The test ended with errors. Error report as shown in the picture in the appendix with the following content:
Maybe the problem is in the tester?Please create a request to servicedesk, we'll figure it out
UPD: Found your request.
Frees the buffer of any dynamic array and sets the size of the zero dimension to 0.
When scripts and indicators are written, the need to use the ArrayFree() function may occur rarely, as all used memory is immediately released, and in custom indicators the main work with arrays is represented by access to indicator buffers, the sizes of which are automatically managed by the executive subsystem of the terminal.
If you need to manage memory in complex dynamic conditions in your program, the ArrayFree() function will allow you to explicitly and immediately free the memory occupied by a dynamic array that is not needed anymore.
You see? Unnecessary.
Naturally, once memory is freed from it, and then you allocate it again by assigning a size to the array, nobody can guarantee its contents.
Use array initialization: ArrayInitialize()
What do you mean, no one guarantees the contents? If the memory was freed, it's gone, so how do you get rubbish in it? Or does clearing the memory imply giving permission for that memory to be used by another part of the program, not actually clearing it at all?
What do you mean no one guarantees the contents? If the memory has been cleared, it is no longer there, so how does it get rubbish in it? Or does clearing memory imply giving permission for that memory to be used by another part of the program, not actually clearing it at all?
ArrayResize doesn't clean up memory, which is why it contains rubbish, from the previous "consumer".
This is done for speed, because after memory is allocated to an array, in 99.99(9)% of cases, the user will "fill" it with his data.
Thank you, that helped.
Two styles? I didn't know about the styles. It's just that previously you could only do this section that way. There has been a change. I've been programming in MQL4 for more than 10 years. And now the developers have changed the language and many of my codes do not work anymore. I'm very disappointed. The changes were not for the better. It means that I have to redo a huge amount of codes. They may be old, but they were a whole lot more useful.
Isn't it how the arrow code was set before mql4 ObjectSetXXX-functions were introduced?
I've also been writing in mql for about 10 years (maybe more - how time flies...) - I'm starting to forget strictly Quaternary functions - I write multiplatform code when possible.
ArrayResize doesn't clear the memory, that's why it contains rubbish from the previous "consumer".
This is done for speed, because after memory allocation to an array, in 99.99(9)% of cases, the user will "fill" it with his data.
Then why are the numerical values "rubbish" constants, even after restarting the terminal?
Personally, I got stuck with simple summing up the contents of cells in another array, and I've been puzzling over the problem for a long time.
Then why are the numeric values "rubbish" constants, even after restarting the terminal?
Personally, I got burned on a simple summation of the contents of cells in another array, and wondered for a long time what the problem was
It doesn't matter what kind of data is contained in the uninitialised array, at any moment, the data can change, no one guarantees its value.
That's why using uninitialized variables (read memory) sometimes leads to situations where it takes a long time to find the cause:
I can only give some advice.
You should get into the habit of always initializing data, so that in the future you don't waste a lot of time searching for errors related to the lack of initialization.
What do you mean no one guarantees the contents? If the memory has been cleared, it is no longer there, so how does it get rubbish in it? Or does clearing memory imply giving permission for that memory to be used by another part of the program, not actually clearing it at all?
What do you mean "no"? You don't remove the memory stick from the motherboard slot. And if the memory is present and it is freed (not initialized with a value, but freed), then it is being used for other program needs.