Skip to content

SymbolSentimentUpdatedEventArgs

class cAlgo.API Since 5.3

DesktopCLICloud

Provides data for the price alert added event.

Environment behaviour

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

Definition

public class SymbolSentimentUpdatedEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

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);
}
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

Name Description
SentimentDesktopCLICloudSymbolSentiment Gets sentiment.
SymbolNameDesktopCLICloudstring Gets symbol name.

See also