ChartText.Text
property · ChartText · cAlgo.API
DesktopCLICloud
Gets or sets the text content.
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
string Text {get; set;}
chartText.Text: str
Returns string
Examples
var text = Chart.DrawText("label", "High", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);
text.Text = "High: " + Bars.HighPrices.LastValue;
Print("Text content: {0}", text.Text);
text = api.Chart.DrawText("label", "High", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)
text.Text = f"High: {api.Bars.HighPrices.LastValue}"
api.Print(f"Text content: {text.Text}")