Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1473
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
Before you do anything with your money, at least do a minimal amount of checking.
Likewise.
Hopefully not credit... Definitely go to the police.
I tried to make an analogue of the comment, but the letters were bigger.
In general, it worked, the letters are readable now.
But because of my ignorance of OOP, my comment does not affect the work of the computer very well,
Some time after running the Expert Advisor with a comment on several charts, something bad happens, up to the fading of the screen and rebooting the server)))))
In the terminal logs a bunch of these records.
Help those who know how to do, so that the memory does not leak.
The plug-in comment file looks like this:
Example of using it like this:
It is clear that I am doing something wrong with the CCanvas class, but what exactly is wrong, I do not understand.
I tried to make an analogue of the comment, but the letters were bigger.
The letters are now readable.
But because I don't know OOP, my comment doesn't affect the work of the computer very well,
Some time after running the Expert Advisor with a comment on several charts, something bad happens, up to fading screen and rebooting the server))))))
In the terminal logs a bunch of these records.
Help those who know how to do, so that the memory does not leak.
The attached comment file looks like this:
Example usage like this:
It's clear that I'm doing something wrong with the CCanvas class, but what exactly is wrong I don't understand.
If you are interested in the code without CCanvas library, but with OBJ_BITMAP_LABEL object, look at my code ...
If you are interested in code without CCanvas library but with OBJ_BITMAP_LABEL object look at my code ...
Thanks, nice solution, I like it.
But, "a samurai has no goal , only a path ", the solution of how to make a comment is less important to me than finding out what my mistake is in using the class.
Thank you, beautiful solution, I liked it.
But, "a samurai has no goal , only a path ", I care less about figuring out how to make a comment than finding out what my mistake was in using the class.
How many, in how many BitmapLabel are created ? (Ctrl+B --> All).
How many, in what quantity is a BitmapLabel created ? (Ctrl+B --> All).
On one chart, one object.
And how can there be more than one? The name of all created objects is the same - "Comment".
I forgot to write.
The problem comes out on a super poor server with one core and 1gb memory. And then not immediately, but after some time.
But I think that if everything was normal with the code, there would be no problem. Something is clogging the RAM, I can't understand what it is.
Why is it important for me to know?
You can buy server capacity, you can buy memory, you can upgrade endlessly, but it will not make my code correct.
On one chart, one object.
How can there be more than one? The name of all created objects is the same - "Comment".
I forgot to write.
The problem comes out on a super poor server with one core and 1gb memory. And not immediately, but after some time.
But I think that if everything was normal with the code, there would be no problem. Something is clogging the RAM, I can't understand what it is.
Why is it important for me to understand ?
You can buy more server capacity, you can buy more memory, you can upgrade endlessly, but it won't make my code correct.
What is there in the log when an Expert Advisor is removed from the chart? Usually it tells you which objects are leaking, which gives you a search direction
What is in the log when EA is removed from the chart? Usually it tells you which objects are leaking, which gives you a search direction
Mm-hmm. I deleted the logs. But no problem, it won't take long to do it again. Now I will start the Expert Advisor on the server, in the morning (maybe earlier) will be logs.
But as far as I remember, I could not find in them an indication of where memory is leaking.
And the Expert Advisor is not removed from the chart, most likely just restarts the server, as there is no record of terminal closing in the logs. But this is not certain.
Mm-hmm. I deleted the logs. But no problem, it won't take long to do it again. I'll start the Expert Advisor on the server now, I'll have the logs in the morning (maybe earlier).
But as far as I remember, I could not find in them an indication of where memory is leaking.
And the Expert Advisor is not removed from the chart, most likely just restarts the server, as there is no record of terminal closing in the logs. But this is not certain.
You have not understood the meaning of my question. You don't need to wait on the server when it runs out of memory and bursts.
If there is an object leak in the code, recompile it on your home local computer when the Expert Advisor is running - a message about the number and type of leaked objects should be displayed in the logs. Or run it on a chart and take it down at once - a message about the leak should also appear, if there is one, of course.
You are missing the point of my question. You don't need to wait on the server when it runs out of memory and bursts.
If there is an object leak in the code, recompile it on your home local computer with the Expert Advisor running - a message about the number and type of leaked objects should be displayed in the logs. Or run it on a chart and take it down at once - a message about the leak should also appear, if there is one, of course.
It doesn't write anything when compiling. It deletes it and installs a new one. That's it.
It is still working on the server. I'll wait, maybe it will write something in the logs.