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

A clock that buckets a fixed number of trades into each bar. More...

#include <bars.hpp>

Public Member Functions

auto bucket (const Trade &, std::uint64_t, std::uint64_t tick_index) const noexcept -> std::uint64_t
 Computes the bucket id for the current trade from its tick position.
 

Public Attributes

std::uint64_t ticks_per_bar {1}
 

Detailed Description

A clock that buckets a fixed number of trades into each bar.

Definition at line 53 of file bars.hpp.

Member Function Documentation

◆ bucket()

auto itch::analytics::TickClock::bucket ( const Trade ,
std::uint64_t  ,
std::uint64_t  tick_index 
) const -> std::uint64_t
inlinenoexcept

Computes the bucket id for the current trade from its tick position.

Parameters
tick_index0-based index of the trade within the stream.
Returns
The bucket id, tick_index / ticks_per_bar.

Definition at line 60 of file bars.hpp.

References ticks_per_bar.

Member Data Documentation

◆ ticks_per_bar

std::uint64_t itch::analytics::TickClock::ticks_per_bar {1}

Definition at line 54 of file bars.hpp.

Referenced by bucket().


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