Skip to content

CustomSymbolSentiment.BuyPercentage

property · CustomSymbolSentiment · cAlgo.API Since 5.3

DesktopCLICloud

Gets / sets buy percentage.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

double BuyPercentage {get; set;}
customSymbolSentiment.BuyPercentage: float

Returns double

Examples

var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.Sentiment.BuyPercentage = 55;
Print("Buy percentage: {0}", customSymbol.Sentiment.BuyPercentage);
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.Sentiment.BuyPercentage = 55
api.Print(f"Buy percentage: {customSymbol.Sentiment.BuyPercentage}")