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

The WU_MVar (Moving Variance) is an indicator that calculates the variance of the last N values, where N is the window size. More...

#include <indicators.h>

Data Fields

double(* update )(struct WU_MVar_ *self, double value)
void(* delete )(struct WU_MVar_ *self)
double value
WU_SMA sma
double * prev_values
double sum2
int window_size
int pos
int len
int dof

Detailed Description

The WU_MVar (Moving Variance) is an indicator that calculates the variance of the last N values, where N is the window size.

It is used to measure the volatility of a time series. dof stands for "degree of freedom" and is used to adjust the variance calculation. If dof is 0, the variance is calculated using the population variance formula. If dof is 1, the variance is calculated using the sample variance formula.

Definition at line 113 of file indicators.h.

Field Documentation

◆ delete

void(* WU_MVar::delete) (struct WU_MVar_ *self)

Definition at line 115 of file indicators.h.

◆ dof

int WU_MVar::dof

Definition at line 123 of file indicators.h.

◆ len

int WU_MVar::len

Definition at line 122 of file indicators.h.

◆ pos

int WU_MVar::pos

Definition at line 121 of file indicators.h.

◆ prev_values

double* WU_MVar::prev_values

Definition at line 118 of file indicators.h.

◆ sma

WU_SMA WU_MVar::sma

Definition at line 117 of file indicators.h.

◆ sum2

double WU_MVar::sum2

Definition at line 119 of file indicators.h.

◆ update

double(* WU_MVar::update) (struct WU_MVar_ *self, double value)

Definition at line 114 of file indicators.h.

◆ value

double WU_MVar::value

Definition at line 116 of file indicators.h.

◆ window_size

int WU_MVar::window_size

Definition at line 120 of file indicators.h.


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