mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-12-02 03:48:19 +08:00
Update IndicatorImp.cpp
修正void IndicatorImp::setContext(const Stock &stock, const KQuery &query)中是否修改Context的判断逻辑,原逻辑为stock或quey有一项没有改动就不修改Context,在遍历时,这个逻辑会导致Context永远为第一个设置的Context
This commit is contained in:
parent
4036c182ef
commit
4b1c4ed0f5
@ -113,7 +113,7 @@ void IndicatorImp::initContext() {
|
||||
|
||||
void IndicatorImp::setContext(const Stock &stock, const KQuery &query) {
|
||||
KData kdata = getContext();
|
||||
if (kdata.getStock() == stock || kdata.getQuery() == query) {
|
||||
if (kdata.getStock() == stock && kdata.getQuery() == query) {
|
||||
if (m_need_calculate) {
|
||||
calculate();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user