tzutrader
A composable C++ backtesting library for trading strategies (experimental)
Loading...
Searching...
No Matches
tzu::Position Struct Reference

#include <defs.h>

Public Member Functions

 Position (int64_t ts=0, double q=0.0, double p=0.0)

Public Attributes

int64_t timestamp
double quantity
double price

Detailed Description

Represents a trading position, which includes the timestamp of the position, the quantity of the asset held, and the price at which the position was opened. This struct can be used to track open positions in a trading strategy.

Constructor & Destructor Documentation

◆ Position()

tzu::Position::Position ( int64_t ts = 0,
double q = 0.0,
double p = 0.0 )
inline

Member Data Documentation

◆ price

double tzu::Position::price

◆ quantity

double tzu::Position::quantity

◆ timestamp

int64_t tzu::Position::timestamp

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