ChartShape
interface cAlgo.API
DesktopCLICloud
Represents the Shape chart object. Allows drawing a Rectangle, a Triangle, and an Ellipse on the chart.
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
public interface ChartShape
Namespace: cAlgo.API · Group: Shapes · Implements: ChartObject
Examples
ChartShape shape = Chart.DrawRectangle("zone", Bars.OpenTimes.Last(20), Bars.LowPrices.Last(20), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.FromArgb(60, Color.Blue));
shape.IsFilled = true;
shape.LineStyle = LineStyle.Dots;
Print("Shape: {0} | Filled: {1}", shape.Name, shape.IsFilled);
shape = api.Chart.DrawRectangle("zone", api.Bars.OpenTimes.Last(20), api.Bars.LowPrices.Last(20), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.FromArgb(60, Color.Blue))
shape.IsFilled = True
shape.LineStyle = LineStyle.Dots
api.Print(f"Shape: {shape.Name} | Filled: {shape.IsFilled}")
Properties
| Name | Description |
|---|---|
ColorDesktopCLICloudColor | Gets or sets the line color. |
IsFilledDesktopCLICloudbool | Defines if the shape is filled. |
LineStyleDesktopCLICloudLineStyle | Gets or sets the line style. |
ThicknessDesktopCLICloudint | Gets or sets the line thickness. |
Inherited members
From ChartObject: Name, Comment, ObjectType, IsInteractive, IsLocked, IsHidden, ZIndex, IsAlive