Configuration parameters for the HodlStrategy.
More...
#include <hodl.h>
Configuration parameters for the HodlStrategy.
◆ InitStrategy
Defines the initial strategy behavior.
| Enumerator |
|---|
| e_BUY_IMMEDIATELY | Buy immediately when the strategy starts.
|
| e_SET_BASIS_PRICE | Set current price as basis and wait for dip.
|
◆ buyAmount()
| double crypto_trader::strategies::HodlStrategyConfig::buyAmount |
( |
| ) |
const |
|
inline |
Gets the amount to use for buy orders.
- Returns
- The buy amount.
◆ emit()
| const common::Emit & crypto_trader::strategies::HodlStrategyConfig::emit |
( |
| ) |
const |
|
inline |
Gets the emission callback function.
- Returns
- The emission callback.
◆ initStrategy()
Gets the initial strategy behavior.
- Returns
- The initial strategy.
◆ percentDown()
| float crypto_trader::strategies::HodlStrategyConfig::percentDown |
( |
| ) |
const |
|
inline |
Gets the percentage decrease for buying.
- Returns
- The percentage down.
◆ percentUp()
| float crypto_trader::strategies::HodlStrategyConfig::percentUp |
( |
| ) |
const |
|
inline |
Gets the percentage increase for selling.
- Returns
- The percentage up.
◆ setBuyAmount()
| HodlStrategyConfig & crypto_trader::strategies::HodlStrategyConfig::setBuyAmount |
( |
double | buyAmount | ) |
|
|
inline |
Sets the amount to use for buy orders.
- Parameters
-
| buyAmount | The buy amount in base currency. |
- Returns
- A reference to the updated configuration object.
◆ setEmit()
Sets the emission callback function.
- Parameters
-
| emit | The callback function for emitting actions. |
- Returns
- A reference to the updated configuration object.
◆ setInitStrategy()
Sets the initial strategy behavior.
- Parameters
-
| initStrat | The initial strategy to set. |
- Returns
- A reference to the updated configuration object.
◆ setPercentDown()
| HodlStrategyConfig & crypto_trader::strategies::HodlStrategyConfig::setPercentDown |
( |
float | percentDown | ) |
|
|
inline |
Sets the percentage decrease for buying.
- Parameters
-
| percentDown | The percentage (e.g., 5.0 for 5%). |
- Returns
- A reference to the updated configuration object.
◆ setPercentUp()
| HodlStrategyConfig & crypto_trader::strategies::HodlStrategyConfig::setPercentUp |
( |
float | percentUp | ) |
|
|
inline |
Sets the percentage increase for selling.
- Parameters
-
| percentUp | The percentage (e.g., 5.0 for 5%). |
- Returns
- A reference to the updated configuration object.
The documentation for this class was generated from the following file:
- /home/runner/work/crypto_trader/crypto_trader/strategies/hodl.h