---
id: "P:cAlgo.API.GannLevel.Ratio"
kind: "property"
type: "T:cAlgo.API.GannLevel"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/GannLevel/Ratio/"
---

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

# GannLevel.Ratio

Member of [GannLevel](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/Gann/GannLevel/index.md).

## Ratio

Gets or sets the level ratio (e.g., 1.0 for 1x1, 2.0 for 2x1, 0.5 for 1x2).

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
double Ratio {get; set;}
```

Python:

```python
gannLevel.Ratio: float
```

### Returns

`double` — 

Available since cAlgo.API 5.6.

### Examples

C#:

```csharp
var gannFan = Chart.DrawGannFan("gannFan", Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30), Bars.OpenTimes.LastValue, Bars.HighPrices.LastValue, Color.Blue);
var level = gannFan.GannLevels[0];
level.Ratio = 3;
Print("First Gann level ratio: {0}", level.Ratio);
```

Python:

```python
gannFan = api.Chart.DrawGannFan("gannFan", api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30), api.Bars.OpenTimes.LastValue, api.Bars.HighPrices.LastValue, Color.Blue)
level = gannFan.GannLevels[0]
level.Ratio = 3
api.Print(f"First Gann level ratio: {level.Ratio}")
```

