algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::backtest::Returns Struct Reference

Chains the drawn returns: a path price is the path's previous close times value / from. More...

#include <algotradelib/src/backtest/bootstrap.hpp>

Public Member Functions

double join (double level, double from, double value) const
 Returns the path's price for a drawn price.

Detailed Description

Chains the drawn returns: a path price is the path's previous close times value / from.

Definition at line 164 of file bootstrap.hpp.

Member Function Documentation

◆ join()

double algotradelib::backtest::Returns::join ( double level,
double from,
double value ) const
inline

Returns the path's price for a drawn price.

Parameters
levelThe path's previous close, unrounded, in grid units.
fromThe drawn day's previous close in the history, in grid units; positive.
valueThe drawn day's price (open, high, low or close), in grid units; positive.
Returns
level * (value / from), the ratio first.

Definition at line 172 of file bootstrap.hpp.


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