Skip to content

ChartTemplateIndicators.Remove

method · ChartTemplateIndicators · cAlgo.API Since 5.6

DesktopCLICloud

Removes an indicator from a chart template.

Environment behaviour

Cloud — not supported. Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.Indicators).

Definition

bool Remove(ChartTemplateIndicator chartTemplateIndicator)
chartTemplateIndicators.Remove(chartTemplateIndicator: ChartTemplateIndicator) -> bool

Parameters

Name C# type Python type Description
chartTemplateIndicator ChartTemplateIndicator ChartTemplateIndicator The ChartTemplateIndicator to be removed from a chart template.

Returns bool — True if remove was successful otherwise false.

Examples

var template = ChartTemplates.Get("My Template");
var indicator = template?.Indicators.FirstOrDefault();
if (indicator != null)
    Print("Indicator removed from the template: {0}", template.Indicators.Remove(indicator));
template = api.ChartTemplates.Get("My Template")
if template is not None and template.Indicators.Count > 0:
    indicator = list(template.Indicators)[0]
    api.Print(f"Indicator removed from the template: {template.Indicators.Remove(indicator)}")