ChartText.Angle
property · ChartText · cAlgo.API Since 5.10
DesktopCLICloud
Gets or sets the rotation angle of the text in degrees, measured clockwise around the text anchor point. The text can be fully rotated; any value is accepted and normalized to the 0 to 360 range. The default value is 0, which renders horizontal text.
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
double Angle {get; set;}
chartText.Angle: float
Returns double
Examples
// Draw text and rotate it 45 degrees.
var text = Chart.DrawText("angled", "Trend Line", Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.White);
text.Angle = 45;
import clr
clr.AddReference("cAlgo.API")
from cAlgo.API import *
from robot_wrapper import *
class Test():
def on_start(self):
text = api.Chart.DrawText("angled", "Trend Line", api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.White)
text.Angle = 45