|
crypto_trader
Cryptocurrency Trading Bot API Documentation
|
Abstract base class defining the interface for a trading strategy. More...
#include <strategy.h>


Public Member Functions | |
| Strategy (const common::Emit &emit) | |
| Constructs a Strategy object. | |
| virtual | ~Strategy ()=0 |
| Destructor for the Strategy interface. | |
| virtual void | handleNewData (const nlohmann::json &data)=0 |
| Handles new market data received by the strategy. | |
Protected Attributes | |
| common::Emit | d_emit |
| Function to emit trading actions. | |
Abstract base class defining the interface for a trading strategy.
Strategies analyze market data and emit trading actions.
| crypto_trader::protocols::Strategy::Strategy | ( | const common::Emit & | emit | ) |
Constructs a Strategy object.
| emit | A function callback used by the strategy to emit actions. |
|
pure virtual |
Destructor for the Strategy interface.
|
pure virtual |
Handles new market data received by the strategy.
| data | The new market data, typically in JSON format. |
Implemented in crypto_trader::strategies::HodlStrategy.
|
protected |
Function to emit trading actions.