I do not have the mq4 file for that indicator.
Fix your indicator.
Got it.
Used one of your answers from another thread:
string on = ObjectName(iObj);
if (StringFind(on, "ccline") == 0) ObjectDelete(on);
}
Thank you.
If you want to automate the process, the best option is what whroeder1 suggests i.e. create a new indicator or modify the EA.
If you can't create a new indicator, the "least ugly" option is to recode your EA to delete ccline3 whenever it is created.
If ccline3 only gets created once per initialization, it shouldn't be too much of a problem.
But, if the indicator keeps trying to recreate ccline3 every tick, you're going to end up in a permanent battle between your EA and this indicator.
If you want to give it a go, add this to your OnInit():
Then add this (or merge it, if you are already using OnChartEvent in your EA):
{
string prefix = "ccline";
if(id==CHARTEVENT_OBJECT_CREATE && StringSubstr(sparam,0,StringLen(prefix))==prefix)
{
ObjectDelete(0,sparam);
Print("Deleted ",sparam);
}
}
I've added a print statement so you can see how frequently ccline3 is being deleted.
Check the Experts log to see how often ccline3 is being deleted.
If you want to automate the process, the best option is what whroeder1 suggests i.e. create a new indicator or modify the EA.
If you can't create a new indicator, the "least ugly" option is to recode your EA to delete ccline3 whenever it is created.
If ccline3 only gets created once per initialization, it shouldn't be too much of a problem.
But, if the indicator keeps trying to recreate ccline3 every tick, you're going to end up in a permanent battle between your EA and this indicator.
If you want to give it a go, add this to your OnInit():
Then add this (or merge it, if you are already using OnChartEvent in your EA):
{
string obj_name = "ccline3";
if(id==CHARTEVENT_OBJECT_CREATE && sparam==obj_name)
{
ObjectDelete(0,obj_name);
Print("Deleted ",obj_name);
}
}
I've added a print statement so you can see how frequently ccline3 is being deleted.
Check the Experts log to see how often ccline3 is being deleted.
Thank you, this solution works perfect.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
One of the indicators I am using in my EA is printing text on the chart, is it possible to automatically remove such text ? I do not have the mq4 file for that indicator.
Any help is appreciated!
regards,
salexes