algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::strategy::vanilla::RsiThreshold::Params Struct Reference

The strategy's settings. More...

#include <algotradelib/src/strategy/vanilla/reversion.hpp>

Collaboration diagram for algotradelib::strategy::vanilla::RsiThreshold::Params:

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.

Detailed Description

The strategy's settings.

Definition at line 124 of file reversion.hpp.

Member Data Documentation

◆ instrument_

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().

◆ overbought_

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().

◆ oversold_

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().

◆ period_

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().

◆ quantity_

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().

◆ tag_

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().


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