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
Thank you all for your answers 😉
The function has a maximum execution time that may not be exceeded. It is 2500ms.
Thank you very much 😉. Can you tell me where you found this information? I don't see it in the documentation for the OnDeinit() function.
Merci
Thank you very much 😉. Can you tell me where you found this information? I don't see it in the documentation for the OnDeinit() function.
In the documentation.
https://www.mql5.com/en/docs/runtime/event_fire#deinit
Discard my previous idea for deleting all objects on the chart. Unnecessary looping can cause lagging in the indicator.
You can do this to delete the objects your indicator created:
I overcomplicated it.
Discard my previous idea for deleting all objects on the chart. Unnecessary looping can cause lagging in the indicator.
You can do this to delete the objects your indicator created:
I overcomplicated it.
i was gonna say about that after read everything.
Actually this also is not the best.
Instead, define a constant as prefix for all your objects, for example,
, then add this prefix to the name of your objects and when you need delete just call
And for comments the Comment("") is enough. But is a better idea replace the comment by an object as well, because not only one program can write comments, so you don't know if the comment comes from your program or another.
i was gonna say about that after read everything.
Actually this also is not the best.
Instead, define a constant as prefix for all your objects, for example,
, then add this prefix to the name of your objects and when you need delete just call
And for comments the Comment("") is enough. But is a better idea replace the comment by an object as well, because not only one program can write comments, so you don't know if the comment comes from your program or another.
Good info, I will apply this myself, thanks
Thanks to all who gave input on this topic.
I just made a very simple Script from your comments and I think it works as it deleted a comment from the chart.
I only had the one comment to delete , so not a great test but here it is, I hope this helps someone.
Its only 6 lines as follows, save it in Scripts folder and Compile (0 errors, 1 warnings)
// DELETE ALL COMMENTS SCRIPT
int start()
{
ChartSetString(0, CHART_COMMENT, "");
}
//----------------------------------