exchange
Low-latency exchange in C++
Loading...
Searching...
No Matches
candle.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <chrono>
6#include <limits>
7
8namespace exchange::server
9{
10struct Candle
11{
13 Price high{std::numeric_limits<Price>::min()};
14 Price low{std::numeric_limits<Price>::max()};
17 std::chrono::sys_seconds start;
18 std::chrono::seconds resolution{std::chrono::seconds{1}};
19 bool isClosed{false};
20
21 [[nodiscard]] bool empty() const
22 {
23 return volume == Quantity{0};
24 }
25};
26} // namespace exchange::server
Definition main.hpp:4
Definition candle.hpp:11
std::chrono::seconds resolution
Definition candle.hpp:18
bool isClosed
Definition candle.hpp:19
std::chrono::sys_seconds start
Definition candle.hpp:17
bool empty() const
Definition candle.hpp:21
Price open
Definition candle.hpp:12
Price low
Definition candle.hpp:14
Price high
Definition candle.hpp:13
Quantity volume
Definition candle.hpp:16
Price close
Definition candle.hpp:15
Definition price.hpp:10
Definition quantity.hpp:9