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

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

# AbsoluteTakeProfitLastProtection (record)

Represents the final take profit in an absolute take profit ladder, closing any remaining order volume at a specified price.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public class AbsoluteTakeProfitLastProtection
```

Available since cAlgo.API 5.8.

## Examples

C#:

```csharp
var position = Positions.Find("myLabel");
if (position != null && position.TradeType == TradeType.Buy)
{
    var targetPrice = position.EntryPrice + 50 * position.Symbol.PipSize;
    var result = position.ModifyTakeProfit(new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitLastProtection(targetPrice)));
    Print("Take profit set at {0}: {1}", targetPrice, result.IsSuccessful);
}
```

Python:

```python
position = api.Positions.Find("myLabel")
if position is not None and position.TradeType == TradeType.Buy:
    targetPrice = position.EntryPrice + 50 * position.Symbol.PipSize
    result = position.ModifyTakeProfit(AbsoluteTakeProfitProtections(AbsoluteTakeProfitLastProtection(targetPrice)))
    api.Print(f"Take profit set at {targetPrice}: {result.IsSuccessful}")
```

## Constructors

- `public AbsoluteTakeProfitLastProtection(double Price)` — Represents the final take profit in an absolute take profit ladder, closing any remaining order volume at a specified price. [details](https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/Constructor/index.md)
- `public AbsoluteTakeProfitLastProtection(AbsoluteTakeProfitLastProtection original)` —  [details](https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/Constructor/index.md)

## Properties

- `public double Price {get; set;}` — The absolute price at which the remaining volume is closed. [details](https://help.ctrader.com/ctrader-algo/references/Trading/AbsoluteTakeProfitLastProtection/Price/index.md)

