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

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

# AbsoluteTakeProfitProtection (record)

Represents a partial take profit closing a portion of the order volume at an absolute price.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public class AbsoluteTakeProfitProtection
```

Available since cAlgo.API 5.8.

## Examples

C#:

```csharp
var position = Positions.Find("myLabel");
if (position != null && position.TradeType == TradeType.Buy)
{
    var pipSize = position.Symbol.PipSize;
    var halfVolume = position.Symbol.NormalizeVolumeInUnits(position.VolumeInUnits / 2, RoundingMode.Down);
    var firstTakeProfit = new AbsoluteTakeProfitProtection(halfVolume, position.EntryPrice + 20 * pipSize);
    var takeProfits = new AbsoluteTakeProfitProtections(firstTakeProfit, new AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize));
    Print("Take profit ladder set: {0}", position.ModifyTakeProfit(takeProfits).IsSuccessful);
}
```

Python:

```python
position = api.Positions.Find("myLabel")
if position is not None and position.TradeType == TradeType.Buy:
    pipSize = position.Symbol.PipSize
    halfVolume = position.Symbol.NormalizeVolumeInUnits(position.VolumeInUnits / 2, RoundingMode.Down)
    firstTakeProfit = AbsoluteTakeProfitProtection(halfVolume, position.EntryPrice + 20 * pipSize)
    takeProfits = AbsoluteTakeProfitProtections(firstTakeProfit, AbsoluteTakeProfitLastProtection(position.EntryPrice + 40 * pipSize))
    api.Print(f"Take profit ladder set: {position.ModifyTakeProfit(takeProfits).IsSuccessful}")
```

## Constructors

- `public AbsoluteTakeProfitProtection(double Volume, double Price)` — Represents a partial take profit closing a portion of the order volume at an absolute price. [details](https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Constructor/index.md)
- `public AbsoluteTakeProfitProtection(AbsoluteTakeProfitProtection original)` —  [details](https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Constructor/index.md)

## Properties

- `public double Price {get; set;}` — The absolute price at which the take profit is triggered. [details](https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Price/index.md)
- `public double Volume {get; set;}` — The portion of the order volume to close when the take profit is triggered. [details](https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitProtection/Volume/index.md)

