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

#include <slick-trader/events/position_event.hpp>

Inheritance diagram for slick::trader::PnLUpdateEvent:
Collaboration diagram for slick::trader::PnLUpdateEvent:

Public Member Functions

 PnLUpdateEvent ()
void set_strategy_id (std::string_view id)
Public Member Functions inherited from slick::trader::Event
 Event (EventType t=EventType::TRADE)
void set_instrument (std::string_view instr)

Public Attributes

char strategy_id [MAX_STRATEGY_ID_LENGTH]
price_t realized_pnl
price_t unrealized_pnl
price_t total_pnl
Public Attributes inherited from slick::trader::Event
EventType type
uint64_t timestamp_ns
uint64_t event_time_ns
BrokerId broker_id
char instrument [MAX_INSTRUMENT_LENGTH]

Detailed Description

Definition at line 39 of file position_event.hpp.

Constructor & Destructor Documentation

◆ PnLUpdateEvent()

slick::trader::PnLUpdateEvent::PnLUpdateEvent ( )
inline

Member Function Documentation

◆ set_strategy_id()

void slick::trader::PnLUpdateEvent::set_strategy_id ( std::string_view id)
inline

Definition at line 52 of file position_event.hpp.

References slick::trader::MAX_STRATEGY_ID_LENGTH, and strategy_id.

Member Data Documentation

◆ realized_pnl

price_t slick::trader::PnLUpdateEvent::realized_pnl

Definition at line 41 of file position_event.hpp.

Referenced by PnLUpdateEvent().

◆ strategy_id

char slick::trader::PnLUpdateEvent::strategy_id[MAX_STRATEGY_ID_LENGTH]

Definition at line 40 of file position_event.hpp.

Referenced by PnLUpdateEvent(), and set_strategy_id().

◆ total_pnl

price_t slick::trader::PnLUpdateEvent::total_pnl

Definition at line 43 of file position_event.hpp.

Referenced by PnLUpdateEvent().

◆ unrealized_pnl

price_t slick::trader::PnLUpdateEvent::unrealized_pnl

Definition at line 42 of file position_event.hpp.

Referenced by PnLUpdateEvent().


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