---
id: "T:cAlgo.API.RelativeTakeProfitProtections"
kind: "record"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/"
---

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

# RelativeTakeProfitProtections (record)

Represents a ladder of up to four partial take profits at distances (in pips) from the entry price, followed by a final take profit that closes any remaining volume.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public class RelativeTakeProfitProtections
```

Available since cAlgo.API 5.8.

## Examples

C#:

```csharp
var takeProfits = new RelativeTakeProfitProtections(
    new RelativeTakeProfitProtection(10000, 20),
    new RelativeTakeProfitProtection(10000, 35),
    new RelativeTakeProfitLastProtection(50));
var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, 30000, "myLabel", new RelativeStopLossProtection(25), takeProfits);
if (result.IsSuccessful)
    Print("Position {0} opened with a three level take profit ladder", result.Position.Id);
```

Python:

```python
takeProfits = RelativeTakeProfitProtections(
    RelativeTakeProfitProtection(10000, 20),
    RelativeTakeProfitProtection(10000, 35),
    RelativeTakeProfitLastProtection(50))
result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 30000, "myLabel", RelativeStopLossProtection(25), takeProfits)
if result.IsSuccessful:
    api.Print(f"Position {result.Position.Id} opened with a three level take profit ladder")
```

## Constructors

- `public RelativeTakeProfitProtections(RelativeTakeProfitLastProtection lastTakeProfit)` — Initializes a new instance with only a final take profit. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md)
- `public RelativeTakeProfitProtections(RelativeTakeProfitProtection firstTakeProfit, RelativeTakeProfitLastProtection lastTakeProfit)` — Initializes a new instance with one partial take profit and a final take profit. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md)
- `public RelativeTakeProfitProtections(RelativeTakeProfitProtection firstTakeProfit, RelativeTakeProfitProtection secondTakeProfit, RelativeTakeProfitLastProtection lastTakeProfit)` — Initializes a new instance with two partial take profits and a final take profit. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md)
- `public RelativeTakeProfitProtections(RelativeTakeProfitProtection firstTakeProfit, RelativeTakeProfitProtection secondTakeProfit, RelativeTakeProfitProtection thirdTakeProfit, RelativeTakeProfitLastProtection lastTakeProfit)` — Initializes a new instance with three partial take profits and a final take profit. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md)
- `public RelativeTakeProfitProtections(RelativeTakeProfitProtection firstTakeProfit, RelativeTakeProfitProtection secondTakeProfit, RelativeTakeProfitProtection thirdTakeProfit, RelativeTakeProfitProtection fourthTakeProfit, RelativeTakeProfitLastProtection lastTakeProfit)` — Initializes a new instance with four partial take profits and a final take profit. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md)
- `public RelativeTakeProfitProtections(RelativeTakeProfitProtections original)` —  [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/Constructor/index.md)

## Properties

- `public RelativeTakeProfitProtection FirstTakeProfit {get;}` — Gets the first partial take profit, if any. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/FirstTakeProfit/index.md)
- `public RelativeTakeProfitProtection FourthTakeProfit {get;}` — Gets the fourth partial take profit, if any. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/FourthTakeProfit/index.md)
- `public RelativeTakeProfitLastProtection LastTakeProfit {get;}` — Gets the final take profit that closes the remaining volume. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/LastTakeProfit/index.md)
- `public RelativeTakeProfitProtection SecondTakeProfit {get;}` — Gets the second partial take profit, if any. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/SecondTakeProfit/index.md)
- `public RelativeTakeProfitProtection ThirdTakeProfit {get;}` — Gets the third partial take profit, if any. [details](https://help.ctrader.com/ctrader-algo/references/Trading/RelativeTakeProfitProtections/ThirdTakeProfit/index.md)

