CustomSymbolSentiment
interface cAlgo.API Since 5.3
DesktopCLICloud
Represents a custom symbol sentiment.
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
public interface CustomSymbolSentiment
Namespace: cAlgo.API · Group: Custom
Examples
var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.Sentiment.BuyPercentage = 62;
customSymbol.Sentiment.SellPercentage = 38;
Print("Sentiment: {0}% buy, {1}% sell", customSymbol.Sentiment.BuyPercentage, customSymbol.Sentiment.SellPercentage);
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.Sentiment.BuyPercentage = 62
customSymbol.Sentiment.SellPercentage = 38
api.Print(f"Sentiment: {customSymbol.Sentiment.BuyPercentage}% buy, {customSymbol.Sentiment.SellPercentage}% sell")
Properties
| Name | Description |
|---|---|
BuyPercentageDesktopCLIClouddouble | Gets / sets buy percentage. |
SellPercentageDesktopCLIClouddouble | Gets / sets sell percentage. |