11 #ifndef ATS_STRATEGY_H
12 #define ATS_STRATEGY_H
82 virtual void buy() = 0;
Contains the declaration of the MarketData class, which handles the streaming of market data for the ...
Contains the declaration of the OrderManager class and related enums and structs.
Handles the streaming of market data for the trading system.
Definition: MarketData.h:54
A class for managing orders.
Definition: OrderManager.h:154
Defines an abstract interface for trading strategies.
Definition: Strategy.h:23
virtual ~Strategy()
Destructs the Strategy object.
Definition: Strategy.cpp:15
std::thread mStrategyThread
Thread for running the strategy.
Definition: Strategy.h:29
virtual void sell()=0
Sends a sell order to the OrderManager.
Strategy(std::string symbol, MarketData &data, OrderManager &orderManager, std::vector< double > prices={})
Constructs a Strategy object.
Definition: Strategy.cpp:10
virtual void stop()
Stops the strategy.
Definition: Strategy.cpp:26
OrderManager & mOrderManager
OrderManager object to create and manage orders.
Definition: Strategy.h:26
virtual void start()
Starts the strategy thread.
Definition: Strategy.cpp:19
virtual double getSignal()=0
Gets the trading signal.
virtual void updatePrice()=0
Updates the historical price vector.
MarketData & mData
MarketData object to get market information.
Definition: Strategy.h:25
virtual void buy()=0
Sends a buy order to the OrderManager.
std::vector< double > mPrices
Vector of historical prices.
Definition: Strategy.h:28
bool mRunning
Flag indicating if the strategy is running.
Definition: Strategy.h:30
bool isRunning()
Returns whether the strategy is running.
Definition: Strategy.cpp:43
virtual void run()
Runs the strategy.
Definition: Strategy.cpp:32
std::string mSymbol
The symbol the strategy is trading.
Definition: Strategy.h:27
Namespace for the algorithmic trading system.
Definition: BinanceExchangeManager.cpp:8