补充注释说明

This commit is contained in:
fasiondog 2024-08-15 13:48:06 +08:00
parent d8731c94a0
commit 2008640875
2 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,7 @@
# cp936
from hikyuu import Strategy, Query, Datetime, TimeDelta, Seconds, Minutes
from hikyuu import StockManager
from hikyuu import sm
def on_change(stk, spot):
@ -16,11 +16,11 @@ def on_spot(rev_time):
def my_func():
print("calculate:", Datetime.now())
sm = StockManager.instance()
for s in sm:
print(s)
# 注意每一个Strategy 只能作为独立进程执行,即 python xxx.py 的方式执行!
# 以 Strategy 方式运行示例
if __name__ == '__main__':
s = Strategy(['sh600000', 'sz000001'], [Query.MIN, Query.DAY])

View File

@ -86,8 +86,6 @@ public:
void runDailyAt(std::function<void()>&& func, const TimeDelta& delta,
bool ignoreHoliday = true);
void start();
/**
*
* @note
@ -102,6 +100,11 @@ public:
*/
void onReceivedSpot(std::function<void(const Datetime&)>&& recievedFucn);
/**
*
*/
void start();
private:
string m_name;
string m_config_file;