ITCHCPP 1.6.0
High-Performance NASDAQ TotalView-ITCH 5.0 Parser & Market-Data Platform
Loading...
Searching...
No Matches
itch::analytics::VolumeClock Struct Reference

A clock that buckets a fixed amount of traded volume into each bar. More...

#include <bars.hpp>

Public Member Functions

auto bucket (const Trade &, std::uint64_t cumulative_volume, std::uint64_t) const noexcept -> std::uint64_t
 Computes the bucket id for the current trade from cumulative volume.
 

Public Attributes

std::uint64_t volume_per_bar {1}
 

Detailed Description

A clock that buckets a fixed amount of traded volume into each bar.

Definition at line 67 of file bars.hpp.

Member Function Documentation

◆ bucket()

auto itch::analytics::VolumeClock::bucket ( const Trade ,
std::uint64_t  cumulative_volume,
std::uint64_t   
) const -> std::uint64_t
inlinenoexcept

Computes the bucket id for the current trade from cumulative volume.

Parameters
cumulative_volumeTotal shares traded so far, including this trade.
Returns
The bucket id, cumulative_volume / volume_per_bar.

Definition at line 74 of file bars.hpp.

References volume_per_bar.

Member Data Documentation

◆ volume_per_bar

std::uint64_t itch::analytics::VolumeClock::volume_per_bar {1}

Definition at line 68 of file bars.hpp.

Referenced by bucket().


The documentation for this struct was generated from the following file: