System对使用前向复权的数据打印警告(未来函数)

This commit is contained in:
fasiondog 2022-02-26 21:49:24 +08:00
parent 66773b5f92
commit a0256f10f1

View File

@ -160,6 +160,10 @@ void System::setTO(const KData& kdata) {
m_src_kdata = m_stock.getKData(no_recover_query);
}
HKU_WARN_IF(
query.recoverType() == KQuery::FORWARD || query.recoverType() == KQuery::EQUAL_FORWARD,
"You are using forward or equal_forward kdata, which is a future function!");
// sg->setTO必须在cn->setTO之前cn会使用到sg防止sg被计算两次
if (m_sg)
m_sg->setTO(kdata); // 传入复权的 KData