Need some help with indicators

 

Hi to all,

in my EA, in the OnInit I attach the indiactor in this way:

int OnInit()
  {
handle_RenkAdv[i]=iCustom(symbols[i],IndicatorPeriod_M1,"::Indicators\\RenkoAdv.ex5",param1);
}

along the time I need to change the value of the Param1. I was thinking to delete the indicator and attach again with the new value.
How can I do that?

 
You can make this param1 as input. But if you want to change the param1 when the script is running then you have to make condition then create new handle for new param1.
 

I would like to remove the indicator and applying again.
So I use:

IndicatorRelease(handle_RenkAdv[i]);
handle_RenkAdv[i]=iCustom(symbols[i],PERIOD_H1,"::Indicators\\RenkoAdv.ex5",renkoType,BoxTick,2,1,5,1,40,1,true,0,0,2,false,symbols[i],"pre");

but it seems not working. 
It is true the IndicatoRelease does not work in strategy manager, so how should I deal with it?

 
Marco Montemari #: I would like to remove the indicator and applying again.

ICustom does not remove anything because it doesn't add anything to the chart.

Code has no eyes; they don't need to see the indicator on the chart, just the values. If you want to see it, you add it to the appropriate chart.

 
William Roeder #:

ICustom does not remove anything because it doesn't add anything to the chart.

Code has no eyes; they don't need to see the indicator on the chart, just the values. If you want to see it, you add it to the appropriate chart.

Sorry, probably I was not clear: I do not care to see it.
I want that at a certain time, I want to remove the indicator and load it again with new parameters.
Probably in the EA my code works, ( I am just testing it) but in the strategy manager it does not. (  When working in the strategy tester, the IndicatorRelease() function is not executed.) So I was asking how to deal with this problem in the strategy manager.

 
Marco Montemari #: I want that at a certain time, I want to remove the indicator and load it again with new parameter
You are already doing that with iCustom.
Reason: