Script to apply an indicator

 

Hi,

How does one write a script that can apply an indicator onto a chart.

I can set the initial parameters of the indicator from the script.

Is this even possible ?

Thanks.

 
You can try creating a template with the indicator applied, then use ChartApplyTemplate()

However, it is going to lose everything else that you already have on the chart that isn't included in the template 
Reason: