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

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

Inheritance diagram for slick::trader::PositionUpdateEvent:
Collaboration diagram for slick::trader::PositionUpdateEvent:

Public Member Functions

 PositionUpdateEvent ()
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]
qty_t quantity
price_t avg_price
price_t realized_pnl
uint64_t last_update_time
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 16 of file position_event.hpp.

Constructor & Destructor Documentation

◆ PositionUpdateEvent()

slick::trader::PositionUpdateEvent::PositionUpdateEvent ( )
inline

Member Function Documentation

◆ set_strategy_id()

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

Definition at line 31 of file position_event.hpp.

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

Member Data Documentation

◆ avg_price

price_t slick::trader::PositionUpdateEvent::avg_price

Definition at line 19 of file position_event.hpp.

Referenced by PositionUpdateEvent().

◆ last_update_time

uint64_t slick::trader::PositionUpdateEvent::last_update_time

Definition at line 21 of file position_event.hpp.

Referenced by PositionUpdateEvent().

◆ quantity

qty_t slick::trader::PositionUpdateEvent::quantity

Definition at line 18 of file position_event.hpp.

Referenced by PositionUpdateEvent().

◆ realized_pnl

price_t slick::trader::PositionUpdateEvent::realized_pnl

Definition at line 20 of file position_event.hpp.

Referenced by PositionUpdateEvent().

◆ strategy_id

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

Definition at line 17 of file position_event.hpp.

Referenced by PositionUpdateEvent(), and set_strategy_id().


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