MCPcopy Create free account

hub / github.com/WesleyDevLab/cheetah / functions

Functions42 in github.com/WesleyDevLab/cheetah

↓ 9 callersFunctionis_working_hour
检查今天是否是交易时间段 :param dt: :return:
utils.py:71
↓ 5 callersFunctionget_conn
()
db.py:20
↓ 3 callersMethodparse
(self, url)
StockBlock.py:38
↓ 2 callersFunctionget_db_file_name
()
db.py:49
↓ 2 callersFunctionis_working_day
检查某天是否是工作日,周一为0 :param dt: :return:
utils.py:59
↓ 2 callersFunctionsave_file
(stock_list)
db.py:53
↓ 1 callersFunctionget_page
(url)
utils.py:87
↓ 1 callersMethodlist_detail
实时获取股票板块详细数据 :param stock_block_type: :return:
StockBlock.py:65
↓ 1 callersFunctionload_file
()
db.py:59
↓ 1 callersFunctionparse_page
(url)
utils.py:93
FunctionMA
(stock_data, timeperiod=30)
stocks.py:29
FunctionMACD
(stock_data, fast_period=12, slow_period=26, signal_period=9)
stocks.py:18
Method__init__
(self)
StockBlock.py:35
Method__init__
(self, feed, instrument)
pyalgo.py:10
Method__init__
(self, feed, instrument, smaPeriod)
strategy/SMACrossOver.py:10
Functiondownload
(url)
common/downloader.py:7
Functionexist
(key)
db.py:35
Functionf
结果四舍五入保留两位小数 :param num: 待格式化数字 :return:
utils.py:9
Functionfilter
(index, day=60)
stocks.py:52
Functionget
(key)
db.py:40
MethodgetSMA
(self)
strategy/SMACrossOver.py:19
Functionget_start_date
获取n天前的日期 now = datetime.now() print now.strftime('%Y-%m-%d') strNow = '2012-01-03' nowDate = time.strptime(strNow, "%Y-%m-%d")
utils.py:19
Functiongolden_cross
(metric_first, metric_second)
stocks.py:36
Methodlist
(self, stock_block_type)
StockBlock.py:80
Functionlist_stock
()
stocks.py:46
Functionload_db
()
db.py:44
MethodonBars
(self, bars)
pyalgo.py:18
MethodonBars
(self, bars)
strategy/SMACrossOver.py:32
MethodonEnterCanceled
(self, position)
strategy/SMACrossOver.py:22
MethodonExitCanceled
(self, position)
strategy/SMACrossOver.py:28
MethodonExitOk
(self, position)
strategy/SMACrossOver.py:25
Methodpreload
()
StockBlock.py:132
Functionrealtime
(symbol)
stocks.py:77
Functionsave
(key, value, expire=DATA_EXPIRED_TIME)
db.py:30
Functionsave_db
(stock_list)
db.py:25
MethodsetUp
(self)
testcases/utils_test.py:8
MethodtearDown
(self)
testcases/utils_test.py:11
Methodtest_get_page
(self)
testcases/utils_test.py:37
Methodtest_is_working_day
(self)
testcases/utils_test.py:33
Methodtest_is_working_hour
(self)
testcases/utils_test.py:14
Functiontick_history
(symbol, date)
stocks.py:85
Functiontick_today
(symbol)
stocks.py:81