![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The strategy's settings. More...
#include <algotradelib/src/strategy/vanilla/crossover.hpp>
Public Attributes | |
| InstrumentId | instrument_ |
| The instrument to trade; bars for any other instrument are ignored. | |
| std::size_t | fast_ {20} |
| The fast span; must be nonzero and less than slow_, or the strategy does nothing. | |
| std::size_t | slow_ {50} |
| The slow span. | |
| AverageKind | kind_ {AverageKind::SIMPLE} |
| Which average to use; see AverageKind. | |
| Decimal64 | quantity_ |
| The shares to hold while the fast average is above the slow one. | |
| std::string | tag_ {"ma-crossover"} |
| The tag on the targets. | |
The strategy's settings.
Definition at line 49 of file crossover.hpp.
| std::size_t algotradelib::strategy::vanilla::MovingAverageCrossover::Params::fast_ {20} |
The fast span; must be nonzero and less than slow_, or the strategy does nothing.
Definition at line 53 of file crossover.hpp.
Referenced by algotradelib::strategy::vanilla::MovingAverageCrossover::on_bar().
| InstrumentId algotradelib::strategy::vanilla::MovingAverageCrossover::Params::instrument_ |
The instrument to trade; bars for any other instrument are ignored.
Definition at line 51 of file crossover.hpp.
Referenced by algotradelib::strategy::vanilla::MovingAverageCrossover::on_bar().
| AverageKind algotradelib::strategy::vanilla::MovingAverageCrossover::Params::kind_ {AverageKind::SIMPLE} |
Which average to use; see AverageKind.
Definition at line 57 of file crossover.hpp.
| Decimal64 algotradelib::strategy::vanilla::MovingAverageCrossover::Params::quantity_ |
The shares to hold while the fast average is above the slow one.
Definition at line 59 of file crossover.hpp.
Referenced by algotradelib::strategy::vanilla::MovingAverageCrossover::on_bar().
| std::size_t algotradelib::strategy::vanilla::MovingAverageCrossover::Params::slow_ {50} |
The slow span.
Definition at line 55 of file crossover.hpp.
Referenced by algotradelib::strategy::vanilla::MovingAverageCrossover::on_bar(), and algotradelib::strategy::vanilla::MovingAverageCrossover::warmup_bars().
| std::string algotradelib::strategy::vanilla::MovingAverageCrossover::Params::tag_ {"ma-crossover"} |
The tag on the targets.
Definition at line 61 of file crossover.hpp.
Referenced by algotradelib::strategy::vanilla::MovingAverageCrossover::on_bar().