10 const void* inputs[]);
19#define WU_STRATEGY(strategy) ((WU_Strategy)(strategy))
21#define wu_strategy_update(strategy, inputs) \
22 ((strategy)->update((strategy), (inputs)))
24#define wu_strategy_delete(strategy) do { \
25 if ((strategy)->delete) \
26 (strategy)->delete((WU_Strategy)(strategy)); \
29#define wu_strategy_num_inputs(strategy) ((strategy)->num_inputs)
30#define wu_strategy_input_type(strategy, idx) ((strategy)->input_types[idx])
31#define wu_strategy_num_outputs(strategy) ((strategy)->num_outputs)
32#define wu_strategy_output_symbol(strategy, idx) \
33 ((strategy)->output_symbols[idx])
86}* WU_PairsTradingStrat;
WU_PairsTradingStrat wu_pairs_trading_strat_new(int window, double threshold, double ratio)
Creates a new pairs trading strategy.
WU_CrossOverStrat wu_crossover_strat_new(int short_window, int long_window, double threshold)
WU_CrossOverStrat is a simple crossover strategy that generates buy and sell signals based on the cro...
WU_PairsTradingStrat implements a classic pairs trading strategy that trades the spread between two c...
WU_Signal represents a trading signal generated by a strategy.
WU_Signal * signal_buffer
const WU_DataType * input_types
WU_Side
WU_Side represents the direction of a signal or a trade.
WU_DataType
WU_DataType represents the type of input data, which can be a candle, a trade, or a single value.