---
id: "M:cAlgo.API.Polyline.#ctor"
kind: "constructor"
type: "T:cAlgo.API.Polyline"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/Constructor/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Polyline constructor

Member of [Polyline](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/index.md).

## Polyline()

Initializes a new instance of the [`Polyline`](https://help.ctrader.com/ctrader-algo/references/Controls/Layout/Shapes/Polyline/index.md) class.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public Polyline()
```

Python:

```python
Polyline()
```

### Examples

C#:

```csharp
var polyline = new Polyline { StrokeColor = Color.Cyan, StrokeThickness = 2 };
polyline.Points = new[] { new Point(0, 80), new Point(40, 20), new Point(80, 60), new Point(120, 0) };
Chart.AddControl(polyline);
```

Python:

```python
polyline = Polyline()
polyline.StrokeColor = Color.Cyan
polyline.StrokeThickness = 2
polyline.Points = [Point(0, 80), Point(40, 20), Point(80, 60), Point(120, 0)]
api.Chart.AddControl(polyline)
```

