Direction of the price movement.
More...
#include <Direction.hpp>
|
| template<Integral OtherCodeType> |
| constexpr | Enum (OtherCodeType code, std::string_view name) noexcept |
| | Creates an element of the enum.
|
| 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 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).
|
|
| static const Direction & | valueOf (OtherCodeType code) noexcept |
| | Returns enum element by integer code bit pattern.
|
| constexpr | Enum (OtherCodeType code, std::string_view name) noexcept |
| | Creates an element of the enum.
|
Direction of the price movement.
For example, tick a direction for the last trade price.
◆ Enum()
template<Integral OtherCodeType>
| Enum< Child, Code >::Enum |
( |
OtherCodeType | code, |
|
|
std::string_view | name ) |
|
inlineconstexprnoexcept |
Creates an element of the enum.
- Parameters
-
| code | The element code. |
| name | The element name with static storage duration (a string literal). |
◆ 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
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.