Skip to content

CustomSymbol.BaseAsset

property · CustomSymbol · cAlgo.API Since 5.3

DesktopCLICloud

Gets / sets the symbol base asset.

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

Asset BaseAsset {get; set;}
customSymbol.BaseAsset: Asset

Returns Asset

Examples

var customSymbol = CustomSymbols.Add("MYEURUSD", Symbols.GetSymbol("EURUSD"));
customSymbol.BaseAsset = Assets.GetAsset("EUR");
Print("Base asset: {0}", customSymbol.BaseAsset.Name);
customSymbol = api.CustomSymbols.Add("MYEURUSD", api.Symbols.GetSymbol("EURUSD"))
customSymbol.BaseAsset = api.Assets.GetAsset("EUR")
api.Print(f"Base asset: {customSymbol.BaseAsset.Name}")