Merged
This commit is contained in:
1 parent
34675696f3
commit
03a81280f4
3 files changed
+21
-12
No files matched your search
@@ -474,8 +474,9 @@ void SniperAlgo::on_book(SecurityKey key, const Book& bk) {
|
||||
}
|
||||
|
||||
void SniperAlgo::on_trade_summary_signal(SecurityKey, api::Side /* aggressor */,
|
||||
Price /* min_p */, Price /* max_p */){
|
||||
}
|
||||
Price /* last_price */,
|
||||
Quantity /* last_quantity */)
|
||||
{}
|
||||
|
||||
void SniperAlgo::on_child_change(OrderKey key, const ChildState& st){
|
||||
LOG(OrderMan, Info,
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
|
||||
#include "lib/orderman/orders/algo/IAlgoOrder.h"
|
||||
|
||||
namespace bts {namespace api {namespace orderman{class CustomOrderDefinition;}}}
|
||||
namespace bts {
|
||||
namespace api {
|
||||
namespace orderman {
|
||||
class CustomOrderDefinition;
|
||||
}
|
||||
} // namespace api
|
||||
} // namespace bts
|
||||
|
||||
namespace bts {
|
||||
namespace orderman {
|
||||
@@ -22,7 +28,8 @@ class SniperAlgo : public IAlgoOrder {
|
||||
void do_update(api::orderman::Update const &) override;
|
||||
void on_book(SecurityKey, Book const &) override;
|
||||
void on_trade_summary_signal(SecurityKey, api::Side /* aggressor */,
|
||||
Price /* min_p */, Price /* max_p */) override;
|
||||
Price /* last_price */,
|
||||
Quantity /* last_quantity */) override;
|
||||
void on_child_change(OrderKey, ChildState const &) override;
|
||||
void on_status(SecurityKey, co2::TradingStatus) override;
|
||||
void on_timer() override;
|
||||
@@ -31,14 +38,15 @@ class SniperAlgo : public IAlgoOrder {
|
||||
enum class State;
|
||||
struct PImpl;
|
||||
std::unique_ptr<PImpl> me;
|
||||
private:
|
||||
IAlgoServices& _algo() const ;
|
||||
bool _onetime_setup(IBeforeLaunchAlgoServices& serv,
|
||||
const bts::api::orderman::CustomOrderDefinition& cod);
|
||||
void _compute_polygon_cross_value(SniperPolygon&);
|
||||
void _fire_orders(SecData& sec_data);
|
||||
|
||||
private:
|
||||
IAlgoServices &_algo() const;
|
||||
bool _onetime_setup(IBeforeLaunchAlgoServices &serv,
|
||||
const bts::api::orderman::CustomOrderDefinition &cod);
|
||||
void _compute_polygon_cross_value(SniperPolygon &);
|
||||
void _fire_orders(SecData &sec_data);
|
||||
// acts on md, cognizant of the state
|
||||
void _cxl_and_end (bool is_error, const std::string& err_msg);
|
||||
void _cxl_and_end(bool is_error, const std::string &err_msg);
|
||||
};
|
||||
|
||||
} // namespace orderman
|
||||
|
||||
@@ -13,7 +13,7 @@ struct TradeSummarySignal {
|
||||
security_key sk = invalid_security_key;
|
||||
api::Side aggressor = api::SIDE_UNDEFINED;
|
||||
IntPrice last_price = {} ;
|
||||
size_t last_qty = 0;
|
||||
uint last_qty = 0;
|
||||
};
|
||||
|
||||
class ITradeSummarySignalListener {
|
||||
|
||||
Reference in new issue
Block a user