Skip to content

ChartStaticText.Color

property · ChartStaticText · cAlgo.API

DesktopCLICloud

Gets or sets the chart static text color.

Environment behaviour

CLI — works differently. Created and kept with all its properties, but never drawn: the CLI displays no chart.

Cloud — works differently. Created and kept with all its properties, but never drawn: the cloud displays no chart.

Definition

Color Color {get; set;}
chartStaticText.Color: Color

Returns Color

Examples

var text = Chart.DrawStaticText("info", "Spread: " + Symbol.Spread / Symbol.PipSize, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);
text.Color = Color.Yellow;
Print("Static text color: {0}", text.Color);
text = api.Chart.DrawStaticText("info", f"Spread: {api.Symbol.Spread / api.Symbol.PipSize}", VerticalAlignment.Top, HorizontalAlignment.Right, Color.White)
text.Color = Color.Yellow
api.Print(f"Static text color: {text.Color}")