---
id: "T:cAlgo.API.SymbolSentimentUpdatedEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/"
---

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

# SymbolSentimentUpdatedEventArgs (class)

Provides data for the price alert added event.

Environments: Desktop supported · CLI supported · Cloud not supported.

- Cloud: Never raised in the cloud: the events that pass it never fire there (SymbolSentiment.Updated).

## Definition

```csharp
public class SymbolSentimentUpdatedEventArgs
```

Available since cAlgo.API 5.3.

## Examples

C#:

```csharp
protected override void OnStart()
{
    if (Symbol.Sentiment != null)
        Symbol.Sentiment.Updated += OnSentimentUpdated;
}

private void OnSentimentUpdated(SymbolSentimentUpdatedEventArgs args)
{
    Print("{0} sentiment | Buy: {1}% | Sell: {2}%", args.SymbolName, args.Sentiment.BuyPercentage, args.Sentiment.SellPercentage);
}
```

Python:

```python
def on_start(self):
    if api.Symbol.Sentiment is not None:
        api.Symbol.Sentiment.Updated += self.on_sentiment_updated

def on_sentiment_updated(self, args):
    api.Print(f"{args.SymbolName} sentiment | Buy: {args.Sentiment.BuyPercentage}% | Sell: {args.Sentiment.SellPercentage}%")
```

## Properties

- `public SymbolSentiment Sentiment {get;}` — Gets sentiment. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/Sentiment/index.md)
- `public string SymbolName {get;}` — Gets symbol name. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/SymbolSentimentUpdatedEventArgs/SymbolName/index.md)

