Symbol.Sentiment
property · Symbol · cAlgo.API.Internals Since 5.3
DesktopCLICloud
Gets symbol sentiment.
Environment behaviour
Cloud — not supported. No sentiment source in the cloud host; reading the returned values blocks up to 1 minute, then fails with a timeout.
Definition
SymbolSentiment Sentiment {get;}
api.Symbol.Sentiment: SymbolSentiment
Returns SymbolSentiment
Examples
using cAlgo.API;
namespace cAlgo.Robots;
public partial class TestExample : Robot
{
protected override void OnStart()
{
Print($"Symbol {SymbolName} traders sentiment Buy Percentage: {Symbol.Sentiment.BuyPercentage} and Sell Percentage: {Symbol.Sentiment.SellPercentage}");
}
}
import clr
clr.AddReference("cAlgo.API")
# Import cAlgo API types
from cAlgo.API import *
# Import trading wrapper functions
from robot_wrapper import *
class Test():
def on_start(self):
print(f"Symbol {api.SymbolName} traders sentiment Buy Percentage: {api.Symbol.Sentiment.BuyPercentage} and Sell Percentage: {api.Symbol.Sentiment.SellPercentage}")
{
"AccessRights": "None"
}