---
id: "P:cAlgo.API.Indicator.LastResult"
kind: "property"
type: "T:cAlgo.API.Indicator"
url: "https://help.ctrader.com/ctrader-algo/references/General/Indicator/LastResult/"
---

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

# Indicator.LastResult

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

## LastResult

The latest trade result

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public TradeResult LastResult {get;}
```

Python:

```python
api.LastResult: TradeResult
```

### Returns

`TradeResult` — 

### Examples

C#:

```csharp
if (!IsLastBar)
    return;
ExecuteMarketOrder(TradeType.Buy, SymbolName, 10000, "myLabel");
if (LastResult.IsSuccessful)
    Print("Position opened at {0}", LastResult.Position.EntryPrice);
else
    Print("Order failed: {0}", LastResult.Error);
```

Python:

```python
def calculate(self, index):
    if not api.IsLastBar:
        return
    api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, 10000, "myLabel")
    if api.LastResult.IsSuccessful:
        api.Print(f"Position opened at {api.LastResult.Position.EntryPrice}")
    else:
        api.Print(f"Order failed: {api.LastResult.Error}")
```

