Unit

StockSharp.Messages

Special class, allows to set the value as a percentage, absolute, points and pips values.

Herda de: Equatable<Unit>

Implementa: IOperable<Unit>, IComparable<Unit>, IPersistable, IFormattable

Construtores

Unit(decimal, UnitTypes, Func<UnitTypes, decimal?>)

Create a value of types Point and Step.

value
Value.
type
Measure unit.
getTypeValue
The handler returns a value associated with Type (price or volume steps).
Unit(decimal, UnitTypes)

Create a value of types Absolute and Percent.

value
Value.
type
Measure unit.
Unit(decimal)

Create absolute value Absolute.

value
Value.
Unit()

Create unit.

Propriedades

GetTypeValue : Func<UnitTypes, decimal?>

The handler returns a value associated with Type (price or volume steps).

Type : UnitTypes

Measure unit.

Value : decimal

Value.

Métodos

Abs() : Unit

Make the value positive.

Retorna: Unit

Clone() : Unit

Create a copy of Unit.

Retorna: Copy.

CompareTo(Unit) : int

Compare Unit on the equivalence.

other
Another value with which to compare.

Retorna: The result of the comparison.

Convert(UnitTypes, Func<UnitTypes, decimal?>, bool) : Unit

Cast the value to another type.

destinationType
Destination value type.
getTypeValue
The handler returns a value associated with Type (price or volume steps).
throwException
Throw exception in case of impossible conversion. Otherwise, returns .

Retorna: Converted value.

Convert(UnitTypes) : Unit

Cast the value to another type.

destinationType
Destination value type.

Retorna: Converted value.

Equals(object) : bool

Compare Unit on the equivalence.

other
Another value with which to compare.

Retorna: , if the specified object is equal to the current object, otherwise, .

GetHashCode() : int

Get the hash code of the object Unit.

Retorna: A hash code.

GetTypeSuffix(UnitTypes) : string

Get string suffix.

type
Measure unit.

Retorna: String suffix.

Load(SettingsStorage)

Load settings.

storage
Settings storage.
OnEquals(Unit) : bool

Compare Unit on the equivalence.

other
Another value with which to compare.

Retorna: , if the specified object is equal to the current object, otherwise, .

op_Addition(long, Unit) : Unit

Add the two objects Unit and Int64.

l
First object Int64.
u
Second object Unit.

Retorna: The result of addition.

op_Addition(decimal, Unit) : Unit

Add the two objects Unit and Decimal.

d
First object Decimal.
u
Second object Unit.

Retorna: The result of addition.

op_Addition(Unit, decimal) : Unit

Add the two objects Unit and Decimal.

u
First object Unit.
d
Second object Decimal.

Retorna: The result of addition.

op_Addition(int, Unit) : Unit

Add the two objects Unit and Int32.

i
First object Int32.
u
Second object Unit.

Retorna: The result of addition.

op_Addition(Unit, int) : Unit

Add the two objects Unit and Int32.

u
First object Unit.
i
Second object Int32.

Retorna: The result of addition.

op_Addition(Unit, long) : Unit

Add the two objects Unit and Int64.

u
First object Unit.
l
Second object Int64.

Retorna: The result of addition.

op_Addition(double, Unit) : Unit

Add the two objects Unit and Double.

d
First object Double.
u
Second object Unit.

Retorna: The result of addition.

op_Addition(Unit, double) : Unit

Add the two objects Unit and Double.

u
First object Unit.
d
Second object Double.

Retorna: The result of addition.

op_Addition(Unit, Unit) : Unit

Add the two objects Unit.

u1
First object Unit.
u2
Second object Unit.

Retorna: The result of addition.

op_Division(Unit, double) : Unit

Divide a Unit by a Double.

u
First object Unit.
d
Second object Double.

Retorna: The result of division.

op_Division(Unit, int) : Unit

Divide a Unit by an Int32.

u
First object Unit.
i
Second object Int32.

Retorna: The result of division.

op_Division(int, Unit) : Unit

Divide an Int32 by a Unit.

i
First object Int32.
u
Second object Unit.

Retorna: The result of division.

op_Division(Unit, long) : Unit

Divide a Unit by a Int64.

u
First object Unit.
l
Second object Int64.

Retorna: The result of division.

op_Division(Unit, decimal) : Unit

Divide a Unit by a Decimal.

u
First object Unit.
d
Second object Decimal.

Retorna: The result of division.

op_Division(long, Unit) : Unit

Divide a Int64 by a Unit.

l
First object Int64.
u
Second object Unit.

Retorna: The result of division.

op_Division(double, Unit) : Unit

Divide a Double by a Unit.

d
First object Double.
u
Second object Unit.

Retorna: The result of division.

op_Division(decimal, Unit) : Unit

Divide a Decimal by a Unit.

d
First object Decimal.
u
Second object Unit.

Retorna: The result of division.

op_Division(Unit, Unit) : Unit

Divide the unit Unit to another.

u1
First object Unit.
u2
Second object Unit.

Retorna: The result of the division.

op_Equality(Unit, double) : bool

Check whether the Unit is equal to a Double.

u
The Unit to compare.
d
The Double to compare.

Retorna: , if the Unit is equal to the Double, .

op_Equality(decimal, Unit) : bool

Check whether the Decimal is equal to a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Retorna: , if the Decimal is equal to the Unit, .

op_Equality(Unit, long) : bool

Check whether the Unit is equal to a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Retorna: , if the Unit is equal to the Int64, .

op_Equality(Unit, int) : bool

Check whether the Unit is equal to an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Retorna: , if the Unit is equal to the Int32, .

op_Equality(int, Unit) : bool

Check whether the Int32 is equal to a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Retorna: , if the Int32 is equal to the Unit, .

op_Equality(Unit, Unit) : bool

Compare two values for equality (if the value of different types, the conversion will be used).

u1
First unit.
u2
Second unit.

Retorna: , if the values are equals, otherwise, .

op_Equality(double, Unit) : bool

Check whether the Double is equal to a Unit.

d
The Double to compare.
u
The Unit to compare.

Retorna: , if the Double is equal to the Unit, .

op_Equality(long, Unit) : bool

Check whether the Int64 is equal to a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Retorna: , if the Int64 is equal to the Unit, .

op_Equality(Unit, decimal) : bool

Check whether the Unit is equal to a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Retorna: , if the Unit is equal to the Decimal, .

op_Explicit(Nullable<double>) : double?

Cast object from Unit to nullable Double.

unit
Object Unit.

Retorna: Double value.

op_Explicit(Double) : double?

Cast object from Unit to Double.

unit
Object Unit.

Retorna: Double value.

op_Explicit(Nullable<decimal>) : double?

Cast object from Unit to nullable Decimal.

unit
Object Unit.

Retorna: Decimal value.

op_Explicit(Decimal) : double?

Cast object from Unit to Decimal.

unit
Object Unit.

Retorna: Decimal value.

op_Explicit(Single) : double?

Cast object from Unit to Single.

unit
Object Unit.

Retorna: Single value.

op_Explicit(Nullable<float>) : double?

Cast object from Unit to nullable Single.

unit
Object Unit.

Retorna: Single value.

op_Explicit(Int64) : double?

Cast object from Unit to Int64.

unit
Object Unit.

Retorna: Int64 value.

op_Explicit(Nullable<int>) : double?

Cast object from Unit to nullable Int32.

unit
Object Unit.

Retorna: Int32 value.

op_Explicit(Int32) : double?

Cast object from Unit to Int32.

unit
Object Unit.

Retorna: Int32 value.

op_Explicit(Nullable<short>) : double?

Cast object from Unit to nullable Int16.

unit
Object Unit.

Retorna: Int16 value.

op_Explicit(Int16) : double?

Cast object from Unit to Int16.

unit
Object Unit.

Retorna: Int16 value.

op_Explicit(Nullable<long>) : double?

Cast object from Unit to nullable Int64.

unit
Object Unit.

Retorna: Int64 value.

op_GreaterThan(double, Unit) : bool

Check whether the Double is greater than a Unit.

d
The Double to compare.
u
The Unit to compare.

Retorna: , if the Double is greater than the Unit, .

op_GreaterThan(Unit, double) : bool

Check whether the Unit is greater than a Double.

u
The Unit to compare.
d
The Double to compare.

Retorna: , if the Unit is greater than the Double, .

op_GreaterThan(long, Unit) : bool

Check whether the Int64 is greater than a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Retorna: , if the Int64 is greater than the Unit, .

op_GreaterThan(decimal, Unit) : bool

Check whether the Decimal is greater than a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Retorna: , if the Decimal is greater than the Unit, .

op_GreaterThan(Unit, long) : bool

Check whether the Unit is greater than a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Retorna: , if the Unit is greater than the Int64, .

op_GreaterThan(int, Unit) : bool

Check whether the Int32 is greater than a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Retorna: , if the Int32 is greater than the Unit, .

op_GreaterThan(Unit, decimal) : bool

Check whether the Unit is greater than a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Retorna: , if the Unit is greater than the Decimal, .

op_GreaterThan(Unit, int) : bool

Check whether the Unit is greater than an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Retorna: , if the Unit is greater than the Int32, .

op_GreaterThan(Unit, Unit) : bool

Check whether the first value is greater than the second.

u1
First unit.
u2
Second unit.

Retorna: , if the first value is greater than the second, .

op_GreaterThanOrEqual(Unit, decimal) : bool

Check whether the Unit is greater than or equal to a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Retorna: , if the Unit is greater than or equal to the Decimal, .

op_GreaterThanOrEqual(decimal, Unit) : bool

Check whether the Decimal is greater than or equal to a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Retorna: , if the Decimal is greater than or equal to the Unit, .

op_GreaterThanOrEqual(Unit, int) : bool

Check whether the Unit is greater than or equal to an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Retorna: , if the Unit is greater than or equal to the Int32, .

op_GreaterThanOrEqual(Unit, double) : bool

Check whether the Unit is greater than or equal to a Double.

u
The Unit to compare.
d
The Double to compare.

Retorna: , if the Unit is greater than or equal to the Double, .

op_GreaterThanOrEqual(Unit, long) : bool

Check whether the Unit is greater than or equal to a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Retorna: , if the Unit is greater than or equal to the Int64, .

op_GreaterThanOrEqual(long, Unit) : bool

Check whether the Int64 is greater than or equal to a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Retorna: , if the Int64 is greater than or equal to the Unit, .

op_GreaterThanOrEqual(Unit, Unit) : bool

Check whether the first value is greater than or equal to the second.

u1
First unit.
u2
Second unit.

Retorna: , if the first value is greater than or equal the second, otherwise, .

op_GreaterThanOrEqual(double, Unit) : bool

Check whether the Double is greater than or equal to a Unit.

d
The Double to compare.
u
The Unit to compare.

Retorna: , if the Double is greater than or equal to the Unit, .

op_GreaterThanOrEqual(int, Unit) : bool

Check whether the Int32 is greater than or equal to a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Retorna: , if the Int32 is greater than or equal to the Unit, .

op_Implicit(Unit) : Unit

Cast Single object to the type Unit.

value
Single value.

Retorna: Object Unit.

op_Implicit(Unit) : Unit

Cast Int64 object to the type Unit.

value
Int64 value.

Retorna: Object Unit.

op_Implicit(Unit) : Unit

Cast Int32 object to the type Unit.

value
Int32 value.

Retorna: Object Unit.

op_Implicit(Unit) : Unit

Cast Int16 object to the type Unit.

value
Int16 value.

Retorna: Object Unit.

op_Implicit(Unit) : Unit

Cast Decimal object to the type Unit.

value
Decimal value.

Retorna: Object Unit.

op_Implicit(Unit) : Unit

Cast Double object to the type Unit.

value
Double value.

Retorna: Object Unit.

op_Inequality(double, Unit) : bool

Check whether the Double is not equal to a Unit.

d
The Double to compare.
u
The Unit to compare.

Retorna: , if the Double is not equal to the Unit, .

op_Inequality(decimal, Unit) : bool

Check whether the Decimal is not equal to a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Retorna: , if the Decimal is not equal to the Unit, .

op_Inequality(Unit, long) : bool

Check whether the Unit is not equal to a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Retorna: , if the Unit is not equal to the Int64, .

op_Inequality(long, Unit) : bool

Check whether the Int64 is not equal to a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Retorna: , if the Int64 is not equal to the Unit, .

op_Inequality(Unit, decimal) : bool

Check whether the Unit is not equal to a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Retorna: , if the Unit is not equal to the Decimal, .

op_Inequality(Unit, Unit) : bool

Compare two values in the inequality (if the value of different types, the conversion will be used).

u1
First unit.
u2
Second unit.

Retorna: , if the values are equals, otherwise, .

op_Inequality(Unit, int) : bool

Check whether the Unit is not equal to an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Retorna: , if the Unit is not equal to the Int32, .

op_Inequality(Unit, double) : bool

Check whether the Unit is not equal to a Double.

u
The Unit to compare.
d
The Double to compare.

Retorna: , if the Unit is not equal to the Double, .

op_Inequality(int, Unit) : bool

Check whether the Int32 is not equal to a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Retorna: , if the Int32 is not equal to the Unit, .

op_LessThan(Unit, long) : bool

Check whether the Unit is less than a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Retorna: , if the Unit is less than the Int64, .

op_LessThan(Unit, double) : bool

Check whether the Unit is less than a Double.

u
The Unit to compare.
d
The Double to compare.

Retorna: , if the Unit is less than the Double, .

op_LessThan(Unit, int) : bool

Check whether the Unit is less than an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Retorna: , if the Unit is less than the Int32, .

op_LessThan(decimal, Unit) : bool

Check whether the Decimal is less than a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Retorna: , if the Decimal is less than the Unit, .

op_LessThan(Unit, decimal) : bool

Check whether the Unit is less than a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Retorna: , if the Unit is less than the Decimal, .

op_LessThan(Unit, Unit) : bool

Check whether the first value is less than the second.

u1
First unit.
u2
Second unit.

Retorna: , if the first value is less than the second, .

op_LessThan(double, Unit) : bool

Check whether the Double is less than a Unit.

d
The Double to compare.
u
The Unit to compare.

Retorna: , if the Double is less than the Unit, .

op_LessThan(long, Unit) : bool

Check whether the Int64 is less than a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Retorna: , if the Int64 is less than the Unit, .

op_LessThan(int, Unit) : bool

Check whether the Int32 is less than a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Retorna: , if the Int32 is less than the Unit, .

op_LessThanOrEqual(Unit, decimal) : bool

Check whether the Unit is less than or equal to a Decimal.

u
The Unit to compare.
d
The Decimal to compare.

Retorna: , if the Unit is less than or equal to the Decimal, .

op_LessThanOrEqual(decimal, Unit) : bool

Check whether the Decimal is less than or equal to a Unit.

d
The Decimal to compare.
u
The Unit to compare.

Retorna: , if the Decimal is less than or equal to the Unit, .

op_LessThanOrEqual(Unit, int) : bool

Check whether the Unit is less than or equal to an Int32.

u
The Unit to compare.
i
The Int32 to compare.

Retorna: , if the Unit is less than or equal to the Int32, .

op_LessThanOrEqual(Unit, long) : bool

Check whether the Unit is less than or equal to a Int64.

u
The Unit to compare.
l
The Int64 to compare.

Retorna: , if the Unit is less than or equal to the Int64, .

op_LessThanOrEqual(Unit, Unit) : bool

Check whether the first value is less than or equal to the second.

u1
First unit.
u2
Second unit.

Retorna: , if the first value is less than or equal to the second, .

op_LessThanOrEqual(int, Unit) : bool

Check whether the Int32 is less than or equal to a Unit.

i
The Int32 to compare.
u
The Unit to compare.

Retorna: , if the Int32 is less than or equal to the Unit, .

op_LessThanOrEqual(double, Unit) : bool

Check whether the Double is less than or equal to a Unit.

d
The Double to compare.
u
The Unit to compare.

Retorna: , if the Double is less than or equal to the Unit, .

op_LessThanOrEqual(Unit, double) : bool

Check whether the Unit is less than or equal to a Double.

u
The Unit to compare.
d
The Double to compare.

Retorna: , if the Unit is less than or equal to the Double, .

op_LessThanOrEqual(long, Unit) : bool

Check whether the Int64 is less than or equal to a Unit.

l
The Int64 to compare.
u
The Unit to compare.

Retorna: , if the Int64 is less than or equal to the Unit, .

op_Multiply(Unit, Unit) : Unit

Multiply the two objects Unit.

u1
First object Unit.
u2
Second object Unit.

Retorna: The result of the multiplication.

op_Multiply(decimal, Unit) : Unit

Multiply a Decimal by a Unit.

d
First object Decimal.
u
Second object Unit.

Retorna: The result of multiplication.

op_Multiply(Unit, decimal) : Unit

Multiply a Unit by a Decimal.

u
First object Unit.
d
Second object Decimal.

Retorna: The result of multiplication.

op_Multiply(int, Unit) : Unit

Multiply an Int32 by a Unit.

i
First object Int32.
u
Second object Unit.

Retorna: The result of multiplication.

op_Multiply(Unit, int) : Unit

Multiply a Unit by an Int32.

u
First object Unit.
i
Second object Int32.

Retorna: The result of multiplication.

op_Multiply(long, Unit) : Unit

Multiply a Int64 by a Unit.

l
First object Int64.
u
Second object Unit.

Retorna: The result of multiplication.

op_Multiply(Unit, long) : Unit

Multiply a Unit by a Int64.

u
First object Unit.
l
Second object Int64.

Retorna: The result of multiplication.

op_Multiply(Unit, double) : Unit

Multiply a Unit by a Double.

u
First object Unit.
d
Second object Double.

Retorna: The result of multiplication.

op_Multiply(double, Unit) : Unit

Multiply a Double by a Unit.

d
First object Double.
u
Second object Unit.

Retorna: The result of multiplication.

op_Subtraction(Unit, double) : Unit

Subtract a Double from a Unit.

u
First object Unit.
d
Second object Double.

Retorna: The result of subtraction.

op_Subtraction(Unit, long) : Unit

Subtract a Int64 from a Unit.

u
First object Unit.
l
Second object Int64.

Retorna: The result of subtraction.

op_Subtraction(long, Unit) : Unit

Subtract the Unit from a Int64.

l
First object Int64.
u
Second object Unit.

Retorna: The result of subtraction.

op_Subtraction(Unit, int) : Unit

Subtract an Int32 from a Unit.

u
First object Unit.
i
Second object Int32.

Retorna: The result of subtraction.

op_Subtraction(int, Unit) : Unit

Subtract the Unit from an Int32.

i
First object Int32.
u
Second object Unit.

Retorna: The result of subtraction.

op_Subtraction(Unit, decimal) : Unit

Subtract a Decimal from a Unit.

u
First object Unit.
d
Second object Decimal.

Retorna: The result of subtraction.

op_Subtraction(decimal, Unit) : Unit

Subtract the Unit from a Decimal.

d
First object Decimal.
u
Second object Unit.

Retorna: The result of subtraction.

op_Subtraction(double, Unit) : Unit

Subtract the Unit from a Double.

d
First object Double.
u
Second object Unit.

Retorna: The result of subtraction.

op_Subtraction(Unit, Unit) : Unit

Subtract the unit Unit from another.

u1
First object Unit.
u2
Second object Unit.

Retorna: The result of the subtraction.

op_UnaryNegation(Unit) : Unit

Get the value with the opposite sign from the value Value.

u
Unit.

Retorna: Opposite value.

Save(SettingsStorage)

Save settings.

storage
Settings storage.
ToString() : string

Преобразовать к строковому представлению.

Retorna: Строковое представление.