![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
MovingAverageCrossover with simple averages. More...
#include <algotradelib/src/strategy/vanilla/crossover.hpp>
Public Member Functions | |
| SmaCrossover (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 SIMPLE. | |
MovingAverageCrossover with simple averages.
Definition at line 127 of file crossover.hpp.
|
inlineexplicit |
Constructs the strategy.
| params | The settings; kind_ is overridden with SIMPLE. |
Definition at line 135 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 150 of file crossover.hpp.
|
inline |
Returns how many bars to load before the first live bar.
Definition at line 141 of file crossover.hpp.
| MovingAverageCrossover algotradelib::strategy::vanilla::SmaCrossover::inner_ |
The general crossover, with kind_ set to SIMPLE.
Definition at line 129 of file crossover.hpp.
Referenced by on_bar(), and warmup_bars().