---
id: "M:cAlgo.API.PendingOrder.ModifyTakeProfitPips(System.Nullable{System.Double})"
kind: "method"
type: "T:cAlgo.API.PendingOrder"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/Orders/PendingOrder/ModifyTakeProfitPips/"
---

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

# PendingOrder.ModifyTakeProfitPips

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

## ModifyTakeProfitPips(double? takeProfitPips)

Shortcut for Robot.ModifyPendingOrder method to change Take Profit

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
TradeResult ModifyTakeProfitPips(double? takeProfitPips)
```

Python:

```python
pendingOrder.ModifyTakeProfitPips(takeProfitPips: float | None) -> TradeResult
```

### Parameters

- `takeProfitPips` (`double?`, Python `float | None`): New Take Profit value in Pips

### Returns

`TradeResult` — 

### Examples

C#:

```csharp
foreach (var order in PendingOrders)
{
    var result = order.ModifyTakeProfitPips(30);
    Print("Order {0} take profit modified: {1}", order.Id, result.IsSuccessful);
}
```

Python:

```python
for order in api.PendingOrders:
    result = order.ModifyTakeProfitPips(30)
    api.Print(f"Order {order.Id} take profit modified: {result.IsSuccessful}")
```

