Questions from Beginners MQL4 MT4 MetaTrader 4 - page 172
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
Hello.
Please advise how to do this correctly.
There is a global collection of objects:
There is an additional class where a lot of calculations are done and this includes creating objects and adding them to the collection:
class CCheck : public CArrayObj { } bool CCheck::SomeMethod(void) { CSample *sample_object=new CSample(); array.Add(sample_object); }
This additional object of CCheck class I create regularly in a loop. But I can't destroy it, because I need CSample objects in the array collection. If I destroy CCheck, I also lose the sample_objects in the array.
I now shove these CCheck objects to another array of garbage objects, which I clear when I don't need the corresponding objects in the array anymore. But I get out of memory error because I have to keep lots of heavy CCheck objects in the array. But I don't need whole object. I just need created in it objects of CSample. Could you please tell me how to do it right, so I can save only CSample object and delete CCheck one. I can't figure it out.
The code is like this:
The solution has been on a forum somewhere, but I can't find the answer.
Who has found an "antidote" against this:
The code is standard:
The essence: Expert Advisor crashes when switching from one timeframe to another. In mt5 there is no such a problem.
Is there a solution? Or it is better to forget about the Panels in mt4 :)
The solution was somewhere already on the forum, but I can't find the answer.
Who found "antidote" against this:
The code is standard:
The essence: Expert Advisor crashes when I switch from one timeframe to another. In mt5 there is no such a problem.
Is there a solution? Or it is better to forget about the Panels in mt4 :)
Maybe someone could use it. Bottom line, there was an Expert, saved it as an Indicator, everything works. I mean the code for the Panel.
Good afternoon!
I thought it was possible to just print an array, but I can't remember and can't find how to do it. How?
Good afternoon!
I thought it was possible to just print an array, but I can't remember and can't find how to do it. How?
ArrayPrint
Ah, it was in MQL5, thanks clearly!
I don't understand what you need to do to fix it:
4030 is "chart not responding".
Yesterday it worked :( The only difference is that MT5 is being optimised in parallel (also uses timer), but there are free resources. The chart with this Expert Advisor is "clean" at all, nothing is attached to it.
The only difference is that MT5 is optimised in parallel (it also uses timer), but there are free resources. The chart with this Expert Advisor is "clean", nothing is attached to it.
I have stopped optimization in 5 and it works. Shouldn't there be any connection?
My question about Unicode was here. Why was it deleted?
Let me give you a little background:
A little less expression in questions and they won't get deleted. It's simple: asking a question isn't about taking out your negativity on others. You're in a community.
Respect the place where you ask your questions and expect to get an answer, not a moderator's reaction.