2018-08-31 02:50:06 +08:00
|
|
|
// demo.cpp : 定义控制台应用程序的入口点。
|
2018-08-19 16:51:10 +08:00
|
|
|
//
|
|
|
|
|
2018-08-21 01:56:29 +08:00
|
|
|
#include <hikyuu/hikyuu.h>
|
2018-08-19 16:51:10 +08:00
|
|
|
|
|
|
|
using namespace hku;
|
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
2018-08-31 02:50:06 +08:00
|
|
|
//配置文件的位置自行修改
|
2018-08-21 01:56:29 +08:00
|
|
|
hikyuu_init("c:\\stock\\hikyuu_win.ini");
|
|
|
|
|
|
|
|
StockManager& sm = StockManager::instance();
|
|
|
|
|
|
|
|
Stock stk = sm.getStock("sh000001");
|
|
|
|
std::cout << stk << std::endl;
|
2018-08-31 02:50:06 +08:00
|
|
|
|
|
|
|
auto k = stk.getKData(KQuery(-10));
|
|
|
|
std::cout << k << std::endl;
|
|
|
|
|
|
|
|
for (auto i=0; i < k.size(); i++) {
|
|
|
|
std::cout << k[i] << std::endl;
|
|
|
|
}
|
2018-08-19 16:51:10 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|