SymbolSentiment.BuyPercentage
property · SymbolSentiment · cAlgo.API Since 5.3
DesktopCLICloud
Gets buy percentage if available otherwise 0.
Environment behaviour
Cloud — not supported. Reading BuyPercentage/SellPercentage or subscribing Updated blocks the cBot up to 1 minute, then fails with a wait-timeout error.
Definition
double BuyPercentage {get;}
symbolSentiment.BuyPercentage: float
Returns double
Examples
if (Symbol.Sentiment.BuyPercentage > 70)
Print("{0}% of traders are buying {1}", Symbol.Sentiment.BuyPercentage, SymbolName);
if api.Symbol.Sentiment.BuyPercentage > 70:
api.Print(f"{api.Symbol.Sentiment.BuyPercentage}% of traders are buying {api.SymbolName}")