Skip to content

Chart.SetBarOutlineColor

method · Chart · cAlgo.API

DesktopCLICloud

Sets the outline color of the bar at the specified bar index.

Environment behaviour

CLI — works differently. Applied to a chart that is never displayed in the CLI; no visual effect.

Cloud — not supported. Does nothing: the cloud host ignores bar colour changes.

Definition

void SetBarOutlineColor(long barIndex, Color color)
api.Chart.SetBarOutlineColor(barIndex: int, color: Color) -> None

Parameters

Name C# type Python type Description
barIndex long int The bar index number
color Color Color The color for bar outline

Examples

var index = Bars.Count - 1;
Chart.SetBarOutlineColor(index, Color.White);
Print("Outline color of bar {0} changed", index);
index = api.Bars.Count - 1
api.Chart.SetBarOutlineColor(index, Color.White)
api.Print(f"Outline color of bar {index} changed")