WU Trading Library 0.2.0
A backtesting and trading strategy library
Loading...
Searching...
No Matches
WU_PositionVector Struct Reference

WU_PositionVector is a data structure that holds multiple positions for a single asset. More...

#include <positions.h>

Data Fields

void(* add )(struct WU_PositionVector *vec, WU_Position pos)
void(* remove )(struct WU_PositionVector *vec, int index)
void(* clear )(struct WU_PositionVector *vec)
struct WU_Position_(* get )(struct WU_PositionVector *vec, int index, bool *found)
double(* total_quantity )(struct WU_PositionVector *vec)
void(* delete )(struct WU_PositionVector *vec)
char * symbol
double last_price
struct WU_Position_positions
bool * active
int count
int capacity

Detailed Description

WU_PositionVector is a data structure that holds multiple positions for a single asset.

It includes the asset symbol and last price.

Definition at line 24 of file positions.h.

Field Documentation

◆ active

bool* WU_PositionVector::active

Definition at line 35 of file positions.h.

◆ add

void(* WU_PositionVector::add) (struct WU_PositionVector *vec, WU_Position pos)

Definition at line 25 of file positions.h.

◆ capacity

int WU_PositionVector::capacity

Definition at line 37 of file positions.h.

◆ clear

void(* WU_PositionVector::clear) (struct WU_PositionVector *vec)

Definition at line 27 of file positions.h.

◆ count

int WU_PositionVector::count

Definition at line 36 of file positions.h.

◆ delete

void(* WU_PositionVector::delete) (struct WU_PositionVector *vec)

Definition at line 31 of file positions.h.

◆ get

struct WU_Position_(* WU_PositionVector::get) (struct WU_PositionVector *vec, int index, bool *found)

Definition at line 27 of file positions.h.

◆ last_price

double WU_PositionVector::last_price

Definition at line 33 of file positions.h.

◆ positions

struct WU_Position_* WU_PositionVector::positions

Definition at line 34 of file positions.h.

◆ remove

void(* WU_PositionVector::remove) (struct WU_PositionVector *vec, int index)

Definition at line 26 of file positions.h.

◆ symbol

char* WU_PositionVector::symbol

Definition at line 32 of file positions.h.

◆ total_quantity

double(* WU_PositionVector::total_quantity) (struct WU_PositionVector *vec)

Definition at line 30 of file positions.h.


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