Slick Trader 0.11.0
Multi-broker algorithmic trading engine with plugin strategies and a live web dashboard
Loading...
Searching...
No Matches
strategy_export.hpp File Reference
#include <slick/logger.hpp>
#include <slick-trader/core/broker_status.hpp>
#include <slick-trader/strategy/istrategy.hpp>
Include dependency graph for strategy_export.hpp:

Go to the source code of this file.

Macros

#define SLICK_TRADER_EXPORT   __attribute__((visibility("default")))
#define SLICK_TRADER_IMPORT
#define SLICK_TRADER_EXPORT_STRATEGY(StrategyClass)

Macro Definition Documentation

◆ SLICK_TRADER_EXPORT

#define SLICK_TRADER_EXPORT   __attribute__((visibility("default")))

Definition at line 11 of file strategy_export.hpp.

◆ SLICK_TRADER_EXPORT_STRATEGY

#define SLICK_TRADER_EXPORT_STRATEGY ( StrategyClass)
Value:
extern "C" { \
SLICK_TRADER_EXPORT uint32_t get_strategy_api_version() { \
} \
return new StrategyClass(); \
} \
SLICK_TRADER_EXPORT void destroy_strategy(slick::trader::IStrategy* strategy) { \
delete strategy; \
} \
SLICK_TRADER_EXPORT const char* get_strategy_name() { \
static StrategyClass instance; \
return instance.name(); \
} \
SLICK_TRADER_EXPORT const char* get_strategy_version() { \
static StrategyClass instance; \
return instance.version(); \
} \
SLICK_TRADER_EXPORT void set_logger_instance(slick::logger::Logger* logger) { \
slick::logger::Logger::set_instance(logger); \
} \
SLICK_TRADER_EXPORT void set_broker_status_registry(slick::trader::BrokerStatusRegistry* registry) { \
slick::trader::BrokerStatusRegistry::set_instance(registry); \
} \
}
virtual const char * name() const =0
constexpr uint32_t STRATEGY_API_VERSION
Definition istrategy.hpp:30
#define SLICK_TRADER_EXPORT

Definition at line 25 of file strategy_export.hpp.

◆ SLICK_TRADER_IMPORT

#define SLICK_TRADER_IMPORT

Definition at line 12 of file strategy_export.hpp.