hikyuu2/hikyuu_cpp/demo/demo.cpp

26 lines
537 B
C++
Raw Normal View History

2018-08-31 02:50:06 +08:00
// demo.cpp : 定义控制台应用程序的入口点。
//
#include <hikyuu/hikyuu.h>
using namespace hku;
int main(int argc, char* argv[])
{
2018-08-31 02:50:06 +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;
}
return 0;
}