---
id: "P:cAlgo.API.CustomSymbolTradingSession.EndTime"
kind: "property"
type: "T:cAlgo.API.CustomSymbolTradingSession"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/EndTime/"
---

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

# CustomSymbolTradingSession.EndTime

Member of [CustomSymbolTradingSession](https://help.ctrader.com/ctrader-algo/references/Plugin/Symbol/Custom/CustomSymbolTradingSession/index.md).

## EndTime

Time when trading session ends

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

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
public TimeSpan EndTime {get;}
```

Python:

```python
customSymbolTradingSession.EndTime: TimeSpan
```

### Returns

`TimeSpan` — 

Available since cAlgo.API 5.3.

### Examples

C#:

```csharp
var session = new CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17));
Print("Session closes at {0}", session.EndTime);
```

Python:

```python
from System import DayOfWeek, TimeSpan
session = CustomSymbolTradingSession(DayOfWeek.Monday, DayOfWeek.Friday, TimeSpan.FromHours(8), TimeSpan.FromHours(17))
api.Print(f"Session closes at {session.EndTime}")
```

