Represents a position with its quantity and price.
More...
#include <PositionManager.h>
|
| Position () |
| Default constructor that initializes the quantity and price to 0.
|
|
| Position (double q, double p) |
| Constructor that initializes the quantity and price to the given values. More...
|
|
double | total () |
| Calculates the total value of the position. More...
|
|
|
double | quantity |
| Quantity of the position.
|
|
double | price |
| Price of the position.
|
|
Represents a position with its quantity and price.
◆ Position()
ats::Position::Position |
( |
double |
q, |
|
|
double |
p |
|
) |
| |
|
inline |
Constructor that initializes the quantity and price to the given values.
- Parameters
-
q | Quantity of the asset |
p | Price of the asset |
◆ total()
double ats::Position::total |
( |
| ) |
|
|
inline |
Calculates the total value of the position.
- Returns
- The total value of the position (quantity * price).
The documentation for this struct was generated from the following file: