misc:genconfig: mute print on meeting unavailable options

Mute the printing on meeting unavailable options since it is
useless and noisy.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
win: add options parser entry for ctp subsystem

1) Add options parser entry for ctp subsystem.
2) Import all options parser handlers using 'from * import *' format.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
regress:tick: add reinit method

1) Add reinit() to reinitialize Tick using a date string.
2) Removed __exit__ () since it is useless.
3) Update test to reinit().

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
futcom: add tempNameSuffix helper method

Add tempNameSuffix() helper method to produce temporary
file name suffix.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:futconfig: add CtpConfig and new methods

1) Add CtpConfig class to access ctp configurations.
2) Rename FutureConfig to TradingConfig.
3) Add getEnabled() and getDatabase() methods for TradingConfig.
4) Add test for #1 and #3.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:ctpParser: add workable ctpParser

Add workable ctpParser module.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
config: add new tradings for test.ini and add ctp.ini

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:ctpParser: fix only executing the first trade

Fix only executing the first trade. Change to start ctp
execution thread in a independent core thread.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
misc:logmgr: add quick-flush support

1) Add support to flush immediately after each write to log file.
2) Change all commentaries to Chinese.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:ctpParser: disable counting the runtime statistics

We only care about the emulation log before the real ctp tradings
heppen, so just disable counting the runtime statistics since they
are useless.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:ctpagent/ctpapi: disable useless printings

Disable useless printings since they broke the Painter
window in terminal.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
regress:emulate: disable useless printings

Disable useless printings since Emulate is also used for CTP
but these printings broke the CTP Painter window in terminal.

Merged zw-dev 3a4e12fb.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
misc:runctrl: remove log interface from RunControl

Since RunControl is only a runtime control unit, and log
management is not the job it should do, remove it.

Merged zw-dev 7a97a0c3.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
strategy:futures: add support to manage logs

1) Add support to store logs to file.
2) Change to enalbe storing logs to file using strategies.

Merged zw-dev 7a97a0c3 and 2b6f9189.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
regress:emulate: fix closing log using runctrl

We should close logMgr using strategy instead of runctrl.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
misc:logmgr: add LogPainter class

LogPainter works to paint logs directly to a window of Painter.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
strategy:futures: display ctp run-time log in a paiter window

Add support to display ctp run-time log in a terminal window.

Merged zw-dev f5b3aaca.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:ctpParser: add monitor to display ctp run-time log

Add monitor to display ctp run-time log for each instrument
in a terminal window.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
strategy:turtle: enable ctp tracing log in moveToNextTick

Display ctp tracing log using a line of Painter window.

Merged zw-dev b78009d2.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp:ctpagent: update initialization for logging

1) Initialize logging baisc for Md and Td together.
2) Rename log file name using standard suffix.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>