|
WU Trading Library 0.2.0
A backtesting and trading strategy library
|
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 |
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.
| void(* WU_MVar::delete) (struct WU_MVar_ *self) |
Definition at line 115 of file indicators.h.
| int WU_MVar::dof |
Definition at line 123 of file indicators.h.
| int WU_MVar::len |
Definition at line 122 of file indicators.h.
| int WU_MVar::pos |
Definition at line 121 of file indicators.h.
| double* WU_MVar::prev_values |
Definition at line 118 of file indicators.h.
| WU_SMA WU_MVar::sma |
Definition at line 117 of file indicators.h.
| double WU_MVar::sum2 |
Definition at line 119 of file indicators.h.
Definition at line 114 of file indicators.h.
| double WU_MVar::value |
Definition at line 116 of file indicators.h.
| int WU_MVar::window_size |
Definition at line 120 of file indicators.h.