Slick Trader 0.11.0
Multi-broker algorithmic trading engine with plugin strategies and a live web dashboard
Loading...
Searching...
No Matches
slick::trader::PnLSnapshot Struct Reference

#include <slick-trader/core/pnl_calculator.hpp>

Collaboration diagram for slick::trader::PnLSnapshot:

Public Member Functions

double get_realized () const
double get_unrealized () const
double get_fees () const
double get_total () const

Public Attributes

std::string strategy_id
price_t realized_pnl {0}
price_t unrealized_pnl {0}
price_t total_fees {0}
price_t total_pnl {0}
uint64_t timestamp_ns {0}

Detailed Description

Definition at line 13 of file pnl_calculator.hpp.

Member Function Documentation

◆ get_fees()

double slick::trader::PnLSnapshot::get_fees ( ) const
inline

Definition at line 23 of file pnl_calculator.hpp.

References slick::trader::from_price_t(), and total_fees.

◆ get_realized()

double slick::trader::PnLSnapshot::get_realized ( ) const
inline

Definition at line 21 of file pnl_calculator.hpp.

References slick::trader::from_price_t(), and realized_pnl.

◆ get_total()

double slick::trader::PnLSnapshot::get_total ( ) const
inline

Definition at line 24 of file pnl_calculator.hpp.

References slick::trader::from_price_t(), and total_pnl.

◆ get_unrealized()

double slick::trader::PnLSnapshot::get_unrealized ( ) const
inline

Definition at line 22 of file pnl_calculator.hpp.

References slick::trader::from_price_t(), and unrealized_pnl.

Member Data Documentation

◆ realized_pnl

price_t slick::trader::PnLSnapshot::realized_pnl {0}

Definition at line 15 of file pnl_calculator.hpp.

Referenced by slick::trader::PnLCalculator::calculate_pnl(), and get_realized().

◆ strategy_id

std::string slick::trader::PnLSnapshot::strategy_id

Definition at line 14 of file pnl_calculator.hpp.

Referenced by slick::trader::PnLCalculator::calculate_pnl().

◆ timestamp_ns

uint64_t slick::trader::PnLSnapshot::timestamp_ns {0}

Definition at line 19 of file pnl_calculator.hpp.

Referenced by slick::trader::PnLCalculator::calculate_pnl().

◆ total_fees

price_t slick::trader::PnLSnapshot::total_fees {0}

Definition at line 17 of file pnl_calculator.hpp.

Referenced by slick::trader::PnLCalculator::calculate_pnl(), and get_fees().

◆ total_pnl

price_t slick::trader::PnLSnapshot::total_pnl {0}

Definition at line 18 of file pnl_calculator.hpp.

Referenced by slick::trader::PnLCalculator::calculate_pnl(), and get_total().

◆ unrealized_pnl

price_t slick::trader::PnLSnapshot::unrealized_pnl {0}

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