---
id: "M:cAlgo.API.Indicator.PlaceStopLimitOrderAsync(cAlgo.API.TradeType,System.String,System.Double,System.Double,System.Double,System.Action{cAlgo.API.TradeResult})"
kind: "method"
type: "T:cAlgo.API.Indicator"
url: "https://help.ctrader.com/ctrader-algo/references/General/Indicator/PlaceStopLimitOrderAsync/"
---

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

# Indicator.PlaceStopLimitOrderAsync

Member of [Indicator](https://help.ctrader.com/ctrader-algo/references/General/Indicator/index.md).

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`double?`, Python `float | None`): Stop loss
- `takeProfit` (`double?`, Python `float | None`): Take profit
- `protectionType` (`ProtectionType?`, Python `ProtectionType | None`): Protection type
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`double?`, Python `float | None`): Stop loss
- `takeProfit` (`double?`, Python `float | None`): Take profit
- `protectionType` (`ProtectionType?`, Python `ProtectionType | None`): Protection type
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`double?`, Python `float | None`): Stop loss
- `takeProfit` (`double?`, Python `float | None`): Take profit
- `protectionType` (`ProtectionType?`, Python `ProtectionType | None`): Protection type
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), "order comment", result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), "order comment", lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), "order comment", result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), "order comment", lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), "order comment", new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), "order comment", StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), "order comment", result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), "order comment", lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), "order comment", new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), "order comment", StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`double?`, Python `float | None`): Stop loss
- `takeProfit` (`double?`, Python `float | None`): Take profit
- `protectionType` (`ProtectionType?`, Python `ProtectionType | None`): Protection type
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), "order comment", true, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), "order comment", True, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), "order comment", true, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), "order comment", True, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), "order comment", true, new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), "order comment", True, StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), "order comment", true, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), "order comment", True, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), "order comment", true, new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), "order comment", True, StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`double?`, Python `float | None`): Stop loss
- `takeProfit` (`double?`, Python `float | None`): Take profit
- `protectionType` (`ProtectionType?`, Python `ProtectionType | None`): Protection type
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossTriggerMethod` (`StopTriggerMethod?`, Python `StopTriggerMethod | None`): Trigger method for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), "order comment", true, StopTriggerMethod.Trade, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), "order comment", True, StopTriggerMethod.Trade, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossTriggerMethod` (`StopTriggerMethod?`, Python `StopTriggerMethod | None`): Trigger method for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), "order comment", true, StopTriggerMethod.Trade, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), "order comment", True, StopTriggerMethod.Trade, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossTriggerMethod` (`StopTriggerMethod?`, Python `StopTriggerMethod | None`): Trigger method for position's StopLoss
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), "order comment", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), "order comment", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossTriggerMethod` (`StopTriggerMethod?`, Python `StopTriggerMethod | None`): Trigger method for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), "order comment", true, StopTriggerMethod.Trade, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), "order comment", True, StopTriggerMethod.Trade, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossTriggerMethod` (`StopTriggerMethod?`, Python `StopTriggerMethod | None`): Trigger method for position's StopLoss
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), "order comment", true, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), "order comment", True, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, double? stopLoss, double? takeProfit, ProtectionType? protectionType, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: float | None, takeProfit: float | None, protectionType: ProtectionType | None, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`double?`, Python `float | None`): Stop loss
- `takeProfit` (`double?`, Python `float | None`): Take profit
- `protectionType` (`ProtectionType?`, Python `ProtectionType | None`): Protection type
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossTriggerMethod` (`StopTriggerMethod?`, Python `StopTriggerMethod | None`): Trigger method for position's StopLoss
- `stopOrderTriggerMethod` (`StopTriggerMethod`, Python `StopTriggerMethod`): Determines how pending order will be triggered in case it is a StopLimitOrder
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, Server.Time.AddDays(1), "order comment", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", 10, 20, ProtectionType.Relative, api.Server.Time.AddDays(1), "order comment", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossTriggerMethod` (`StopTriggerMethod?`, Python `StopTriggerMethod | None`): Trigger method for position's StopLoss
- `stopOrderTriggerMethod` (`StopTriggerMethod`, Python `StopTriggerMethod`): Determines how pending order will be triggered in case it is a StopLimitOrder
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), "order comment", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), "order comment", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, RelativeStopLossProtection stopLoss, RelativeTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: RelativeStopLossProtection, takeProfits: RelativeTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`RelativeStopLossProtection`, Python `RelativeStopLossProtection`): Relative Stop loss
- `takeProfits` (`RelativeTakeProfitProtections`, Python `RelativeTakeProfitProtections`): Relative Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossTriggerMethod` (`StopTriggerMethod?`, Python `StopTriggerMethod | None`): Trigger method for position's StopLoss
- `stopOrderTriggerMethod` (`StopTriggerMethod`, Python `StopTriggerMethod`): Determines how pending order will be triggered in case it is a StopLimitOrder
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new RelativeStopLossProtection(10), new RelativeTakeProfitProtections(new RelativeTakeProfitProtection(1000, 10), new RelativeTakeProfitProtection(2000, 20), new RelativeTakeProfitLastProtection(30)), Server.Time.AddDays(1), "order comment", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", RelativeStopLossProtection(10), RelativeTakeProfitProtections(RelativeTakeProfitProtection(1000, 10), RelativeTakeProfitProtection(2000, 20), RelativeTakeProfitLastProtection(30)), api.Server.Time.AddDays(1), "order comment", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossTriggerMethod` (`StopTriggerMethod?`, Python `StopTriggerMethod | None`): Trigger method for position's StopLoss
- `stopOrderTriggerMethod` (`StopTriggerMethod`, Python `StopTriggerMethod`): Determines how pending order will be triggered in case it is a StopLimitOrder
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), "order comment", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), "order comment", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

## PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)

Place Stop Limit order in asynchronous execution mode

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeOperation PlaceStopLimitOrderAsync(TradeType tradeType, string symbolName, double volume, double targetPrice, double stopLimitRangePips, string label, AbsoluteStopLossProtection stopLoss, AbsoluteTakeProfitProtections takeProfits, DateTime? expiration, string comment, bool hasTrailingStop, StopTriggerMethod? stopLossTriggerMethod, StopTriggerMethod stopOrderTriggerMethod, StopLossBreakEven stopLossBreakEven, Action<TradeResult> callback)
```

Python:

```python
api.PlaceStopLimitOrderAsync(tradeType: TradeType, symbolName: str, volume: float, targetPrice: float, stopLimitRangePips: float, label: str, stopLoss: AbsoluteStopLossProtection, takeProfits: AbsoluteTakeProfitProtections, expiration: DateTime | None, comment: str, hasTrailingStop: bool, stopLossTriggerMethod: StopTriggerMethod | None, stopOrderTriggerMethod: StopTriggerMethod, stopLossBreakEven: StopLossBreakEven, callback: Callable[[TradeResult], None]) -> TradeOperation
```

### Parameters

- `tradeType` (`TradeType`, Python `TradeType`): Direction of trade
- `symbolName` (`string`, Python `str`): Symbol name of trade
- `volume` (`double`, Python `float`): Volume (in units) of trade
- `targetPrice` (`double`, Python `float`): Price (or better) at which order is filled
- `stopLimitRangePips` (`double`, Python `float`): Maximum distance for order execution from target price
- `label` (`string`, Python `str`): Label representing the order
- `stopLoss` (`AbsoluteStopLossProtection`, Python `AbsoluteStopLossProtection`): Absolute Stop loss
- `takeProfits` (`AbsoluteTakeProfitProtections`, Python `AbsoluteTakeProfitProtections`): Absolute Take profits
- `expiration` (`DateTime?`, Python `DateTime | None`): Order expiry date and time
- `comment` (`string`, Python `str`): Order comment
- `hasTrailingStop` (`bool`, Python `bool`): Enable/disable TrailingStop for position
- `stopLossTriggerMethod` (`StopTriggerMethod?`, Python `StopTriggerMethod | None`): Trigger method for position's StopLoss
- `stopOrderTriggerMethod` (`StopTriggerMethod`, Python `StopTriggerMethod`): Determines how pending order will be triggered in case it is a StopLimitOrder
- `stopLossBreakEven` (`StopLossBreakEven`, Python `StopLossBreakEven`): Break-even for position's StopLoss
- `callback` (`Action<TradeResult>`, Python `Callable[[TradeResult], None]`): Action when order is placed

### Returns

`TradeOperation` — Trade Operation

Available since cAlgo.API 5.8.

### Examples

C#:

```csharp
PlaceStopLimitOrderAsync(TradeType.Buy, Symbol.Name, 10000, Symbol.Ask, 5, "myLabel", new AbsoluteStopLossProtection(1.0), new AbsoluteTakeProfitProtections(new AbsoluteTakeProfitProtection(1000, 1.05), new AbsoluteTakeProfitProtection(2000, 1.06), new AbsoluteTakeProfitLastProtection(1.07)), Server.Time.AddDays(1), "order comment", true, StopTriggerMethod.Trade, StopTriggerMethod.Trade, new StopLossBreakEven(15, 3), result => Print("Trade operation successful: {0}", result.IsSuccessful));
```

Python:

```python
api.PlaceStopLimitOrderAsync(TradeType.Buy, api.Symbol.Name, 10000, api.Symbol.Ask, 5, "myLabel", AbsoluteStopLossProtection(1.0), AbsoluteTakeProfitProtections(AbsoluteTakeProfitProtection(1000, 1.05), AbsoluteTakeProfitProtection(2000, 1.06), AbsoluteTakeProfitLastProtection(1.07)), api.Server.Time.AddDays(1), "order comment", True, StopTriggerMethod.Trade, StopTriggerMethod.Trade, StopLossBreakEven(15, 3), lambda result: api.Print(f"Trade operation successful: {result.IsSuccessful}"))
```

