![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
What a run is told, gathered so main states it once and a test can state it differently. More...
#include <live_program.hpp>
Public Attributes | |
| std::vector< atl::InstrumentId > | universe_ |
| The instruments the source polls. | |
| strategy::RiskLimits | limits_ |
| The limits the guard enforces. | |
| runner::PollSchedule | schedule_ |
| How often each kind is polled. trade needs working_orders_ set, shorter than maximum_portfolio_age_: a runner that sends orders keeps them until the listing or holdings account for them, and the loop holds (with a note) while no listing will come. | |
| atl::BarInterval | bar_interval_ {atl::BarInterval::ONE_DAY} |
| Which bars the source asks for, and how many: the history read at start is this many. | |
| int | bar_count_ {100} |
| How many bars each bar poll asks for. | |
| std::chrono::nanoseconds | maximum_portfolio_age_ {std::chrono::minutes(2)} |
| How old a holdings snapshot – and the order listing – may be before the loop stops sizing against it. | |
| std::chrono::nanoseconds | maximum_price_limits_age_ {std::chrono::minutes(20)} |
| How old a price band may be before the loop stops clamping to it. | |
| std::string | journal_path_ |
| Where the order journal lives. | |
| std::string | journal_scope_ |
| Which account the journal belongs to; a journal naming another refuses to open. | |
| std::string | control_file_ |
| The file an operator writes quiesce, withdraw or flatten into to stop the run. | |
| std::size_t | max_iterations_ {0} |
| Iterations before returning; 0 runs until a stop. | |
| std::chrono::nanoseconds | closing_wait_ {std::chrono::seconds(30)} |
| How long a withdraw or flatten may wait for the order list and holdings to account for this runner's own orders before its closing pass; zero is one immediate pass. See runner::PollingLoop::set_closing_wait. | |
| std::chrono::nanoseconds | owed_order_limit_ {std::chrono::minutes(10)} |
| How long an order may stay owed with nobody able to account for it (its outcome unknown and no sweep having found it, or held for an operator) before the run stops placing; zero never stops for one. See runner::PollingLoop::set_owed_order_limit. | |
| atl::Venue | default_route_ {atl::Venue::UNSPECIFIED} |
| The venue an order is sent to, since a strategy's orders name none; UNSPECIFIED takes the broker's own default. Kiwoom has none, so a Kiwoom run must state one. See live::SessionExecutor::default_route. | |
What a run is told, gathered so main states it once and a test can state it differently.
Definition at line 57 of file live_program.hpp.
| int live_program::Settings::bar_count_ {100} |
How many bars each bar poll asks for.
Definition at line 71 of file live_program.hpp.
| atl::BarInterval live_program::Settings::bar_interval_ {atl::BarInterval::ONE_DAY} |
Which bars the source asks for, and how many: the history read at start is this many.
Definition at line 69 of file live_program.hpp.
| std::chrono::nanoseconds live_program::Settings::closing_wait_ {std::chrono::seconds(30)} |
How long a withdraw or flatten may wait for the order list and holdings to account for this runner's own orders before its closing pass; zero is one immediate pass. See runner::PollingLoop::set_closing_wait.
Definition at line 89 of file live_program.hpp.
Referenced by live_program::configure(), and live_program::print_how_to_stop().
| std::string live_program::Settings::control_file_ |
The file an operator writes quiesce, withdraw or flatten into to stop the run.
Definition at line 81 of file live_program.hpp.
Referenced by live_program::configure(), and live_program::print_how_to_stop().
| atl::Venue live_program::Settings::default_route_ {atl::Venue::UNSPECIFIED} |
The venue an order is sent to, since a strategy's orders name none; UNSPECIFIED takes the broker's own default. Kiwoom has none, so a Kiwoom run must state one. See live::SessionExecutor::default_route.
Definition at line 101 of file live_program.hpp.
| std::string live_program::Settings::journal_path_ |
Where the order journal lives.
Definition at line 77 of file live_program.hpp.
| std::string live_program::Settings::journal_scope_ |
Which account the journal belongs to; a journal naming another refuses to open.
Definition at line 79 of file live_program.hpp.
| strategy::RiskLimits live_program::Settings::limits_ |
The limits the guard enforces.
Definition at line 61 of file live_program.hpp.
| std::size_t live_program::Settings::max_iterations_ {0} |
Iterations before returning; 0 runs until a stop.
Definition at line 83 of file live_program.hpp.
| std::chrono::nanoseconds live_program::Settings::maximum_portfolio_age_ {std::chrono::minutes(2)} |
How old a holdings snapshot – and the order listing – may be before the loop stops sizing against it.
Definition at line 73 of file live_program.hpp.
Referenced by live_program::configure().
| std::chrono::nanoseconds live_program::Settings::maximum_price_limits_age_ {std::chrono::minutes(20)} |
How old a price band may be before the loop stops clamping to it.
Definition at line 75 of file live_program.hpp.
Referenced by live_program::configure().
| std::chrono::nanoseconds live_program::Settings::owed_order_limit_ {std::chrono::minutes(10)} |
How long an order may stay owed with nobody able to account for it (its outcome unknown and no sweep having found it, or held for an operator) before the run stops placing; zero never stops for one. See runner::PollingLoop::set_owed_order_limit.
Definition at line 95 of file live_program.hpp.
Referenced by live_program::configure().
| runner::PollSchedule live_program::Settings::schedule_ |
How often each kind is polled. trade needs working_orders_ set, shorter than maximum_portfolio_age_: a runner that sends orders keeps them until the listing or holdings account for them, and the loop holds (with a note) while no listing will come.
Definition at line 67 of file live_program.hpp.
| std::vector<atl::InstrumentId> live_program::Settings::universe_ |
The instruments the source polls.
Definition at line 59 of file live_program.hpp.
Referenced by live_program::load_reference_data().