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

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

# PendingOrder.RelativeTakeProfitProtections

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

## RelativeTakeProfitProtections

The relative take profit protections of the order. Null if order has no take profit.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
RelativeTakeProfitProtections RelativeTakeProfitProtections {get;}
```

Python:

```python
pendingOrder.RelativeTakeProfitProtections: RelativeTakeProfitProtections
```

### Returns

`RelativeTakeProfitProtections` — 

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
var takeProfits = new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(10000, 20), new RelativeTakeProfitLastProtection(40));
var result = PlaceLimitOrder(TradeType.Buy, SymbolName, 30000, Symbol.Bid - 20 * Symbol.PipSize, "myLabel", new RelativeStopLossProtection(20), takeProfits);
if (result.IsSuccessful && result.PendingOrder.RelativeTakeProfitProtections != null)
    Print("Last take profit distance: {0} pips", result.PendingOrder.RelativeTakeProfitProtections.LastTakeProfit.Distance);
```

Python:

```python
takeProfits = RelativeTakeProfitProtections(RelativeTakeProfitProtection(10000, 20), RelativeTakeProfitLastProtection(40))
result = api.PlaceLimitOrder(TradeType.Buy, api.SymbolName, 30000, api.Symbol.Bid - 20 * api.Symbol.PipSize, "myLabel", RelativeStopLossProtection(20), takeProfits)
if result.IsSuccessful and result.PendingOrder.RelativeTakeProfitProtections is not None:
    api.Print(f"Last take profit distance: {result.PendingOrder.RelativeTakeProfitProtections.LastTakeProfit.Distance} pips")
```

