---
id: "T:cAlgo.API.HistoricalOrderType"
kind: "enum"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/HistoricalOrders/HistoricalOrderType/"
---

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

# HistoricalOrderType (enum)

Represents the type of HistoricalOrder.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public enum HistoricalOrderType
```

Available since cAlgo.API 5.1.

## Examples

C#:

```csharp
var stopOuts = HistoricalOrders.Count(order => order.OrderType == HistoricalOrderType.StopOut);
var protectionOrders = HistoricalOrders.Count(order => order.OrderType == HistoricalOrderType.StopLossTakeProfit);
Print("Stop out orders: {0}, stop loss / take profit orders: {1}", stopOuts, protectionOrders);
```

Python:

```python
stopOuts = len([order for order in api.HistoricalOrders if order.OrderType == HistoricalOrderType.StopOut])
protectionOrders = len([order for order in api.HistoricalOrders if order.OrderType == HistoricalOrderType.StopLossTakeProfit])
api.Print(f"Stop out orders: {stopOuts}, stop loss / take profit orders: {protectionOrders}")
```

## Values

- `HistoricalOrderType.Limit` — Limit order
- `HistoricalOrderType.Market` — Market order
- `HistoricalOrderType.MarketRange` — Market Range order
- `HistoricalOrderType.MarketOnOpen` — Market on open order
- `HistoricalOrderType.Stop` — Stop order
- `HistoricalOrderType.StopOut` — Stop out order
- `HistoricalOrderType.StopLimit` — Stop limit order
- `HistoricalOrderType.StopLossTakeProfit` — Stop Loss / Take Profit order

