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

Maximum Drawdown - tracks the largest peak-to-trough decline. More...

#include <indicators.h>

Data Fields

double(* update )(struct WU_MaxDrawdown_ *self, double portfolio_value)
void(* delete )(struct WU_MaxDrawdown_ *self)
double value
double peak

Detailed Description

Maximum Drawdown - tracks the largest peak-to-trough decline.

Updates with portfolio values and returns the drawdown as a negative percentage. Calculated as (current_value - peak) / peak when current is below peak.

Definition at line 223 of file indicators.h.

Field Documentation

◆ delete

void(* WU_MaxDrawdown::delete) (struct WU_MaxDrawdown_ *self)

Definition at line 225 of file indicators.h.

◆ peak

double WU_MaxDrawdown::peak

Definition at line 227 of file indicators.h.

◆ update

double(* WU_MaxDrawdown::update) (struct WU_MaxDrawdown_ *self, double portfolio_value)

Definition at line 224 of file indicators.h.

◆ value

double WU_MaxDrawdown::value

Definition at line 226 of file indicators.h.


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