Represents position for Account/Instrument. More...
#include <RTPosition.h>
Public Member Functions | |
RTPosition (RTOrder *order) | |
RTPosition (const RTExecutionReport *report) | |
RTPosition (const std::string &symbol, int qty, int type) | |
void | update (OrderSide side, int qty, double last_px) |
void | update (int qty) |
void | update (const RTExecutionReport *report, int denominator=1) |
const std::string & | symbol () const |
void | symbol (const std::string &symbol) |
const int & | qty () const |
double | average_price () |
double | realized_pnl () |
const int | type () |
void | to_xml (std::ostream &stream) |
Represents position for Account/Instrument.
double RT::RTPosition::average_price | ( | ) | [inline] |
returns the positions's average price
const int& RT::RTPosition::qty | ( | ) | const [inline] |
returns the positions's qty
double RT::RTPosition::realized_pnl | ( | ) | [inline] |
returns the positions's realized profit loss
void RT::RTPosition::symbol | ( | const std::string & | symbol | ) | [inline] |
sets the positions's instrument symbol
const std::string& RT::RTPosition::symbol | ( | ) | const [inline] |
returns the positions's instrument symbol
void RT::RTPosition::to_xml | ( | std::ostream & | stream | ) | [inline] |
Converts the position to xml
const int RT::RTPosition::type | ( | ) | [inline] |
returns position's type
void RT::RTPosition::update | ( | const RTExecutionReport * | report, | |
int | denominator = 1 | |||
) | [inline] |
Position update
void RT::RTPosition::update | ( | int | qty | ) | [inline] |
Position update
void RT::RTPosition::update | ( | OrderSide | side, | |
int | qty, | |||
double | last_px | |||
) | [inline] |
Position update