---
id: "P:cAlgo.API.PendingOrder.DistancePips"
kind: "property"
type: "T:cAlgo.API.PendingOrder"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/DistancePips/"
---

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

# PendingOrder.DistancePips

Member of [PendingOrder](https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/index.md).

## DistancePips

Gets the distance in pips between the current price of the symbol and the target price of the pending order (via `TargetPrice`).

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
double DistancePips {get;}
```

Python:

```python
pendingOrder.DistancePips: float
```

### Returns

`double` — 

### Examples

C#:

```csharp
foreach (var order in PendingOrders.Where(pendingOrder => pendingOrder.DistancePips > 100).ToArray())
    CancelPendingOrder(order);
```

Python:

```python
for order in [pendingOrder for pendingOrder in api.PendingOrders if pendingOrder.DistancePips > 100]:
    api.CancelPendingOrder(order)
```

