Table of Contents

Struct PriceUnit

Namespace
ATAS.DataFeedsCore
Assembly
ATAS.DataFeedsCore.dll

A price distance (for example a stop-loss or take-profit offset) together with its unit. The default value is a zero Price distance.

public readonly struct PriceUnit
Extension Methods

Constructors

PriceUnit(decimal, PriceUnitTypes)

Initializes a distance.

public PriceUnit(decimal value, PriceUnitTypes type)

Parameters

value decimal

The distance, in the units of type.

type PriceUnitTypes

The unit.

Properties

Type

Gets the unit of Value.

public PriceUnitTypes Type { get; init; }

Property Value

PriceUnitTypes

Value

Gets the distance, in the units of Type.

public decimal Value { get; init; }

Property Value

decimal

Methods

ToString()

Returns the value followed by the unit suffix: none for a price, T for ticks, % for percent and $ for money.

public override string ToString()

Returns

string

The text, for example 10T.

Exceptions

ArgumentOutOfRangeException

Type is not a defined unit.