|
| System () |
|
| System (const string &name) |
|
| System (const TradeManagerPtr &tm, const MoneyManagerPtr &mm, const EnvironmentPtr &ev, const ConditionPtr &cn, const SignalPtr &sg, const StoplossPtr &st, const StoplossPtr &tp, const ProfitGoalPtr &pg, const SlippagePtr &sp, const string &name) |
|
virtual | ~System () |
|
string | name () const |
| 获取名称 更多...
|
|
void | name (const string &name) |
| 设置名称 更多...
|
|
KData | getTO () const |
|
TradeManagerPtr | getTM () const |
|
MoneyManagerPtr | getMM () const |
|
EnvironmentPtr | getEV () const |
|
ConditionPtr | getCN () const |
|
SignalPtr | getSG () const |
|
StoplossPtr | getST () const |
|
StoplossPtr | getTP () const |
|
ProfitGoalPtr | getPG () const |
|
SlippagePtr | getSP () const |
|
void | setTM (const TradeManagerPtr &tm) |
|
void | setMM (const MoneyManagerPtr &mm) |
|
void | setEV (const EnvironmentPtr &ev) |
|
void | setCN (const ConditionPtr &cn) |
|
void | setSG (const SignalPtr &sg) |
|
void | setST (const StoplossPtr &st) |
|
void | setTP (const StoplossPtr &tp) |
|
void | setPG (const ProfitGoalPtr &pg) |
|
void | setSP (const SlippagePtr &sp) |
|
Stock | getStock () const |
|
void | setStock (const Stock &stk) |
|
const TradeRecordList & | getTradeRecordList () const |
|
const TradeRequest & | getBuyTradeRequest () const |
|
const TradeRequest & | getSellTradeRequest () const |
|
const TradeRequest & | getSellShortTradeRequest () const |
|
const TradeRequest & | getBuyShortTradeRequest () const |
|
void | reset (bool with_tm, bool with_ev) |
| 复位 更多...
|
|
SystemPtr | clone (bool with_tm, bool with_ev) |
| 克隆操作,会依次调用所有部件的clone操作 更多...
|
|
void | setTO (const KData &kdata) |
| 设置交易对象 更多...
|
|
void | run (const KQuery &query, bool reset=true) |
|
void | run (const Stock &stock, const KQuery &query, bool reset=true) |
|
void | runMoment (const Datetime &datetime) |
|
void | runMoment (const KRecord &record) |
|
void | clearDelayRequest () |
|
bool | haveDelayRequest () const |
|
bool | readyForRun () |
|
bool | _environmentIsValid (const Datetime &datetime) |
|
bool | _conditionIsValid (const Datetime &datetime) |
|
void | _buyNotifyAll (const TradeRecord &) |
|
void | _sellNotifyAll (const TradeRecord &) |
|
size_t | _getBuyNumber (const Datetime &, price_t price, price_t risk, Part from) |
|
size_t | _getSellNumber (const Datetime &, price_t price, price_t risk, Part from) |
|
size_t | _getSellShortNumber (const Datetime &, price_t price, price_t risk, Part from) |
|
size_t | _getBuyShortNumber (const Datetime &, price_t price, price_t risk, Part from) |
|
price_t | _getStoplossPrice (const Datetime &datetime, price_t price) |
|
price_t | _getShortStoplossPrice (const Datetime &datetime, price_t price) |
|
price_t | _getTakeProfitPrice (const Datetime &datetime) |
|
price_t | _getGoalPrice (const Datetime &datetime, price_t price) |
|
price_t | _getShortGoalPrice (const Datetime &, price_t price) |
|
price_t | _getRealBuyPrice (const Datetime &datetime, price_t planPrice) |
|
price_t | _getRealSellPrice (const Datetime &datetime, price_t planPrice) |
|
void | _buy (const KRecord &today, Part from) |
|
void | _buyNow (const KRecord &today, Part from) |
|
void | _buyDelay (const KRecord &today) |
|
void | _submitBuyRequest (const KRecord &today, Part from) |
|
void | _sell (const KRecord &today, Part from) |
|
void | _sellNow (const KRecord &today, Part from) |
|
void | _sellDelay (const KRecord &today) |
|
void | _submitSellRequest (const KRecord &today, Part from) |
|
void | _sellShort (const KRecord &today, Part from) |
|
void | _sellShortNow (const KRecord &today, Part from) |
|
void | _sellShortDelay (const KRecord &today) |
|
void | _submitSellShortRequest (const KRecord &today, Part from) |
|
void | _buyShort (const KRecord &today, Part from) |
|
void | _buyShortNow (const KRecord &today, Part from) |
|
void | _buyShortDelay (const KRecord &today) |
|
void | _submitBuyShortRequest (const KRecord &today, Part from) |
|
void | _processRequest (const KRecord &today) |
|
void | _runMoment (const KRecord &record) |
|