Table of Contents

Struct CandleSeriesInstrument

Namespace
ATAS.Indicators
Assembly
ATAS.Indicators.dll

Identifies an instrument for a candle series request. Provide any one of the keys; they are tried most-specific first: ContractId, SecurityId, Code + Exchange, then Code alone. A plain string converts implicitly to a code-only descriptor.

Added in ATAS 8.0.15.

public readonly struct CandleSeriesInstrument
Extension Methods

Properties

Code

Instrument code (ticker), e.g. "ESU6" or "BTCUSDT".

[Browsable(false)]
public string? Code { get; init; }

Property Value

string

ContractId

Platform contract id, when known - the most precise key.

[Browsable(false)]
public long? ContractId { get; init; }

Property Value

long?

Exchange

Exchange of Code; narrows the code lookup.

[Browsable(false)]
public string? Exchange { get; init; }

Property Value

string

IsEmpty

True when no key is provided (the chart's instrument is used).

[Browsable(false)]
public bool IsEmpty { get; }

Property Value

bool

SecurityId

Connector-level security id, when known.

[Browsable(false)]
public string? SecurityId { get; init; }

Property Value

string

Methods

Equals(CandleSeriesInstrument)

public bool Equals(CandleSeriesInstrument other)

Parameters

other CandleSeriesInstrument

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

Returns a short description of the instrument key for logs and display.

public override string ToString()

Returns

string

Code or Code@Exchange when a code is set; otherwise the SecurityId, then the ContractId; <chart> when no key is set.

Operators

operator ==(CandleSeriesInstrument, CandleSeriesInstrument)

public static bool operator ==(CandleSeriesInstrument left, CandleSeriesInstrument right)

Parameters

left CandleSeriesInstrument
right CandleSeriesInstrument

Returns

bool

implicit operator CandleSeriesInstrument(string?)

Converts an instrument code into a descriptor with only Code set.

public static implicit operator CandleSeriesInstrument(string? code)

Parameters

code string

The instrument code (ticker); null or blank gives an empty descriptor (the chart's instrument).

Returns

CandleSeriesInstrument

operator !=(CandleSeriesInstrument, CandleSeriesInstrument)

public static bool operator !=(CandleSeriesInstrument left, CandleSeriesInstrument right)

Parameters

left CandleSeriesInstrument
right CandleSeriesInstrument

Returns

bool