![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
MovingAverageCrossover with exponential averages. More...
#include <algotradelib/src/strategy/vanilla/crossover.hpp>
Public Member Functions | |
| EmaCrossover (MovingAverageCrossover::Params params={}) | |
| Constructs the strategy. | |
| std::size_t | warmup_bars () const |
| Returns how many bars to load before the first live bar. | |
| template<class Ctx> | |
| void | on_bar (Ctx &ctx, const BarEvent &bar) |
| Calls the general crossover's on_bar. | |
Public Attributes | |
| MovingAverageCrossover | inner_ |
| The general crossover, with kind_ set to EXPONENTIAL. | |
MovingAverageCrossover with exponential averages.
Definition at line 156 of file crossover.hpp.
|
inlineexplicit |
Constructs the strategy.
| params | The settings; kind_ is overridden with EXPONENTIAL. |
Definition at line 164 of file crossover.hpp.
|
inline |
Calls the general crossover's on_bar.
| Ctx | The runner's context type. |
| ctx | The context. |
| bar | The new bar. |
Definition at line 179 of file crossover.hpp.
|
inline |
Returns how many bars to load before the first live bar.
Definition at line 170 of file crossover.hpp.
| MovingAverageCrossover algotradelib::strategy::vanilla::EmaCrossover::inner_ |
The general crossover, with kind_ set to EXPONENTIAL.
Definition at line 158 of file crossover.hpp.
Referenced by on_bar(), and warmup_bars().