dataMgr:importer/whImporter: reorganize the code structure

1) Remove 'dataFile' and 'dataTable' arguments from __init__(s) and
   change to specify them in class methods instead to extend reusibility.
2) Remove useless setAttrs() because of 1).
3) Change 'partReimportTo()' to 'partReimport()'.
4) Add getRecordField() to return a specified field from a record.
5) Add importFromDir() method to import data records from a directory.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
dataMgr:whImporter: add processRawRecords method

1) Add processRawRecords() which processes raw records before
   calling importFromDir().
2) Correct and remove commentary.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
strategy:turtle: enhance checkings for profit and positions

1) Change self.profit to statistic the current business's profit
   and use self.totalProfit to statistic the whole test.
2) Replace all 'len(self.pList)' with current position to benefit
   reading and sustaining.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
test:test_data: fix test run error.

An error was caused because there was no necessary field required
by Data.highestByDate(), add it.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
strategy:turtle: update atr and some commentaries

1) Remove 'table' argument from atr(). We just want one Turtle object
   to handle only one table in order to keep independent in logics.
2) Update some commentaries.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
dataMgr:importer/whImporter: add support to append records

1) Add support to append records from a datafile to a datatable.
2) Rename getRecordField() to getRecordFieldSepBySpace(), which means
   it only works for the records separated by space.
3) Add getRecordFieldSepByComma() which works for the records separated
   by comma.
4) Rename getRecordTime() and getRecordData() to getDirRecordTime() and
   getDirRecordData() because they should only be used with the records
   in a directory.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
data: set default field for lowestByDate() and highestByDate()

Set default field for lowestByDate() and highestByDate() as 'Close'.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
strategy:turtle: update run() method

Ignores the first 10 days even though some of these days may match
long/short signals.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
strategy:futures/turtle: move position methods to futures

Move position management methods from Turtle to Futures, this benefits
other futures strategy to directly inherit these methods and save code
and time.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
strategy:turtle: add endRun() method.

Add endRun() method which closes all opened positions before stop test.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
display:output: Create the display subsystem

1) Make a display subsystem. This subsystem will contain the
   modules of displaying data in the CML and GUI.
2) Create a output module. Implemented the data display formated
   in CML console. Currently only support give color to bash.
3) Defined a new class COLORS, contain a templete structure and
   the method of add templete.
4) Defined a new class PrintColor, which is the children of COLORS.
   This class could display formated data in the CML console.
5) Write the test for the two classes and their methods.

Signed-off-by: GuofengLiu <lgf612@sina.com>
Merge branch 'winf-dev' of github.com:ruanzhengwang-org/winfuture into gliu-dev
.gitignore: create a git ignore fie

ignore some kind of tmp and module file

Signed-off-by: Guofeng Liu <lgf612@sina.com>