Skip to content

Plugin.Symbols

property · Plugin · cAlgo.API

DesktopCLICloud

Gets the symbol names.

Environment behaviour

CLI — not supported. Plugins cannot run in the CLI: ctrader-cli runs cBots only.

Cloud — not supported. Plugins cannot run in the cloud: it runs cBots only.

Definition

public Symbols Symbols {get;}
api.Symbols: Symbols

Returns Symbols

Examples

var symbol = Symbols.GetSymbol("EURUSD");
if (symbol != null)
    Print("{0} bid: {1}, ask: {2}", symbol.Name, symbol.Bid, symbol.Ask);
Print("Available symbols: {0}", Symbols.Count);
symbol = api.Symbols.GetSymbol("EURUSD")
if symbol is not None:
    api.Print(f"{symbol.Name} bid: {symbol.Bid}, ask: {symbol.Ask}")
api.Print(f"Available symbols: {api.Symbols.Count}")