dxFeed Graal CXX API v9.0.0
Loading...
Searching...
No Matches

Direction of the price movement. More...

#include <Direction.hpp>

Inheritance diagram for Direction:

Public Member Functions

template<Integral OtherCodeType>
constexpr Enum (OtherCodeType code, std::string_view name) noexcept
 Creates an element of the enum.
Public Member Functions inherited from Enum< Direction, std::uint32_t >
constexpr std::uint32_t getCode () const noexcept
 Returns code that is used in flag bits.
std::string getName () const
 Returns the enum element name.
std::string toString () const
 Returns a string representation of an enum element.

Static Public Attributes

static const DXFCPP_EXPORT Direction UNDEFINED {0, "UNDEFINED"}
 Direction is undefined, unknown or inapplicable.
static const DXFCPP_EXPORT Direction DOWN {1, "DOWN"}
 The current price is lower than the previous price.
static const DXFCPP_EXPORT Direction ZERO_DOWN {2, "ZERO_DOWN"}
 The current price is the same as the previous price and is lower than the last known price of different value.
static const DXFCPP_EXPORT Direction ZERO {3, "ZERO"}
 The current price is equal to the only known price value suitable for price direction computation.
static const DXFCPP_EXPORT Direction ZERO_UP {4, "ZERO_UP"}
 The current price is the same as the previous price and is higher than the last known price of different value.
static const DXFCPP_EXPORT Direction UP {5, "UP"}
 The current price is higher than the previous price.
static const DXFCPP_EXPORT std::span< const std::reference_wrapper< const Direction > > ALL {ALL_ELEMENTS}
 All elements of the enum (constant-initialized).

Additional Inherited Members

Static Public Member Functions inherited from Enum< Direction, std::uint32_t >
static const Direction & valueOf (OtherCodeType code) noexcept
 Returns enum element by integer code bit pattern.
Protected Member Functions inherited from Enum< Direction, std::uint32_t >
constexpr Enum (OtherCodeType code, std::string_view name) noexcept
 Creates an element of the enum.

Detailed Description

Direction of the price movement.

For example, tick a direction for the last trade price.

Member Function Documentation

◆ Enum()

template<Integral OtherCodeType>
Enum< Child, Code >::Enum ( OtherCodeType code,
std::string_view name )
inlineconstexprnoexcept

Creates an element of the enum.

Parameters
codeThe element code.
nameThe element name with static storage duration (a string literal).

Member Data Documentation

◆ UNDEFINED

DXFCPP_BEGIN_NAMESPACE constinit const Direction Direction::UNDEFINED {0, "UNDEFINED"}
staticconstinit

Direction is undefined, unknown or inapplicable.

It includes cases with undefined price value or when direction computation was not performed.

◆ ZERO

const Direction Direction::ZERO {3, "ZERO"}
staticconstinit

The current price is equal to the only known price value suitable for price direction computation.

Unlike UNDEFINED the ZERO direction implies that the current price is defined and direction computation was duly performed but has failed to detect any upward or downward price movement. It is also reported for cases when a price sequence was broken and direction computation was restarted anew.