---
id: "T:cAlgo.API.ChartEquidistantChannel"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/"
---

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

# ChartEquidistantChannel (interface)

Represents the Equidistant Channel chart object. The tool that allows drawing two precisely parallel lines in any direction on the chart.

Environments: Desktop supported · CLI works differently · Cloud works differently.

- CLI: Created and kept with all its properties, but never drawn: the CLI displays no chart.
- Cloud: Created and kept with all its properties, but never drawn: the cloud displays no chart.

## Definition

```csharp
public interface ChartEquidistantChannel
```

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo
{
    // A sample indicator for showing how to use Chart.DrawEquidistantChannel method
    public partial class EquidistantChannelSample : Indicator
    {
        protected override void Initialize()
        {
            var channel = Chart.DrawEquidistantChannel("EquidistantChannel", Chart.FirstVisibleBarIndex, Bars.LowPrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.HighPrices[Chart.LastVisibleBarIndex], 20 * Symbol.PipSize, Color.Red);

            channel.IsInteractive = true;
        }

        public override void Calculate(int index)
        {
        }
    }
}
```

Python:

```python
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        channel = api.Chart.DrawEquidistantChannel("EquidistantChannel", api.Chart.FirstVisibleBarIndex, api.Bars.LowPrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.HighPrices[api.Chart.LastVisibleBarIndex], 20 * api.Symbol.PipSize, Color.Red)
        channel.IsInteractive = True
```

config.json:

```json
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}
```

## Methods

- `double CalculateY(int barIndex)` — Calculates Y-axis value corresponding the specified bar index. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/CalculateY/index.md)
- `double CalculateY(DateTime time)` — Calculates Y-axis value corresponding the specified time value. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/CalculateY/index.md)

## Properties

- `double ChannelHeight {get; set;}` — Gets or sets the height of the Equidistant Channel. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/ChannelHeight/index.md)
- `Color Color {get; set;}` — Gets or sets the Equidistant Channel line color. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Color/index.md)
- `bool ExtendToInfinity {get; set;}` — Defines if the Equidistant channel extends to infinity. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/ExtendToInfinity/index.md)
- `LineStyle LineStyle {get; set;}` — Gets or sets the Equidistant channel line style. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/LineStyle/index.md)
- `bool ShowAngle {get; set;}` — Gets or sets the Equidistant Channel angle. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/ShowAngle/index.md)
- `int Thickness {get; set;}` — Gets or sets the Equidistant Channel line thickness. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Thickness/index.md)
- `DateTime Time1 {get; set;}` — Gets or sets the value 1 on the Time line. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Time1/index.md)
- `DateTime Time2 {get; set;}` — Gets or sets the value 2 on the Time line. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Time2/index.md)
- `double Y1 {get; set;}` — Gets or sets the value 1 on the Y-axis. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Y1/index.md)
- `double Y2 {get; set;}` — Gets or sets the value 2 on the Y-axis. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartEquidistantChannel/Y2/index.md)

## Inherited members

- `string Name {get;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Name/index.md)
- `string Comment {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Comment/index.md)
- `ChartObjectType ObjectType {get;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ObjectType/index.md)
- `bool IsInteractive {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsInteractive/index.md)
- `bool IsLocked {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsLocked/index.md)
- `bool IsHidden {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsHidden/index.md)
- `int ZIndex {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ZIndex/index.md)
- `bool IsAlive {get;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsAlive/index.md)

