![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The strategy's settings. More...
#include <algotradelib/src/strategy/vanilla/reversion.hpp>
Public Attributes | |
| InstrumentId | instrument_ |
| The instrument to trade; bars for any other instrument are ignored. | |
| std::size_t | period_ {14} |
| The RSI period; zero disables the strategy. | |
| math::Scalar | oversold_ {30.0} |
| Buy at or below this level. | |
| math::Scalar | overbought_ {70.0} |
| Sell at or above this level; must exceed oversold_, or nothing is traded. | |
| Decimal64 | quantity_ |
| The shares to hold while in a position. | |
| std::string | tag_ {"rsi-threshold"} |
| The tag on the targets. | |
The strategy's settings.
Definition at line 124 of file reversion.hpp.
| InstrumentId algotradelib::strategy::vanilla::RsiThreshold::Params::instrument_ |
The instrument to trade; bars for any other instrument are ignored.
Definition at line 126 of file reversion.hpp.
Referenced by algotradelib::strategy::vanilla::RsiThreshold::on_bar().
| math::Scalar algotradelib::strategy::vanilla::RsiThreshold::Params::overbought_ {70.0} |
Sell at or above this level; must exceed oversold_, or nothing is traded.
Definition at line 132 of file reversion.hpp.
Referenced by algotradelib::strategy::vanilla::RsiThreshold::on_bar().
| math::Scalar algotradelib::strategy::vanilla::RsiThreshold::Params::oversold_ {30.0} |
Buy at or below this level.
Definition at line 130 of file reversion.hpp.
Referenced by algotradelib::strategy::vanilla::RsiThreshold::on_bar().
| std::size_t algotradelib::strategy::vanilla::RsiThreshold::Params::period_ {14} |
The RSI period; zero disables the strategy.
Definition at line 128 of file reversion.hpp.
Referenced by algotradelib::strategy::vanilla::RsiThreshold::on_bar(), and algotradelib::strategy::vanilla::RsiThreshold::warmup_bars().
| Decimal64 algotradelib::strategy::vanilla::RsiThreshold::Params::quantity_ |
The shares to hold while in a position.
Definition at line 134 of file reversion.hpp.
Referenced by algotradelib::strategy::vanilla::RsiThreshold::on_bar().
| std::string algotradelib::strategy::vanilla::RsiThreshold::Params::tag_ {"rsi-threshold"} |
The tag on the targets.
Definition at line 136 of file reversion.hpp.
Referenced by algotradelib::strategy::vanilla::RsiThreshold::on_bar().