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

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

# ChartGannBox (interface)

Represents the Gann Box chart object.

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 ChartGannBox
```

Available since cAlgo.API 5.7.

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo
{
    // This sample shows how to use Chart.DrawGannBox method to draw a Gann Box
    public partial class GannBoxSample : Indicator
    {
        protected override void Initialize()
        {
            Chart.DrawGannBox("GannBox", Chart.FirstVisibleBarIndex, Bars.ClosePrices[Chart.FirstVisibleBarIndex], Chart.LastVisibleBarIndex, Bars.ClosePrices[Chart.LastVisibleBarIndex], Color.Blue);
        }

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

Python:

```python
gannBox = api.Chart.DrawGannBox("GannBox", api.Chart.FirstVisibleBarIndex, api.Bars.ClosePrices[api.Chart.FirstVisibleBarIndex], api.Chart.LastVisibleBarIndex, api.Bars.ClosePrices[api.Chart.LastVisibleBarIndex], Color.Blue)
gannBox.IsInteractive = True
```

config.json:

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

## Inherited members

- `IReadonlyList<GannLevel> GannLevels {get;}` (from ChartGannBase) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/GannLevels/index.md)
- `bool DisplayPrices {get; set;}` (from ChartGannBase) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/DisplayPrices/index.md)
- `int Thickness {get; set;}` (from ChartGannBase) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Thickness/index.md)
- `Color Color {get; set;}` (from ChartGannBase) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Color/index.md)
- `LineStyle LineStyle {get; set;}` (from ChartGannBase) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/LineStyle/index.md)
- `DateTime Time1 {get; set;}` (from ChartGannBase) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Time1/index.md)
- `DateTime Time2 {get; set;}` (from ChartGannBase) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Time2/index.md)
- `double Y1 {get; set;}` (from ChartGannBase) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Y1/index.md)
- `double Y2 {get; set;}` (from ChartGannBase) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/ChartGannBase/Y2/index.md)
- `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)

